Yaskawa YASNAC PC NC PLC Programming Manual User Manual

Page 71

Advertising
background image

6 - 35

YASNAC PCNC PLC Programming Manual Chapter 6: PLC Instructions

(c) Explanation

•

A ST contact must be entered before the ADDW instruction.

•

The ADDW 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
FFFFH.

(d) Example

(27)SUBW (SUB Word Register) RR after operation: RR-

(a) Function

The instruction executes subtraction between the contents of double-length register
(WR2) and double-length register (WR1) when the ST contact is ON (RR = 1) and
stores the result to register (WR2).

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

(b) Format

(c) Explanation

•

A ST contact must be entered before the SUBW instruction.

•

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

•

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

≤

WR2.

A B Paradym31 Variable Name

Advertising