Reading And Writing Plc Variables - Siemens SINUMERIK 802D sl Programming And Operating Manual

Surface grinding
Hide thumbs Also See for SINUMERIK 802D sl:
Table of Contents

Advertisement

Example:
N10 PVAR7[2]=24
Value assignment for field with SET instruction:
N20 PVAR5[2]=SET(1,2,3)
Value assignment for field with REP instruction:
N20 PVAR7[4]=REP(2)
10.9.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[5]
Note
The reading of variables generates a preprocessing stop (internal STOPRE).
Surface grinding
Programming and Operating Manual, 11/2012, 6FC5398-5CP10-3BA0
10.9 Arithmetic parameters (R variables), LUD and PLC variables
;The third field element (with index 2) is assigned
the value 24.
;After the 3rd field element, different values are
assigned.
;After field element [4] - all are assigned the same
value, here 2.
;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 5 (starts at byte 5 of range)
Programming
279

Advertisement

Table of Contents
loading

Table of Contents