Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: brianthechemist on January 28, 2025, 01:00:51 PM

Title: Probing/toolsetter/etc question: How does Mach know which?
Post by: brianthechemist on January 28, 2025, 01:00:51 PM
This may be an obvious question...  I have 3 "probes" set up on my system (Probe0 is the Renishaw, 1 is a Z plate and 2 is the toolsetter).  Which probe signal is populated into the mcAxisGetProbePos?

I'm guessing that it is determined by which G31 (or 31.1, 31.2, etc.) is run, is that right?
Title: Re: Probing/toolsetter/etc question: How does Mach know which?
Post by: smurph on January 29, 2025, 02:22:48 AM
It is all the same.  G31 and G31.1, etc... only change the value sent to the probeon and probeoff scripts.  Those scripts could be used to fire relays that "re-wire" for different probes based on probe 0-9 (G31-G31.9).  Or other uses.  For example, I use the probeon.mcs (with G31) script to spin my wireless Renishaw probe to turn it on.  But my tool setter probe that I run with G31.1 doesn't do anything in the probeon.mcs script. 

So basically, what is recorded in the system variables that mcAxisGetProbePos() retrieves is where the table is when ANY probe is hit.  You can only run one probe at a time so it works fine. 

#5061 // X G31 Skip position
#5062 // Y G31 Skip position
#5063 // Z G31 Skip position
#5064 // A G31 Skip position
#5065 // B G31 Skip position
#5066 // C G31 Skip position

#5071 // X G31 Skip machine position
#5072 // Y G31 Skip machine position
#5073 // Z G31 Skip machine position
#5074 // A G31 Skip machine position
#5075 // B G31 Skip machine position
#5076 // C G31 Skip machine position

Steve
Title: Re: Probing/toolsetter/etc question: How does Mach know which?
Post by: brianthechemist on January 29, 2025, 10:51:30 AM
Perfect. Thats what i thought! Thanks.