Set and Reset Bit Device

Bit Device Set and Reset: SET, RST

 

Function

-SET instruction sets a bit device permanently ON. The turned-on device remains the turned-on status even after SET instruction is turned OFF.

-RST instruction resets a bit device permanently OFF. The turned-on device by SET instruction can be turned OFF and reset by RST instruction.

 

Instruction

Device address

No. of Steps

Flag

M

X

Y

K

L

F

T

C

S

Z

D

@D

Int.

Error

Zero

Carry

SET

RST

S

o

-

o

o

o

-

-

-

o

-

-

-

-

1

-

-

-

o

-

o

o

o

-

o

o

o

-

-

-

-

 

 

Example)

 

-Turning ON X00 causes Y00 to turn ON.  Y00 remains ON even after X00 turns OFF.

-Turning ON X01 causes Y00 to turn OFF. Y00 remains OFF even after X01 turns OFF.

-SET and RST instructions can be used for the same device as many times as necessary. However, the last instruction activated determines the current status.

 

Steps

Instruction

Device

0

LD

X00

1

SET

Y00

2

LD

X01

3

RST

Y00

4

LD

X02

5

SET

M00

6

LD

X03

7

RST

M00

8

LD

X04

9

SET

L00

10

LD

X05

11

RST

L00