Outputting analog input data, Kv -300 – KEYENCE Visual KV Series User Manual

Page 389

Advertising
background image

9.5 Programming Examples

KV-10/80 Series Only

KV

-300

KV-10/80

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

1-365

1

9

Outputting Analog Input Data

This sample program outputs data received from the analog inputs.

Note: Voltage can be converted to current, and vice versa by switching the I/O
wiring.

Conditions

Analog data is input from analog input V0 on the KV-AD4.
(The digital data of data memory DM0992 is used for this operation.)

The data that was input from analog input V0 is output as it is to analog output
V0 on the KV-DA4. (The digital data is written to data memory DM0996.)

Ladder diagram

1. DM0996 is initialized when the power is turned ON.

(That is, #2000 is written to DM0996.)

2. Digital data in data memory for A/D conversion is written to DM0001.
3. Before the digital data is written to data memory for D/A conversion, check that

the data is #4095 or less.

Note: An unsteady value will be output if a value outside the range 0 to 4095 is
written to data memory for D/A conversion.

4. The output data will be updated at the rising edge of special utility relay 2800. (As

internal relay 1000 switches ON/OFF at each scan, the output data will be
updated every two scans.)

2008 #02000

LDA

2007

DM0992

LDA

1000

DM0996

STA

DM0001

STA

1500

1000

1000

2800

1500

2002

2011

DM0001

LDA

#04095

CMP

DM0001

LDA

DM0996

STA

1

2

3

4

( )

( )

( )

KVHKA Chap 09.p65

08.3.11, 11:20 AM

365

Advertising