This is an example of using a MPG (Manual Pulse Generator) to jog the axes on a CNC machine.
There are several HAL connections needed to jog with a MPG. Figure 1 illustrates the path from the MPG to the axis jog count inputs. Notice how you can connect to all three axes jog counts. If your using a software encoder component you will need to make HAL connections for it.
net jog-count <= hm2_5i25.0.7i77.0.0.enc0.count net jog-count => axis.0.jog-counts net jog-count => axis.1.jog-counts net jog-count => axis.2.jog-counts
In Figure 2 we set pin (setp) values in the mux4 component. We set in0 to zero so that will be off.
In Figure 3 we see the path from the jog scale selector switch to the mux4 component. If input 1 is on then or2.0 out is on and mux4.0.out is set to the value of mux4.0.in1. If input 2 is on then sel1 is on so the output of mux4 is equal to in2. If input 3 is on the both sel0 and sel1 is on so the output of mux4 is equal to in3.
Optionally you can also use the ilowpass component in between the encoder counts and the axis jog-counts to smooth out the jogging on machines with fast acceleration. You will need to set the ilowpass.n.gain and the ilowpass.n.scale.