beautypg.com

If–then–else – Rockwell Automation 9301 Series RSView32 Users Guide User Manual

Page 537

background image

14–24

RSView32 User’s Guide

1.

tag1 > tag2 = 0

2.

tag 1 < tag3 = 1

3.

0 AND 1 = 0

The expression evaluates to 0 (false).

_____________________________

tag1>tag2 AND tag3

is evaluated in this sequence:

1.

tag2 AND tag3 = 1

2.

tag1 > 1 = 1

The expression evaluates to 1 (true).

_____________________________

NOT tag1 AND tag2 > tag3 ** 2

is evaluated in this sequence:

1.

NOT tag1 = 0

2.

0 AND tag2 = 0

3.

tag3 ** 2 = 100

4.

0 > 100 = 0

The expression evaluates to 0 (false).

If–then–else

If–then–else expressions carry out an action conditionally or branch
actions depending on the statements in the expression. The if–then–