Hi,
until recently I had an even earlier version of Mach4 on my machine PC, and it has an API, and always has had it.
Look in Mach4Hobby/Docs folder for Mach4CoreAPI.chm. Open it and there you have Machs API. You can also open it from
the Help Docs button from Machs screen.
Use this API:
LUA Syntax:
mcState, rc = mc.mcCntlGetState(
MINSTANCE mInst)
It will return the numeric value of the machine state.......easy.....one line......easy!.
If you wish to communicate that to another device or PC or to the internet or whatever then use one of the comms protocols provided.
Modbus is one of the simplest and one that I am most familiar with. The machine state is loaded to a register and that register is communicated over Modbus.....easy.
Craig