Sample Program For Processing Data Words With A Data Word Number Exceeding - Siemens Simatic S5 IP 240 Manual

Counter/positioning/position decoder module
Hide thumbs Also See for Simatic S5 IP 240:
Table of Contents

Advertisement

Positioning
10.24
Sample Program for Processing Data Words with a Data Word Number
Exceeding 255
If a data block exceeds a length of 256 data words, those data words with a data word number
exceeding 255 must be processed using supplementary STEP 5 operations (system operations). The
sample programs below are intended to help you work with these data words.
Function:
The PLC-specific "L/T DWX" function blocks are used to load and transfer three data words with
word numbers greater than 255; these data words cannot be addressed using STEP 5 operations
"L DW x" and "T DW x".
Note
The following sample programs do not check to see whether the specified data
block has been created or is of sufficient length. Should this be the case, the
S5 CPU may go to STOP.
Descriptions of the identifiers:
DBNR - D KF
DATA BLOCK NUMBER
DWNR - I
W
1st DATA WORD TO BE READ OR WRITTEN
L/T
- I BI
ON A "0" SIGNAL, THE CONTENTS OF THE THREE DWs ARE OUTPUT TO
"
ON A "1" SIGNAL, THE VALUES IN "DWN" - "DWN2" ARE TRANSFERRED
DWN
- I
W
VALUE FROM/FOR DATA WORD "DWNR"
(DL=FREE, DR=POSITION NUMBER)
DWN1 - I
W
VALUE FROM/FOR DATA WORD "DWNR"+1
(POSITION VALUE: SG AND DECADES 10^4 - 10^6 OR 2^16 - 2^23)
DWN2 - I
W
VALUE FROM/FOR DATA WORD "DWNR"+2
(POSITION VALUE: DECADES 10^0 - 10^3 OR 2 ^ 0 - 2 ^ 15)
10-94
DWN" - "DWN2"
TO THE DATA BLOCK
IP 240
EWA 4NEB 811 6120-02a

Advertisement

Table of Contents
loading

Table of Contents