Hello Guest it is December 12, 2019, 01:39:52 PM

Author Topic: Extract diagnostic values  (Read 148 times)

0 Members and 1 Guest are viewing this topic.

Extract diagnostic values
« 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.
Re: Extract diagnostic values
« Reply #1 on: March 05, 2019, 02:16:02 AM »
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:
Code: [Select]
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
My wife left with my best friend...
     and I miss him!