Conditional Program Jumps (If, Gotob, Gotof, Goto, Gotoc) - Siemens SINUMERIK 840DE Programming Manual

Hide thumbs Also See for SINUMERIK 840DE:
Table of Contents

Advertisement

Jump forward
Jump with block number
GOTOF N100
....
N100 ;destination
Indirect jumps
Jump to block number
N5 R10=100
N10 GOTOF "N"<<R10 ;jump to block whose number is in R10
N90
N100 ;destination
N110
Jump to labels
DEF STRING[20] DESTINATION
DESTINATION = "label2" ;jump with variable jump destination
GOTOF DESTINATION
Label1: T="Drill1"
....
Label2: T="drill2" ;destination
Further information:
• The unconditional jump must be programmed in a separate block.
• In programs with unconditional jumps, the end of program M2/M30 does not have to
10.3

Conditional program jumps (IF, GOTOB, GOTOF, GOTO, GOTOC)

Function
Jump conditions can be formulated using IF instructions. The jump to the programmed jump
destination is only performed if the jump condition is fulfilled.
Programming
IF expression GOTOB <destination>
Or
IF expression GOTOF <destination>
Or
IF expression GOTO/GOTOC <destination
Fundamentals
Programming Manual, 10.2004 Edition, 6FC5 298-7AB00-0BP1
10.3 Conditional program jumps (IF, GOTOB, GOTOF, GOTO, GOTOC)
appear at the end of the program.
Arithmetic Parameters and Program Jumps
10-5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents