Good you've made some progress. Looks to me as if some of the modio is done in the PP driver as well then. The thing with DoSpinCW is weird though because I use activateSignal(OUTPUT1) instead in M3, not a doSpinCW in sight and THC works just fine and dandy.
I wrote this little bit of code in a button to determine if the THC mode was actually on...
If isActive(THCON) Then
MsgBox("THC is ON")
Else
MsgBox("THC is OFF")
End If
When I press this button, even with the THC LED on, it tells me that the THC is off. I'm at a loss. There has to be something telling Mach to ignore THC commands even though THC is on.
The reason this doesn't work as you might have expected is... (and you're going to love this after your walk on water comment earlier)
what you're testing here is whether ArcOK is on or off - not whether THC is on or off. THCON is actually the signal name for ArcOK. But then that's what it's called in ports n pins too so it shouldn't be that surprising perhaps.
Please get back with whether modbus is fast enough for THC UP/DOWN - I'd be interested. Personally I think THC via PP is only just keeping up - but then if some of the modio
is done in the PP driver, it may be no different - who knows.
Ian