beautypg.com

App index special computation, Conditional expression – Yokogawa Value Series FX1000 User Manual

Page 216

background image

9-11

IM 04L21B01-01EN

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

3

2

1

4

5

6

7

8

9

10

11

12

13

14

App

Index

Special Computation

PRE( )

(Syntax)

PRE(e1)

(Condition)

Determines the previous value of e1.

HOLD(a):b

(Syntax)

HOLD(a):b

(Condition)

When a is zero, b is carried out to derive the computed value.
Otherwise, the previous computed value is held.

RESET(a):b

(Syntax)

RESET(a):b

(Condition)

When a is zero, b is carried out to derive the computed value.
Otherwise, the previous computed value of b is reset, and b is carried
out to derive the computed value.

CARRY(a):b

(Syntax)

CARRY(a):b

(Condition)

Only TLOG.SUM can be specified for b. If the computed value X of b is
less than a, the computed result is X. If X is greater than or equal to a,
the computed result is the excess (X – a).

(Description)

When a value such as the flow rate is summed and the threshold value
is reached or exceeded, the sum value is reset while carrying over the
amount that exceeded the threshold value.

Expression Example

Expression that sums the values of channel 1 and resets the value when it reaches or
exceeds 10000
K01 = 10000
CARRY(K01):TLOG.SUM(001)

Examples of Equations That Are Not Allowed

002+HOLD(K01):TLOG.SUM(001)
Reason: HOLD is not at the beginning of the expression.

RESET(101.GT.K01):TLOG.SUM(001)+RESET(101.GT.K01):002
Reason: RESET appears twice in one equation.

Conditional Expression

[a?b:c]

(Syntax)

[001.GT.K01?002:003]

(Condition)

If the measured value of channel 1 is greater than constant K01, the
computed result is the measured value of channel 2. Otherwise, the
computed result is the measured value of channel 3.

Examples of Equations That Are Not Allowed

[001.GT.K01?002:003]*K02
Reason: Used in combination with another computing element.

Nested Conditional Expressions

A conditional expression can be written to Expression

1

, Expression

2

, and Expression

3

in the equation [Expression

1

?Expression

2

:Expression

3

]. For example, the following

expression is allowed:
[Equation

1

?[Equation

2-1

?Equation

2-2

:Equation

2-3

]:[Equation

3-1

?Equation

3-2

:Equation

3-3

]]

Expressions can be nested as long as the number of characters of the expression does
not exceed 120 characters.

9.2 Writing Expressions