User-specific M/H functions
M/H functions are mostly determined by programming the "Programmable Logic Controller" (PLC). This controller contains an interface ("Window to PLC") information on the programmed M/H functions in the current NC block. In addition, it provides synchronisation conditions which control synchronisation between the NC and the PLC.
Syntax: |
M.. |
or |
H.. |
M/H functions can be programmed with general mathematical expressions. In particular, this allows the assignment of values by means of parameters, e.g. MP10. Before access to the M/H function, the calculated numerical value is rounded off and converted into an integer. The smallest permissible value is 0 (zero). Negative values generate an error message.
The maximum number of M/H functions per NC channel [6]-8.1/-8.2 and the maximum number of M/H functions per NC block [6]-8.3 are fixed.
The EXIST function (see Section Arithmetical expressions <expr>) checks whether a variable exists at all.
Programing Example
User-specific M/H functions
The EXIST request first checks whether a user-specific M function is at all defined in the channel parameter list P-CHAN-00027 before the M function is executed.
...
N10 G90 Y0
N20 $IF EXIST[M80] == TRUE
N30 X0 Y0 Z0 M80 (M80 is available)
N40 $ELSE
: …
N60 $ENDIF
...
M30
The following M functions have a predefined meaning in the NC program, i.e. they are not freely available. The user can only assign their synchronisation mode P-CHAN-00027.
Syntax: | |
M00 | Programmed stop |
M01 | Optional stop |
M02 | Program end, stop the machine |
M17 | Subroutine end |
M29 | Subroutine end |
M30 | Program end, stop the machine |