Hello Guest it is November 13, 2019, 05:18:05 PM

Author Topic: Missing Documentation of mcCntlGetPoundVar magic numbers...  (Read 455 times)

0 Members and 1 Guest are viewing this topic.

Missing Documentation of mcCntlGetPoundVar magic numbers...
« on: April 16, 2019, 04:31:28 AM »
Hello,

None of the provided Documentation documents this:
mc.mcCntlGetPoundVar(inst, mc.SV_PROBE_POS_Z)
It is not included in the scripting manual.

Where ist a list, that explains SV_PROBE_POS_Z ?
Also mcCntlGetPoundVar is not in the scripting manual, only in examples.


I assume SV_PROBE_POS_Z is the last Probe G31.1 Z in WCO.
But how to get the other probe coordinates and how to get them in Machine coordinates?

Any Idea how to find those magic numbers used in all the mcCntlGetPoundVar examples?
Re: Missing Documentation of mcCntlGetPoundVar magic numbers...
« Reply #1 on: April 16, 2019, 05:02:20 AM »
Hi,
this is from API.chm:

Quote
LUA Syntax:
value, rc = mc.mcCntlGetPoundVar(
      number mInst,
      number param)

Description:
Get the value of a system variable (pound variable).

Parameters: Parameter Description
mInst The controller instance.
param An integer specifying a system variable.
*value The address of a double to receive the value of the system variable.


Returns: Return Code Description
MERROR_NOERROR No Error.
MERROR_INVALID_INSTANCE The mInst parameter was out of range.
MERROR_INVALID_ARG param is out of range.

Check out the Enums:

https://www.machsupport.com/forum/index.php?topic=30323.0

This is an excerpt from the lists:

Quote
mc.SV_PROBE_POS_X // G31 Skip signal
mc.SV_PROBE_POS_Y
mc.SV_PROBE_POS_Z
mc.SV_PROBE_POS_A
mc.SV_PROBE_POS_B
mc.SV_PROBE_POS_C
mc.SV_PROBE_MACH_POS_X // G31 Skip signal machine position
mc.SV_PROBE_MACH_POS_Y
mc.SV_PROBE_MACH_POS_Z
mc.SV_PROBE_MACH_POS_A
mc.SV_PROBE_MACH_POS_B
mc.SV_PROBE_MACH_POS_C

Craig

My wife left with my best friend...
     and I miss him!
Re: Missing Documentation of mcCntlGetPoundVar magic numbers...
« Reply #2 on: April 16, 2019, 05:11:08 AM »
Thank you.
But how to get the second Probe Values?
Re: Missing Documentation of mcCntlGetPoundVar magic numbers...
« Reply #3 on: April 16, 2019, 05:21:05 AM »
Hi,

Quote
But how to get the second Probe Values?

Sorry, not sure what you mean.....second values?

Craig
My wife left with my best friend...
     and I miss him!
Re: Missing Documentation of mcCntlGetPoundVar magic numbers...
« Reply #4 on: April 16, 2019, 06:11:03 AM »
There are multiple probe Inputs:
G31.1, G31.2,...

If you touch with a 3d Probe on the tool length sensor in order to find the TLO offeset for the 3d Probe - it is neccessary that two Probe inputs trigger. The one for the Tool length sensor (G31.1) and the one for the 3d edge finder (G31.2) wich triggers afterwards.
Then there are 2 differenzt Z Positions - which difference then is the switch hysteresis for the 3d Probe.

So there must be this set of variables for each Probe input G31.1 G32.2,... I think there are 4 of them in Mach 4.


Re: Missing Documentation of mcCntlGetPoundVar magic numbers...
« Reply #5 on: April 16, 2019, 09:02:21 AM »
I thought these were documented, but when I went back to check where I found the G31 and couldn't find G31.1 - G31.3. 
G31 Part Z Coordinate is #5063 and G31 Machine Z Coordinate is #5073
I thought the others were documented, but clearly they are not.  Open up the Reg file #VARS to about #5000 - #5500 and make a few probe strikes on G31.1 and see if any of them change.  Trial and Error has helped me find #VARS in the past. 
Chad Byrd
Re: Missing Documentation of mcCntlGetPoundVar magic numbers...
« Reply #6 on: April 16, 2019, 09:33:07 AM »
Thank you Cbyrdtopper.
Any way to reach out to the developers to improve documentation on this?

Would even be great to have the known enums in the scripting documentation and not "only" in the forum from a community Member. Would be easier to find for new users.
Re: Missing Documentation of mcCntlGetPoundVar magic numbers...
« Reply #7 on: April 16, 2019, 09:51:07 AM »
Would even be great to have the known enums in the scripting documentation and not "only" in the forum from a community Member.

This information is in the g code documentation included in the Help Docs folder in Mach4 under the entry G31/G31.X. It's not a hidden secret, you just need to read the manuals.
Newfangled Solutions Helpdesk: http://support.machsupport.com
YouTube Support Channel: https://www.youtube.com/c/MachSupportOfficial
Re: Missing Documentation of mcCntlGetPoundVar magic numbers...
« Reply #8 on: April 16, 2019, 10:41:18 AM »
Thank you for pointing me there.
But its only the numbers, not the enum. For that reason my text search through all documents found no match.

And it is only the G31 variables not the others for G31.1,...
Re: Missing Documentation of mcCntlGetPoundVar magic numbers...
« Reply #9 on: April 16, 2019, 05:52:47 PM »
As far as I know, there is only a single set of variables. These are updated by the most recent probe strike, whether it is probe 1, 2, 3 or 4. At least that is how it works for me using a CS Lab controller..

Allan