beautypg.com

Yaskawa YASNAC PC NC PLC Programming Manual User Manual

Page 77

background image

6 - 41

YASNAC PCNC PLC Programming Manual Chapter 6: PLC Instructions

(d) Example

(35)CPRW (Compare Word Register) RR after operation: RR

Ù

(a) Function

The instruction executes comparison between WR1 and WR2 when the ST content
is ON (RR = 1), and sets “0” or “1” to Z1 according to the result of comparison.

WR1 < WR2 Z1 = 0

WR

WR2 Z1 = 1

If the ST contact is OFF (RR = 0), the CPRW instruction is not executed. The content
of RR remains unchanged.

(b) Format

(c) Explanation

After the execution of CPRW instruction, the contents of WR1 and WR2 remain
unchanged.

A ST contact must be entered before the CPRW instruction.

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

(d) Example

A B Paradym31 Variable Name