Hi,
how are you connecting your sensor to Mach?
If you connect it to your motion controller/breakout board combination then you'll have to wait for the motion controller
reporting cycle before Mach gets to hear about the change in sensor state.
Using the ESS as an example, it has a deafult cycle frequency of 40Hz or 25ms interval. Thus if you have a switch connected to the
controller/BoB it could take as long as 25ms for Mach to get the changed signal state depending on when the event ocurred within
the cycle.
I have heard people increasing the cycle rate to 200Hz or 5ms intervals, but even 5ms is not realtime.
You might ask then 'how is it that Mach can respond instantly to Limit and Home switches'. The answer is that Mach does NOT respond instantly,
the motion controller DOES, and it does so autonomously. The events gets reported to Mach, using the same reporting cycle I described above,
but not instantaneously.
Clearly the motion controller manufacturer must program/hardwire his motion controller to handle certain events in realtime, and in a manner
which is consistent with Mach's expectations. For this reason the motion control plugin, written by the motion control manufacturer, is a technically
demanding but absolutely vital part of any Mach4 installation.
If you choose to write your own plugin to manage your sensor suite for instance you may. It requires that you sign an NDA with NFS and then you get
the inside gen on Machs core enough for you to write a plugin in C/C++.
Craig