Application of keep instruction – KEYENCE Visual KV Series User Manual

Page 105

Advertising
background image

2.4 Instruction Details

1

2

3-81

Chapter 2 Instructions

Application of KEEP instruction

Detection of chewing gum packs
Detects chewing gum packs over the carton using the proximity switch ES series
(0001 to 0003). If the switch detects that one or more packs of chewing gum are
missing, output relay 0500 turns ON for 1 s.
The timing clock is generated from the visible beam photoelectric switch PZ2 (0000).

Executes SET when all input relays 0000 to 0003 are ON.

Detects presence/absence of chewing gum packs at DOWN edge of 0000.

Outputs 1-s one-shot pulse from output relay 0500 when 1000 is OFF.

Coding

Timing diagram

Reflector R-2

ES

PZ2-61

ES

ON

Gum
Gum
Gum

Gum
Gum

Gum
Gum
Gum

OFF

ON

0000

1001

0000

1001
DIFD

#00010

T001

1001 1000 T001

0500

0001 0002 0003

KEEP

SET
1000

RES

RES

0500

Line No.

Instruction

Operand

Line No.

Instruction

Operand

0000

LD

0000

0007

DIFD

1001

0001

AND

0001

0008

LD

1001

0002

AND

0002

0009

ANB

1000

0003

AND

0003

0010

OR

0500

0004

LD

1001

0011

ANB

T001

0005

KEEP

1000

0012

OUT

0500

0006

LD

0000

0013

TMR

001 #00010

0000

0001

0002

0003

0500

OFF

ON

OFF

ON

OFF

ON

OFF

ON

OFF

ON

ON

ON

Executes SET when all input relays
0000 to 0003 are ON.

Detects presence/absence of chewing
gum packs all Down edge of 0000.

Outputs 1-s one-shot plus from output
relay 0500 when 1000 is OFF.

1 s

KEEP

KVNKA Chap 02_4aP.p65

08.3.11, 11:58 AM

81

Advertising