Yaskawa YASNAC PC NC PLC Programming Manual User Manual

Page 64

Advertising
background image

6 - 28

YASNAC PCNC PLC Programming Manual Chapter 6: PLC Instructions

(c) Explanation

•

A

ST contact must be entered before the ADD instruction.

•

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

•

There is no function to detect overflow. Make sure that the result will not exceed 255
(FFH).

(d) Example

(16)SUB (SUB Register) RR after operation: RR-

(a) Function

The function executes subtraction between the content in the resister R2 and the content in
register R1 when the R1 contact is ON (RR = 1) and stores the result to register R2.

The content in register R1 remains unchanged and status of RR also remains unchanged.

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

(b) Format

(c) Explanation

There is no function to detect underflow. Make sure that the following is always satisfied:
R1

≤

R2.

(17)ANR (AND Register) RR after operation: RR-

(a) Function

The function executes AND operation between the content in the resister R2 and the
content in register R1 when the ST contact is ON (RR = 1) and stores the result to
register R2.

The content in register R1 remains unchanged and status of RR also remains unchanged.

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

A B Paradym31 Variable Name

Advertising