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 12

Visual KV Series User's Manual 2: Support Software, pages 21 to 30

Pages 21 to 30 of 105

The original document is the PDF (910 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

Other special utility relays .......................................................................... 3-15 1.3.9 Timers and Counters ........................................................................................ 3-18 Timer/Counter list ....................................................................................... 3-18 Description ................................................................................................. 3-18 1.3.10 Data Memories ................................................................................................. 3-19 1.3.11 Temporary Data Memory .................................................................................. 3-21 1.3.12 Relay Nos. and Functions ................................................................................. 3-22 1.4 Special Functions .......................................................................................... 3-23 1.4.1 Input Time Constant Change Function ............................................................. 3-23 Setting the input time constant for basic units using special utility relays .. 3-23 1.4.2 Modifying the Input Relay Time Constant ......................................................... 3-24 Modification within the CPU ....................................................................... 3-24 1.4.3 Constant Scan Time Mode ............................................................................... 3-25 1.4.4 Output Disabled Function ................................................................................. 3-26 1.4.5 Input Refresh Disabled Function ...................................................................... 3-26 1.4.6 Contact Comment Save Function ..................................................................... 3-27 1.4.7 Special Functions ............................................................................................. 3-28 Constant Scan Time Mode ........................................................................ 3-28 Output Disabled Function .......................................................................... 3-28 Input Refresh Disabled Function ................................................................ 3-28 1.5 1.5.1 1.5.2 1.5.3

Chapter 2

Chapter 3

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

Instructions 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5

Instruction List [Visual KV Series] .............................................................. 3-34 Basic Instructions .............................................................................................. 3-34 Application Instructions ..................................................................................... 3-36 Arithmetic Instructions ...................................................................................... 3-38 Interrupt Instructions .........................................................................................3-41 Function No. List (Alphabetical order) .............................................................. 3-41

2.2 2.2.1 2.2.2 2.2.3 2.2.4

Instruction List [KV-300 Series, KV-10/80] ................................................. 3-42 Basic Instructions .............................................................................................. 3-42 Application Instructions ..................................................................................... 3-45 Arithmetic Instructions ...................................................................................... 3-48 Interrupt Instructions .........................................................................................3-54

2.3

Convention Details ........................................................................................ 3-55

2.4 2.4.1 2.4.2 2.4.3

Instruction Details .......................................................................................... 3-56 Basic Instructions .............................................................................................. 3-56 Application Instructions ..................................................................................... 3-95 Arithmetic Instructions .................................................................................... 3-134

2.5

Programming Notes ..................................................................................... 3-189

Interrupts

Visual KV

3.1

Interrupt Instructions ................................................................................... 3-192

3.2 3.2.1 3.2.2 3.2.3 3.2.4

Interrupt Processing .................................................................................... 3-194 Interrupt Processing ........................................................................................ 3-194 Types of Interrupts .......................................................................................... 3-195 Interrupt Priority .............................................................................................. 3-196 Interrupt Program ............................................................................................ 3-196

3.3 Direct Input/Output ...................................................................................... 3-197 3.3.1 Direct Input ..................................................................................................... 3-197 3.3.2 Direct Output ................................................................................................... 3-197 3.4 3.4.1 3.4.2 3.4.3 3.4.4

Chapter 4

Applications of Interrupt Programs ........................................................... 3-198 Interrupt with a Signal Converter .................................................................... 3-198 Interrupt with a High-speed Counter ............................................................... 3-199 Measuring the ON Time of High-speed Pulses .............................................. 3-200 Measuring the Period in which a Target Passes between Two Points ........... 3-201

High-speed Counters 4.1

Visual KV

High-speed Counter Instructions ............................................................... 3-204

(20)

Page 22

4.2 Outline of High-speed Counters ................................................................. 3-206 4.2.1 High-speecÛCounters and High-speed Counter Comparators ...................... 3-206 Structure of high-speed counters and high-speed counter comparators . 3-206 Specifications of high-speed counters ..................................................... 3-208 High-speed counter comparators ............................................................. 3-209 4.2.2 Internal Clock for High-speed Counters .......................................................... 3-210 4.3 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6

Setting and Operation of High-speed Counters ........................................ 3-211 Reading the Current Value of the High-speed Counter .................................. 3-211 Preset Value of the High-speed Counter Comparator .................................... 3-211 Comparator Output .........................................................................................3-211 Count Input Method ........................................................................................ 3-212 Resetting the High-speed Counter ................................................................. 3-214 Differences with the CTH Instruction between the Conventional and Visual KV Series ................................................................ 3-216 4.3.7 Applications of High-speed Counters ............................................................. 3-217 4.4 4.4.1 4.4.2 4.4.3 4.4.4 4.4.5

Extended Functions of High-speed Counters ........................................... 3-221 24-bit High-speed Counter .............................................................................. 3-221 Changing the Current Value of a 24-bit High-speed Counter ......................... 3-223 Application Example of 24-bit High-speed Counter (single-phase input) ....... 3-224 Ring Counter Function .................................................................................... 3-225 Applications of Ring Counters ........................................................................ 3-226

4.5 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5

Special Functions Using High-speed Counters ........................................ 3-228 Specified Frequency Pulse Output Function .................................................. 3-228 Applications of the Specified Frequency Pulse Output ................................... 3-229 Frequency Counter Function .......................................................................... 3-231 Applications of Frequency Counters ............................................................... 3-232 Cam Switch Function ...................................................................................... 3-233 Cam switch mode .................................................................................... 3-233 Multi-step comparator mode .................................................................... 3-234 Setting method .........................................................................................3-234 4.5.6 Application of the Cam Switch (Cam Switch Mode) ....................................... 3-236 4.6 Direct Clock Pulse Output ........................................................................... 3-237 4.6.1 Outline of Direct Clock Pulse Output .............................................................. 3-237 4.6.2 Pulse Output Setting with the High-speed Counter Comparator .................... 3-238 Changing the pulse period and width ....................................................... 3-238 Calculating the pulse period and comparator preset value ...................... 3-239 Operation with special utility relays .......................................................... 3-239 4.7 4.7.1 4.7.2 4.7.3 4.7.4

Chapter 5

Examples of Direct Clock Pulse Output .................................................... 3-242 Example of Outputting a Pulse with 1:1 ON/OFF Ratio .................................. 3-242 Example of Outputting a Pulse with Variable ON/OFF Ratio .......................... 3-245 Example of Stopping the Pulse Output at a Specified Pulse Count ............... 3-249 Application of Direct Clock Pulse Output (Ramp-up/down control) ................ 3-251

Positioning Control

Visual KV

5.1 Outline of Positioning Control .................................................................... 3-254 5.1.1 Ramp-up/down Control ................................................................................... 3-254 5.2 Parameter Setting and Operating Procedures .......................................... 3-255 5.2.1 Parameter Setting Procedure ......................................................................... 3-255 5.2.2 Operating Procedure ...................................................................................... 3-257 5.3 5.3.1 5.3.2 5.3.3

Chapter 6

Examples of Using the Positioning Control Function .............................. 3-258 Connection Example ....................................................................................... 3-258 Tips .................................................................................................................3-258 Application Examples of the Positioning Control Function ............................. 3-259

Interrupts, High-speed Counters, Positioning Control

KV-300, KV-10/80

6.1 Interrupt Instructions ................................................................................... 3-268 6.1.1 Description of Interrupts .................................................................................. 3-268 Input processing for routine program and interrupt routine ...................... 3-268 Types of interrupt ..................................................................................... 3-268 Interrupt priority ........................................................................................ 3-269 Interrupt routine ........................................................................................ 3-269 Direct output ............................................................................................. 3-270

(21)

Page 23

Direct input ............................................................................................... 3-270 6.1.2 Interrupt Instructions ....................................................................................... 3-271 6.2 Direct Clock Pulse ........................................................................................ 3-276 6.2.1 Output of Direct Clock Pulse ........................................................................... 3-276 Outline of High-Speed Counters .............................................................. 3-276 Outline of Pulse Output ............................................................................ 3-279 Examples of Pulse Output ....................................................................... 3-284 6.3 Positioning Control ...................................................................................... 3-296 6.3.1 Positioning Control (Ramp-up/down Control) ................................................. 3-296 Outline of positioning control .................................................................... 3-296 Setting and application of parameters ..................................................... 3-297 Examples of stepping motor control ......................................................... 3-300

Chapter 7

Chapter 8

Serial Communication 7.1 7.1.1 7.1.2 7.1.3

Communications Specifications ................................................................ 3-306 Communications Specification ........................................................................ 3-306 Connection with the KV Unit ........................................................................... 3-306 Connecting the KV-300 CPU to a Personal Computer ................................... 3-307

7.2 7.2.1 7.2.2 7.2.3 7.2.4 7.2.5 7.2.6 7.2.7

Serial Communication ................................................................................. 3-308 Command Transmission Procedure ............................................................... 3-308 Format of Commands/Responses .................................................................. 3-309 Communication Command/Response List ..................................................... 3-310 Setting Communication Commands and Responses to Commands .............. 3-311 Other Response Codes .................................................................................. 3-315 Error Code List ................................................................................................ 3-316 Example Program ........................................................................................... 3-317

7.3 7.3.1 7.3.2 7.3.3

Loading Text Data ........................................................................................ 3-318 Receiving Text Data ....................................................................................... 3-318 Transmitting Text Data ................................................................................... 3-319 Sample Program ............................................................................................. 3-320

7.4

ASCII Code List ............................................................................................ 3-321

Programming Examples 8.1

List

......................................................................................................... 3-324

8.2 Details ......................................................................................................... 3-326 8.2.1 Reference Program Examples ........................................................................ 3-326 Basic Instructions ..................................................................................... 3-326 Application Instructions ............................................................................ 3-334 Arithmetic Instructions .............................................................................. 3-343

WARRANTIES AND DISCLAIMERS

3-367

(22)

Page 24

WARRANTIES AND DISCLAIMERS See 2-215.

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 Software – Windows [KV-H6WE2] This chapter describes the items included in the package, the product outline, the method to connect a personal computer, the installation method, the common operating procedures, etc. 1.1

Items Included in the Package ............................................................. 2-2

1.2 1.2.1 1.2.2

Outline of the Ladder Builder for KV ................................................... 2-3 Operating environment and system configuration .................................... 2-3 Features and functions of the Ladder Builder for KV ............................... 2-4

1.3 1.3.1 1.3.2

Before Programming ............................................................................ 2-7 Differences from the KV IncrediWare (DOS) ........................................... 2-8 Differences from the Ladder Builder for KV Ver 1.0 ................................. 2-8

1.4 1.4.1 1.4.2

Installing the Software .......................................................................... 2-9 Preparation for installation ....................................................................... 2-9 Installation procedure ............................................................................... 2-10

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

Page 26

Chapter 1 Introduction

1.1

Items Included in the Package The following items are included in the Ladder Builder for KV package. Ensure that all the items are supplied. ● Ladder Builder for KV master disks #1 and #2

1

#1

#2

3 1/2" floppy disk (1.44 MB) x 2

The "Ladder Builder for KV" programs and the installer are saved on these disks. Store them in a secure location after installing the programs. Note: It is recommended that you make a backup copy of the master disks in case the disks are accidentally damaged. ● Connection cable ➮ See page 2-7.

2-2

Page 27

Chapter 1 Introduction

1.2

Outline of the Ladder Builder for KV This section describes the operation environments, system configuration, features, functions, etc. of the Ladder Builder for KV. Be sure to read this section before using the Ladder Builder for KV.

1.2.1

Operating environment and system configuration The following operating environment is required to run the Ladder Builder for KV. Ensure that your system satisfies the following conditions and that the required equipment is provided. ■ Personal computers supported Models supporting Windows 3.1 or later (equipped with the RS-232C interface) IBM PC and PC/AT or compatible machine ■ CPU memory capacity i486DX2 or higher (Pentium 90 MHz or higher is recommended.) 8 MB RAM (16 MB or more is recommended.) ■ Compatible operating systems • Windows 3.1 • Windows 95 ■ Font types required (Make sure to install them.) • MS Sans Serif • Small fonts • Arial Each of them is supplied as standard in Windows 95. ■ Free space on hard disk 4.5 MB or more ■ KV and each unit Connect the required units such as KV to the personal computer to use the monitor functions and transfer programs using the Ladder Builder for KV. ➮ Refer to “1.3 Before Programming” on page 2-7. Display Resolution: 640 x 480 or higher KV Series PLC

Printer

Printer that can be connected to the personal computer and supports Windows (300 dpi or higher)

Note: The Ladder Builder for KV does not support long file names.

2-3

1

Page 28

Chapter 1 Introduction

1.2.2

Features and functions of the Ladder Builder for KV The Ladder Builder for KV is a software program that allows you to create sequence programs. It offers excellent functionality and advanced programming processing ability.

Features of the Ladder Builder for KV ■ The multi-file edit function and simple mouse operation improve work efficiency. Because two or more files can be edited at a time, a block diagram can be cut and pasted between files. Symbols and connection lines can be easily copied and moved using the mouse. Each function can be started by pressing a button on the tool bar, which promotes efficient operation.

1

■ Selection of instruction words and devices from a list ensures the correct input of symbols. Because the instruction word and device can be selected from a list for each type, symbols can be entered with little error. A symbol can also be entered directly by typing the corresponding instruction word to facilitate rapid programming.

■ Ladder data can be shared with the KV IncrediWare (DOS). Because the ladder data created using the KV IncrediWare (DOS) can be used as it is, the ladder property created thus far can still be used effectively. The ladder data created using the Ladder Builder for KV can also be used in the KV IncrediWare (DOS).

2-4

Page 29

Chapter 1 Introduction ■ Allows quick selection of the device to be monitored by dragging and dropping from the ladder diagram. The device to be monitored can be easily and quickly selected by dragging and dropping it from the ladder diagram.

1

■ Allows quick confirmation of the ladder diagram, the contacts and the timing chart. Each of the three windows can be positioned anywhere on the screen, allowing you to simultaneously monitor and simulate the operation of the program. The three windows are the Ladder Monitor window which displays the ladder diagram, the Monitor All window which displays the device list, and the Registration Monitor window which allows you to check the movement of the contacts in the timing chart.

■ Allows use of the simulator functions even when not connected to a PLC. You can monitor and simulate the operation of the program even when a PLC is not connected. Debugging efficiency is improved because program operation can be checked without transferring the program to the PLC. As well, the reverse step execution function is provided both for execution of scans and execution of steps. ■ Provides 5 different screen sizes for different applications. There are 5 different screen display sizes that can be selected as required for different applications. For example, the reduced size can be selected to confirm the entire flow, and the enlarged size can be selected to edit each contact.

2-5

Page 30

Chapter 1 Introduction

Functions of the Ladder Builder for KV The following functions are provided in the Ladder Builder for KV. ■ Editor function • Creates the ladder diagram using diversified instruction words of the ladder language. • Registers comments to contacts. Comments can be transferred to a Visual KV or a KV-300 (Except for KV-10/80 Series). • Converts the ladder diagram into machine code. • Displays the ladder diagram, mnemonic list, label comment and device use status list, etc., on the screen and prints them out to the printer

1

■ Simulator function • Simulates the operation of the ladder diagram even if a Visual KV or a conventional KV is not connected, and allows debugging of the program. • Provides a continuous scan execution mode, one scan execution mode, one step execution mode, etc. so that errors be confidently located. • Enables execution of a step in the reverse direction once or continuously.

■ Monitor function • Monitors the contact ON/OFF status on a real-time, on-line basis using the ladder diagram created. • Displays the timing chart, and transfers programs to a Visual KV or a conventional KV.

2-6