- Posts: 193
- Thank you received: 0
Ethercat HAL driver
k-1 wrote:
what do you mean by that? processes that come from the master (ex. plc -> external to Lcnc) or processes that come from Lcnc itself? Those should synchronize with a normal file hal ... or in the case of motion data with the kinematic ... Iunderstand badly?
regards
Giorgio
Any process data between the master and its slave is synced by the means of EtherCAT.
Interesting is what happens within the slave: the EtherCAT network can be synced within under 1us, but a typical Linuxcnc installation
would have a latency of at least 10 us nowadays, wouldn't it?
Suppose you run the EtherCAT network at 500 us cycle time, then your EtherCAT LinuxCNC slave might need to run its internal HAL processes at 250 us cycle time in order to cope with the higher latency of LinuxCNC software.
Please Log in to join the conversation.
If so, I should only create an rt component to communicate with the board, fixing what you can read or write.
What do you think about it?
regards
Giorgio
Please Log in to join the conversation.
k-1 wrote: If so, I should only create an rt component to communicate with the board, fixing what you can read or write.
What do you think about it?
regards
Giorgio
I have not yet looked through the SDks of these EtherCAT PCIE cards.
What's there solution? Some kind of double buffer?
Is IO for such a card managed through polling or is it event driven?
Please Log in to join the conversation.
sirop wrote: 1) What's there solution? Some kind of double buffer?
2) Is IO for such a card managed through polling or is it event driven?
1) these is my solution for syncronisation problem ...
2) not read the drive of card yet ... I think download and read it in these days. My choice was made solely on the basis of support for the kernel rt-preemt linux or not. In fact there are 5/6 slave ethercat cards reported on the beckhoff site, but there are at least another 5/6 manufacturers ... 2/3 at least they are based on anybus ... others have a fcpa and the ET1100 chip ... not all they have linux support, so I chose the ones who have the best support ... (eds would otherwise be better but the only card cost is very high like a cheap industrial pc) ... just i read drive of those I choose will give you more information.
My intention of slaves uses is not for controlling drive, but for a sort of nml over ethercat instead over ethernet ... and having never programmed an fgpa, I want to get out of this unknown.
Any how my interest to these type of slaves card is because connecting Lcnc ethercat master into a ethercat network with a plc as master maybe not so simple operation ... I read that not all plc master product is compatible with these type of operation and sometimes one of the masters is not seen by the master "commander" (plc) ... so I do not want to find it in this situation. This "problem" is known for some famous brands of plc ...
Please Log in to join the conversation.
- sqmathlete
- Offline
- Premium Member
-
- Posts: 118
- Thank you received: 0
I am still having a problem getting my delta asda-a2e amps out of the pre-op state :S
Attachment not found
Attachment not found
Attachment not found
Attachment not found
Attachment not found
Attachment not found
The other configuration uses an xml file with the status word and control word as u32 values. In this scenario the amp will often start up in the op state, then through halcmd I can set the values accordingly and the amp turns on the amp no problem. Home the axis and linuxcnc will run a program.
Hoping that someone can enlighten me, I'm just not sure what I am missing. Why does the one config come up in the op-state and the bitwise lathe does not.
Note: often it is difficult to shutdown linuxcnc and then start it up again and have the amp come on in the op state. Usually I have to shut everything off and restart to get the link up consistent if at all.
Also, if I run ethercat slaves -v, in the CoE details, Enable SDO Info: no (????) and Enable Upload at Startup: no (???) Do these need to be set to yes to upload SDO through the XML file? I'm not a %100 sure but I think I observed that SDO data that I was in the file did not seem to have any effect on the amp.
Any help would greatly be appreciated. I have spent way too many hours at this over the past few months and just can't seem to figure out what I am missing.
Kind Regards,
Dan
Please Log in to join the conversation.
sqmathlete wrote: Hi All,
Hoping that someone can enlighten me, I'm just not sure what I am missing. Why does the one config come up in the op-state and the bitwise lathe does not.
Look through github.com/sittner/linuxcnc-ethercat/blo...-conf_X.xml#L98-L116 to understand how a "complex" type ( aka "special32" by roshi) is set up with hal types of shorter length, halType="bit", for example.
This line of ecat_asda_config_bit.xml
Either use
Please Log in to join the conversation.
I hate to waste people's time, but I am starting to waste my own over this. I have been following the EtherCAT driver and have installed the driver and can see the EK1100 and Slaves when typing “Ethercat Slaves” in the Terminal, but I am stuck on where you will generate the pins for the Beckhoff Slaves. Will the pins be generated in the XML file or when configuring the HAL file. I used one of the simple xml examples, but with my slaves listed. I can load the xml in halcmd (loadusr -W lcec_conf myfile.xml) and have tried a few different xml configurations, but still have not figured out the pins. My first goal is to wire an external E-Stop to a EL1004 slave to start figuring things out. Basically, I need to know how to generate the slave pins in order to tie them to the iocontrol.0.emc-enable-in and iocontrol.0.user-enable-out to make the E-stop loop. Once I see how this is performed, then I can build all the other I/O functions. I am under the assumption the pdoEntry idx's are the pins, but wanted to check with everyone on here to make sure I am going down the correct path. The following is what I put together for the XML file if I was using only the EK1100 bus module and 1pc of the EL1004 slave to do some simple testing of a E-stop input.
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1000">
<slave idx="0" type="EK1100" name="Busklemme"/>
<slave idx="1" type="EL1004"/>
<syncManager idx="1" dir="in">
<pdo idx="0x0f00">
<pdoEntry idx="6000" subIdx="01" bitLen="16" halPin="iocontrol.0.emc-enable-in" halType="u32"/>
<pdoEntry idx="6000" subIdx="02" bitLen="48" halPin="iocontrol.0.user-enable-out" halType="u32">
</pdoEntry>
</pdo>
</syncManager>
</master>
</masters>
If anyone will please take time and help me figure out what I am missing, I would appreciate it. The first thing is just making sure if I am on the right path.
Thanks,
Robert
Please Log in to join the conversation.
- sqmathlete
- Offline
- Premium Member
-
- Posts: 118
- Thank you received: 0
From what I can tell you have a multiple of errors. Note: formatting in .xml files is critical.
1) "<slave idx="1" type="EL1004"/>" should be <slave idx=1 type="EL1004 name="your-pin-name-here" /> in order to create the pins.
2) Those pins are then connected in your hal file to iocontrol,motion etc not defined as a pdo in your sync manager.
3) know what type of variable both the server and the client are expecting "iocontrol.0.emc-enable-in" & "iocontrol.0.user-enable-out"
are bit values not u32.
4) download a copy of the Igh master manual and a copy of the Cia402 manual. These are very useful to help understand how to
define pdo's.
5) Be prepared to do some reading,
Good Luck,
Dan
Please Log in to join the conversation.
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
Please Log in to join the conversation.
- sqmathlete
- Offline
- Premium Member
-
- Posts: 118
- Thank you received: 0
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
Please Log in to join the conversation.
