- Posts: 224
- Thank you received: 0
Changing MPG step rate with a switch
1 year 5 months ago #329182
by slowpoke
Changing MPG step rate with a switch was created by slowpoke
I have a MPG encoder that has 100 detents and scaled on my lathe X axis for 0.001" increments. All working great.
Once in a while I need to turn to a dimension tighter than 0.001" When I need to do this I tweak my ini file to make the MPG increments 0.0001"
I would prefer to have a toggle switch to toggle between regular(0.001") and sensitive (0.0001") mode, and be able to toggle it as required and not have to restart LinuxCNC.
Is this possible and if so how would I go about it?
Thanks,
Once in a while I need to turn to a dimension tighter than 0.001" When I need to do this I tweak my ini file to make the MPG increments 0.0001"
I would prefer to have a toggle switch to toggle between regular(0.001") and sensitive (0.0001") mode, and be able to toggle it as required and not have to restart LinuxCNC.
Is this possible and if so how would I go about it?
Thanks,
Please Log in to join the conversation.
1 year 5 months ago #329187
by PCW
Replied by PCW on topic Changing MPG step rate with a switch
Typically you would use a mux component for this.
In you case (only 2 increments) you could use mux2
Something like:
loadrt mux2
addf mux2.0 servo thread
setp mux2.0.in0 0.0001
setp mux2.0.in1 0.001
net jog-increment-select mux2.0.sel some_old_input_bit
net jog-increment mux2.0.out
(your signal names and select pin names will be different)
In you case (only 2 increments) you could use mux2
Something like:
loadrt mux2
addf mux2.0 servo thread
setp mux2.0.in0 0.0001
setp mux2.0.in1 0.001
net jog-increment-select mux2.0.sel some_old_input_bit
net jog-increment mux2.0.out
(your signal names and select pin names will be different)
Please Log in to join the conversation.
1 year 5 months ago #329286
by rodw
Replied by rodw on topic Changing MPG step rate with a switch
There is actually a good MPG example in the docs with xyz axis and scale selection. It uses parallel port pins but it works on any platform.
Please Log in to join the conversation.
Time to create page: 0.071 seconds
