beautypg.com

Assignment expressions, E assignment expressions – Delta RMC151 User Manual

Page 342

background image

RMC70/150 and RMCTools User Manual

For examples of expressions, see the Condition Expressions and Assignment Expressions

topics.
For examples of user programs that use expressions, see the Programming Examples

topic.

Parts of an Expression

The building blocks of all expressions are:

Operators

These are symbols that represent an action to be performed, such as +,

-, /, etc.

Functions

These are predefined, named formulas, such as SIN(), MIN(),

LOG_EVENT(), etc.

User

Functions

User functions are custom functions created or imported by the user.

User functions can be edited in the User Function Editor.

Operands

These are the elements that the operators and functions work on:

Type

Examples

Constant

Value

3, 10.345

Register (tag)

_Axis[0].ActPos, %MD8.3

Variable

SampleVariable1 (must exist in the variable

table)

Keywords

These are words that have a specific meaning for the code, such as IF,

THEN, ELSE, True, False, etc.

Comments Comments are a good way of documenting the code.

Expression Color-Coding

Expressions are color-coded as follows:

Blue: Keywords

Dark Red: System-defined tags

Beige: User-defined tags

Black: Operators and numbers

Magenta: Functions

Red with yellow background: Invalid value

Troubleshooting Expressions

For help on troubleshooting expressions, see the Troubleshooting Expressions topic.

Operators and Functions

For details on the operators and functions used in expressions, see the Operators and

Functions topics.

5.13.2. Assignment Expressions

An assignment expression assigns a value to a register. Assignment expressions are used in

the Expression (113) command in a User Program, and in User Functions.

Assignment Expression Basics

An assignment expression must follow this format:

322

Delta Computer Systems, Inc.

This manual is related to the following products: