3.1.7.6 Program example with nested check structures
Program code Comment
LOOP
IF NOT $P_SEARCH ; IF no block search
G1 G90 X0 Z10 F1000
WHILE $AA_IM[X] <= 100 ; WHILE (setpoint X axis <= 100)
G1 G91 X10 F500 ; Drilling pattern
Z–5 F100
Z5
ENDWHILE
ELSE ; ELSE block search
MSG("No drilling during block search")
ENDIF ; ENDIF
$A_OUT[1] = 1 ; Next drilling plate
G4 F2
ENDLOOP
M30
3.1.8 Cross-channel program coordination (INIT, START, WAITM, WAITMC, WAITE,
SETM, CLEARM)
In principle, a channel of the NC can execute the program started in it independently of other
channels in its mode group. If, however, several programs in several channels of the mode
group are involved in machining a workpiece, the program sequences in the various channels
must be coordinated with the following coordination commands.
Requirement
All the channels involved in the program coordination must belong to the same mode group:
MD10010 $MC_ASSIGN_CHAN_TO_MODE_GROUP[<Channel>] = <Mode group number>
Channel name instead of channel number
Instead of the channel numbers, the channel names entered in MD20000
$MC_CHAN_NAME[<Channel index>] can be used as parameters of the predefined
procedures for the program coordination. The use of the channel names in the NC programs
first has to be enabled:
MD10280 $MN_PROG_FUNCTION_MASK, bit 1 = TRUE
Work preparation
3.1 Flexible NC programming
NC programming
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0 481