Changing MPG step rate with a switch

More
1 year 5 months ago #329182 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,

Please Log in to join the conversation.

More
1 year 5 months ago #329187 by PCW
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)

 

Please Log in to join the conversation.

More
1 year 5 months ago #329286 by rodw
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
Powered by Kunena Forum