Updating Probing Routines with Probe Enabled Pin

More
03 Dec 2022 14:02 #258427 by daveyr
Good morning

Before i go down a path of updating all the Probing routines i wanted a sanity check. 

I am running 2.9-Pre1 and Probe Basic from the Python3 branch. Things are working great, I am at the stage of integrating the probe protection (Only allow probing to run when the probe is connected using topcom.cz/products/smart/smartmer2/ allows combing of different NPN / PNP inputs and also dose disconnected device detection) For this to work i was going to add in M64Px and M65Px for signaling that probing operations should be enabled. (This is working fine in the ETS).

Is there a best practice for adding in and using a variable to pass into the different probing scripts or am i just going to need to do a copy / replace type action.  

What i did for the ETS was the following.
In the Variables section
#<enable_probe_protection> = 1 ; Is probing protection required. 0 = no 1=yes
#<probe_protection_pin> = 0 ; Digital output pin to be used for probe protection signal

Then above the section with the G38.2 i put 
o<115> if [#<enable_probe_protection> GT 0]
 M64 P#<probe_protection_pin> ;Enable tool setting probing allowed pin
o<115> endif

and after the probing has stopped
o<125> if [# GT 0]
  M65 P# ;Disable tool setting probing
o<125> endif

If the best approach is to use a global variable from linuxcnc.var and reference that in all the probe files is there register of variables so i dont tread on anyone else? (Would use 4 Variables, TS Probe Protection, TS Probe Protection Pin, Probe Protection, Probe Protection Pin). 

hope that all makes sense.

Please Log in or Create an account to join the conversation.

More
03 Dec 2022 20:03 #258449 by daveyr
I added a section to the default.ini as then it could persist if the linuxcnc.var got wiped.

In there put the 2 pin numbers and then created 2 new subroutines one for enable / one for disable.

Then did a search and replace for all the G38's to have the enable above and the disable below.

Please Log in or Create an account to join the conversation.

Moderators: KCJLcvette
Time to create page: 0.143 seconds
Powered by Kunena Forum