- Posts: 32
- Thank you received: 0
Best way to retrieve parameters from an external file?
- nick.smith
- Topic Author
- Offline
- Junior Member
-
Less
More
3 years 4 months ago #272610
by nick.smith
Best way to retrieve parameters from an external file? was created 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]
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 to join the conversation.
- tommylight
-
- Away
- Administrator
-
Less
More
- Posts: 22008
- Thank you received: 3
3 years 4 months ago #272611
by tommylight
Replied by tommylight on topic Best way to retrieve parameters from an external file?
Moved to "path pilot" section.
Please Log in to join the conversation.
3 years 4 months ago #272621
by JohnnyCNC
Replied by JohnnyCNC on topic Best way to retrieve parameters from an external file?
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
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 to join the conversation.
- ThreeEyedBandit
- Offline
- New Member
-
Less
More
- Posts: 1
- Thank you received: 0
1 year 2 months ago #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.
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 to join the conversation.
Time to create page: 0.089 seconds
