Program Branch (Case - Siemens SINUMERIK 840D sl Programming Manual

Job planning
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

1.10.3
Program branch (CASE ... OF ... DEFAULT ...)
Function
The CASE function provides the possibility of checking the actual value (type: INT) of a
variable or an arithmetic function and, depending on the result, to jump to different positions
in the program.
Syntax
CASE(<expression>) OF <constant_1> GOTOF <jump destination_1>
<constant_2> GOTOF <jump destination_2> ... DEFAULT GOTOF <jump
destination_n>
Significance
CASE:
<expression>:
OF:
<constant_1>:
<constant_2>:
DEFAULT:
GOTOF:
Job Planning
Programming Manual, 06/2009, 6FC5398-2BP20-0BA0
Jump statement
Variable or arithmetic function
Keyword to formulate conditional program branches.
First specify constant value for the variable or arithmetic function
Type:
INT
Second specified constant value for the variable or arithmetic
function
Type:
INT
For the cases where the variable or arithmetic function does not
assume any of the specified constant values, the DEFAULT
instruction can be used to determine the branch destination.
Note:
If the DEFAULT instruction is not programmed, then in these
cases, the block following the CASE instruction is the jump
destination.
Jump instruction with jump destination towards the end of the
program.
Instead ofGOTOF all other GOTO commands can be programmed
(refer to the subject "Program jumps to jump markers").
Flexible NC programming
1.10 Program jumps and branches
97

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents