Digital input to float
21 Aug 2024 21:41 - 21 Aug 2024 21:42 #308345
by slowpoke
Digital input to float was created by slowpoke
I have external push buttons for jog increment and I'm trying for example to update halui.axis.x.increment with the value 0.001
conv_bit_float seems like it should work for this?
It's not obvious how I get the float value of 0.001, assigned to the float value?
Error is postgui.hal:202: Pin '0.001' does not exist
The external button is updating net jog-inc-1 when I push the button (observed in Hal show)
Excerpt from postgui is as follows:
loadrt conv_bit_float count=1
addf conv-bit-float.0 servo-thread
net jog-inc-1 <= arduino.keypad.Jog-Inc-1
net jog-inc-1 => conv-bit-float.0.in
net jog-inc-1f conv-bit-float.0.out 0.001
conv_bit_float seems like it should work for this?
It's not obvious how I get the float value of 0.001, assigned to the float value?
Error is postgui.hal:202: Pin '0.001' does not exist
The external button is updating net jog-inc-1 when I push the button (observed in Hal show)
Excerpt from postgui is as follows:
loadrt conv_bit_float count=1
addf conv-bit-float.0 servo-thread
net jog-inc-1 <= arduino.keypad.Jog-Inc-1
net jog-inc-1 => conv-bit-float.0.in
net jog-inc-1f conv-bit-float.0.out 0.001
Last edit: 21 Aug 2024 21:42 by slowpoke.
Please Log in or Create an account to join the conversation.
21 Aug 2024 22:35 #308347
by PCW
Replied by PCW on topic Digital input to float
conv_bit_float will just turn a bit to 0.0 or 1.0
Normally the way jog increments are selected are with a mux
component, say mux4
man mux4
Normally the way jog increments are selected are with a mux
component, say mux4
man mux4
Please Log in or Create an account to join the conversation.
Time to create page: 0.107 seconds