Arithmetic Operation - Siemens SIMATIC S5-115U User Manual

Simatic s5 series cpu 941-7ub11 cpu 942-7ub11 cpu 943-7ub11 and cpu 943-7ub21 cpu 944-7ub11 and cpu 944-7ub21
Table of Contents

Advertisement

STEP 5 Operations
Processing the "JUR" Operation
Execution of the "JUR" operation is independent of the RLO.
The parameter specifies the jump displacement directly. For example, parameter "1" means that
processing will continue with the next one-word statement. Parameter "2" means processing will
continue with the one-word statement directly after the next one-word statement.
Such labeling includes the following special features:
The jump displacement is not corrected automatically. If changes are made in the Section of
the program that is jumped over, the jump destination can be displaced.
The jump destination should be in the same segment or block as the jump statement.
Caution
!
Avoid jumps over block boundaries since you have no control over the absolute
location of blocks in the internal user memory.
8.3.4

Arithmetic Operation

An arithmetic operation increases the contents of ACCUM 1 by a specified value. The parameter
represents this value as a positive or negative number. Table 8-29 shows the essential features of
the "ADD" operation. An example follows the table.
Operation
Operand
ADD
ID
BN
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 ACCUM 2, i.e., the contents
of ACCUM 2 are not changed.
8-70
Table 8-29. Arithmetic Operation
Add a constant
Add byte or word constants.
Parameter
- 128 to+127
- 32768 to+32767
S5-115U Manual
Meaning
EWA 4NEB 811 6130-02b

Advertisement

Table of Contents
loading

Table of Contents