Originally Posted by
vmax549
I had a friend fix the video problem and did some more testing with Mux4 and found out that you cannot do a hand pendant in PP BECAUSE tormach when they added their pendant code created the link to the axis scale and now you cannot access it from hal as it was already assigned to their jog process . EVEN though this machine does not have the control panel . So unless tormach chages their code to only link to the jog scale IF there is a hooked up then we cannot add our own jog pendant. (;-) V2.0.0 did not have this problem.
I would like to test your code idea but I have no idea how to write that code. IF you have a moment to code it I have time to test it here..
(;-) TP
Here we go:
(You will obviously need to change the Mesa pin designations "hm2_[HOSTMOT2](BOARD).0.gpio.02X.in" to be compatible with your interface and pin outs)
Code:
# Load the mux4 and two or2's
loadrt mux4 names=mux-axis-scale
loadrt or2 names=or-mux-in0,or-mux-in1
# Add the components to the servo-thread
addf mux-axis-scale servo-thread
addf or-mux-in0 servo-thread
addf or-mux-in1 servo-thread
# Connect the scale inputs 0 to 3 to the or2 inputs:
net scale-select-input0 hm2_[HOSTMOT2](BOARD).0.gpio.026.in # No need to connect it anywhere. You could leave this line out.
net scale-select-input1 hm2_[HOSTMOT2](BOARD).0.gpio.027.in or-mux-in0.in0
net scale-select-input2 hm2_[HOSTMOT2](BOARD).0.gpio.028.in or-mux-in1.in0
net scale-select-input3 hm2_[HOSTMOT2](BOARD).0.gpio.029.in or-mux-in0.in1 or-mux-in1.in1
# Connect outputs of the or2 components to the mux4:
net mux-selection0 or-mux-in0.out mux-axis-scale.sel0
net mux-selection1 or-mux-in1.out mux-axis-scale.sel1
# Set the scale values for the axis multiplexer:
setp mux-axis-scale.in0 0.000025
setp mux-axis-scale.in1 0.000250
setp mux-axis-scale.in2 0.002500
setp mux-axis-scale.in3 0.025000
# Connect the mux output to the axis jog scales:
net axis-jog-scales mux-axis-scale.out axis.0.jog-scale axis.1.jog-scale axis.2.jog-scale axis.3.jog-scale
I presume you don't expect to integrate a Tormach Console so just comment out the axis.X.jog-scale inputs in the offending hal file:
Code:
net console-jogscale turbo-console.0.step-select-value #axis.0.jog-scale axis.1.jog-scale axis.2.jog-scale axis.3.jog-scale
I tested it on my test machine. PP runs and the axis.X.jog-scale values change according to the selected inputs. I can't however verify whether the jogging actually works.
Give it a go if you have time.
Step