Implicite subprogram calls (G80–G89/G800-G819)

G80 G89  [ [<val1>,<val2>, - ,<val10>] ] Sub program call (non-modal)

or in addition

G800 G819  [ [<val1>,<val2>, - ,<val10>] ] Sub program call (non-modal)

G8x / G8xx At the programming of G80–G89 and G800-G819 an assigned global subprogram is implicitly executed. The default names of these subprogramms can either be configurated in the channel parameters [1]-45/ [1]-46 or defined during NC program execution by the command #FILENAME.

If at the programming of G80–G89 and G800-G819 no assigned program name is available, the error message P-ERR-20131 "Unknown G function" is generated.

The global subprogram is called only once, this means G80–G89 and G800-G819 has no modal effect.

<val1> , - , <val10> For the supply of a sub program (cycles) with additional data in an optionally following bracketing up to 10 parameters (mathematical expressions in REAL format) can be programmed in a fixed sequence. The parameters are separated by commas. Gaps in sequence have to be indicated by serially-ordered commas ", ," .

Analogous to the normal cycle programming in the sub program the parameters can be read via the @Px access. There is a fixed assignment between the transfer parameter and the @Px read access. (e.g. @P1 reads parameter value 1, @P2 reads parameter value 2 and so on). In this kind of so-called sub programms also the additional extended cycle syntax with the @ - character can be used. Weather a parameter is programmed (valid), can be checked in sub program (cycle) by the variable V.G.@P[i].VALID.

A G80–G89 and G800-G819 is executed as the last action at block end. This means, axes motions programmed in the same NC block always are executed before the call of the global subprogram.

Programming example

For G80 the global sub progr. - g80_cycle.nc – shall be called:

.. 
N10 #FILENAME[ G80="g80_cycle.nc" ]
Nx ..
N30 G80 Call of g80_cycle.nc as global subprogram
:
M1000 M30
For G815 the global sub progr. - g815_cycle.nc – shall be called:
..
N10 #FILENAME[ G815="g815_cycle.nc" ]
Nx ..
N30 G815 Call of g815_cycle.nc as global subprogram
:
G85 calls the global sub progr. - cycle_tst.nc – with parameters:
N10 #FILENAME[ G85="cycle_tst.nc" ]
Nx ..
N30 G85 [10,2, ,15,-3, ,5] Call of cycle_tst.nc as global subprogram
: