Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: furtaso on March 05, 2019, 02:03:41 AM
-
Hello. Sorry to bother you. I work with the ESS plugin. I want to extract indications from the encoder. How can I do this? I see the encoder values in the diagnostics window in MACH4 but I need to transfer them to another program.
-
Hi,
you could write a Lua program to read the encoder values, I presume they are pound variables, and put them
into a file.
You can use this API to get a pound variable:
LUA Syntax:
value, rc = mc.mcCntlGetPoundVar(
number mInst,
number param)
Description:
Get the value of a system variable (pound variable).
I would suggest you use m400 and m401 as examples of how to open a data file, add data to it and then close it.
m400 and m401 are in Mach4Hobby/LuaExamples/ProbeToFile.
Craig