Condition (if/then/else) block, 3 condition (if/then/else) block – Nematron Pointe Controller User Manual

Page 158

Advertising
background image

Chapter 5: Developing Controller Programs

Pointe Controller User Guide

156

5.7.3 Condition (If/Then/Else) Block

A Condition block contains a Yes or No type
question that directs program flow in one of two
directions. When the specified condition evaluates
to a non-zero value, program flow proceeds down
the true branch.

By default, the true branch is labeled “Then” and
the false branch is labeled “Else,” to correspond to

the if-then-else programming construct. You can change these labels to yes and
no or on and off to correlate to the test condition.

PROPERTY

WHAT YOU ENTER

Caption

User label for the block.

Line Labels

If/Then/Else, Is/Yes/No, or Is/On/Off as the labels for the block and

outgoing flowlines.

Switch T/F Paths

Yes or No. Yes switches the direction of the true/false paths. When

you enable this option, the true path proceeds to the right, and
the false path proceeds down. No leaves true/false paths in the
normal orientation (true is down, false is to the right).

Timeout Value

Timeout value to wait for the condition to be true before
proceeding down the false path. Only the current chart remains
suspended waiting for this timeout to occur—all other charts
continue to run normally.

Units

Units of the Timeout Value.

Condition Type

Type of Condition:

Expression – Build a conditional expression using the

Build Condition

dialog.

Diag Fault Bit Test – Select an Input, Memory, or Output
tag and test to see if its

Diag Fault Bit

is set or clear.

If the condition evaluates true, then the Then/Yes/On line is
followed. If the condition evaluates false, then then Else/No/Off
line is followed.

Advertising