User specific M/H-functions

M/H-functions are determined mostly by the programming of the "Programmable Logic Controller" (PLC). This control contains an interface ("Window to PLC") information on the programmed M/H-Functions in the current NC-block. In addition, synchronization conditions are supplemented, which control the synchronization between NC and PLC.

M 

or

H <expr> 

M/H-Functions can be programmed with general mathematical expressions. This particularly allows values with parameters, for instance 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 for one NC-channel [6]-8.1/-8.2 and the maximum number of M/H-functions for one NC-block [6]-8.3 is firmly given.

The EXIST-function (see chapter 2.6.1.3) checks if a M/H-function generally is available.

Programming example

By the EXIST-request in a first step before the call of an user specific M-function it is checked, if it is defined in NC-channel parameter list [1]-3.

... 
N10 G90 Y0
N20 $IF EXIST[M80] == TRUE
N30 X0 Y0 Z0 M80 (M80 is available)
N40 $ELSE
:
N60 $ENDIF
...
M30

In NC program the following M-functions have a fixed predefined meaning and are not free available. Only their synchronization mode [1]-3 can be set by the user.

M00 Programmed stop

M01 Optional stop

M02 Program end, Stopping of the machine

M17 Subroutine end

M29 Subroutine end

M30 Program end, Stopping of the machine