Ethercat HAL driver

More
9 years 4 months ago #94397 by sirop
Replied by sirop on topic Ethercat HAL driver
You have to try out PDO mapping similar to www.iram.fr/~blanchet/ethercat/akd/examples/

Please Log in or Create an account to join the conversation.

More
9 years 4 months ago #94627 by ChrisB
Replied by ChrisB on topic Ethercat HAL driver
Hi
i am getting closer.
I have changed the PDO Mapping of the Drive and i can generate a c file with the comandlinetool.
How can i integrate this into the startup of linuxcnc?
Thanks

Please Log in or Create an account to join the conversation.

More
9 years 4 months ago #94638 by sirop
Replied by sirop on topic Ethercat HAL driver
In order to use linuxcnc-ethercat you have to
either make an XML file as discussed above
or patch the linuxcnc-ethercat with a "library" for Kollmorgen .

If you understand the underlying etherlab lib well enough, then you can also code your own stand-alone component
similar to wiki.linuxcnc.org/cgi-bin/wiki.pl?Etherlab .

Please Log in or Create an account to join the conversation.

More
9 years 4 months ago #94666 by ChrisB
Replied by ChrisB on topic Ethercat HAL driver
OK my question was not well former. How can i apply the sdo commands to linuxcnc or etherlab to configure the custom pdos. Now i know the sdos and can do it manually. But not automatic. Thanks

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #95278 by robh
Replied by robh on topic Ethercat HAL driver
Hi

trying to sort my XML File,

Q1
the value for appTimePeriod=""
where does this come from/what is it for, as i can not see this in my XML file for the drives.
is this what syncs the clocks on master & Slave?

here is a copy from estun the xml
pastebin.com/iAnxBSR4

this is what i have written so far as an XML file
pastebin.com/B7FXUq5J

also can you see anything else wrong, as right now when i run this XML the hole PC locks up after a random time with linuxcnc open and in standby and forcing a hard reboot. so i dont know if something is wrong in the XML?
timing/clock or something else as at first to update the encoders this takes few seconds untill read. but once first read update seems ok if moving the motor shafts untill the system locksup.

Q2
with the Pos & Poscommand is type float the correct type to use?
or do you need to use S32 on Pos & poscommand in XML?
ie
Posfeedback
lcec.0.0.pos > S32 to Float > Scale value > Float to S32 > Feed to pos-fb
pos command
motor-pos-command > S32 to float > scale > float to S32 > lcec.0.0.poscommand

on the drive i have set the encoder ratio as
0.0001mm Res
10mm Pitch Screw
17bit encoder = 32768

32768x4/(10/.0001)=131072/10000
as reduced fraction = 4096/3125
then in estun drive
P201=4096
P202=3125

copy of the hal file so far for reff
pastebin.com/dihu2fxV

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #95283 by sirop
Replied by sirop on topic Ethercat HAL driver

robh wrote: Hi

trying to sort my XML File,

Q1
the value for appTimePeriod=""
where does this come from/what is it for, as i can not see this in my XML file for the drives.
is this what syncs the clocks on master & Slave?

That is where appTimePeriod is used github.com/sittner/linuxcnc-ethercat/blo...c_main.c#L1119-L1132 .
So the cycle time of the HAL thread the linucnc-thread is attached to is appTimePeriod of the EtherCAT cycle.

Q2
with the Pos & Poscommand is type float the correct type to use?
or do you need to use S32 on Pos & poscommand in XML?
ie
Posfeedback


Your estun the xml pastebin.com/iAnxBSR4 says that Positions are measured as DINT = S32 in HAL terms.

I do not understand this line:

<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="drivecontrol" halType="bit"/>

You map a 16 bit value to one bit Hal pin? or did you mean the so called "complex entry" as shown here for instance
github.com/sittner/linuxcnc-ethercat/blo...-conf_X.xml#L98-L116 ?

Please Log in or Create an account to join the conversation.

Time to create page: 3.023 seconds
Powered by Kunena Forum