3 convention details, Chapter 2 instructions – KEYENCE Visual KV Series User Manual

Page 79

Advertising
background image

2.3 Convention Details

3-55

1

2

Chapter 2 Instructions

2.3

Convention Details

In this chapter, each instruction is described as follows:

2.4 Instruction Details

3-66

2

Chapter 2 Instructions

Example

Coding

Description

Output relay 0500 remains ON after input relay 0000 turns OFF. Output relay
0500 turns OFF when input relay 0001 turns ON.

SET instruction sets a latch whereas RES instruction resets it.

RES instruction not only turns OFF relay coils but serves as a reset signal when
a timer or counter is used as an operand.

Note: The SET and RES instructions can be entered in any order. Note, however,
that priority is given to the instruction that is entered last.
In the above example, when both 0000 and 0001 are ON, RES has priority over
SET, causing 0500 to remain OFF.

Tips

Differences between SET/RES and KEEP

Basically , SET/RES and KEEP (

➮ p. 3-57 and p. 3-71) serve the same purpose.

SET and RES can be used separately. Therefore, RES can be placed before
SET.
Another instruction may be placed between SET and RES.

KEEP needs only three lines of program, therefore saving memory space when
used a number of times.

Operands

Key operation

SET: Set

RES: Reset

Turns ON specified relay when input is ON
and enables this relay to remain ON.

Turns OFF specified relay, timer, or counter
when input is ON.

SET

1

RES

0

nnnn

RES

nnnn

SET

0000

0001

0500

SET

0500

RES

Line No.

Instruction

Operand

0000

LD

0000

0001

SET

0500

0002

LD

0001

0003

OUB

0500

0001

0002

0001

0002

C000

RES

#00100

00000

C000

#00100

0000

C000

0000

0001

0500

SET

0500

RES

0000

0001

RES

KEEP

0500

SET

LD

0000

RES

0500

LD

0001

SET

0500

LD

0000

LD

0001

KEEP 0500

SET

1

RES

0

Operand

ENT

R-SRCH

Operand

ENT

R-SRCH

:

:

SET / RES

NEW KV

KV-300

KV-10/16

KV-24/40/80

0500 to 1915

0500 to 1915

0500 to 1915

0500 to 1915

2009

2009

2009

2009

2100 to 17915

2100 to 17915

2100 to 2915

2100 to 6915

T000 to T249

T000 to T249

T000 to T063

T000 to T119

C000 to C249

C000 to C249

C000 to C063

C000 to C119

CTH0 to CTH1 (RES only)
CTC0 to CTC3 (RES only)

Instruction
Describes the name
and brief function of
the instruction.

Instruction key
Represents the key or
function No. for entry.

Ladder symbol
Represents the form
of the instruction on a
ladder diagram.

Mnemonic
Represents the instruc-
tion in ladder language.

• Example
• Timing diagram
• Description
Perform programming
using the given example
to gain experience.

Note
Describes the notes
for the instruction.

Tips
Describes hands-on
techniques for efficient
programming.

Operand
Shows operands (element
Nos.) that can be used for
the instruction.

Key operation
Describes the basic key
operations on the handheld
programmer. Set the mode
switch to PROGRAM.

Coding
Shows the
coding for
the given
example.

* The above page is created for explanation purposes only.

This page may be different from the actual page.

KVNKA Chap 02_1&2&3P.p65

08.3.11, 11:53 AM

55

Advertising