Streaming of Large G-Code Files
runFile
runFile(path:= string)
The size of files that can be executed employing the GST
-interpreter is limited. However, sometimes it is required to execute large files that may have been created e.g. by a CAD
-program. Therefore, the user has the possibility to execute filestreams of native G
-Code.
Executes the plain G
-Code that is contained in the G
-Code file given by path
. The function call returns after all lines in the supplied file have been processed. The function is intended for streaming large G
-Code files to the NC-kernel efficiently.
Native Note that the supplied |
A G
-Code filestream from file 'myNativeGCodeFile.nc'
can be called from a GST
-program with the following syntax if the file is in the default directory of the GST interpreter:
!runfile('myNativeGCodeFile.nc');
If the file 'myNativeGCodeFile.nc'
is located elsewhere, the file path must also be specified, e.g:
!runfile('C:\myGcodeFolder\machine1\myNativeGCodeFile.nc');
runFile with R parameters and simple arithmetic expressions
From the TwinCAT V3.1.4024.40 R parameters and simple arithmetic expressions are allowed with runfile.
callRunfileWithRParamsAndExpressions.nc
N0 G0 X0 Y0 Z0
N1 G1 X10 F5000
!R3:=3;
!R5:=5;
!R10:=15;
!r100:=-1.234;
!R888:=98.123;
N2 G1 y={r100}
!runfile(RunfileWithRParamsAndExpressions.nc');
M30
RunfileWithRParamsAndExpressions.nc
G1 X200
G1 Y150
G1 Z234
M123
G1 z = R888 - r100 - r100 / R10
G1 y=100-r888
G1 x=-R10/r5-r3 q1=20-r3*R5