Best way to retrieve parameters from an external file?

More
31 May 2023 21:51 #272610 by nick.smith
If I have a list of parameters in a separate file, how can I retrieve them into a loaded .nc file?

Specific to PathPilot, if it matters.

Example, in parameters.txt

xpos = 4
ypos = -5
zpos = -6

Want to run test.nc:

G0 X[xpos] Y[ypos] Z[zpos]

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

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
31 May 2023 22:34 #272611 by tommylight
Moved to "path pilot" section.

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

More
01 Jun 2023 02:01 #272621 by JohnnyCNC
This might be what you are looking for.

I have this in my .ini file 

[TOOLSENSOR]
MAXPROBE = .5
SEARCH_VEL = 3
PROBE_VEL = 2
TOUCH = 1.015
Z_COORD =-11.843
X_LOC = .0690
Y_LOC = 6.631
Z_PROBE_START = -3.7
Z_PROBE_DISTANCE = -5.95
Z_ABS_TRIP_HEIGHT = -11.916810

and the GCode references the values.

G53 X#<_ini[TOOLSENSOR]X_LOC> Y#<_ini[TOOLSENSOR]Y_LOC>
G53 Z#<_ini[TOOLSENSOR]Z_PROBE_START>                  
G91                                                    
G38.2 Z#<_ini[TOOLSENSOR]Z_PROBE_DISTANCE> F#2002      
G43.1 Z0                                               

 

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

More
20 Aug 2025 17:11 #333738 by ThreeEyedBandit
Replied by ThreeEyedBandit on topic Best way to retrieve parameters from an external file?
Quick question, how do you enable ini file lookups in the PathPilot control?

Only reference I can find it in the tormach_mill_base.ini file there is 'set bit 2 to fetch ini file values in g code'

One reason I want to do this so I can setup a tool life monitoring macro, and want the values to be persistent through power cycles.

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

Time to create page: 0.190 seconds
Powered by Kunena Forum