- Posts: 286
- Thank you received: 113
Ethercat HAL driver
- CORBETT
- Offline
- Elite Member
-
Less
More
9 years 2 days ago #101017
by CORBETT
Replied by CORBETT on topic Ethercat HAL driver
Dan,
Thanks for getting back with me so quick. I will look through the 2 manuals and see if I can figure more of this out. I have drove myself nuts looking through the internet with several dead ends and wasted time.
Thanks,
Robert
Thanks for getting back with me so quick. I will look through the 2 manuals and see if I can figure more of this out. I have drove myself nuts looking through the internet with several dead ends and wasted time.
Thanks,
Robert
- sqmathlete
- Offline
- Premium Member
-
Less
More
- Posts: 118
- Thank you received: 18
8 years 11 months ago #101142
by sqmathlete
Replied by sqmathlete on topic Ethercat HAL driver
Hi Frank,
I haven't had a lot of time to try anything with the amps but I have been trying to understand the example and your answer fully before I launch into that.
From what I can tell if you define the objects 0x6040 Conrol Word, and 0x6060 Mode as u32 values in your xml, you are able to set the required values for start-up in your hal file (without writing any raw sdo data in your xml file). Keep in mind that the amp is still in the pre-op state when the hal file is read. Which makes sense since it is recommended to download all sdo data (or write parameters?) when the slave is in the pre-op state. Then when linuxcnc starts up, the slave is in the op-state BUT, for example changing modes is not possible since linuxcnc has no way to change state. example set 0x6060 from 0x08 CSP mode to 0x06 Home mode. Which is fine...kinda if you do not want to use the internal homing routine of the servo amps. Roschi see's this early in the development and mention's this around pg 4? of this thread. He? develops the "special32" bit so that linuxCNC can control individual bits in the control word and mode objects, or read 0x6061 mode-op-status as feed back into classic ladder/etc.
The newly developed "complex" variable builds on the complex32 variable but is not limited to 32 bits. Similar to the "complex32", the 'complex" variable breaks out the objects into individual bits which can then be connected to io/motion/classic ladder pins and the resulting combination of bits is then sent back to the amp as an "octet string" i.e. 1 byte at time = 2 hex values satisfying the objects 16 bit "u32" variable requirement and allowing linuxCNC to interact with the objects.
In theory this all seems like this should work and probably does which makes me think that the problem lies in the settings of the amplifier, or there is a slight difference between "proven?" delta asda-a2 and asda-a2-e amplifiers. However, the ASDA-A2-E amps conform to Cia402 standard and should be similar in set-up to Roschi's Stroeber amps. In fact the manuals are very similar...
Or perhaps there is something wrong with my files? Who knows at this point...I will try again when I get a chance.
Kind Regards,
Dan
I haven't had a lot of time to try anything with the amps but I have been trying to understand the example and your answer fully before I launch into that.
This is a point that has been mystifying to me, I will try to explain my meager understanding in the hopes that I will be corrected or that others may learn.Either use halType="u32"
From what I can tell if you define the objects 0x6040 Conrol Word, and 0x6060 Mode as u32 values in your xml, you are able to set the required values for start-up in your hal file (without writing any raw sdo data in your xml file). Keep in mind that the amp is still in the pre-op state when the hal file is read. Which makes sense since it is recommended to download all sdo data (or write parameters?) when the slave is in the pre-op state. Then when linuxcnc starts up, the slave is in the op-state BUT, for example changing modes is not possible since linuxcnc has no way to change state. example set 0x6060 from 0x08 CSP mode to 0x06 Home mode. Which is fine...kinda if you do not want to use the internal homing routine of the servo amps. Roschi see's this early in the development and mention's this around pg 4? of this thread. He? develops the "special32" bit so that linuxCNC can control individual bits in the control word and mode objects, or read 0x6061 mode-op-status as feed back into classic ladder/etc.
or -- if you want bitwise splitting --halType="complex"
The newly developed "complex" variable builds on the complex32 variable but is not limited to 32 bits. Similar to the "complex32", the 'complex" variable breaks out the objects into individual bits which can then be connected to io/motion/classic ladder pins and the resulting combination of bits is then sent back to the amp as an "octet string" i.e. 1 byte at time = 2 hex values satisfying the objects 16 bit "u32" variable requirement and allowing linuxCNC to interact with the objects.
In theory this all seems like this should work and probably does which makes me think that the problem lies in the settings of the amplifier, or there is a slight difference between "proven?" delta asda-a2 and asda-a2-e amplifiers. However, the ASDA-A2-E amps conform to Cia402 standard and should be similar in set-up to Roschi's Stroeber amps. In fact the manuals are very similar...
Or perhaps there is something wrong with my files? Who knows at this point...I will try again when I get a chance.
Kind Regards,
Dan
- sirop
- Offline
- Elite Member
-
Less
More
- Posts: 193
- Thank you received: 57
8 years 11 months ago #101179
by sirop
If you want to interchange between 0x08 CSP mode to 0x06 Home mode, you have to code a state machine component which
changes the op-state to pre-op state and then changes MODE OF OPERATION INDEX 0X6060 to whatever by SDO communication similar to github.com/sirop/MK_sdo_download/blob/master/sdo_download.comp .
Replied by sirop on topic Ethercat HAL driver
sqmathlete wrote: Hi Frank,
Then when linuxcnc starts up, the slave is in the op-state BUT, for example changing modes is not possible since linuxcnc has no way to change state. example set 0x6060 from 0x08 CSP mode to 0x06 Home mode.
Dan
If you want to interchange between 0x08 CSP mode to 0x06 Home mode, you have to code a state machine component which
changes the op-state to pre-op state and then changes MODE OF OPERATION INDEX 0X6060 to whatever by SDO communication similar to github.com/sirop/MK_sdo_download/blob/master/sdo_download.comp .
- chimeno
- Offline
- Elite Member
-
Less
More
- Posts: 295
- Thank you received: 125
8 years 11 months ago #101305
by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hello everyone, if you can help me, I just installed linuxcnc -stretch-uspace-i386-r9, install igh-ethercat with generic driver, install linuxcnc-ethercat, add to the file realtime.mk, line 27 "-L / opt / etherlab / bin / "make..ok. start linuxcnc and give me error "lcec: dlopen: libeethercat.so.1: can not open shared object file: no such file or directory ...
any ideas?
Thank you
any ideas?
Thank you
- chimeno
- Offline
- Elite Member
-
Less
More
- Posts: 295
- Thank you received: 125
8 years 11 months ago #101539
by chimeno
Replied by chimeno on topic Ethercat HAL driver
good morning,
Can linuxcnc-ethercat work with the linuxcnc -stretch-uspace-i386-r9 version, does anyone work well? I have problems executing it.
Thank you
Can linuxcnc-ethercat work with the linuxcnc -stretch-uspace-i386-r9 version, does anyone work well? I have problems executing it.
Thank you
- sirop
- Offline
- Elite Member
-
Less
More
- Posts: 193
- Thank you received: 57
8 years 11 months ago #101588
by sirop
Replied by sirop on topic Ethercat HAL driver
Sure that -lethercat is in /opt/etherlab/bin/ ?
The following user(s) said Thank You: chimeno
Time to create page: 0.213 seconds