Yaskawa Ladder Works Programming Manual User Manual

Page 218

Advertising
background image

A-6

3. Application to ladder program

The use of Expression in the ladder program is divided into three kinds of the following.

① Conditional expression of IF instruction

② Conditional expression of WHILE instruction

③ Operational expression of EXPRESSION instruction

The use example is explained as follows.

① Conditional expression of IF instruction

The Expression is described in the conditional expression description area of the IF

instruction and the ELSE instruction. However, only Expression which outputs the result

of the bool type can be described. Therefore, the description of the Expression which

includes the substitution operator is not recognized.

ex)

MB000001

==

true OK

MW00002

<

100

OK

MW00003

!=

MW00004

OK

MB000005

=

false NG

MW00007

=

MW00010

NG

② Conditional expression of WHILE instruction

The Expression is described in the conditional expression description area of the WHILE

instruction. However, only Expression which outputs the result of the bool type can be

described. Therefore, the description of the Expression which includes the substitution

operator is not recognized.

ex)Refer to the example of ①.

③ Operational expression of EXPRESSION instruction

The Expression is described in the conditional expression description area of the

EXPRESSION instruction. The operational expression can be described according to the

description rule of Expression. However, Expression which outputs the result of the

bool type cannot be described.

ex)

MB000010 = MB000001 && MB000005;

OK

MB000011 = MB000010 == true;

OK

MW00000 = (MW00001 + MW00005) / MW00004;

OK

Advertising