Ok i looked into the MUX2 hal object, and I like it, since I seem to only care about the state machine values of 6/15, this would work well to connect to the enable pin.
I am having a problem connecting it though. For some reason, while the documentation states that the MUX2.out is a float - LinuxCNC is giving me an error at startup that its a bit - what am I doing incorrectly?
Code:
# Connect Enable Pins / Signals
net xenable => mux2.0.sel
setp mux2.0.in0 6.0
setp mux2.0.in1 15.0
net mux2.0.out => iocontrol.0.emc-enable-in => lcec.0.0.TxControlWord
Error:
Signal 'mux2.0.out' of type 'bit' cannot add pin 'lcec.0.0.TxControlWord' of type 'u32'
I know i haven't converted the float to u32, but the HAL layer actually seems to convert floats/u32 automatically. but that's not even the error its throwing, its complaining it's not a bit...