Ethercat HAL driver

More
10 Jun 2017 15:11 #94394 by sirop
Replied by sirop on topic Ethercat HAL driver
I see only 4 sync managers in s300s700_41_2017-06-10.xml ,
<Sm MinSize="40" MaxSize="1486" DefaultSize="512" StartAddress="#x1800" ControlByte="#x26" Enable="1">MBoxOut</Sm>
<Sm MinSize="40" MaxSize="1486" DefaultSize="512" StartAddress="#x1c00" ControlByte="#x22" Enable="1">MBoxIn</Sm>
<Sm StartAddress="#x1100" ControlByte="#x24" Enable="1">Outputs</Sm>
<Sm StartAddress="#x11C8" ControlByte="#x20" Enable="1">Inputs</Sm>

You try to use
<syncManager idx="4" dir="in">
as if there were more than 4 Sync managers.

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

More
10 Jun 2017 16:01 #94396 by ChrisB
Replied by ChrisB on topic Ethercat HAL driver
I also see just 4.
But how can i apply the velocity command and the other parameters.
The first two SM are yousless for this!? Bcause the are mailbox.
And the other two SM's do just have two parameters.
Or how can i acces the other values?

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

More
10 Jun 2017 16:05 #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
16 Jun 2017 21:04 #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
17 Jun 2017 07:20 #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
17 Jun 2017 22:43 #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
02 Jul 2017 15:16 #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
02 Jul 2017 19:33 #95283 by sirop
Replied by sirop 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?

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.

More
06 Jul 2017 12:11 #95428 by robh
Replied by robh on topic Ethercat HAL driver
thanks, using complex works grate, i was using an old XML file as a start point and did not see the update to complex types

i have the drives running and moving now.
just trying to figure how to sort the homing out, id like to just hit the home all button and have the drives run there home method. and report back to linuxcnc that its complete and set the axis to homed.

i have setup a state change to home mode on the drive when axis.n.homing is true
and set the bits to start the home method
but linuxcnc gives a following error when the drive move due to feedback.

am i missing something as is there a speshial value/setting to allow drive homing in linuxcnc?
what values should be in the home ini to allow drives todo there home method while linuxcnc just waits for it to report home finish?

thanks, rob

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

More
06 Jul 2017 12:41 - 06 Jul 2017 12:42 #95430 by sirop
Replied by sirop on topic Ethercat HAL driver


i have the drives running and moving now.
just trying to figure how to sort the homing out, id like to just hit the home all button and have the drives run there home method. and report back to linuxcnc that its complete and set the axis to homed.

i have setup a state change to home mode on the drive when axis.n.homing is true
and set the bits to start the home method
but linuxcnc gives a following error when the drive move due to feedback.


I do not know much about HOMING by the means of linuxcnc and thus I do not know if
EtherCAT drives can be homed by the means of linuxnc only.

I guess you have to read on about
<Object>
             <Index>#x6060</Index>
                 <Name>Modes of operation</Name>
                    <Type>SINT</Type>
                          <BitSize>8</BitSize>
                                <Flags>
                                    <Access>rw</Access>
                                    <Category>o</Category>
                                    <PdoMapping>RT</PdoMapping>
                                </Flags>
</Object>
in the manual of your EtherCAT drive and then probably code your own component for HOMING.
Last edit: 06 Jul 2017 12:42 by sirop.

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

Time to create page: 0.208 seconds
Powered by Kunena Forum