Ethercat HAL driver

More
10 Aug 2017 15:17 #97298 by plopes9000
Replied by plopes9000 on topic Ethercat HAL driver
What puzzles me is how could this github.com/sittner/linuxcnc-ethercat/blo.../ethercat-conf_X.xml have ever worked ... I can only assume that the backup parameter was used to store the canopen slaves configuration so that it's available at preop just after boot, hence caught in the igh ethercat initial bus scan. But I did try the backup parameter without success - though I'm not sure I did it properly . . .

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

More
10 Aug 2017 15:24 #97299 by sirop
Replied by sirop on topic Ethercat HAL driver
You can also do
ethercat rescan
after the first (unsuccessful) launch.

BTW, last time I tied to use OCTET_STRING from cmd, I did not really succeed:
lists.etherlab.org/pipermail/etherlab-users/2016/003094.html .

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

More
10 Aug 2017 15:41 #97301 by plopes9000
Replied by plopes9000 on topic Ethercat HAL driver
The goal is to be able to boot the pc and launch linuxcnc without manual steps.

Thanks Boris. I will keep trying when I'm back home.

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

More
13 Aug 2017 20:05 #97415 by sqmathlete
Replied by sqmathlete on topic Ethercat HAL driver
Hi Sirop,

I dug deeper as you suggested into the AKD example. Ran the bash example code and managed to output ethercat cstruct. (I have attached the file) As you can see there is some info at the top enabling the syncManagers which makes sense because I see the amplifier (Delta ASDA-A2E)

File Attachment:

File Name: ecat-comma...-xml.txt
File Size:2 KB

File Attachment:

File Name: ecat-comma...-xml.txt
File Size:2 KB
in the preop state in LinuxCNC and cannot make it switch states or interact with it at all. :(

Q1. Is the file outputted by the cstruct command the "glue module" referred to here?
wiki.linuxcnc.org/cgi-bin/wiki.pl?Etherlab.

Q2. Does this info also need to be included in the xml file and if so how would it be parsed?

Q3. To all. Show of hands how many people have a working machine? Working on a bench?
Attachments:

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

More
13 Aug 2017 20:30 #97417 by sqmathlete
Replied by sqmathlete on topic Ethercat HAL driver
Hi Naragon,

Not sure if you posted these files somewhere but I am having a similar issue intializing the amplifiers. Are you using Delta ASDA-A2E amps?

Kind Regards,

Dan

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

More
13 Aug 2017 20:59 - 13 Aug 2017 21:00 #97420 by sirop
Replied by sirop on topic Ethercat HAL driver

Hi Sirop,


Q1. Is the file outputted by the cstruct command the "glue module" referred to here?
wiki.linuxcnc.org/cgi-bin/wiki.pl?Etherlab.

Q2. Does this info also need to be included in the xml file and if so how would it be parsed?


You can go the way described in wiki.linuxcnc.org/cgi-bin/wiki.pl?Etherlab , that would mean that you code your own EtherCAT component.

Or you use linuxcnc-ethercat which you need an XML description file for. Its format is different from the output of ethercat xml,
but the the information it contains is more or less the same.

I doubt that you can simply switch to operational phase by the means of etherlab cmd tool. But you can probably use sdo commands like ethercat download/upload to read and write values already in the PREOP phase.
Last edit: 13 Aug 2017 21:00 by sirop. Reason: typo

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

More
13 Aug 2017 21:49 #97423 by sqmathlete
Replied by sqmathlete on topic Ethercat HAL driver
"Or you use linuxcnc-ethercat which you need an XML description file for. Its format is different from the output of ethercat xml, but the the information it contains is more or less the same"

Can you expand a bit more on this? Where would one find/put this second xml file? I have a configuration of beckhoff input/output terminals and don't see anything in my notes about having this second xml file.

and yes, commands like ethercat upload/download seem to read and write values in the PREOP phase through the terminal.

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

More
13 Aug 2017 22:15 #97425 by sirop
Replied by sirop on topic Ethercat HAL driver

"Or you use linuxcnc-ethercat which you need an XML description file for. Its format is different from the output of ethercat xml, but the the information it contains is more or less the same"

Can you expand a bit more on this? Where would one find/put this second xml file? I have a configuration of beckhoff input/output terminals and don't see anything in my notes about having this second xml file.


I just wanted to say that the format of, for instance, github.com/sittner/linuxcnc-ethercat/blo...ex/ethercat-conf.xml is different from the output of ethercat xml, but the information is in both cases almost the same.
It describes your EtherCAT configuration ( of every slave involved).

In your HAL script you do then:
loadusr -W lcec_conf  ethercat-conf.xml
loadrt lcec

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

More
14 Aug 2017 00:14 #97430 by sqmathlete
Replied by sqmathlete on topic Ethercat HAL driver
Okay, that makes more sense. Another question, in sittners example github.com/sittner/linuxcnc-ethercat/blo.../ethercat-conf_X.xml line 76-77 the SDO data the control word 6040 is reversed. Is this because of this infosys.beckhoff.com/english.php?content...mServiceData.htm&id=

That is, in a client > server download request the bytes 0-3 of user data is indexed from the LSB but data object 4 is indexed from the MSB?

For example the default PDO mapping (as seen in Twincat )of the Delta ASDA-A2E amps is as follows
1st RxPDO 0x1600

0x6040:00 size =2 offs = 0.0 Control word
0x607A:00 size=4 offs = 2.0 Target Position
0x60FF:00 size =4 offs = 6.0 Target Velocity
0x6071:00 size=2 offs = 10 Target Torque
0x6060:00 size=1 offs=12 Mode of Operation

To write the SDO data for 6040 control word like sittners example would be and following the beckhoff example for client-.server download request
line 75
<sdoDataRaw "40 60 00 02 00 80 00" />
which, if I understand correctly breaks down to
40 60 = index1 msb first, since index 0 = pdo index 0x1600
00 = sub index,
02 = data size (16bits),
00 80 = value
00 = ????

I still can't seem to get the amp to come in to the OP state. Guessing that there is something in the inintial sdo set up that I am missing.
The following user(s) said Thank You: Nico2017

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

More
14 Aug 2017 00:21 #97431 by sqmathlete
Replied by sqmathlete on topic Ethercat HAL driver
00 = offset?

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

Time to create page: 0.192 seconds
Powered by Kunena Forum