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.

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.

Moderators: cncbasher
Time to create page: 0.063 seconds
Powered by Kunena Forum