Appendix 10 expression examples, Appendix 10 – Yokogawa Data Acquisition with PID Control CX2000 User Manual

Page 420

Advertising
background image

App-51

IM 04L31A01-01E

Appendix

App

Appendix 10

Expression Examples

The following are simple application examples using expressions. Refer to them when
using computation channels.

Function
This is a counter that counts from 1 to 15.

Expression
31 = 31*(31.LT.K02)+K01
K01=1
K02=15

Explanation
When the value of channel 31 is smaller than 15, the value of (31.LT.K02) is 1. The value of channel 31
increments by 1 every scan interval.
When the value of channel 31 is 15, the value of (31.LT.K02) becomes 0. The value of 31*(31.LT.K02)+K01
returns to 1.

Counter

1

15

Scan interval

Note
Computation channels are processed in sequence. The
value 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. In this
example, a value one scan behind is used for "31" in
"31*(31.LT.K02)+K01."

Function
If the measured values on channel 1 are integrated and the total exceeds 1000, 1000 is subtracted from the total, and
integration continues.

Scan Interval
1 second
Channel 1
Measuring range: 0.0–50.0 L/M (liters per minute)

Expression
31 =(31+(01/K01))-(31.GE.K02)*K02
K01 = 60 (unit of time of the measured flow on channel 1

÷ scan interval, or in this case, 60 sec. ÷ 1 sec = 60)

K02 =1000 (reset if the integrated value exceeds this value)

Explanation
(31+(01/K01)) calculates the integrated value on channel 1.
When the value of channel 31 is smaller than 1000, the value of (31.GE.K02) is 0. The value of (31.GE.K02)*K02 is 0.
When the value of channel 31 is 1000 or higher, the value of (31.GE.K02) is 1. The value of (31.GE.K02)*K02 is 1000.
1000 is subtracted from the integrated value, and integration continues.

Resetting and Carrying Over an Excess When the Integrated Value Exceeds a Certain Value

The portion exceeding 1000 is carried over, and the value is reset

Channel 31

1000

Time

Channel 1

(Integration)

Scan interval

Advertising