Program Branch Switch..case - HEIDENHAIN CNC PILOT 640 User Manual

Smart.turn and din programming
Table of Contents

Advertisement

4

Program branch SWITCH..CASE

The program branch consists of the elements:
SWITCH, followed by a variable. The content of the variable is
interrogated in the following CASE statement
CASE x: The CASE branch is run with the variable value x. CASE
can be programmed repeated times
DEFAULT: This branch is executed if no CASE statement
matched the variable value. DEFAULT can be omitted
BREAK: Concludes the CASE branch or DEFAULT branch
Programming:
Select Extras > DINplus word.... The control opens the Insert
DIN PLUS word selection list.
Select SWITCH
Enter the switch variable
For each CASE branch:
Select CASE (in Extras > DINplus word...)
Enter the SWITCH condition (value of the variable) and insert
the NC blocks to be executed
For the DEFAULT branch: Insert the NC blocks to be executed
Example: SWITCH..CASE
. . .
N.. SWITCH #g201
N.. CASE 1
N.. G0 Xi10
. . .
N.. BREAK
N.. CASE 2
N.. G0 Xi20
. . .
N.. BREAK
N.. DEFAULT
N.. G0 Xi30
. . .
N.. BREAK
N.. ENDSWITCH
. . .
482
DIN/ISO programming | Conditional block run
Executed if #g201=1
Executed if #g201=2
No CASE statement matched the variable value
HEIDENHAIN | User's Manual smart.Turn and DIN Programming | 12/2017

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Manualplus 620

Table of Contents