KEYENCE Visual KV Series User Manual

Page 361

Advertising
background image

8.2 Details

3-337

1

8

Chapter 8 Programming Examples

ON

OFF

500ms

Measure the pulse interval

Reset input relay 0002
Output relay 0500 turns ON
when the pulse interval is not within the range from 490 to 510 mm.

Ladder diagram

Coding

2008

0000

0001

0002

DM0000

PLS

I TVL

PAUSE

RES

1000

1000

0500

STA

DM0000

SET

LDA

#00001

2008

STA

DM0001

LDA

#00051

2008

STA

DM0002

LDA

#00049

2008

STA

DM0003

LDA

#00010

1002

RES

0500

STA

DM0100

1001

LDA

DM0007

Sets mode 1 in DM0000.

Sets MAX. setting value (510 ms) in DM0001.

Sets MIN. setting value (490 ms) in DM0002.

Sets the average number of measurements (10) in
DM0003.

Measures the pulse interval when input relay 0000
turns ON.

Pauses measurement when input relay 0001 turns
ON.

Resets measurement when input relay 0002 turns
ON.

Writes the average measurement value into
DM0100 and resets 0500 after every time a
measurement is completed.

Turns On output relay 0500 when the pulse
interval is not within the range from 490 to 510
mm.

Line No.

Instruction

Operand

Line No.

Instruction

Operand

0000

LD

2008

0015

STA

DM0003

0001

LDA

#00001

0016

LD

0000

0002

CON

0017

LD

0001

0003

STA

DM0000

0018

LD

0002

0004

LD

2008

0019

ITVL

DM0000 1000

0005

LDA

#00051

0020

LD

1002

0006

CON

0021

LDA

DM0007

0007

STA

DM0001

0022

CON

0008

LD

2008

0023

STA

DM0100

0009

LDA

#00049

0024

CON

0010

CON

0025

RES

0500

0011

STA

DM0002

0026

LD

1000

0012

LD

2008

0027

OR

1001

0013

LDA

#00010

0028

SET

0500

0014

CON

Fetching data from the KV-AN6 (For KV-300 PLC only)
Fetches data from Ch 1 of the KV-AN6. Writes this data value into DM0100.

Mode No.

➞ 9000 (DM0000) from Ch 1 of KV-AN6

MAX. setting value

➞ 2000 (DM0001)

MIN. setting value

➞ 00900 (DM0002)

Average number of measurements

➞ 10 (DM0003)

Reset input relay 0002

KVNKA Chap 08.p65

08.3.11, 0:12 PM

337

Advertising