Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 4 of 9

User's Manual Visual KV Series 3 Programming, pages 21 to 30

Pages 21 to 30 of 79

The original document is the PDF (355 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

Filed in the catalog under the Keyence KV-16R

Page 21

1.4.1 Preparation for installation .................................................................................. 2-9 1.4.2 Installation Procedure ....................................................................................... 2-10 Installation in Windows 95 ......................................................................... 2-10 Installation in Windows 3.1 ........................................................................ 2-12

Chapter 2

1.5

Cautions for Use ............................................................................................ 2-13

1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5

Basic Operations ........................................................................................... 2-14 Program creation flow and available modes ..................................................... 2-14 Starting up and exiting from the software ......................................................... 2-16 Screen .............................................................................................................. 2-18 Mouse operation and keyboard operation ........................................................ 2-21 Online Help ....................................................................................................... 2-23

Editor

KV-300

2.1 Outline of the Editor Functions .................................................................... 2-26 2.1.1 Cautions for editing ladder programs ................................................................ 2-26 2.2 Edit Screen .....................................................................................................2-27 2.2.1 Name and function of each part of the screen .................................................. 2-27 2.2.2 Ladder program window screen ....................................................................... 2-28 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7

File Management ............................................................................................ 2-29 Creating a new file ............................................................................................ 2-29 Setting the automatic file read function ............................................................. 2-30 Setting automatic file save for the file ............................................................... 2-31 Saving and reading files ................................................................................... 2-32 Reading and saving a file in another format ..................................................... 2-33 Saving a ladder diagram in text format ............................................................. 2-36 Verifying files .................................................................................................... 2-36

2.4 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6

Entering/Deleting Symbols and Connection Lines .................................... 2-37 Entering symbols .............................................................................................. 2-37 Deleting symbols .............................................................................................. 2-42 Entering contacts/coils directly ......................................................................... 2-42 Changing the device at the current cursor position .......................................... 2-43 Entering/Deleting connection lines ................................................................... 2-44 Canceling edit operations ................................................................................. 2-45

2.5 2.5.1 2.5.2 2.5.3

Entering Comments/Labels ......................................................................... 2-46 Editing comments/labels ................................................................................... 2-46 Editing line comments ....................................................................................... 2-50 Changing ladder lines into comments ............................................................... 2-51

2.6 Edit and Arrangement .................................................................................. 2-52 2.6.1 Copy, move, and delete .................................................................................... 2-52 2.6.2 Inserting and deleting lines ............................................................................... 2-57 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5

Jump, Search, and Replace ......................................................................... 2-58 Jump .................................................................................................................2-58 Searching for instruction words/operands ........................................................ 2-62 Searching for the device at the cursor position ................................................. 2-63 Replacing operands .......................................................................................... 2-64 Converting a/b contacts .................................................................................... 2-65

2.8 Editing the Mnemonic List ........................................................................... 2-67 2.8.1 Displaying and terminating a mnemonic list ..................................................... 2-67 2.8.2 Copy, move, and delete .................................................................................... 2-69 2.9 Displaying the Use Status ............................................................................. 2-70 2.9.1 Displaying a use status list ............................................................................... 2-70 2.10 Setting the System .........................................................................................2-71 2.10.1 Setting the system ............................................................................................ 2-71 2.11 Entering and Developing Macros ................................................................ 2-72 2.11.1 Creating a macro file .........................................................................................2-72 2.11.2 Entering and developing macros ...................................................................... 2-74 2.12 Compilation .................................................................................................... 2-75 2.12.1 Executing compilation ....................................................................................... 2-75 2.12.2 Error display ......................................................................................................2-76 2.12.3 Double coil check .............................................................................................. 2-76 2.13

Printing Functions .........................................................................................2-77

(20)

Page 22

2.13.1 Printing .............................................................................................................. 2-77 2.13.2 Preview display ................................................................................................. 2-81 2.14 Changing the Display Color on the Screen ................................................. 2-82 2.14.1 Changing display colors on the screen ............................................................. 2-82

Chapter 3

Simulator 3.1 Outline of the Simulator Functions .............................................................. 2-84 3.1.1 Outline of the functions ..................................................................................... 2-84 3.1.2 Restrictions in the simulator .............................................................................. 2-84 3.2 Starting up and Exiting from the Simulator ................................................. 2-86 3.2.1 Operating procedure for startup and exit .......................................................... 2-86 3.2.2 Name and function of each part of the screen .................................................. 2-88

Chapter 4

3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5

Ladder Monitor ............................................................................................... 2-89 Outline of the ladder monitor ............................................................................ 2-89 Executing scans ................................................................................................ 2-89 Executing steps .............................................................................................. 2-101 Jump and search ............................................................................................ 2-105 Stop/reset and device all clear ........................................................................ 2-108

3.4 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5

Monitor All .................................................................................................... 2-109 Outline of monitor all ....................................................................................... 2-109 Displaying, saving, and reading the monitor all window ................................. 2-109 Monitor all window .......................................................................................... 2-113 Registering devices ........................................................................................ 2-113 Selecting and changing devices ..................................................................... 2-116

3.5 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.5.7

Registration Monitor .................................................................................... 2-119 Outline of the registration monitor ................................................................... 2-119 Displaying, saving, and reading the registration monitor ................................ 2-119 Registration monitor window ........................................................................... 2-122 Registering devices ........................................................................................ 2-122 Selecting and changing devices ..................................................................... 2-123 Manipulating timing charts .............................................................................. 2-128 Printing out the registration monitor ................................................................ 2-131

Monitor 4.1 4.1.1 4.1.2 4.1.3

Outline of the Monitor Functions ............................................................... 2-134 Outline of the functions ................................................................................... 2-134 Restrictions in the monitor .............................................................................. 2-134 Precautions for communication ...................................................................... 2-135

4.2 Communicating with the PLC ..................................................................... 2-136 4.2.1 Setting the PLC communication parameters .................................................. 2-136 4.2.2 Setting the comment transfer .......................................................................... 2-138 4.3 Starting up and Exiting from the Monitor .................................................. 2-139 4.3.1 Operating procedures for startup and exit ...................................................... 2-139 4.3.2 Name and function of each part of the screen ................................................ 2-143 4.4 4.4.1 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7

Ladder Monitor ............................................................................................. 2-144 Outline of the ladder monitor .......................................................................... 2-144 Displaying the ladder monitor window ............................................................ 2-144 PLC error check .............................................................................................. 2-144 Starting the monitor ........................................................................................ 2-145 Stopping the monitor ....................................................................................... 2-145 Screen displayed while the monitor is running ............................................... 2-146 Setting the PLC operation mode ..................................................................... 2-147

4.5 Monitor All and Registration Monitor ......................................................... 2-148 4.5.1 Functions of the monitor all window ................................................................ 2-148 4.5.2 Functions of the registration monitor .............................................................. 2-148 4.6 4.6.1 4.6.2 4.6.3

(21)

Monitor Function .......................................................................................... 2-149 Disabling the input refresh/Disabling the output ............................................. 2-149 Changing the current values all at once ......................................................... 2-150 Device all clear ...............................................................................................2-154

Page 23

Appendices Appendix A Error Message List ......................................................................... 2-156 A-1 System errors ................................................................................................. 2-156 A-2 Memory errors ................................................................................................ 2-156 A-3 File errors ........................................................................................................ 2-157 A-4 Installation errors ............................................................................................ 2-157 A-5 Errors that occur in the editor ......................................................................... 2-158 A-6 Errors that occur in the monitor/simulator ....................................................... 2-159 A-7 Communication errors (displayed in the monitor) ........................................... 2-159 A-8 PLC errors ...................................................................................................... 2-160 A-9 Errors that occur during compilation ............................................................... 2-161 Appendix B Instruction List ............................................................................... 2-163 B-1 Basic instructions ............................................................................................ 2-163 B-2 Application instructions ................................................................................... 2-164 B-3 Arithmetic instructions ..................................................................................... 2-165 B-4 Interrupt instructions ....................................................................................... 2-166 Appendix C Relay No. List .................................................................................. 2-167 C-1 Relays, timers, counters, and memory numbers for each model ................... 2-167 Appendix D Special Utility Relay List ................................................................ 2-168 D-1 Special relays and arithmetic operation flags ................................................. 2-168 D-2 Special utility relays for high-speed counter (0) .............................................. 2-168 D-3 Special utility relays for high-speed counter (1) .............................................. 2-169 D-4 Other special utility relays ............................................................................... 2-169 D-5 Memory switches ............................................................................................ 2-172 D-6 Special memory list ......................................................................................... 2-172 Appendix E Devices for KV-10R(W)/T(W) to 80R(W)/T(W), KV-300 ................ 2-174 E-1 Special utility relays ........................................................................................ 2-174 E-2 Memory switches ............................................................................................ 2-176 E-3 Special memory list ......................................................................................... 2-176 Appendix F Sample Program List ..................................................................... 2-178 F-1 Description of sample ladder programs .......................................................... 2-178 Appendix G Quick Reference ............................................................................. 2-180 G-1 Editor .............................................................................................................. 2-180 G-2 Simulator ......................................................................................................... 2-188 G-3 Monitor ............................................................................................................ 2-195 Appendix H Notes for Programming ................................................................. 2-201 H-1 Circuits that must be modified ........................................................................ 2-201 H-2 Precautions for programming ......................................................................... 2-202 H-3 Programs which cannot be decompiled .......................................................... 2-203 Appendix I

List of Files Used ............................................................................ 2-204

Appendix J

Countermeasures for Frequent Communication Errors ............ 2-205

WARRANTIES AND DISCLAIMERS

2-215

(22)

Page 24

WARRANTIES AND DISCLAIMERS See 3-367.

Caution •

No part of this manual may be reprinted or reproduced in any form or by any means without the prior written permission of KEYENCE CORPORATION.

•

The content of this manual is subject to change without notice.

•

KEYENCE has thoroughly checked and reviewed this manual. Please contact the sales office listed at the end of this manual if you have any questions or comments regarding this manual or if you find an error.

•

KEYENCE assumes no liability for damages resulting from the use of the information in this manual, item 3 above notwithstanding.

•

KEYENCE will replace any incomplete or incorrectly collated manual.

All company names and product names in this manual are registered trademarks or trademarks of their respective owners.

(23)

Page 25

Chapter 1 Programming This chapter describes basic knowledge including program creation procedures, device configuration, relay assignments, special functions to set and confirm Visual KV Series operations, as well as the extended ladder diagrams. Understand the contents described here completely at first before creating programs. ➮

For a detailed description of instructions, refer to "2.4. Instruction Details" (p.3-56).

1.1

Before Creating Programs .......................................................... 3-2

1.1.1 1.1.2

Flow from Introduction to Operation ........................................................... 3-2 Scan Time .................................................................................................. 3-3

1.2

User Memory ................................................................................ 3-4

1.2.1

Program Capacity ...................................................................................... 3-4

1.3

Device Configuration ................................................................... 3-5

1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.3.10 1.3.11 1.3.12

Device List .................................................................................................. 3-5 Relay No. ................................................................................................... 3-7 Assigning Relay Nos. ................................................................................. 3-8 Input Relays ............................................................................................... 3-9 Output Relays .......................................................................................... 3-10 Internal Utility Relays ............................................................................... 3-11 Special Utility Relays ................................................................................ 3-12 Special Utility Relay List ........................................................................... 3-14 Timers and Counters ................................................................................ 3-18 Data Memories ......................................................................................... 3-19 Temporary Data Memory ......................................................................... 3-21 Relay Nos. and Functions ........................................................................ 3-22

1.4

Special Functions ...................................................................... 3-23

1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7

Input Time Constant Change Function .................................................... 3-23 Modifying the Input Relay Time Constant ................................................ 3-24 Constant Scan Time Mode ....................................................................... 3-25 Output Disabled Function ......................................................................... 3-26 Input Refresh Disabled Function .............................................................. 3-26 Contact Comment Save Function ............................................................ 3-27 Special Functions ..................................................................................... 3-28

1.5

Extended Ladder Diagrams ...................................................... 3-29

1.5.1 1.5.2 1.5.3

Features of Extended Ladder Diagrams .................................................. 3-29 Advantages of Extended Ladder Diagrams ............................................. 3-30 Example of an Extended Ladder Diagram ............................................... 3-31

Page 26

1.1 Before Creating Programs

1.1 Before Creating Programs This section describes what you should know before creating programs and operations for the Visual KV Series.

1.1.1 Flow from Introduction to Operation This section describes an overview of program creation procedures, functions used, and setting items. In the example described below, a latch circuit is created as a program for the Visual KV Series. Introduction

➞ Examining contents of operations Figure 1 shows a latch circuit which operates as follows. Pushbutton switch PB1: ON ➞Pilot lamp (PL) turns on. Pushbutton switch PB2: OFF

Fig. 1 PB1 = N.O. contact switch PB2 = N.C. contact switch PB1

PB2

▲

Pushbutton switch PB1: OFF ➞Pilot lamp (PL) remains lit even if PB1 turns Pushbutton switch PB2: OFF OFF. Pushbutton switch PB1: OFF ➞Pilot lamp (PL) goes out Pushbutton switch PB2: ON when PB2 is set to ON.

▲

1

RL (Relay)

Time chart PB1 contact PB2 contact

PL

ON OFF ON OFF ON

PL

OFF

Next, a program is created that will use the same operation as this circuit to control a PLC.

➞

Program examination Circuit 1 shows relay symbols for the latch circuit. Examine which contact in the Visual KV Series is used for each pushbutton switch and pilot lamp (Table 1). When many I/O devices are required for control, expansion units should also be considered. Table 1

Circuit 1 RL

PB1 PB2 RL

Relay (coil)

Relay (contact) RL

Relay (contact)

PL

Pilot lamp

I/O device Pushbutton switch PB1 (N.O. contact) Pushbutton switch PB2 (N.C. contact) Relay RL Pilot lamp PL

Contact No. Input relay (0000) Input relay (0001) Internal relay (1000) Output coil (0500)

➞

Program creation Edit a program using the "LADDER BUILDER for KV" programming support software creation tool. Ladder diagram 0000

0001*

1000

1000

1000

0500

Coding list LD 0000 OR 1000 AND 0001 OUT 1000 LD 1000 OUT 0500 END

* Enter "N.O. (AND X001)" to 0001 to use N.C. contact.

➞ Transferring and confirming the program Transfer the created program to the Visual KV Series, perform a test run, and then confirm operations with the actual devices.

➞ Operation

3-2

Chapter 1 Programming

Page 27

1.1 Before Creating Programs

1.1.2 Scan Time Scan time The Visual KV Series repeatedly executes a ladder based on the sequence circuit as follows. Input processing

Writes the ON/OFF status of all input terminals to the input memory before executing the program.

Program execution

Reads the ON/OFF status of each device (internal utility relay, timer, counter, etc.) based on the instructions, and performs arithmetic operations. Writes the arithmetic operation result to the output memory.

Output processing

Outputs the contents of the output memory to output terminals.

The duration of time required to perform one cycle is called the scan time (or cycle time). The scan time varies based on program size and the instructions used in the program.

Input response time delay In addition to the I/O processing time, there is also an input time delay in the Visual KV Series caused by the scan time. The input time delay is generated because the input status can only be read during the input processing time. If the input status is changed after input processing, the changed contents can only be read during the next scan time. In the figure below, 1 and 2 can be read but 3 cannot be read. 1

Input signal

2

3

ON OFF

Scan time

Input processing

Program execution

Output processing

Input processing

Program execution

Output processing

Program execution

Input processing

Read

Output processing

Input processing

Program execution

Output processing

Input processing

Output processing

Read

Scan time

Reference: The maximum and minimum values of the input response time are as follows. Maximum value: Input time constant + Scan time x 2 + Output response delay time Minimum value: Input time constant + Scan time + Output response delay time

Note 1: When the input time constant is made small by setting the HSP instruction, special utility relay 2813, and data memory DM1940, a signal may not be received if its ON time is shorter than the scan time. Note 2: The INT instruction is independent of the scan time. Note 3: The minimum scan time is 140 µs (with the basic unit).

Chapter 1 Programming

3-3

11

Page 28

1.2 User Memory

1.2 User Memory This section describes the allowable size (capacity) of a program which can be created in the Visual KV Series.

1.2.1 Program Capacity When a user program is created for the Visual KV Series, the maximum number of steps a program can contain using the mnemonic diagram varies based on the byte count of the instructions used. The instruction byte count is determined individually for each instruction. ➮

For more about byte counts for each instruction, refer to "2.1 Instruction List" (p.3-34).

Maximum number of lines in a program In the KV-10xx/16xx, a program with approximately 2,000 steps can be written. In the KV-24xx/40xx, a program with approximately 4,000 steps can be written.

1

•

Total byte count of the memory used by instructions ≤ 6,000 bytes / 12,000 bytes

•

Total byte count of the memory used by objects of instructions ≤ 12,000 bytes / 24,000 bytes * In the description above, a value on the left side indicates the byte count for the KV-10xx/16xx, while a value on the right side indicates the byte count for the KV-24xx/40xx. * The memory occupied by objects indicates the memory required to execute a program when operation is started.

For example, the allowable number of steps to be written can be calculated from the memory occupied by the instructions as follows. 12,000 bytes / 3 bytes (average byte count of an instruction) = 4,000 steps Note: If either the memory occupied by the instructions or the memory occupied by objects of a program exceeds the specified memory capacity, the program cannot be written or executed.

Calculating the byte count used The byte count used in this program can be calculated as shown in the table below. #00020 T000

0000 0500

T000

0500

Line No.

Instruction

Operand

Byte count

00000

LD

0000

3

5

00001

OR

0500

3

4

00002

TMR

000#00020

2

7

00003

ANB

T000

3

8

OUT

0500

00004

Total

3-4

Chapter 1 Programming

Number of objects

3

8

14 bytes

32 bytes

Page 29

1.3 Device Configuration

1.3 Device Configuration "Device" is a general name for relays, registers, etc. processed by instructions. This section describes the available devices in the Visual KV Series and their general use.

1.3.1 Device List Relay list Relay No.

Normal use

High-speed use (1)

High-speed use (2)

They function as B phase of high-speed counters through specification of utility relays in KV-10. –

0000 0001 0002

Input relays (Direct input allowed area)

Interrupt inputs INT0 to INT3

Remarks

(Polarity inversion allowed) Input captures

0003

– High-speed counter 0 input High-speed counter 1 input

0004 0005 0006 Input relays 0007

– 0008 0009 0010 to 0415

0502

–

A phase input

– –

B phase input

Output relays (Direct output allowed area)

11

– –

Preset input

–

Input relays

0500 0501

High-speed counter 0 High-speed counter 1 High-speed counter 0 High-speed counter 1 High-speed counter 0 High-speed counter 1

– High-speed counter 0 output High-speed Specified frequency counter 1 pulse output output Ramp-up/down control output

0503

70 points – –

–

–

0504 to 0915

Output relays

76 points

1000 to 1915

Internal utility relays

160 points

2000 to 2815

Special utility relays

144 points

2900 to 2915

Special utility relays

HKEY information storage area

3000 to 17915 Internal utility relays

2,144 points

Note 1: The ON/OFF status of the set functions is always cleared when the operation mode is changed from PROGRAM to RUN. However, special utility relays 2700 to 2715 are held even when the operation mode is changed from PROGRAM to RUN or when the power is turned off. Note 2: Internal utility relays can be held by setting the MEMSW instruction

List of I/O relays in basic units Model

KV-10xx

KV-16xx

KV-24xx

KV-40xx

Basic input relays

0000 to 0005

0000 to 0009

0000 to 0015

0000 to 0107

Basic output relays

0500 to 0503

0500 to 0505

0500 to 0507

0500 to 0515

Chapter 1 Programming

3-5

Page 30

1.3 Device Configuration

List of relays in expansion units ■ Input units Connection order 1st input module 2nd input module 3rd input module 4th input module

KV-E4X

KV-E8X

KV-40

KV-10/16/24

KV-10/16/24

KV-E16X

KV-40

KV-40

KV-10/16/24

100 to 103 200 to 203 100 to 107 200 to 207 100 to 115 200 to 215 200 to 203 300 to 303 200 to 207 300 to 307 200 to 215 300 to 315 300 to 303 400 to 403 300 to 307 400 to 407 300 to 315 400 to 415 400 to 403

400 to 407

400 to 415

■ Output units Connection order 1st output module 2nd output module 3rd output module 4th output module

1

KV-E4T(P)/R

KV-E8T(P)/R

KV-E16T(P)/R

600 to 603

600 to 607

600 to 615

700 to 703

700 to 707

700 to 715

800 to 803

800 to 807

800 to 815

900 to 903

900 to 907

900 to 915

■ I/O units KV-E4XR/T(P) Connection order 1st input module 2nd input module 3rd input module 4th input module 1st output module 2nd output module 3rd output module 4th output module * *

3-6

Input relays

Output relays

KV-10/16/24

KV-40

100 to 103

200 to 203

200 to 203

300 to 303

300 to 303

400 to 403

KV-10/16/24

KV-40

603 to 606

603 to 606

703 to 703

703 to 703

803 to 803

803 to 803

903 to 903

903 to 903

400 to 403

Relay Nos. of expansion units are automatically assigned in the order of connection. The connection order is counted only for input and output units. When I/O units are connected, they are counted as input units and output units separately.

Chapter 1 Programming