beautypg.com

Kv -300 – KEYENCE Visual KV Series User Manual

Page 376

background image

9.4 Programming

KV-10/80 Series Only

KV

-300

KV-10/80

Chapter 9 KV-AD4/DA4 Analog I/O Unit

1-352

9

Calculating Voltage and Current Values from Digital Data

This item describes how to calculate the actual input voltage or current values
(decimal) from the digital data written to data memory for A/D conversion as a result
of A/D conversion. Executing this calculation in the sequence program allows the
calculated voltage or current values to be used in other processes in the program.

➮ The voltage and digital data conversion tables are shown in "9.4.3 A/D and D/A Conversion Tables"

on page 1-357. Sample programs are provided under "9.5 Programming Examples" on page 1-359.

How to calculate analog input voltage

Analog input voltage (mV) =

(digital data x resolution (5 mV)) - offset value (10000)

Example

When digital data value 3800 (decimal) is written to data memory

(3800 x 5 (mV)) - 10000 = 9000 (mV) = 9 (V)

This indicates that an analog value of 9 V was input to the KV-AD4.

How to calculate analog input current

Analog input current (mA) =

(digital data x resolution (4

µ

A)) + offset value (4000)

Example

When digital data value 3800 (decimal) is written to data memory

(3800 x 4 (µA)) + 4000 = 19200 (µA) = 19.2 (mA)

This indicates that an analog value of 19.2 mA was input to the KV-AD4.

Resolution

"Resolution" refers to the minimum analog input value by which digital data can be
changed. For example, 5 mV is the resolution of input range -10 to +10 V. This
indicates that the digital data in memory changes when the analog input value
changes by at least 5 mV. The digital data in memory will not change if the analog
input value changes by only 4 mV.

Why is the resolution 5 mV, 4 µA?

Only the upper 12 bits of digital data are written to data memory. The maximum
value that can be expressed in 12 bits is expressed as 4095 in decimal (approxi-
mated to 4000). Accordingly, 1/4000 of the input range full scale (FS) is taken as the
resolution on the KV-AD4/DA4. For example, the resolution of input range -10 to +10
V can be calculated as follows:

20000 (mV) ÷ 4000 = 5 (mV)

Full scale of input range -10 to +10 V is 20 V (20000 mV).

KVHKA Chap 09.p65

08.3.11, 11:20 AM

352