EasyManua.ls Logo

schmersal PROTECT-PSC - Page 175

schmersal PROTECT-PSC
267 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Programming / parameter assignment
6
Instruction Manual PROTECT-PSC
V 2.6R01 / 04.19
6-41
Examples
Arithmetical functions
Instruction
OP1
OP2
OP2
Function
W+
S1
S2
S3
S3 = S1 + S2
W-
S1
S2
S3
S3 = S1 - S2
W*
S1
S2
S3
S3 = S1 * S2
W/
S
1
S
2
S
3
S
3
= S
1
/ S
2
Store quotients in S3 and the remainder in
S3 + 1.
WINC
S
1
S
2
Incrementing of S2 and comparison of the
incremented value with S1. If both values
are equal, then the result is HIGH.
The data are treated as BCD values.
WDEC
S
1
Decrementing the content of S1.
The data are treated as BCD values
Agenda
S
1,2,3
: register
T
T
a
a
b
b
l
l
e
e
6
6
-
-
7
7
O
O
v
v
e
e
r
r
v
v
i
i
e
e
w
w
o
o
f
f
t
t
h
h
e
e
a
a
r
r
i
i
t
t
h
h
m
m
e
e
t
t
i
i
c
c
a
a
l
l
f
f
u
u
n
n
c
c
t
t
i
i
o
o
n
n
s
s
Examples
Multiply the content of the flag K002 with the content of the flag K000 and write the
result to flag K003.

Table of Contents