Curiously, I started fresh, put this back in the pump and it works like a charm.
This went crazy later on (yesterday) but might now know why.
MaxStroke = GetUserDRO (1105)
CutLength = GetUserDRO (1100)
SawKerf = GetUserDRO (1104)
SetUserDRO (1107,MaxStroke / (CutLength + SawKerf))
SetUserDRO(1106,Fix(GetUserDRO (1107)))
Almost identical to your's TP, does it need the "If" and the Waits ?
NONE of these DRO's (1100,4 & 5) are moving, like an axis ... they are all fixed user entered values.
Task: See if you can get a SINGLE line script to do what the 2 lines above do.
This is what I thought I had working yesterday that crapped out on me. My "Simple" sample a few posts back.
Will be back later ........
Russ