Kv -300 – KEYENCE Visual KV Series User Manual
Page 393

9.5 Programming Examples
KV-10/80 Series Only
KV
-300
KV-10/80
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-369
1
9
1. The initial settings are made.
2. The value of input data (DM0992) is written to measurement value (DM0004),
and measurement count (DM0008) is incremented by one.
3. Measurement values are accumulated (DM0004), and written to accumulated
values (DM0009 and DM0010). When the lower bit of the accumulated value
(DM0010) overflows (2009 turns ON), "1" is added to the upper bit of accumu-
lated value (DM0009).
4. When measurement count (DM0008), and accumulated values (DM0009 and
DM0010) are divided by average count (DM0003) to calculate average value
(DM0007). By this operation, relay 502 is turned ON to indicate completion of the
average value measurement, and measurement count (DM0008), and accumu-
lated values (DM0009 and DM0010) are reset.
5. When average value (DM0007) exceeds maximum limit setting (DM0001),
internal relay 1000 switches ON, and relay 500 switches on for two seconds to
indicate the maximum limit error.
When average value (DM0007) falls below minimum limit setting (DM0002),
internal relay 1001 switches ON, and relay 501 switches on for two seconds to
indicate the minimum limit error.
6. If average value (DM0007) becomes a value other than the initial setting (#0000),
maximum average value (DM0005) and minimum average value (DM0006) are
overwritten with the average value.
7. Average value (DM0007) is compared with maximum average value (DM0005),
and the maximum average value is overwritten if the average value is greater.
8. Average value (DM0007) is compared with minimum average value (DM0006),
and the minimum average value is overwritten if the average value is smaller.
Note: "2007" (first scan OFF at power ON) must be set as the input condition. In the
case of analog input, an unsteady value will be input for the first scan when the
power is turned ON.
KVHKA Chap 09.p65
08.3.11, 11:20 AM
369