Reading And Writing The Registers - Siemens SIMATIC S5 IP 281 Equipment Manual

Hide thumbs Also See for SIMATIC S5 IP 281:
Table of Contents

Advertisement

R 11192

Reading and Writing the Registers

3.1.3
The registers are read or written via the programmable controller using S5
commands. The permissible commands are found in section 3.10.
Writing the
The use of word commands is recommended for registers which are longer
registers
than one byte (load, interrupt and parameter registers) .
(Exception: CPU 944, only byte commands are permitted.)
The 1P 281 does not accept the values until the last byte is written (access to
the byte with the highest offset address of the corresponding register). It is
mandatory that the sequence from the lowest address to the highest ad-
dress (or from the highest byte to the lowest byte) be adhered to to prevent
the registers from accepting erroneous values.
Reading the
The contents of the registers are stored intermediately during read ac–
registers
highest byte of the register to be read is accessed.
Example:
Read byte 3 of CVR1
Read byte 2 of CVR1
Read byte 1 of CVR1
Read byte O of CVR1
Read byte 3 of CVR1
Read byte 2 of CVR1
Read STATUS1
Read byte 1 of CVR1
It is recommended that registers which are longer than one byte (IIR and
(Exception: CPU 944: Only byte commands are permitted.)
Access
via
CPU 944 inPLCS5–115U does not permit word commands. When byte
byte commands
command addressing is used, the access sequence shown below must be
adhered to.
– Sequence of byte addresses for 2–byte registers:
2nd byte address: n+l
– Sequence of byte addresses for 4–byte registers:
2nd byte address: n+l
3rd byte address: n+2
4th byte address: n+3
@SiemensA(31992, order
No other register can be read until the entire register has been read.
As soon another readable register is accessed, the new contents
are intermediately stored and the old value is lost.
-t Value of CVR1 is still valid.
-t Value is stored.
-t Value of CVR1 is lost.
6ES599&r)Kp21
Software Se ftings
to obtain avalkj value
3 – 3

Advertisement

Table of Contents
loading

Table of Contents