6F3B0250
Basic Hardware and Function
127
7. Instructions
Logical operations
FUN
Name
Expression
Function
Steps Speed Available Page
No.
(
m
s)
T1 T1S
048 AND
-
[
A AND B
®
C ]
-
Finds logical AND of
A and B,
and stores it in
C.
4
5.7
Ö
Ö
174
050 OR
-
[
A OR B
®
C ]
-
Finds logical OR of
A and B,
and stores it in
C.
4
5.7
Ö
Ö
175
052 Exclusive OR
-
[
A EOR B
®
C ]
-
Finds logical exclusive OR of
A
and
B, and stores it in C.
4
5.7
Ö
Ö
176
064 Bit test
-
[
A TEST B ]
-
Turns ON output if logical AND
of
A and B is not 0.
3
5.0
Ö
Ö
181
Shift operations
FUN
Name
Expression
Function
Steps Speed Available Page
No.
(
m
s)
T1 T1S
068
1 bit shift right
-
[ SHR1
A ]
-
Shifts data of
A 1 bit to the right
(LSB direction). The carry flag
changes according to the result
.
2
6.8
Ö
Ö
182
069
1 bit shift left
-
[ SHL1
A ]
-
Shifts data of
A 1 bit to the left
(MSB direction). The carry flag
changes according to the result
.
2
6.8
Ö
Ö
183
070
n bit shift right
-
[
A SHR n
®
B ]
-
Shifts data of
A n bits to the right
(LSB direction) and stores the
result in
B. The carry flag
changes according to the result
.
4
10.2
Ö
Ö
184
071
n bit shift left
-
[
A SHL n
®
B ]
-
Shifts data of
A n bits to the left
(MSB direction) and stores the
result in
B. The carry flag
changes according to the result.
4
10.2
Ö
Ö
185
074
Shift register
D SR Q
S (
n)
E
A
When shift input (S) comes ON,
shifts the data of specified shift
register 1 bit to the left, and
stores data input (D) state into
A.
This operation is enabled while
enable input (E) is ON. The carry
flag changes according to the
result.
Shift register:
n devices starting
with device
A.
3
65.9 -
76.2
Ö
Ö
186
075
Bi-directional
shift register
D DSR Q
S (
n)
E
L
A
When shift input (S) comes ON,
shifts the data of specified shift
register 1 bit to the left or to the
right depending on direction input
(L). This operation is enabled
while enable input (E) is ON. The
carry flag changes according to
the result.
Shift register:
n devices starting
with device
A.
Direction: Left when L is ON,
right when L is OFF
3
69.0 -
79.3
Ö
Ö
188
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: [email protected]