classicladder index-enable

More
3 years 11 months ago #256332 by M4MazakUser
classicladder index-enable was created 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?
More
3 years 11 months ago #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
More
3 years 11 months ago #256366 by M4MazakUser
Replied by M4MazakUser on topic classicladder index-enable
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)
More
3 years 11 months ago #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
More
3 years 11 months ago #256375 by M4MazakUser
Replied by M4MazakUser on topic classicladder index-enable
Thanks!
Time to create page: 1.333 seconds
Powered by Kunena Forum