Beckhoff ethercat 64 with bit linuxcnc, How to install.

More
10 Dec 2022 22:14 #259143 by rodw
What IO module?
If its not beckhof, you need to make a custom xml file.
With just the io module connected type
ethercat slaves -v
ethercat pdos

You will have all the info to build a xml file similar to  slave1 here
github.com/rodw-au/linuxcnc-cia402/blob/...ercat-conf-diewu.xml

Please Log in or Create an account to join the conversation.

More
12 Dec 2022 10:42 #259249 by akg1904
So I am trying to get a Weidmuller UR20-FBC-EC IO module integrated.

I tried my best to make the xml file.
I had a few doubts though...

On line 6 what are these responsible for:
appTimePeriod="1000000"
refClockSyncCycles="1"

On line 7 what are these responsible for:
type="generic"
configPdos="false"

On line 8 what are these responsible for:
assignActivate="300"
sync0Cycle="*1"
sync0Shift="0"

I have also attached the xml file with this post.
At the end of the file there are 3 commented out sections that have the response to:

ethercat slaves -v
ethercat pdos
ethercat sdos

Not sure if that is any help or not but just thought maybe the extra information may be useful. Please ignore it if it's useless.

File Attachment:

File Name: wm-io.xml
File Size:47 KB


Now I do have another question. After this custom xml file is generated, how do I go about integrating it with linuxcnc?

Thanks again for you help :)
Attachments:

Please Log in or Create an account to join the conversation.

More
12 Dec 2022 11:42 - 12 Dec 2022 11:44 #259250 by rodw
LINE 6 = servo thread length. must agree
LINE 7 generic. because it does not have built in support so you are creating a generic slave
LINE 8 I just accepted.
halpin = the name you wil call this as a pin in linuxcnc so it cannot have spaces
vid and pid are as in your slaves -v
  vid = Vendor Id:       0x00000230
  pid = Product code:    0x4f911c30

Probably other errors that i am not familiar with  but a good start.
Last edit: 12 Dec 2022 11:44 by rodw.

Please Log in or Create an account to join the conversation.

More
12 Dec 2022 14:46 #259255 by akg1904
Thanks you for that prompt response, I appreciate your effort.

I've attached the xml rectifying the hal pin spaces and updated the PID and VID.

File Attachment:

File Name: wm-io_2022-12-12.xml
File Size:47 KB


Can you point me to any resource on how to integrate this xml file into Linuxcnc so that it reflects in the HAL configuration window?

Right now its just kinda sitting in my config folder...
Attachments:

Please Log in or Create an account to join the conversation.

More
12 Dec 2022 17:36 #259260 by rodw
I can't help any further except to say configpdos should be true (I think) 
If you ignore the cia402 stuff, this example shows how to load from your halfile
github.com/rodw-au/linuxcnc-cia402/blob/main/cia402.hal
The  sticky at the end shows how to use halcmd to do basic testing.
Expect errors so do at the command line so yo see them..
The following user(s) said Thank You: akg1904

Please Log in or Create an account to join the conversation.

More
14 Dec 2022 08:11 #259432 by akg1904
Hi Rodw,

Thank you for your input, it helped me a lot in figuring out the problems, I followed the link you shared and then circled back to an old post of yours and realised linuxcnc-uspace-dev hadn't been installed as well. Super embarassing but I finally managed to get lcec to show in the hal configuration.

So, once again thanks for the help.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
22 Feb 2024 19:14 #294011 by johntrevick
Hi,
I'm trying to get a module working that is not already supported and I hope someone can help me.  I followed the instructions on the first page of this thread as best I could.  

First I was trying to get an EL3068 8 port analog card working and it was successful.  I'm using it to read some potentiometers. 

Now I'm trying to get an EL5102 module working and I thought this would be the easier one since the EL5101 is already supported. After following the process linuxcnc doesn't complain about it being in my hal file but the module doesn't leave preop stage.

I copied the EL5101.h and EL5101.c files to lcec_El5102.h and .c
modified them to substitute 5101 to 5102 and changed the ProductCode field (from ethercat xml -p7)
I didn't try adding the second channel in the .c file.  I looked but how to do it wasn't obvious.
did make clean and then make
cp lcec.so ../../linuxcnc-dev/rtlib/
sudo cp lcec_conf /usr/bin/
cp lcec_conf ../../linuxcnc/configs/wedm/

ethercat slaves gives: (with linuxcnc started)
 0  0:0   OP     +  EK1100 EtherCAT-Koppler (2A E-Bus)
 1  0:1   OP     +  EL1809 16K. Dig. Eingang 24V, 3ms
 2  0:2   OP     +  EL2008 8K. Dig. Ausgang 24V, 0.5A
 3  0:3   OP     +  EL3068 8K. Ana. Eingang 0-10V
 4  0:4   OP     +  EK1100 EtherCAT-Koppler (2A E-Bus)
 5  0:5   OP     +  EL1008 8K. Dig. Eingang 24V, 3ms
 6  0:6   OP     +  EL2008 8K. Dig. Ausgang 24V, 0.5A
 7  0:7   PREOP  +  EL5102 2Ch. Inc. Encoder 5V (RS422,TTL)
 8  0:8   OP     +  EL7342 2K. DC-Motor-Endstufe (50V, 3.5A)
 9  0:9   OP     +  DVS_ETHCAT_v1.004
10  0:10  OP     +  DVS_ETHCAT_v1.004

if I set ethercat debug 1 and look at dmesg I see it checking the time offset when starting up but later it just skips over it when going through each device.
[...]
[186186.355310] EtherCAT DEBUG 0-4: Checking system time offset.
[186186.375331] EtherCAT DEBUG 0-4: DC 64 bit system time offset calculation: system_time=761845177497583898 (corrected with 20000000), app_time=761845177496618367, diff=-965531
[186186.375339] EtherCAT DEBUG 0-4: Not touching time offset.
[186186.395306] EtherCAT DEBUG 0-7: Checking system time offset.
[186186.415328] EtherCAT DEBUG 0-7: DC 64 bit system time offset calculation: system_time=761845177537569111 (corrected with 20000000), app_time=761845177536577318, diff=-991793
[186186.415336] EtherCAT DEBUG 0-7: Not touching time offset.
[186186.435301] EtherCAT DEBUG 0-8: Checking system time offset.
[186186.455318] EtherCAT DEBUG 0-8: DC 64 bit system time offset calculation: system_time=761845177577586331 (corrected with 20000000), app_time=761845177576580029, diff=-1006302
[186186.455327] EtherCAT DEBUG 0-8: Setting time offset to 761658983053803698 (was 761658983054810000)
[...]
[186186.860091] EtherCAT DEBUG 0-6: Now in SAFEOP.
[186186.862084] EtherCAT DEBUG 0-6: Now in OP. Finished configuration.
[186186.895348] EtherCAT DEBUG 0-8: Changing state from PREOP to OP.
[186186.895356] EtherCAT DEBUG 0-8: Configuring...
[186186.898094] EtherCAT DEBUG 0-8: Now in INIT.


ethercat slaves -v gives:
=== Master 0, Slave 7 ===
Device: Main
State: PREOP
Flag: +
Identity:
  Vendor Id:       0x00000002
  Product code:    0x13ee3052
  Revision number: 0x00100000
  Serial number:   0x00000000
DL information:
  FMMU bit operation: no
  Distributed clocks: yes, 64 bit
  DC system time transmission delay: 1880 ns
Port  Type  Link  Loop    Signal  NextSlave  RxTime [ns]  Diff [ns]   NextDc [ns]
   0  EBUS  up    open    yes             6   3045771182           0         145
   1  EBUS  up    open    yes             8   3045771492         310         155
   2  N/A   down  closed  no              -            -           -           -
   3  N/A   down  closed  no              -            -           -           -
Mailboxes:
  Bootstrap RX: 0x1000/244, TX: 0x10f4/244
  Standard  RX: 0x1000/128, TX: 0x1100/128
  Supported protocols: CoE, FoE
General:
  Group: Measuring
  Image name: 
  Order number: EL5102
  Device name: EL5102 2Ch. Inc. Encoder 5V (RS422,TTL)
  CoE details:
    Enable SDO: yes
    Enable SDO Info: yes
    Enable PDO Assign: yes
    Enable PDO Configuration: no
    Enable Upload at startup: no
    Enable SDO complete access: yes
  Flags:
    Enable SafeOp: no
    Enable notLRW: no
  Current consumption: 210 mA
  
  
  
uname -a
Linux Charmilles 4.19.71-rt24-v7l+ #1 SMP PREEMPT RT Fri Jan 1 21:15:16 GMT 2021 armv7l GNU/Linux

LINUXCNC - 2.8.4

This is a raspberry PI and built following instructions from MetalMusings
forum.linuxcnc.org/ethercat/42048-notes-...at-on-raspberry-pi-4

I'm sure I did a bunch of other stuff after following his instructions but I didn't document exactly what I was doing and don't quite remember.  However, apart from this card it is mostly working.  I/O is working and my ethercat drives are moving are moving the servo motors.  I have a separate issue related to a belt reduction but that should probably be in another thread.
 

Please Log in or Create an account to join the conversation.

More
22 Feb 2024 23:00 #294026 by rodw
I think you are out of date here
The Pi4 is supported on the LInuxcnc Downloads page.
The image includes the current repository for ethercat
Follow these steps forum.linuxcnc.org/ethercat/45336-etherc...-how-to-step-by-step
There has been a lot of work in recent months. You hardware could be supported now. If not ask, it might get supported.
forum.linuxcnc.org/ethercat/51187-new-li...cat-git-tree?start=0
 

Please Log in or Create an account to join the conversation.

More
23 Feb 2024 01:37 #294042 by johntrevick
yes I'm not at the most recent version, thank you for your quick reply.

I have upgraded to the more recent ethercat library as mentioned in New LinuxCNC-Ethercat git tree .
My devices folder is under linuxcnc-ethercat/src/devices and I didn't have to do the part where I added the device to lcec.config.c & lcec.config.h files

I guess I will try rebuilding from scratch but overall it is working with just this one module EL5102 not supported. The other unsupported module EL3068 I was able to get working and my other common i/o modules work so the ethercat part is working.

Please Log in or Create an account to join the conversation.

More
23 Feb 2024 01:55 #294043 by rodw
If possible, it would be good if you could do a pull request to Scotts repo to add your drivers. MAybe ask on the other thread

Please Log in or Create an account to join the conversation.

Time to create page: 0.260 seconds
Powered by Kunena Forum