Hi Hakan,
I don't know for sure but I believe Mach4 is expecting some sort of feedback pulse and it uses that pulse stream to calculate the
actual spindle speed and display it.
droTrueSpindle
the name of the DRO in the upper lefthand corner of the Spindle block of controls.
I've yet to find any code that describes how the DRO is updated, I think its part of Machs core nor have I worked out how a pulse input is directed
to the module.
Without some sort of pulse feedback how could Mach ever know the actual spindle speed, it's almost sure that it will differ from the programmed speed.
Exactlty how the signal is assigned and the calculations done I don't know yet.
My understanding is this is the primary method Mach uses to monitor the spindle. I imagine it could be modified to reflect the available input data,
so it could accommodate an index pulse once per rev or an encoder of hundreds of pulses per rev. I note that many VFDs have programmable outputs
to simulate an encoder. Further I note that VFDs can output an analogue voltage equivalent to spindle speed. While direct monitoring of spindle speed
may be the primary method there are alternatives.
The input signals Spindle at Speed and Spindle at Zero are inputs which have been predefined in Mach. The Probe signal is another predefined signal
but it maybe your machine doesn't use it and therefore has no input pin assigned to it. Because Probe is such a widely if not universally used input
it makes sense to have a signal name defined. It analogous fashion the two signals you're talking about are available on just about every VFD and so
make useful candidates as predefined signals.
In your case given that you have wired the controller inputs with these two signals you can assign Mach predefined signals and then use those signals to
effect behaviours you wish, for instance triggering delays in the m3/m4 and m5 scripts. You are already half way to achieving the behaviour you want or
you could abandon that approach and use the more conventional pulse monitoring approach above. May I suggest that you complete the control solution
you've already started. It will require some code additions to m3,m4 and m5. Once you have that operational then you might consider the other approach.
I think that a lot of the required functionality required to make the pulse approach work are already included in Mach and really only requires
settings to be made for it to work. You could then compare the two ideas to see which is best and learn a bunch about Mach/LUA as you do so.
Craig