Bps (bit push), brd (bit read), and bpp (bit pop) – IDEC MicroSmart User Manual

Page 190

Advertising
background image

7: B

ASIC

I

NSTRUCTIONS

7-6

« FC4A M

ICRO

S

MART

U

SER

S

M

ANUAL

»

BPS (Bit Push), BRD (Bit Read), and BPP (Bit Pop)

The BPS (bit push) instruction is used to save the result of bit logical operation temporarily.
The BRD (bit read) instruction is used to read the result of bit logical operation which was saved temporarily.
The BPP (bit pop) instruction is used to restore the result of bit logical operation which was saved temporarily.

When using

WindLDR

, the user need not program the BPS, BRD, and BPP instructions. The circuit in the ladder diagram

shown below is converted into BPS, BRD, and BPP when the ladder diagram is compiled.

I0

I1

I2

Ladder Diagram

I0

ON

OFF

I1

ON

OFF

I2

ON

OFF

I3

ON

OFF

Timing Chart

Q1

ON

OFF

I3

Q2

ON

OFF

Q3

ON

OFF

When both inputs I0 and I1 are on, output Q1 is turned on.

When both inputs I0 and I2 are on, output Q2 is turned on.

When both inputs I0 and I3 are on, output Q3 is turned on.

BPS

BPP

BRD

Instruction

Data

LOD
BPS
AND
OUT
BRD
AND
OUT
BPP
AND
OUT

I0

I1
Q1

I2
Q2

I3
Q3

Program List

Q1

Q2

Q3

Advertising