FX Series Programmable Controllers

Basic Program Instructions 2

2.15Set and Reset

FX1S

FX1N

FX2N

FX2NC

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Mnemonic

Function

 

 

 

 

 

Format

Devices

Program steps

 

 

SET

Sets a bit device

 

 

 

 

 

 

 

 

 

 

Y,M:1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(SET)

permanently ON

 

 

 

 

 

SET

 

 

 

Y, M, S

S, special M

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

coils:2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Resets a bit

 

 

 

 

 

 

 

 

 

Y, M, S, D, V, Z

 

 

 

 

 

 

 

 

 

 

 

 

 

(see section

D, special D

 

 

RST

device

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(ReSeT)

permanently

 

 

 

 

 

RST

 

 

 

2.16 for timers

registers, V and

 

 

 

 

 

 

 

 

 

 

 

and counters

Z:3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

OFF

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T,C)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Program example:

 

 

 

 

 

 

 

 

 

 

 

 

X0

SET Y0

X1

RST Y0

X2

SET M0

X3

RST M0

X4

SET S0

X5

RST S0

X6

RST D0

0

LD

X

0

1

SET

Y

0

2

LD

X

1

3

RST

Y

0

4

LD

X

2

5

SET

M

0

6

LD

X

3

7

RST

M

0

8

LD

X

4

9

SET

S

0

10

LD

X

5

11

RST

S

0

12

LD

X

6

13

RST

D

0

Basic points to remember:

-Turning ON X0 causes Y0 to turn ON.

Y0 remains ON even after X0 turns OFF.

-Turning ON X1 causes Y0 to turn OFF. Y0 remains OFF even after X1 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.

X0

X1

Y0

-It is also possible to use the RST instruction to reset the contents of data devices such as data registers, index registers etc. The effect is similar to moving ‘K0’ into the data device.

Resetting timers and counters:

• Please see next page.

2-17

Page 43
Image 43
Mitsubishi Electronics FX1S manual Set and Reset, Resetting timers and counters