Programming instructions
7-4
NC Events NC Programming 17VRS
DOK-MTC200-NC**PRO*V17-ANW1-EN-P
7.3 Conditional Branches Upon NC Events
Branch If NC Event Set ‘BES’
The BES command branch if NC-event set is used to continued program
processing at the declared branch label if the NC-event defined in the
command parameter is set.
BES <Branch label> <Process number[0..6]>:<Event number[0..31]> BES .LABEL 1:15
BES <Branch label> <Event number[0..31]>
BES .LABEL 9
•
If the symbol "*" is declared instead of the NC-event number, proc-
essing to the addressed branch label if at least one NC-event in the
specified process is set.
•
NC-events can also be changed by the SPS program and via the
MUI/GUI/SOT menu. Therefore please refer to the machine builder's
information since the builder may have used various NC-events for
synchronization purposes.
Branch If NC Event Reset ‘BER’
The BER command branch if NC NC-event reset is used to continued
program processing at the declared branch label if the NC-event defined
in the command parameter is reset.
BER <Branch label> <Process number[0..6]>:<Event number[0..31]> BER .LABEL 1:15
BER <Branch label> <Event number[0..31]> BER .LABEL 9
If the symbol "*" is declared instead of the NC-event number, processing
branches to the addressed branch label if all the NC-events in the speci-
fied process are reset.
NC-events can also be changed by the SPS program and via the
MUI/GUI/SOT menu. Therefore please refer to the machine builder's in-
formation since the builder may have used various NC-events for syn-
chronization purposes.
Example NC program - Branches conditional on NC events
At the begin of both NC-programs, all NC-events for the given process
are reset. If NC-event 15 in process 1 is set before process 2 reaches line
3, then process 2 continues processing at the branch label ".WAIT" in line
7. If it is not set, the process continues to execute in line 4.
NC program process 1 NC program process 2
RE 1:* ;Reset all NC events in
process 1
RE 2:* ;Reset all NC events
in process 2
T1 BSR .M6 ;Tool change T1 ;Tool change
SE 1:15 ;Set NC event 15 in process
1
BES .WARTEN 1:15 ;Branch to .label
WAIT if NC event 15
of process 1 status is
1
M03 S150 ;Spindle ON M03 S150 ;Spindle ON
G04 F15 ;Dwell time G04 F15 ;Dwell time
M05 ;Spindle OFF M05 ;Spindle OFF
RET ;End of program RET ;End of program
Syntax
Syntax