Hi,
I follow your general idea and it sounds OK.
If I use siglib to monitor the register and input, is it safe to assume that it will update at the 50ms rate? That should be fast enough for reasonable manual control.
No, this is incorrect. Mach4 has dozens of signals, many of them internal but also external input signals for example.
Any time ANY ONE of those signals' changes state the SigLib table is triggered. If the signal has an entry in the SigLib table then
that functionality is triggered. None of these signals are 'polled'. That is to say that the only time the functionality is triggered is if that signal
changes state.
What you want is a polled signal. This is the prime use of the PLC script. It runs every few milliseconds, typically 12.5ms by default. If there is an
input, the joystick for example, that you wish to monitor on a regular basis then the PLC is the place to put the monitoring code.
Note also that Mach4 has ladder logic called the PMC module. It runs every millisecond or so, and thus could just about be considered realtime
and would be very useful for this project.
Can you tell us more about the joystick? I thought the majority of gaming joysticks just had four contacts, one at each carinal point. I would have thought
that a joystick would have been the ideal device to get the directional on/off switching signals rather than the jog speed. The jog speed is best done with
a single potentiometer.
Craig