Ethercat HAL driver
- marcin2458
- Offline
- New Member
- Posts: 10
- Thank you received: 1
Thank you for responding so quickly.
I have improved the pid configuration.
The shaft started to spin, one pin was missing 'net v-vel-cmd=> axis.0.0.join-vel-cmd'. But to the same signal is assigned x-pid.output pin. When it assigns both pins to the same signal, the information pops up when the program is opened that the second pin cannot be assigned to the same signal. When for x-pid.output I change the name of the PID signal just doesn't work so the motor shaft is quite "soft" enough that I can shake it with my hand. When I assign it to x-vel-cmd signal, PID works as it should but the shaft does not rotate. Someone may have some idea how to solve this problem, maybe some examples of writing in the hall?
Regards,
Marcin
Please Log in or Create an account to join the conversation.
I am trying to summarize the general philosophy to get a device with EtherCAT capability to work with the EtherCAT driver then linuxcnc-ethercat.
As far as I understand it, the device manufacturer can provide an ESI file (EtherCAT slave information, using xml formatting). Not sure at this stage if this file can contain some default communication feature.
Then with the firmware of the manufacturer you can set up the EtherCAT communication of the device: which information is exchanged, what frequency and so on. For instance that would be Indraworks for Bosch Rexroth. Once done we should be able to generate an ENI file (EtherCAT network information) which describes the bus topology and all the information exchanged.
This configuration can be amended/tested with the EtherCAT configurator or TwinCAT.
Another file is then created, based on the ENI file, WITH a xml format. It should be created manually to fit the format for the .xml file used in linuxcnc etherCAT module based on the ENI file. This step is described in the nice .pdf tutorial by @roschi: docs.google.com/document/d/1GiB065ZIAaoM...GQl2X9DM9-THNM/edit#
I understand all the parameters transformation but not parameter 2:
Then grab the Information of the NC-cycle time
here it is A00F → 0x0FA0 = 4000 and multiply by 1000; Or choose another number which fix to the needs (Parameter 2)
I do not really get the A00F transformation to 0x0FA0. I get that 0FA0 in hex gives 4000 in decimal.
At this stage I might need to implement a Eurotherm temperature controller (mini 8) and an ABB drive with EtherCAT for a specific project. So as I have not seen any of those devices being used like that on this forum topic, I wanted to be sure I got it right in theory before digging in the more technical aspects.
Thank you,
Nicolas
Please Log in or Create an account to join the conversation.
You do what I can! I'm glad you start the engine, I just didn't understand very well? surely only the PID configured with more margin would have to work without problems.
Hi Nico,
in theory, the configuration of any ethercat device is quite easy, if you are using TWINCAT, the values you have, you have to invert them every two bits example
TWINCAT parameter "A00F00F0A0" = "A0 0F 00 F0 A0" invert.
Parameter Linuxcnc-ethercat "0A F0 00 0F A0
When the parameters are very long, it is best to make a capture with WIRESHARK, you activate it at the same time as the configuration in TWINCAT and you can see the exact values in format for linuxcnc-ethercat.
I create my own .XML configuration files only with the parameters that I want to change, since any configuration problem creates many problems.
I don't know if I could help you a lot.
Regards
Chimeno
Please Log in or Create an account to join the conversation.
I have attached a new EL9576 controller, for you players!
regards
Chimeno
Please Log in or Create an account to join the conversation.
thanks @chimeno for your answer. Although just to be sure:
Did you mean: Parameter Linuxcnc-ethercat "0A F0 00 0F 0A" the last one being different?TWINCAT parameter "A00F00F0A0" = "A0 0F 00 F0 A0" invert.
Parameter Linuxcnc-ethercat "0A F0 00 0F A0
So if I got any device EtherCAT capable and its ESI file, I should be able to work out the associated .xml file for linuxcnc-etherCAT. Is that it?
Thank you,
Nicolas
Please Log in or Create an account to join the conversation.
TWINCAT parameter "A00F00F0A0" = "A0 0F 00 F0 A0" inverted.
Parameter Linuxcnc-ethercat "A0 F0 00 0F A0
If you can configure any device in the attached .xml file.
for example
EL5152
"set up
80n0: 03 Enable up / down
counter [} 128]
Enablement of the up / down counter in place of the encoder with the bit set.
BOOLEAN RW 0x00 (0dec) "
<? xml version = "1.0" encoding = "ISO-8859-1"?>
<EtherCATMailbox><CoE> <InitCmds>
<InitCmd>
<Transition> PS </Transition>
<Comment> <! [CDATA [Max current]]> </Comment>
<Timeout> 0 </Timeout>
<Ccs> 1 </Ccs>
<Index> 32768 </Index>
<SubIndex> 3 </SubIndex>
<Data> 0x01 </Data>
</InitCmd>
</InitCmds></SoE> </EtherCATMailbox>
it helps you?
Regards
Chimeno
Please Log in or Create an account to join the conversation.
just to be sure on what you just explained:
The way I see it is, you keep the first and last A0 and you just reverse two by two the other pairs of characters. The example might be confusing as the characters in between the A0 form a palindrome (symetry if you reverse it).TWINCAT parameter "A00F00F0A0" = "A0 0F 00 F0 A0" inverted.
Parameter Linuxcnc-ethercat "A0 F0 00 0F A0"
Just another thing to be sure we are on the same page for the way I am using etherCAT with linuxcnc. What I do in my hal file is:
loadusr -W lcec_conf param-ethercat-v1.xml
addf lcec.read-all ethercat-thread-fp
addf lcec.write-all ethercat-thread-fp
So I just want to be able to understand and extract information on a ESI file to be able to implement it into the param-ethercat-v1.xml file used by linuxcnc-ethercat, for instance:
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="4">
<slave idx="0" type="EK1100"/>
<slave idx="1" type="EL1008"/>
<slave idx="2" type="EL1008"/>
<slave idx="3" type="..."/>
</master>
</masters>
Thanks for your help,
Nicolas
Please Log in or Create an account to join the conversation.
TWINCAT parameter "A0E0F0" = "A0 0E F0"
Parameter Linuxcnc-ethercat "F0 0E A0"
with the slave idx = 3 a non-Beckhoff device and the driver is not in the linuxcnc-ethercat list, you have two options to create or finalize the generic
example :
<! - EL6751 CANopen slave ->
<slave idx = "8" type = "generic" vid = "00000002" pid = "1a5f3052" configPdos = "true">
<sdoConfig idx = "f800" subIdx = "complete">
<sdoDataRaw data = "0A 00 05 02 80 00 1E 00" />
<sdoDataRaw data = "01 00 12 80 64 00" />
</ sdoConfig>
<sdoConfig idx = "8000" subIdx = "complete">
<sdoDataRaw data = "2B 00 05 00 00 00 00 00" />
<sdoDataRaw data = "00 00 00 00 00 00 00 00" />
<sdoDataRaw data = "00 00 00 00 05 04 00 00" />
<sdoDataRaw data = "02 00 00 00 5F 1A 00 00" />
<sdoDataRaw data = "00 00 00 00 00 00 00 00" />
<sdoDataRaw data = "00 00 00 00 00 00 00 00" />
<sdoDataRaw data = "00 00 02 00 64 00 03 00" />
<sdoDataRaw data = "00 00 00 00 01 01 00 00" />
<sdoDataRaw data = "0A 00" />
</ sdoConfig>
<sdoConfig idx = "8001" subIdx = "complete">
<sdoDataRaw data = "01 00 01 00 00 00 FF 08" />
<sdoDataRaw data = "85 01 00 00 00 00 00 18" />
</ sdoConfig>
<sdoConfig idx = "8002" subIdx = "complete">
<sdoDataRaw data = "01 00 00 00 00 00 FF 08" />
<sdoDataRaw data = "05 02 00 00 00 00 00 14" />
</ sdoConfig>
<syncManager idx = "0" dir = "out">
</ syncManager>
<syncManager idx = "1" dir = "in">
</ syncManager>
<syncManager idx = "2" dir = "out">
<pdo idx = "1600">
<! - Byte 0 ->
<pdoEntry idx = "7000" subIdx = "01" bitLen = "1" halPin = "eps-tog-out" halType = "bit" />
<pdoEntry idx = "7000" subIdx = "02" bitLen = "1" halPin = "emc-on" halType = "bit" />
<pdoEntry idx = "7000" subIdx = "03" bitLen = "1" halPin = "emc-auto" halType = "bit" />
<pdoEntry idx = "7000" subIdx = "04" bitLen = "1" halPin = "eps request" halType = "bit" />
<pdoEntry idx = "7000" subIdx = "05" bitLen = "1" halPin = "eps- unload" halType = "bit" />
<pdoEntry idx = "7000" subIdx = "06" bitLen = "1" halPin = "out-nc0.5" halType = "bit" />
<pdoEntry idx = "7000" subIdx = "07" bitLen = "1" halPin = "eps-vc-rdy" halType = "bit" />
<pdoEntry idx = "7000" subIdx = "08" bitLen = "1" halPin = "out-nc0.7" halType = "bit" />
Regards
Chimeno
Please Log in or Create an account to join the conversation.
www.trinamic.com/support/eval-kits/details/tmc8461-eval/
Please Log in or Create an account to join the conversation.
it is not difficult, just a little complicated, you can do it in two ways, one is to use the generic complex or if you know something to program add to the linuxcnc-ethercat list, you will have to do many tests,
greetings
Chimeno
Please Log in or Create an account to join the conversation.