encoder.n.index-enable

More
14 Dec 2021 13:38 - 14 Dec 2021 13:52 #229055 by wang
encoder.n.index-enable was created by wang
  I use the Ethercat bus to control linuxcnc. I found this problem when I configured the home switch. Which pin is ‘’encoder.n.index-enable’’?

I think I should write something like this in the hal file
net encoder_index encoder.n.index-enable joint.n.index-enable
But I don't know which pin is ‘’encoder.n.index-enable’’, because I don’t see which PDO is the index signal in the CANopen manual.

What should I write?
net encoder_index lcec.0.0.??? joint.n.index-enable
Attachments:
Last edit: 14 Dec 2021 13:52 by wang.

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

More
14 Dec 2021 21:32 #229078 by arvidb
Replied by arvidb on topic encoder.n.index-enable
I don't know if this is standardised, but on my EtherCAT drives the index flag (called "Phase Z" by Omron) is part of 0x60FD "Digital inputs". Bit 16 to be precise. This is 1 if the index was detected during the last communication cycle.

For better precision it's possible to latch the exact encoder value when the index pulse was detected and read it back, just as if it was a touch probe. I'm not sure how to make LinuxCNC use this value though.
The following user(s) said Thank You: wang

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

More
14 Dec 2021 23:34 - 14 Dec 2021 23:35 #229084 by rodw
Replied by rodw on topic encoder.n.index-enable
If you have a cia402 compatible drive, then there is a component that makes this easy
forum.linuxcnc.org/24-hal-components/418...can-bus-ethercat-etc
Follow the example here

I just got this going last night (if only I had a NPN prox sensor to be sure!)

Some drives (like mine) do not have a index mark but  home by various methods and use the index to tell linuxcnc its homed. You need to look at the default homing velocity in the drive (pulses per second) and convert that to velocity in mm/sec
Then set the home search velocity and  home latch velocity to that value.

I have been keeping my progress recorded in github.com/rodw-au/linuxcnc-cia402
but some changes I committed have yet to be tested (to see drive input states and outputs) I am very keen to home by stalling the motor to eliminate sensors...
Last edit: 14 Dec 2021 23:35 by rodw.

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

More
15 Dec 2021 10:19 #229106 by wang
Replied by wang on topic encoder.n.index-enable
Thank you for your help, I did not see that the 16-bit of my servo drive 60FD is the index signal

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

More
15 Dec 2021 10:29 #229107 by wang
Replied by wang on topic encoder.n.index-enable
Thank you very much for your patient explanation. My drive should have an index signal, but I don’t know the specific object dictionary or which pdo pin corresponds to the index signal.

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

Time to create page: 0.147 seconds
Powered by Kunena Forum