classicladder index-enable

More
10 Nov 2022 09:19 #256332 by M4MazakUser
I'm rebuilding a 2004 shenyang lathe in lismore nsw Australia.  Some parts like the turret encoder didn't make it through 4metres of water. I've replaced it with a 5000line incremental encoder (a b z) I had laying around. I can read in the encoder value as an s32in to classic ladder,  but I'd like to reset index-enable as it clicks over so the count value is easier to decipher for tool positions.  This would be easy if I could link index-enable into classic ladder as an output, but it only seems to be available as an input.(I can't set it from classic ladder).
Any ideas people? Even if it could be done in hal?

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

More
10 Nov 2022 13:14 #256349 by JT
Replied by JT on topic classicladder index-enable
encoder.x.index-enable is an I/O pin.
linuxcnc.org/docs/stable/html/man/man9/encoder.9.html
linuxcnc.org/docs/stable/html/hal/rtcomps.html#_encoder

You should be able to set index-enable to True for one scan in the ladder then when the index pulse happens count is reset to 0.

JT

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

More
10 Nov 2022 17:48 #256366 by M4MazakUser
Yes I thought that, and index-enable is a bidirectional pin, but it seems I can only net it to classic ladder as an input (read, can't set the value)

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

More
10 Nov 2022 18:50 #256369 by PCW
Replied by PCW on topic classicladder index-enable
You can feed the classic ladder output through the
tristate_bit component to set index enable true
The following user(s) said Thank You: JT

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

More
10 Nov 2022 19:43 #256375 by M4MazakUser
Thanks!

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

Time to create page: 0.149 seconds
Powered by Kunena Forum