Ethercat HAL driver

More
13 years 6 months ago #32149 by sascha
Replied by sascha on topic Ethercat HAL driver
I think I have to use KBUILD_EXTRA_SYMBOLS to avoid the warnings. I will test ist later.
More
13 years 6 months ago #32166 by willrat
Replied by willrat on topic Ethercat HAL driver
Yes EL3062 a typo! and EL4032 2 channels AI and AO 12-bit. We are controlling hydraulic servos and getting position with Balluff transducers.



I'm now going to try a small (simple) test rig with 2xEL1018 8 Channel input modules. Running the 'ethercat master' give me a idle master; all the slaves are reported. The 'user' example makes the master active. So I'm assuming the master is OK.

I'm guessing something like this might work for my hal configuration...

$halrun
halrun: loadusr emcec_conf config.xml
halrun: loadrt emcec

So whats the format of the input config.xml?

Looking at the code for each device is seems the hal pins are automatically named canonically. So is the config just for additional parameters? trying loadrt emcec complains of no emcec_conf.
More
13 years 6 months ago #32167 by sascha
Replied by sascha on topic Ethercat HAL driver
You have to load as follows:
Code:
loadusr -W emcec_conf ethercat-conf.xml loadrt emcec

so that the real time part is loaded just after the config parser is ready.
Then add read/write function. For example:
Code:
addf emcec.read-all servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf emcec.write-all servo-thread

The xml file in the simples case is just a list of slaves. Please note
that "appTimePeriod" has to match the period of the servo-thread in
the example above.
Code:
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="10"> <slave idx="0" type="EK1100"/> <slave idx="1" type="EL1008"/> <slave idx="2" type="EL1808"/> <slave idx="3" type="EL2808"/> <slave idx="4" type="EL2808"/> <slave idx="5" type="EL3162"/> <slave idx="6" type="EL4132"/> <slave idx="7" type="EL4132"/> <slave idx="8" type="EL5151"/> <slave idx="9" type="EL5152"/> <slave idx="10" type="EL5101"/> <slave idx="11" type="EL2521"/> </master>

Here a more complex example with DC config, generic device, dynamic PDO mapping
and SDO initialization:
Code:
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="10"> <slave idx="0" type="EK1100"/> <slave idx="1" type="EL1809"/> <slave idx="2" type="EL1809"/> <slave idx="3" type="EL2809"/> <slave idx="4" type="EL4002"/> <slave idx="5" type="EL4002"/> <!-- EL6751 CANopen slave --> <slave idx="6" 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="D0 07 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 02"/> <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 02"/> <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"> <pdoEntry idx="7000" subIdx="01" bitLen="16" halPin="can-out" halType="bit"/> </pdo> </syncManager> <syncManager idx="3" dir="in"> <pdo idx="1a00"> <pdoEntry idx="6000" subIdx="01" bitLen="16" halPin="can-in" halType="bit"/> </pdo> <pdo idx="1a80"> <pdoEntry idx="a000" subIdx="01" bitLen="8" halPin="can-slave-nodestate" halType="u32"/> <pdoEntry idx="f100" subIdx="01" bitLen="8" halPin="can-error" halType="u32"/> <pdoEntry idx="f100" subIdx="03" bitLen="16" halPin="can-state" halType="u32"/> <pdoEntry idx="f100" subIdx="02" bitLen="1" halPin="can-diagflag" halType="bit"/> <pdoEntry idx="a000" subIdx="02" bitLen="1" halPin="can-slave-diagflag" halType="bit"/> <pdoEntry idx="0000" subIdx="00" bitLen="6"/> </pdo> </syncManager> </slave> <slave idx="7" type="EL2809"/> <slave idx="8" type="EL7342"> <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="-25000"/> <watchdog divider="2498" intervals="2000"/> </slave> <slave idx="9" type="EL7342"> <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="-25000"/> <watchdog divider="2498" intervals="2000"/> </slave> <slave idx="10" type="EL9505"/> </master>

You are right. Pin names are generated pending on the type of devide (except the
generic one). There is also a attribtute "name" for masters & slaves to override
the default index based naming.

I should do some work an docs :whistle:
The following user(s) said Thank You: Nico2017
More
13 years 6 months ago - 13 years 6 months ago #32190 by willrat
Replied by willrat on topic Ethercat HAL driver
Thanks for that very much appreciated, I've got a basic functioning system now. :cheer:

The notes you've just posted is enough docs for starters!

One thing we are interested in for the future is the EL6224 which is for IO-Link devices; I don't know if you've come across this technology; its another consortium arrangement; it allows traditionally analog devices to be connected serially and device configuration can be done over the network also.
Last edit: 13 years 6 months ago by willrat.
More
13 years 6 months ago #32438 by nursum
Replied by nursum on topic Ethercat HAL driver
Hi,

ist the servo driver also usable for the Beckhoff AX drives, which are similar to Servostar from Kollmorgen and ABB ACP201drives? They also uses COE (CanOpen over EtherCat).
I plan to use these drives for my milling machine which works actually with "big" DC-Motors (2 KW Siemens).

Ingo
More
13 years 6 months ago #32443 by willrat
Replied by willrat on topic Ethercat HAL driver
I think you will have to write a driver for this.

The ethercat master is based on etherlab. Search the web for "etherlab ax" gives a few results on the etherlab mailing list with different versions of the AX drives - some use CANoverEtherCat some use SercosOverEthercat -- perhaps some have had success?

The Beckhoff website does not have the full specs for the servo drives' ethercat interface (whilst the IO modules are well documented)

I'd start here
www.mail-archive.com/find.php?cx=partner...therlab+ax&sa=Search
Time to create page: 0.451 seconds
Powered by Kunena Forum