Omron SYSMAC CP Series Instruction & Reference Manual page 68

Cpu unit
Hide thumbs Also See for SYSMAC CP Series:
Table of Contents

Advertisement

2 Instructions
RSTA
RSTA(531) turns OFF N2 bits, beginning
from bit N1 of D, and continuing to the left
(more-significant bits). All other bits are
left unchanged. (No changes will be
made if N2 is set to 0.)
Bits turned OFF by RSTA(531) can be
turned ON by any other instructions, not
just SETA(530).
Hint
SETA
• SETA(530) can be used to turn ON bits in data areas that are normally accessed by words only, such
as the DM areas.
RSTA
• RSTA(531) can be used to turn OFF bits in data areas that are normally accessed by words only,
such as the DM areas.
Sample program
SETA
When CIO 0.00 is turned ON in the following example, the 20 bits (0014 hexadecimal) beginning
with bit 5 of CIO 100 are turned ON.
0.00
D
N1
N2
RSTA
When CIO 0.00 is turned ON in the following example, the 20 bits (0014 hexadecimal) beginning
with bit 3 of CIO 100 are turned OFF.
0.00
D
N1
N2
2-32
SETA
100
15
D: 100
1
1
&5
101
&20
RSTA
100
15
&3
D: 100
0
0
101
&20
15
D
0
0
D+1
D+2
N1: Bit 5
12
11
8
7
5
4
3
1
1
1 1
1
1
1
1
1
1
1
1
1
1
1
1
1
N1: Bit 3
12
11
8
7
4
3
0
0
0 0
0
0
0
0
0
0
0
0
0
0
0
0
0
CP1E CPU Unit Instructions Reference Manual(W483)
N1
0
0 0
N2 bits are
reset to 0 (OFF).
0 0
0
0
N2: 20 bits
1
0
N2: 20 bits
0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents