Reading And Writing Plc Variables; Program Jumps; Unconditional Program Jumps - Siemens SINUMERIK User Manual

Hide thumbs Also See for SINUMERIK:
Table of Contents

Advertisement

11.14.3

Reading and writing PLC variables

Functionality
To allow rapid data exchange between NC and PLC, a special data area exists in the PLC user interface with a length of 512
bytes. In this area, PLC data are compatible in data type and position offset. In the NC program, these compatible PLC
variables can be read or written.
To this end, special system variables are provided:
$A_DBB[n]
$A_DBW[n]
$A_DBD[n]
$A_DBR[n]
"n" stands here for the position offset (start of data area to start of variable) in bytes
Programming example
R1=$A_DBR[4]
Note
The reading of variables generates a preprocessing stop (internal STOPRE).
Note
Writing of PLC tags is generally limited to a maximum of three tags (elements).
Where PLC tags are to be written in rapid succession, one element will be required per write operation.
If more write operations are to be executed than there are elements available, then block transfer will be required (a
preprocessing stop may need to be triggered).
Example:
$A_DBB[1]=1 $A_DBB[2]=2 $A_DBB[3]=3
STOPRE
$A_DBB[4]=4
11.15

Program jumps

11.15.1

Unconditional program jumps

Functionality
NC programs process their blocks in the sequence in which they were arranged when they were written.
The processing sequence can be changed by introducing program jumps.
The jump destination can be a block with a label or with a block number. This block must be located within the program.
The unconditional jump instruction requires a separate block.
Programming
GOTOF label
GOTOB label
Label
Programming and Operating Manual (Turning)
01/2017
;Data byte (8-bit value)
;Data word (16-bit value)
;Data double-word (32-bit value)
;REAL data (32-bit value)
;Reading a REAL value, offset 4 (starts at byte 4 of range)
;Jump forward (in the direction of the last block of the program)
;Jump backwards (in the direction of the first block of the program)
;Selected string for the label (jump label) or block number
127

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 808dSinumerik 808d advanced

Table of Contents