Hi,
do you have a spindle index signal or could you fit one?
The reason I ask is that there is a convenient feature that you could use....'Wait for Spindle Speed to Stabliize' found in
the Configure/Control/Spindle tab. If it is checked the Gcode will pause until Mach detects that the spindle speed is up to your nominated
percentage of its final speed. It has the advantage of 'minimum wait'. That is if you specify a delay of 15 secs to 24000 rpm which may be
adequate for a moderate diameter tool of moderate inertia but the delay is more than required if you were using a very low interia
small diameter endmill say. This feature waits only until such times as the spindle is up to speed and then continues processing GCode.
As Chas has pointed out there is are two signals defined in Mach4; ISIG_SPINDLE_AT_SPEED and ISIG_SPINDLE_AT_ZERO.
Note the signals are defined but they have no standarised action, you have to code how you wish your machine to operate in
there presence. Also the signals are supplied by your VFD. They are very common, maybe even standard, on all VFD's I have come across.
This last fact separates the two approaches:
1)Wait for Spindle to Stabilize.....Mach measures the actual speed from an index signal
2)ISIS_SPINDLE_AT_SPEED etc is supplied by the VFD.
Option 2) requires you to code the response of your machine whereas 1) does not....Mach's response is standardized.
Craig