Hello Guest it is March 28, 2024, 12:44:06 PM

Author Topic: How to get hold of Probing Calibration Data in a LUA script?  (Read 1191 times)

0 Members and 1 Guest are viewing this topic.

Hi,

I'm setting up a probe in Mach4, which is working very good so far. But, I want a write, for my needs, a bit different probing routine compared with the ones offered by default in Mach4. I have so far figured out that the calibration routine stores the calibration data in the Machine.ini file. So far so good. My question is if there is some way I can get hold of that data in a LUA script (without parsing the whole file and looking for the parameter)? Is it stored in some variables at start up? The one I wanted to get hold of is the calibrated probe radius. I have been looking around in the documentation, in the forum, in internet, but so far failed to find some information about this.

Hope to get some help here by all the expertise in the forum.

Best Regards,
Kjell     
Re: How to get hold of Probing Calibration Data in a LUA script?
« Reply #1 on: May 31, 2018, 04:19:58 PM »
Ok - when you post a question you get some new ideas in the same moment as you press the post button  :). Looked a bit more in the API documentation (help file) and found:

retval, rc = mc.mcProfileGetDouble(
      number mInst,
      string section,
      string key,
      number defval)

in the section "Profile (INI) Settings". Works perfect to get out the values I want from the ini file.

Kjell



Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: How to get hold of Probing Calibration Data in a LUA script?
« Reply #2 on: May 31, 2018, 05:27:44 PM »
 :)
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!