Calculation syntax, Simple expression, Comments – MTS Series 793 User Manual

Page 373: Data types

Advertising
background image

Note:

You must be at the Calibration access level to edit values and dimensions on the Fullscale tab.

Calculation Syntax

Simple Expression

The simplest expression of a calculated signal is an equation that uses other signals and calculation parameters
in the calculation.

For example:

“Axial Stress” = “Axial Force” / “Area”;

If the names contain spaces or other special characters, they must be enclosed in quotation marks. In the
preceding example, the quotation marks could have been left off of Area. However, it is typical to always put
them in.

Note:

Signal labels have display names and internal names. If the display name does not require quotes,
but the internal name does, the application will automatically put quotes around the signal name when
the calculation is saved and restored.

Names are case sensitive in the Calculation Editor window.

The expression can span multiple lines, and spaces or tabs can be inserted to improve readability. However,
the names in quotation marks must not contain extra spaces or line terminators.

Comments

C-style comment delimiters can be used to insert comments in the expression, or temporarily comment out
portions of the code. There are two types of comments—bracketing comments and end-of-line comments.

Bracketing comments are delimited by character sequences /* and */ that can span multiple lines. For example:

/* … ...my comment... ...*/

End of line comments start with a double-slash, and end at the end of the line. For example:

“Axial Stress” = “Axial Force” / “Area”;

//my comment

Data Types

In simple situations, you can think of all the data in calculations as being numbers. However, the calculation
engine actually handles different kinds of data. A value is an IEEE 32-bit floating point, an IEEE 64-bit floating
point, or a 32-bit integer.

All calculation parameters are stored in IEEE 32-bit floating-point format.

All floating point signals are 32-bit floating points.

MTS Series 793 Control Software 373

Calculated Signals

Advertising