How can we help?

Structure of an Expression

You are here:
< All Topics

Expression Structure and Operators

Variables are wrapped in brackets and are prefixed with the Source identifier followed by a period, then the variable name in all lower case with an underscore used in place of spaces.

Example:

[PCSDB.general_equipment_status]

[Focas.cycle_status]

Constants are wrapped in brackets and are prefixed with the Source identifier followed by a period, then the constant name in all upper case with an underscore used in place of spaces.

Example:

[PCSDB.CYCLING]

[Focas.MEM]

Parameters are wrapped in curly brackets and a place holder is typically shown in all caps.

Example:

[Focas.spindle_speed]{SPINDLE NUMBER}

The text SPINDLE NUMBER should be replaced with the actual spindle number such as 1.

The expressions can utilize comparison, logical, and math operators. Parentheses are used to specify the order of operation and are required when building expressions.

Comparison Operators

SymbolMeaning
>Greater Than
<Less Than
>=Greater Than or Equal To
<=Less Than or Equal To
=Equal To
!=Not Equal To
==Set

Example:

([Focas.part_count] > [Focas.prev_part_count])

Logic Operators

SymbolMeaning
ANDLogical AND
ORLogical OR

Example:

([PCSDB.general_equipment_status]!=[PCSDB.CYCLING]) AND ([Focas.cycle_status]=[Focas.CYCLING])

Math Operators

Words are used as the math operators rather than the traditional symbols since symbols such as the dash are commonly used in part numbers.

SymbolExpression OperatorMeaning
+PLUSAddition
-MINUSSubtraction
*MULTIPLYMultiplication
/DIVIDEDivision

Example:

([Focas.part_count] MINUS [Focas.prev_part_count])

You can find an example of a custom calculation here.

Use of Parentheses

When building an expression each evaluation must be wrapped in parentheses.

Example:

([PCSDB.general_equipment_status]!=[PCSDB.CYCLING]) AND ([Focas.cycle_status]=[Focas.CYCLING])

When building a Target expression parentheses should not be used.

Example:

[Focas.part_count] MINUS [Focas.prev_part_count]

When building expressions using “OR” double parentheses should be used. This will make the system evaluate this potion of the expression first.

Example:

(([PCSDB.general_equipment_status]!=[PCSDB.CYCLING]) OR ([Focas.cycle_status]=[Focas.CYCLING]))

*This can be used with a result to set a custom value. See here for more detail.

Table of Contents