beautypg.com

Condition expressions, A logical expression, E condition expressions – Delta RMC151 User Manual

Page 344

background image

RMC70/150 and RMCTools User Manual

In the Tags box, find the desired register and double click it. It will be placed

in Expression box. Then, in the Operators box, double-click the assignment

operator (:=). It will also be placed in Expression box.

Note:

You can also type the information directly in the Assignment Expression

box.

Local Variables:

If your expression needs temporary variables, you can declare variables in the user

program step. See Local Variables for details.

3. Complete the expression:

Double-click any item in the lists on the Tags, Functions or Operators tabs

to insert into the expression.

Type other items, such as register addresses or numeric values.

To mix data types, you must explicitly convert them. For example, you cannot

directly assign a fractional value to an integer variable. You must use the data

type conversion functions.

If you enter multiple expressions in the Expression command, each expression

must end with a semi-colon. See the examples above.

If the expression is invalid, the Expression Builder give an error. When no

errors are listed, the expression is valid.

4. Click OK to close the dialog and enter the expression in the command.

5.13.3. Condition Expressions

Condition expressions are used in the Condition box of a Program Trigger item, and in the

Wait For and Conditional Jump link types. A condition expression must evaluate to True or

False.
Simple condition expressions can also be entered with the New Condition Wizard.

Sample Expressions

1.

_Axis[0].Status.InPos

=

True

//checks if the in Axis 0 Status Bit

named "In Position " is on.

2.

_Axis[1].ActPos

< 4.0

AND

MyInput

= True


3.

_Axis[0].ActPos

>

Pos1

AND

_Axis[1].ActPos

< 4.0


4.

MyVariable

+

SQRT

(_

Axis[1].ActPrs

) >= 12900.1


5.

counter

>= 300

Entering an Expression

Using a Wizard
In the Condition box of a Program Trigger or a link type, click the ellipsis button . The

New Condition Wizard will open. Use the wizard to create the following types of

expressions:

Test a Status bit, such as the In Position bit.

Test and Error bit, such as the Fault Input bit.

324

Delta Computer Systems, Inc.

This manual is related to the following products: