Академический Документы
Профессиональный Документы
Культура Документы
C0
C1
C2
C3
C4
C5
C6
C7
F.G.
+
_
+
Voltage signal
ch. 0
Voltage signal
ch. 1
Voltage signal
ch. 2
Voltage signal
ch. 3
(Input)
A/D converter
Analog signal cable
Shield
Shield
Shield
Shield
Analog signal
cable
Shield
Shield
(Load)
Voltage signal
ch. 4
Voltage signal
ch. 5
D/A converter
8.3 Installation KV-300 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 8 KV-AN6 Analog I/O Module
1-318
8
8.3.4 Example of Current I/O Wiring
I Current output unit
Note 1: Use a two-core twisted pair shielded cable as the analog signal cable.
Note 2: Isolate the analog signal cable wiring from the AC cable wiring including
power cables.
Note 3: Connect a shielding wire or shielded cable to the input side for analog input,
and to the load side for analog output. It may be better to connect a shielding wire or
shielded cable to C0 to C7, depending on the case.
Current signal
ch. 0
0
1
2
3
V4
I4
V5
I5
C0
C1
C2
C3
C4
C5
C6
C7
F.G.
+
Current signal
ch. 1
Current signal
ch. 2
Current signal
Ch.3
(Input)
Analog signal cable
Shield
Shield
Shield
Shield
Analog signal
cable
Shield
Shield
(Load)
Current signal
ch. 4
Current signal
ch. 5
A/D converter
D/A converter
8.3 Installation KV-300 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 8 KV-AN6 Analog I/O Module
1-319
1
8
8.3.5 Setting I/O Ranges
This section describes how to set the KV-AN6 I/O ranges.
As shown in the following figure, the analog input (A/D) range and analog output (D/
A) range can be selected with the slide switches on the right side of the KV-AN6
module.
The I/O ranges are factory-set to 5 V.
Analog input (A/D) range Analog output (D/A) range
Selection Setting Selection Setting
switch switch
Voltage input: -5 to +5 V Voltage output: -5 to +5 V
Voltage input: -10 to +10 V Voltage output: -10 to +10 V
Current input: 0 to 20 mA Connecting Current output: 4 to 20 mA
terminal for
current output
CAUTION
10V 0 to 20 mA 5V
5V 10V
Analog output range (D/A)
selection switch
Analog input range (A/D)
selection switch
KV-AN6
module
CH0
CH1
CH4
CH5
CH2
CH3
A
/
D
D
/
A
Turn OFF the power switch before changing selection switch settings.
Analog input signals must fall within the range set by the selection switch.
8.4 Programming KV-300 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 8 KV-AN6 Analog I/O Module
1-320
8
8.4 Programming
8.4.1 Input Characteristics (A/D)
On the KV-AN6, the analog input function converts analog signals from an external
unit to digital signals. The converted data is written into the assigned data memory
addresses at every scan time.
An external analog input signal can be set according to the input range, as shown in
the following table.
The selection switches in the above table are located on the right side of the KV-
AN6 ( Refer to page 1-319).
Voltage input
Current input
Through the A/D converter, analog input signals are written as binary data (16 bits)
into the assigned data memory addresses by channel ( Refer to page 1-324). The
effective bits are the 12 bits starting from the most significant digit.
When a signal beyond the setting range is input, it is converted to 7FFFH at positive
voltage and 8000H at negative voltage. For example, if +10 V is input when input
range is set to 5 V, it is digitally converted to 7FFFH.
2
0
4 6 8 10
-6400
-12800
-19200
-25600
(8300H) -32000
(7D00H) +32000
+25600
+19200
+12800
+6400
(mA) 12 14 16 18 20
(Digital-converted value)
(0 to 20 mA range)
(Analog input value)
(Digital-converted value)
+2
0
+4 +6 +8 +10 -2 -4 -6 -8
-6400
-12800
-19200
-25600
-32000 (8300H)
(7D00H) +32000
+25600
+19200
+12800
+6400
-5
+5
(V) -10
(5 V range)
(10 V range)
(Analog input value)
Selection Description Range
switch
Voltage input -5 to +5 V
-10 to +10 V
Current input 0 to 20 mA
8.4 Programming KV-300 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 8 KV-AN6 Analog I/O Module
1-321
1
8
Full scale and resolution of each range
(12-bit BIN data)
Negative input data is treated as a 2s complement.
Maximum value (+10 V, +5 V, 20 mA)
Minimum value (-10 V, -5 V, 0 mA)
(4 mA)
8.4.2 Calculating Input Data (A/D)
The KV-AN6 converts analog input signals to 16-bit digital values and writes them
into data memory. (The effective bits are the 12 bits starting from the most signifi-
cant digit.)
This section describes how to convert the data stored in data memory into digital
data (in decimal) according to the input range.
Full scale and resolution of each range
The following table shows the full scale and resolution of each range.
Since the effective bits that are written into data memory are the 12 bits starting
from the most significant digit, resolution is 1/4000 of the full-scale value.
To calculate the input voltage value or input current value from the data written
into data memory, use the following expressions:
Input voltage = DM value/16 x Resolution of the input range
Input current = (32000 + DM value)/16 x Resolution of the input range
To convert a 16-bit DM value to an effective 12-bit value, divide the 16-bit value
by 16.
Example 1
When 19200 (in decimal) is written into DM addresses in the 10 V range
19200/16 x 5 mV = 6000 mV = 6 V
The KV-AN6 receives input of +6 V.
Example 2
When 12800 (in decimal) is written into DM addresses in the 5 V range
12800/16 x 2.5 mV = 2000 mV = 2 V
The KV-AN6 receives input of 2 V.
Example 3
When 16000 (in decimal) is stored in DM addresses in the 0-to-20 mA range
(32000 + 16000)/16 x 5 A = 15000 A = 15 mA
The KV-AN6 receives input of +15 mA.
D15 D14 D13 D12 D11 D10 D09 D08 D07 D06 D05 D04 D03 D02 D01 D00
0 0 0 0
Sign bit
0: Positive
1: Negative
Hexadecimal Hexadecimal
Hexadecimal
Undefined
Data memory
addresses
Undefined
D15 D14 D13 D12 D11 D10 D09 D08 D07 D06 D05 D04 D03 D02 D01 D00
0 1 1 1 1 1 0 1 0 0 0 0 X X X X
7 D 0
Undefined
D15 D14 D13 D12 D11 D10 D09 D08 D07 D06 D05 D04 D03 D02 D01 D00
1 0 0 0 0 0 1 1 0 0 0 0 X X X X
8 3 0
Range Full scale Resolution
10 V 20 V 5 mV
5 V 10 V 2.5 mV
0 to 20 mA 20 mA 5 A
8.4 Programming KV-300 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 8 KV-AN6 Analog I/O Module
1-322
8
8.4.3 Output Characteristics (D/A)
On the KV-AN6, the analog output function converts digital (binary) data to analog
external output signals. The digital data stored in data memory is converted to
analog data and sent to an output unit at every scan time.
The analog output signal can be set according to the input range as shown in the
following table.
The selection switches in the table are located on the right side of the KV-AN6.
Refer to page 1-319.
Voltage output
Selection switch Description Range
Voltage output -5 to +5 V
-10 to +10 V
Connected to terminal for current output Current output 4 to 20 mA
(Analog output value)
Current output
Through the D/A converter, digital data stored in the assigned data memory ad-
dresses by channel (Refer to page 1-324) is output as analog signals. The effective
bits are the 12 bits starting from the most significant digit.
Note: A change in the value of the DM address from 7FFFH (32767) to 8000H
(32768) or vice versa means that the polarity is reversed when the voltage output is
selected, or that output drastically changes from the maximum value to the minimum
value or vice versa when the current output is selected. Use the program to maintain
output data within the specified range.
0
10
8
6
4
2
-
3
2
0
0
0
(
8
3
0
0
H
)
-
2
5
6
0
0
-
1
9
2
0
0
-
1
2
8
0
0
-
6
4
0
0
6
4
0
0
1
2
8
0
0
1
9
2
0
0
2
5
6
0
0
(
7
D
0
0
H
)
3
2
0
0
0
-2
-4
-6
-8
-10
(V)
2
6
4
0
0
1
2
8
0
0
1
9
2
0
0
2
5
6
0
0
3
2
0
0
0
-
3
2
0
0
0
-
2
5
6
0
0
-
1
9
2
0
0
-
1
2
8
0
0
-
6
4
0
0
(mA)
6
8
10
12
14
16
18
20
0
4
(10 V range)
(5 V range)
(Digital data)
(Analog output value)
(4-to-20 mA range)
(Digital data)
8.4 Programming KV-300 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 8 KV-AN6 Analog I/O Module
1-323
1
8
8.4.4 Calculating Output Data (D/A)
To output analog data, write the data into the analog output data memory ad-
dresses.
Calculate the numerical value to be written into data memory.
Voltage output
DM value = Output voltage/Output range resolution x 16
Current output
DM value = (Output current -12 [mA])/0.004 [mA] x 16
To convert a 16-bit DM value to an effective 12-bit value, multiply the 16-bit value
by 16.
Example 1
When +7.5 V is output in the 10 V range
7.5 V/5 mV x 16 = 24000
The DM value is 24000.
Example 2
When -5 V is output in the 5 V range
5 V/2.5 mV x 16 = 32000
Since the output voltage in this example is negative, set the result by subtracting
32000 from 0 as the DM value.
Example 3
When 18 mA is output in the 4-to-20 mA range
(18 mA - 12 mA)/0.004 x 16 = 24000
The DM value is 24000.
8.4 Programming KV-300 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 8 KV-AN6 Analog I/O Module
1-324
8
8.4.5 Assigning Data Memory (DM) Addresses
The data memory address assignment is predefined by each A/D and D/A
channel.
Analog input is converted to 16-bit digital data (in binary) and stored in the data
memory addresses assigned for the A/D conversion.
To convert analog data for output, write 16-bit digital data (binary) into the data
memory addresses assigned for the D/A conversion.
DM address assignment list
The KV-AN6 modules are numbered sequentially starting with the one closest to the
KV-300 CPU.
Module No. Description DM Channel R: read
W: write
1 A/D DM9000 Analog input ch. 0 R
DM9001 Analog input ch. 1
DM9002 Analog input ch. 2
DM9003 Analog input ch. 3
D/A DM9004 Analog output ch. 4 W
DM9005 Analog output ch. 5
2 A/D DM9006 Analog input ch. 0 R
DM9007 Analog input ch. 1
DM9008 Analog input ch. 2
DM9009 Analog input ch. 3
D/A DM9010 Analog output ch. 4 W
DM9011 Analog output ch. 5
3 A/D DM9012 Analog input ch. 0 R
DM9013 Analog input ch. 1
DM9014 Analog input ch. 2
DM9015 Analog input ch. 3
D/A DM9016 Analog output ch. 0 W
DM9017 Analog output ch. 1
4 A/D DM9018 Analog input ch. 0 R
DM9019 Analog input ch. 1
DM9020 Analog input ch. 2
DM9021 Analog input ch. 3
D/A DM9022 Analog output ch. 0 W
DM9023 Analog output ch. 1
5 A/D DM9024 Analog input ch. 0 R
DM9025 Analog input ch. 1
DM9026 Analog input ch. 2
DM9027 Analog input ch. 3
D/A DM9028 Analog output ch. 4 W
DM9029 Analog output ch. 5
8.4 Programming KV-300 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 8 KV-AN6 Analog I/O Module
1-325
1
8
8.4.6 Reading Analog Input
The following example describes how to read analog input.
Example
This program reads data from analog input ch. 0 of the KV-AN6 module no. 1, and
writes positive data into DM0000 and negative data into DM0001. (The data value
up to the second decimal position is written.)
Input range of 10 V is used.
Input of +10 V is stored as 1000 into DM0000, and input of -10V is stored as 1000
into DM0001 (data value x 100).
Ladder diagram
For assignment of data memory addresses, refer to page 1-324.
Example
I Conversion tip
Conversion from hexadecimal data to decimal data
Example: Convert 7D00H (in hexadecimal) to a decimal value
7 x 16 3 + D x 16 2 + 0 x 16 1 + 0 x 16 0 = 28672 + 3328 + 0 + 0 = 32000
(in decimal)
2002 2009 DM9000
LDA
$8000
CMP
2009
COM
#00001
ADD
#00016
DIV
DM0001
STA
#00005
MUL
DM0000
STA
>
<
#00016
DIV
#00005
MUL
DM9000
Analog input:
KV-AN6
module no. 1,
input ch. 0
Result of
$8000
When analog input is positive
DM9000/#16 x 5 mV > DM0000
When analog input is negative
(Reversed bit of DM9000 + #1)/#16 x 5 mV > DM0001
Analog input
5 (mounting hole)
99
31
65
39
43
35.4 90 111
9.2 Configuration KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-339
1
9
KV-DA4
General specifications
Input/Output specifications
Item Specifications
Model KV-DA4
Power supply voltage Supplied from CPU (24 VDC, +10%, -20%)
Current consumption 200 mA max.
Ambient temperature 0 to 50C (32 to 122F), No freezing
Relative humidity 35 to 85%, No condensation
Withstand voltage 1500 VAC for 1 minute (across all external terminals and housing,
and across all power terminal and I/O terminals)
Vibration 10 to 55 Hz double-amplitude 1.5 mm max. for 2 hours each in X,
Y and Z-axes
Insulation resistance 50 M min. (across all external terminals and housing,
and across all power terminal and I/O terminals [measured by
500 VDC megohmmeter] )
Environment
Weight
No excessive dust and corrosive gases allowed
Approx. 180 g
Item Voltage Current
Analog output range -10 to +10 V
Output impedance 0.5 min.
4 to 20 mA
No. of analog outputs 4 (4 channels)
Min. load resistance
Max. load resistance
1 k
400
Resolution 5 mV (1/4000)
Output range 10 V
4 A (1/4000)
Output range 4 to 20 mA
Conversion speed Once per two scans min. (changes at startup of conversion
instruction relay)
Total accuracy 1% (FS)
Isolation method Photocoupler (channels not isolated)
9.2 Configuration KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-340
9
Analog output terminal assignment
Terminal Signal Description
Output range: -10 to +10 V
NC (No connection)
Analog voltage output ch0
Analog voltage output ch1
Analog voltage output ch2
Analog voltage output ch3
Analog current output ch0
Analog current output ch2
Analog current output ch1
Analog current output ch3
I0
I1
I2
I3
C0
C1
C2
C3
C4
C5
C6
C7
V0
V1
V2
V3
Output range: 4 to +20 mA
Ground for analog signal (connected internally)
Note 1: Separate terminals are used for analog voltage input and analog current
output. Take care not to miswire these terminals.
Note 2: Do not connect the output voltage and output current to terminals of the
same No., for example, by connecting external instruments to both V0 and I0.
Doing so might cause the KV-DA4 to malfunction.
Dimensions
C0 C1 C2 C3
C4 C5 C6 C7
V0 V1 V2 V3
I0 I1 I2 I3
ANALOG OUT
KEYENCE
KV - DA4
POWER
2-
5 (mounting hole)
99
31
65
39
43
35.4 90 111
9.2 Configuration KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-341
1
9
For details on how to connect the KV-AD4/DA4 and the KV-10 to 80, see "Connecting to the KV-10
to 80 on page 1-348. For details on how to connect other I/O expansion units, refer to page 1-192.
Pay attention to the following when expanding the system.
Note 1: Only one KV-AD4 and one KV-DA4 can be connected to a single KV-10 to
80. If two or more KV-AD4/DA4s are connected, they will not operate normally.
Note 2: Always connect the KV-AD4/DA4 to the right end of the connection path.
Note 3: When both the KV-AD4 and KV-DA4 are used, make sure that one of
these units is connected to the right end of the connection path and that the other
unit is connected in between. The KV-AD4 and KV-DA4 may be connected in any
order.
9.2.3 System Configuration
This section describes the system configuration when the KV-AD4/DA4 is connected
to the KV-10 to 80.
The KV-AD4/DA4 can be connected to the KV-10 to 80 as shown in the following
diagram.
One KV-AD4 and KV-DA4 module each can be connected to a single KV-10 to 80.
Other I/O expansion units can be connected to the CPU as specified in the manual.
C0 C1 C2 C3
C4 C5 C6 C7
V0 V1 V2 V3
I0 I1 I2 I3
ANALOG IN
KEYENCE
KV - AD4
POWER
KEYENCE
KV - 10R
Power supply unit CPU
(KV-10 to 80)
KV-AD4/DA4
KV-10 to 80 I/O expansion unit KV-AD4 KV-DA4
9.3 Installation KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-342
9
9.3 Installation
9.3.1 Installation Procedure
The KV-AD4/DA4 is connected to the CPU of the KV-10 to 80 and connected to
external instruments according to the following procedure.
2
4
5
Make sure that the environment where you are going to install the KV-AD4/DA4
is appropriate.
For details, see "9.3.2 Checking the Installation Environment" on the next page.
Checking the Installation Environment
Prepare items needed for installing the KV-AD4/DA4 such as signal leads and
crimp terminals.
For details, see "Wiring" (p.1-345).
Preparation
1
3
Connect external instruments for analog input to the KV-AD4 and KV-DA4,
respectively. Before connecting the KV-AD4, the input mode (voltage and current
input terminal settings) must be set.
For details, see "9.3.3 Setting the KV-AD4 Input Mode" (p.1-344).
Connecting External Instruments
Connect the KV-AD4/DA4 to the CPU of the KV-10 to 80.
For details, see "9.3.5 Connecting to the KV-10 to 80" (p.1-348).
Connecting the KV-AD4/DA4
Trial Operation
9.3 Installation KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-343
1
9
9.3.2 Checking the Installation Environment
Do not install this system in any of the following locations.
Direct sunlight
Outside of ambient temperature 0 to 50C (32 to 122F)
Outside of relative humidity 35 to 85%
Locations likely to freeze by sudden temperature changes
Near corrosive or inflammable gases
Near excessive dust, salt spray, iron powder or smoke
Locations directly subject to vibration and shock
Locations likely to be splashed with water, oil or chemicals
Locations subject to strong magnetic or electric fields
CAUTION
9.3 Installation KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-344
9
9.3.3 Setting the KV-AD4 Input Mode
Before the KV-AD4 is connected to other units, its input mode must first be set. At
purchase, current input channels ch0 to ch3 have been set as active channels.
This operation is not necessary on the KV-DA4.
Setting the input mode
Follow the procedure below to set the input mode.
1. If the KV-AD4 is already connected to a KV series CPU, turn it OFF.
2. Set the input mode selector switches to ON if the input is voltage when the data
to be sent from connected instruments is input to a channel. If the input is cur-
rent, set the input mode selector switches to OFF.
V0/V1
I0/I1
V2/V3
I2/I3
ON
OFF
DIPSW1
DIPSW2
DIPSW1 Switch DIPSW2
ON
OFF
CH0, CH1 -10 to +10 V CH0, CH1 4 to 20 mA
CH2, CH3 -10 to +10 V CH2, CH3 4 to 20 mA
Channel Input Type Switch Setting
0ch, 1ch
2ch, 3ch
0ch, 1ch
2ch, 3ch
0ch, 1ch
2ch, 3ch
0ch, 1ch
2ch, 3ch
Current input
Voltage input
Voltage input
Current input
Voltage input
Current input
9.3 Installation KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-345
1
9
9.3.4 Connecting External Instruments
Using the analog I/O terminal block, connect external instruments for analog input
and output. For details on how to wire terminals, refer to the "Analog I/O Terminal
Wiring Diagrams."
Wiring
Follow the procedure below to wire analog I/O.
The following describes how to wire the KV-AD4.
Use 2-core twisted pair cable for the analog signal cable.
When wiring the terminals, use rounded or forked crimp terminals of width
6 mm. Wiring terminals without crimp terminals is likely to result in faulty
contact, and prevent data from being transmitted correctly. Use M3.0
screws on the terminal blocks on the KV-AD4/DA4.
Wire the AC power cable and analog signal cable separately. Do not bundle
these cables together.
With the KV-AD4, connect the shielded cable to the input side, and with the
KV-DA4, connect to the load side.
Note: When mounting the KV-AD4/DA4 at a location that is likely to be influenced
by electrical noise, ground using a grounding resistance of 100 max.
1. If the KV-AD4 is already connected
to a KV-10 to 80 CPU, turn it OFF
and then disconnect it from the
CPU.
2. Remove the protective cover of the
analog input terminal block. Hold
the left and right sides of the cover
as shown in the figure, and lift up to
remove.
3. Attach the crimp terminals of the signal cable to the terminals.
Wire the cables correctly. Wiring the cables to the incorrect terminals may
result in malfunction.
Loosen the terminal screw with a
screwdriver, and then insert the
crimp terminal.
Then, firmly tighten the terminal
screw.
For details on wiring, refer to
"KV-AD4 Analog Input Terminal"
on page 1-346 and "KV-DA4
Analog Output Terminal" on
page 1-347.
4. Attach the cover to the analog input
terminal block.
CAUTION
CAUTION
C 0 C 1 C 2 C 3
V 0 V 1 V 2 V 3
K E Y E N C E
K V - A D 4
P O W E R
9.3 Installation KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-346
9
Wiring diagrams
KV-AD4 Analog Input Terminal
Refer to the following wiring diagrams when wiring the analog input terminals.
Note: Make sure that the terminals (channels) to be wired have been set by the
input mode selection switches.
For details, see "Setting the KV-AD4 Input Mode" on page 1-344.
C3
C2
C1
C0
V3
V2
V1
V0
C
0
C
1
C
2
C
3
C
4
C
5
C
6
C
7
V
0
V
1
V
2
V
3
I0
I1
I2
I3
A
N
A
L
O
G
I
N
K
E
Y
E
N
C
E
K
V
-
A
D
4
P
O
W
E
R
Voltage output
instrument
Voltage signal
ch3
Voltage signal
ch2
Voltage signal
ch1
Voltage signal
ch0
Shielded cable
Shielded cable
Shielded cable
Shielded cable
Analog signal wire
Terminal
(Input source side)
C
0
C
1
C
2
C
3
C
4
C
5
C
6
C
7
V
0
V
1
V
2
V
3
I0
I1
I2
I3
A
N
A
L
O
G
I
N
K
E
Y
E
N
C
E
K
V
-
A
D
4
P
O
W
E
R
I3
I2
I1
I0
C7
C6
C5
C4
Shielded cable
Shielded cable
Shielded cable
Shielded cable
Analog signal
wire
Terminal
(Input source side)
Current output
instrument
Current
signal
ch3
Current
signal
ch2
Current
signal
ch1
Current
signal
ch0
Voltage input wiring
Current input wiring
9.3 Installation KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-347
1
9
Voltage output wiring
C
0
C
1
C
2
C
3
C
4
C
5
C
6
C
7
V
0
V
1
V
2
V
3
I0
I1
I2
I3
K
E
Y
E
N
C
E
K
V
-
D
A
4
P
O
W
E
R
C3
C2
C1
C0
V3
V2
V1
V0
A
N
A
L
O
G
O
U
T
(Load side)
+
Shielded cable
Shielded cable
Shielded cable
Shielded cable
Analog signal wire
Terminal
Voltage signal
ch3
Voltage
input instrument
Voltage signal
ch2
Voltage signal
ch1
Voltage signal
ch0
Current output wiring
C
0
C
1
C
2
C
3
C
4
C
5
C
6
C
7
V
0
V
1
V
2
V
3
I0
I1
I2
I3
A
N
A
L
O
G
O
U
T
K
E
Y
E
N
C
E
K
V
-
D
A
4
P
O
W
E
R
I3
I2
I1
I0
C7
C6
C5
C4
Shielded cable
Shielded cable
Shielded cable
Analog signal wire
Terminal
(Load side)
+
Current
signal
ch3
Current input
instrument
Current
signal
ch2
Current
signal
ch1
Current
signal
ch0
KV-DA4 Analog Output Terminal
Refer to the following wiring diagrams when wiring the analog output terminals.
9.3 Installation KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-348
9
Note: Make sure that the power is turned OFF before connecting the KV-AD4/DA4
to the KV-10 to 80.
1. Slide up the protective cover on the
right of KV-10 to 80.
2. Connect the connector cable from
the KV-AD4/DA4 to the connector
on the KV-10 to 80.
Protective cover
9.3.5 Connecting to the KV-10 to 80
Connect the KV-AD4/DA4 to the KV-10 to 80 CPU.
The following example describes how to connect a KV-AD4 to the right side of a KV-
10.
KV-10
KV-AD4
Connector cable
CAUTION
Note: Connector cables cannot be extended.
For details on how to connect the I/O expansion unit and the KV-AD4/DA4, see "9.2.3 System
Configuration" page 1-341.
When connecting the connector cable do not hold it by its cable. Hold it by
the connector. Applying unnecessary force on the cable may cause the unit
to malfunction.
Always connect the connector cable by hand. Using a tool to connect the
connector cable may apply excessive force on the unit, causing it to mal-
function.
9.3 Installation KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-349
1
9
9.3.6 Maintenance
This section describes how to inspect and clean the unit.
Inspection and Cleaning
I Inspection
Connectors become loose when a KV Series unit is used for a long time. If you
continue to use a KV Series unit with loose connectors, this may cause the unit
to malfunction.
For this reason, you must periodically inspect the unit and connectors.
Generally, inspect the following points:
Are connection parts disconnected or loose?
Are connectors disconnected or loose?
Are the terminal screws on the terminal block loose?
Are relays fused or their contacts faulty?
Are connector cables between units and instruments damaged?
I Cleaning
Dirt adheres to the CPU and other units when they are used continuously for a
long time. Clean off any dirt on these units with a clean cloth.
Before removing any dust or dirt from fine parts such as connectors, remove the
connector and then remove with a cotton swab.
9.4 Programming KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-350
9
9.4 Programming
9.4.1 Programming the KV-AD4
This section describes the A/D conversion mechanism, and the digital data that is
written to the CPU by the KV-AD4 after A/D conversion. It also describes how to
calculate actual voltage and current values based upon the digital data written to
CPU.
A/D Conversion Mechanism
This item describes the A/D conversion mechanism on the KV-AD4. Check this item
before writing sequence programs for the KV-AD4.
1. The analog signal (voltage or current) is input to the KV-AD4 from the external
instrument.
This operation is called "analog input."
2. The KV-AD4 converts the analog signal to digital data.
This operation is called "A/D conversion."
3. The KV-AD4 then writes the digital data to the data memory for A/D conversion
on the CPU.
Digital data is automatically written at each scan.
For details, see "About Digital Data after A/D Conversion" on the next page.
4. If necessary, the digital data is processed by the sequence program on the CPU.
The value of the actual input voltage or current can be calculated from the
digital data.
For details, see "Calculating Voltage and Current Values from Digital Data"on page 1-352.
The calculated values can be used for further processing besides the sequence program.
The digital data can also be output as analog data as it is.
Power
supply
unit
A/D
converter
KV-AD4 CPU
Writing digital data
Sequence
program
Data memory for
A/D conversion
Analog
input
Transducer
or
pre-amp
External
instrument
(e.g. sensor)
1
2
3
4
9.4 Programming KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
Chapter 9 KV-AD4/DA4 Analog I/O Unit
1-351
1
9
About Digital Data after A/D Conversion
Data Memory to which digital data is written
The KV-AD4 converts analog signals that have been input from external instruments
to digital data, and writes this digital data to data memory for A/D conversion on the
CPU.
Data memory for A/D conversion on the CPU is used only when the KV-AD4 is
connected to the CPU. This memory can be used as regular data memory when the
KV-AD4 is not connected to the CPU. When the KV-AD4 is connected to the CPU,
this memory can be used only for A/D conversion and not for other applications.
Note: When the KV-AD4 is connected to the CPU, the conversion data is written at
each scan even if the channels on the KV-AD4 are not in use.
The address of the data memory to which digital data is written varies according to
the channel (terminal) to which the instrument for analog input is connected. The
following table shows the correspondence between channel and data memory.
Channel Data Memory
CH0
CH1
CH2
CH3
DM0992
DM0993
DM0994
DM0995
Digital data content
The numerical values of the digital data that is written to data memory for A/D
conversion are not obtained by simply converting actual voltage or current to binary
format. During conversion they are influenced by the input characteristics preset by
the user. The KV-AD4 voltage and input characteristics are as follows.
For example, when analog input is +5 V, 3000 will be written to the data memory
for A/D conversion. If the analog input is outside of the input range, 0 and 4095 are
written as the minimum and maximum values.
Digital data
+4000
+3000
+2000
+1000
-10 +10 -8 -6 -4 -2
0
+2 +4 +6 +8
Voltage
(V)
Range: 10 V
Voltage input characteristics
Digital data
+4000
+3000
+2000
+1000
0
2 4 6 8 1012141618 20
Range: 4 to 20 mA
Current
(mA)
Current input characteristics
9.4 Programming KV-10/80 Series Only
K
V
-
3
0
0
K
V
-
1
0
/
8
0
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)