beautypg.com

Yaskawa YASNAC PC NC PLC Programming Manual User Manual

Page 69

background image

6 - 33

YASNAC PCNC PLC Programming Manual Chapter 6: PLC Instructions

(24) DIN (Data Insert) RR after operation: RR-

(a) Function

The function executes AND between R1 and the numeric value, and between R2 and the
complement of the numeric value, then OR between the results when the ST contact is ON
(RR = 1) and stores the result of OR to R2. (Extraction of the data)

If the ST contact is OFF (RR = 0), the DIN instruction is not executed.

(b) Format

(c) Explanation

A ST contact must be entered before the DIN instruction.

The DIN instruction is executed in intervals of “4 × n” msec while the ST contact is
ON.

The relationship between register and numeric value is shown below.

A, B: “0” or”1”

(d) Example

(25)ADC (Add with Carry) RR after operation: RR

Ù

(a) Function

The instruction executes addition between the contents in registers R1 and R2, and
the content of RR and stores the result to register R2. If carry occurs “1” is set to RR.

D7

D6

D5

D4

D3

D2

D1

D0

R1

A

A

A

A

A

A

A

A

R2

B

B

B

B

B

B

B

B

n

0

0

0

0

1

1

1

1

Result

B

B

B

B

A

A

A

A

B C

A

Paradym31 Variable Name