- Posts: 393
- Thank you received: 0
Check if program fits on work area before starting it
7 years 10 months ago #122603
by emcPT
Check if program fits on work area before starting it was created by emcPT
Hello
In a lathe, where several tools are used, I would like to check if the part that I will make fits the working area. I would like to do this in the Gcode, at its start so that a conditional jump is made, and it would be similar to:
IF (G54.Z - Z.LIMIT > PARTSIZE) then OK
I have the PARTSIZE, and I think I can get the current work plane G54 Z value from the 5223 system variable.
However I do not see how can I access Z limit (that is defined on the INI file).
Would this be possible to achieve?
In a lathe, where several tools are used, I would like to check if the part that I will make fits the working area. I would like to do this in the Gcode, at its start so that a conditional jump is made, and it would be similar to:
IF (G54.Z - Z.LIMIT > PARTSIZE) then OK
I have the PARTSIZE, and I think I can get the current work plane G54 Z value from the 5223 system variable.
However I do not see how can I access Z limit (that is defined on the INI file).
Would this be possible to achieve?
Please Log in to join the conversation.
7 years 10 months ago #122625
by MaHa
Replied by MaHa on topic Check if program fits on work area before starting it
To access ini file parameter, set
[RS274NGC]
FEATURES = 4
and use this in your gcode:
#<_ini[AXIS_2]MIN_LIMIT>
or for absolute value
ABS[#<_ini[AXIS_2]MIN_LIMIT>]
[RS274NGC]
FEATURES = 4
and use this in your gcode:
#<_ini[AXIS_2]MIN_LIMIT>
or for absolute value
ABS[#<_ini[AXIS_2]MIN_LIMIT>]
Please Log in to join the conversation.
7 years 10 months ago #122647
by emcPT
Replied by emcPT on topic Check if program fits on work area before starting it
That is valuable information. Thank you.
Although I did not tested, this looks promising.
Are the FEATURES documented? I only seen information on the forum.
Although I did not tested, this looks promising.
Are the FEATURES documented? I only seen information on the forum.
Please Log in to join the conversation.
7 years 10 months ago #122662
by MaHa
Replied by MaHa on topic Check if program fits on work area before starting it
The well hidden information is there
linuxcnc.org/docs/2.7/html/remap/remap.h...i_file_configuration
If you want to abort the program when the partsize doesn`t fit, just
IF (G54.Z - Z.LIMIT LT PARTSIZE)
(MSG, Oversize Program abort)
M2
ENDIF
Maybe Z-offset of your active tool is needed also for the calculation
linuxcnc.org/docs/2.7/html/remap/remap.h...i_file_configuration
If you want to abort the program when the partsize doesn`t fit, just
IF (G54.Z - Z.LIMIT LT PARTSIZE)
(MSG, Oversize Program abort)
M2
ENDIF
Maybe Z-offset of your active tool is needed also for the calculation
Please Log in to join the conversation.
Time to create page: 0.082 seconds
