- Posts: 87
- Thank you received: 0
Ethercat HAL driver
- plopes9000
- Offline
- Premium Member
-
Please Log in to join the conversation.
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 to join the conversation.
- plopes9000
- Offline
- Premium Member
-
- Posts: 87
- Thank you received: 0
Thanks Boris. I will keep trying when I'm back home.
Please Log in to join the conversation.
- sqmathlete
- Offline
- Premium Member
-
- Posts: 118
- Thank you received: 0
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)
Attachment not found
Attachment not found
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?
Please Log in to join the conversation.
- sqmathlete
- Offline
- Premium Member
-
- Posts: 118
- Thank you received: 0
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 to join the conversation.
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.
Please Log in to join the conversation.
- sqmathlete
- Offline
- Premium Member
-
- Posts: 118
- Thank you received: 0
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 to join the conversation.
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:
Please Log in to join the conversation.
- sqmathlete
- Offline
- Premium Member
-
- Posts: 118
- Thank you received: 0
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.
Please Log in to join the conversation.
- sqmathlete
- Offline
- Premium Member
-
- Posts: 118
- Thank you received: 0
Please Log in to join the conversation.
