2 writing expressions, 2 writing expressions -5, App index – Yokogawa Removable Chassis DX1000N User Manual

Page 249: Common items

Advertising
background image

9-5

IM 04L41B01-01E

Computation and Report Functions (/M1 and /PM1 Options)

1

2

3

4

5

6

7

8

9

10

11

12

App

Index

1

2

3

4

5

6

7

8

9

10

11

12

App

Index

9.2 Writing Expressions

This section explains the meaning and how to write expressions.

Common Items

Follow the rules below when writing expressions.
• Use up to 120 characters to write expressions.
• The precedence of computing terms can be specified using parentheses.
• Specify the channels in the expression using channel numbers.
Example: 1, 12, and 101
• The one-digit number of constants (K), communication input data (C), remote input

terminal status (D), pulse input (P, Q), internal switch (S), alarm output relay status
(I), flag (F), and recording (memory sampling) status (M) in the expression can be
denoted as in “01” and “1.”

Example: K01, K1, C01, C1, D01, D1, P01, P1, Q01, Q1, S01, S1, I01, I1, F01, and F1.
• The data of the previous scan is used in the computation for its own channel number

and channel numbers greater than its own channel number in the expression.

• Special computation (HOLD, RESET, and CARRY) and conditional expressions are

written at the beginning of the expression.

Order of Precedence in Computations

The order of precedence of computation in expressions is as follows:

Type

Computing Element

(high order of precedence)

Function

ABS(), SQR(), LOG(), LN(), EXP(),

TLOG.MAX(), TLOG.MIN(), TLOG.AVE(),

TLOG.SUM(), TLOG.P-P(), CLOG.MAX(),

CLOG.MIN(), CLOG.AVE(), CLOG.SUM(),

CLOG.P-P()

Special computation and conditional expression

PRE, HOLD, RESET, CARRY, [a?b:c]

Power

**

Logical negation

NOT

Multiplication and division

*, /

Addition and subtraction

+, –

Greater than and less than

.GT., .LT., GE., LE.

Equal and not equal

.EQ., .NE.

Logical product

AND

Logical sum and exclusive logical sum

OR, XOR

(low order of precedence)

Limitations

The following limitations exists in writing expressions.

Type

Limitations

TLOG computation A computing element cannot be written inside the parentheses.

Only one TLOG computation can be specified in a single expression.

CLOG computation Number of channels that can be written in the parentheses is 30 channels or less.

A computing element cannot be written inside the parentheses.
Only one CLOG computation can be specified in a single expression.

PRE

A computing element cannot be written inside the parentheses.

HOLD(a):b

Can only be written at the beginning of an expression.
Only one HOLD computation can be specified in a single expression.

RESET(a):b

Can only be written at the beginning of an expression.
Only one RESET computation can be specified in a single expression.

CARRY(a):b

Can only be written at the beginning of an expression.
Only one CARRY computation can be specified in a single expression.
Only TLOG.SUM can be written in “b.”

Conditional equation
[a?b:c]

RESET, CARRY, or HOLD cannot be written to “a,” “b,” or “c.” Other computing

elements cannot be combined (example: [a?b:c]+001). However, coditional

equations can be specified for a, b, and c.

Advertising
This manual is related to the following products: