- Posts: 118
- Thank you received: 18
Ethercat HAL driver
- sqmathlete
- Offline
- Premium Member
-
Less
More
9 years 2 months ago #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
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
- sirop
- Offline
- Elite Member
-
Less
More
- Posts: 193
- Thank you received: 57
9 years 2 months ago - 9 years 2 months ago #97420
by sirop
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.
Replied by sirop on topic Ethercat HAL driver
sqmathlete wrote: 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: 9 years 2 months ago by sirop. Reason: typo
- sqmathlete
- Offline
- Premium Member
-
Less
More
- Posts: 118
- Thank you received: 18
9 years 2 months ago #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.
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.
- sirop
- Offline
- Elite Member
-
Less
More
- Posts: 193
- Thank you received: 57
9 years 2 months ago #97425
by sirop
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:
Replied by sirop on topic Ethercat HAL driver
sqmathlete wrote: "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:
Code:
loadusr -W lcec_conf ethercat-conf.xml
loadrt lcec
- sqmathlete
- Offline
- Premium Member
-
Less
More
- Posts: 118
- Thank you received: 18
9 years 2 months ago #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.
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
- sqmathlete
- Offline
- Premium Member
-
Less
More
- Posts: 118
- Thank you received: 18
9 years 2 months ago #97431
by sqmathlete
Replied by sqmathlete on topic Ethercat HAL driver
00 = offset?
Time to create page: 0.451 seconds