S5-100U STEP 5 Operations
Transferring to the System Data Area
Example: Set the scan monitoring time to 100 ms after each mode change from “STOP” to
“RUN”. You can program this time in multiples of 10 ms in system data word 96. The
following function block can be called from OB21, for example.
ExplanationSTL
FB 11
L KF +10
TRS 96
BE
Block number and type
Load ACCU 1 with the factor 10.
Transfer this value to system data word 96.
!
Caution
The TIR, TRS and TNB operations are memory-changing operations with which you can
access the user memory and the system data area. These accesses are not monitored
by the operating system. Improper use of the operations can lead to changes in the
program and to a programmable controller crash.
8.3.3 Arithmetic Operations
An arithmetic operation changes the contents of ACCU 1 by a specified value. The parameter re-
presents this value as a positive or negative decimal number. Table 8-29 shows the essential
features of the “ADD” operation. An example follows the table.
Table 8-29. Overview of the “ADD” Operation
Operation MeaningOperand
ADD Add a constant
Add byte or word constants.
Parameter
-128 to +127
-32768 to +32767
ID
BF
KF
Processing
An arithmetic operation is executed independently of the RLO. It does not affect the RLO or the
condition codes.
You can subtract by entering a negative parameter.
Even if the result cannot be represented by 16 bits, no carry is made to ACCU 2, i.e., the contents
of ACCU 2 are not changed.
EWA 4NEB 812 6120-02
8-67