You are on page 1of 240

96M0365

Users Manual
NEW KV Series 2 Support Software

NEW KV Series

Support software

How this manual is organized:


The NEW KV Series Users Manual is composed of 3 separate
manuals; 1-Installation, 2-Support Software, 3-Programming.
Please read each manual relevant to your purpose.

Safety Precautions
This instruction manual describes the operation and function of the KV Series PLC.
Read this manual carefully to ensure safe use and maximum performance from your
KV Series PLC.

Symbols
The following symbols alert you to important messages. Be sure to read these
messages carefully.
Failure to follow instructions may lead to injury. (electric

WARNING shock, burn, etc.)

CAUTION
Note:

Failure to follow instructions may lead to product damage.

Provides additional information on proper operation.

Conventions
This manual describes the operation/function of all Keyence KV Series PLC.
Note following conventions when you use.
Visual KV (Series)
KV-10xx, 16xx, 24xx, 40xx

KV-10AR/AT/DR/DT
KV-24AR/AT/DR/DT

KV-16AR/AT/DR/DT
KV-40AR/AT/DR/DT

Conventional KV (Series)
KV-300 (Series)
KV-10/80 (Series)

KV-10R(W)/T(W)
KV-24R(W)/T(W)
KV-80R(W)/T(W)
KV-300

KV-16R(W)/T(W)
KV-40R(W)/T(W)

General Precautions

At startup and during operation, be sure to monitor the functions and performance of the KV Sereis PLC.

We recommend that you take substantial safety measures to avoid any damage
in the event a problem occurs.

Do not open or modify the KV Series PLC or use it in any way other than described in the specifications.

When the KV Series PLC is used in combination with other instruments, functions and performance may be degraded, depending on operating conditions and
the surrounding environment.

Do not use the KV Series PLC for the purpose of protecting the human body.

Note: The built-in display may show the error message "Error 40" blinking the very
first time you turn on the power supply to the Visual KV Series. Press any key
around the display to cancel this message.
The Visual KV Series shows this message when no program is loaded.

(1)

Note to User
When using the Visual KV Series in the following conditions or environments, be
sure to use the Visual KV Series with sufficient margin regarding the rating and
functions, take appropriate safety precautions such as fail-safe, and contact our
sales personnel if any questions arise.

Use in conditions or environments not described in this manual

Use for nuclear power control, railway facilities, air service facilities, vehicles,
combustion devices, medical equipment, amusement machines, safety equipment, etc.

Use for applications where large effects are predicted to be given on human lives
and properties and safety is especially requested.

Restriction on Acquiring the CE Marking


Restriction to be compatible with EMC directives
When using a relay output type unit (whose model name ends with "R"), connect
spark killers having the appropriate withstand voltage against the load to the
output terminals in parallel to contacts (because the unit discharges when a relay
contact becomes open and noise is generated). In our experiments, we use the
following models of spark killers.
XEB0101 0.1 F-10 manufactured by OKAYA DENKI SANGYO
The following 1-turn ferrite core is added to the AC power input circuit of the KV40AR/T, the KV-24AR/T and to the DC power input circuit of the KV-40DR/T.
ZCAT3035-1330 manufactured by TDK
Note: The contents above do not by themselves ensure that the entire machine
manufactured in accordance with the above contents is compatible with EMC
directives.
You must judge by yourself whether or not the entire machine is compatible with
EMC directives because compatibility may change depending on the component
configuration, wiring and location inside of the machine.
Restriction on compatibility with low-voltage directives (IEC-1010-1)
Use insulated type crimp-style terminals.

For wiring materials, use lead wires whose sheath is 0.4 mm or more.

The Visual KV Series is allowed to be installed in a vertical position only.


(Spacers for expansion units are not available.)

Be sure to use the Visual KV Series inside the control panel.

(2)

Features of the Visual KV Series


Extremely small
The Visual KV Series is the smallest in the world among AC type PLCs equipped
with screw terminal blocks, and saves installation space.
Extremely fast
The minimum scan time is 140 s and minimum instruction execution time is 0.7
s, which is the fastest control in its class.
AC power built-in type newly added
AC power built-in type units are newly added. This type can be used in small
spaces where a switching power supply unit cannot be installed.
Excellent Access Window
An Access Window with two-color backlight is adopted in all models to facilitate
changing and monitoring of device data. Changing between RUN mode and
PROGRAM mode, checking the error code when an error has occurred, etc. can
be performed in a Visual KV Series unit without the need for any handheld
programmer.
The analog trimmer, which has been popular in the conventional KV Series, is
digitized to enable more detail settings. [Digital trimmers]
User message setting function
In the Access Window, 256 different user messages can be displayed. This
function can be used to give instructions on works on the production line, indicate
abnormalities in the units, etc.
Program write in RUN mode
Ladder programs can be changed even while the system is running.
Equipped with two serial ports
Visual KV Series basic units are equipped with two serial ports to connect peripheral units, improving the debug environment.
(The KV-10xx is equipped with only one serial port.)
Easy Ramp-up/down control function
The one-axis motor control function is offered separately from high-speed
counters so that feedback control is enabled.
Equipped with two 24-bit high-speed 30 kHz, two-phase counters
The Visual KV Series is equipped with two high-speed counters each with a twopoint comparator output function that enables high-speed encoder input.
Specified frequency pulse output function
High-speed counters can function as pulse oscillators of 50 kHz maximum with
easy setting, without creating a complicated ladder program.
Frequency counter function
High-speed counters can function as frequency counters with easy setting,
without creating complicated ladder programs.
Cam switch function
High-speed counters can function as cam switches with easy setting, without
creating complicated ladder programs.

(3)

Interrupt function
The Visual KV Series is equipped with four high-speed interrupt inputs of
10 s maximum.
Input time constant change function
The time constant can be set in 7 steps from 10 s to 10 ms.
Double memory backup functions
In addition to a conventional SRAM battery backup function, the Visual KV Series
is also equipped with an EEPROM backup function.

Compatibility with Conventional KV Series Peripheral Units


The Visual KV Series functions as a high-end compatible model of the conventional
KV Series. Peripheral units of the conventional KV Series such as the ladder support
software "KV IncrediWare (DOS)" and "LADDER BUILDER for KV" and the
handheld programmer KV-P3E(01) can be used since they are part of the Visual KV
Series.
However, it should be noted that the contents have changed as follows.

The internal clock cycle of high-speed counters consists of three types: 1 s, 10


s, and 100 s.

The time constant for an input relay specified by the HSP instruction is 10 s.

The analog trimmer function is set with the Access Window built into the basic
unit.

The available device setting range of the TMIN instruction is from 0 to 65535.
[Handheld programmer KV-P3E(01) can display 0 to 9999 .]

The RUN/PROGRAM LED is displayed in the Access Window provided on the


front face of the basic unit.

Transistor output is not independent, but is common.

With the transistor type, the output terminal layout is different.

The specifications for output current of transistor outputs Nos. 500 to 502 is 100
mA.

Conventional KV Series expansion units are not available as expansion units for
the Visual KV Series.

The channel setting switch is not provided for expansion units. Channels are
determined in connection order.

Scans in expansion I/O units are not synchronous with the scan time in Visual KV
Series basic units.

Assignment of special utility relays has partially changed.

Data memory device Nos. DM1000 to DM1999 are assigned as special data
memories.

(4)

Cautions when using the previous version of ladder support software


Pay strict attention to the following items when using the ladder support software.

CAUTION

When using the ladder support software "KV IncrediWare (DOS)" or "LADDER
BUILDER for KV Ver. 1.0x", set the model to "KV-300".
DM0 to DM1999 are only available.

When the ladder support software "LADDER BUILDER for KV Ver. 1.0x" is
used, do not use the monitors Change All function. If the Change All function
is used, the basic unit may be damaged. Never use the Change All function.

Peripheral units and other units incompatible with the Visual KV Series
Peripheral units in the conventional KV Series and other units shown below are not
compatible with the Visual KV Series.

Expansion I/O units for the conventional KV Series: KV-8ER/8ET/8EX/16EX/


8EYR/8EYT/16EYR/16EYT
Analog I/O units for the conventional KV Series: KV-AD4/DA4

Cautions when Using the Serial Port


The KV-16xx/24xx/40xx units are equipped with two RJ-11 modular connectors for
serial communication.
When using them, pay strict attention to the following contents:

(5)

Programs can be transferred and monitored using either communication port A or


B. However, never connect the ladder software and a handheld programmer to
the two ports at the same time.

The KV-D20 operator interface panel can be connected to either communication


port A or B. However, only one KV-D20 unit can be connected to a single basic
unit.

Never leave both the KV-D20 operator interface panel and KV-P3E(01) handheld
programmer on simultaneously for a long period of time.

Cautions when writing in RUN mode


WARNING

In the Visual KV Series, a program can be changed using the ladder support software "LADDER BUILDER for KV" even while the program is running.

Pay strict attention to safety when performing any writes in RUN mode.

The situation may become extremely dangerous depending on the status of


the controller device connected to the PLC or the program used.

When writing in RUN mode, each function is offered as follows:


KV function

While running

After writing

Delete the used ones.

Initialized

All new ones.

Initialized

When set values for high-speed counter


comparators are changed, the current
High-speed counter
Change the set values values of the high-speed counters are
High-speed counter
for high-speed counter also changed in the same way as
comparator
FUN70 is executed with the KV-P3E(01)
comparators used
handheld programmer.
"Changing set value of timer/counter:
FUN70" (p.1-222)

No change
Internal auxiliary
relay/special
auxiliary relay
Easy ramp up-anddown control
function
Cam switch function
Specified frequency
pulse output function
Frequency counter
function
Previous value for
differential
instruction

Remains in current status.

Held

Continues operation until current output has completed.


Continues operation.
Continues operation.
Continues operation.
The previous value is acquired for differential instructions after
conversion. Relays changed at this instant cannot be detected by
differentiation.

Note 1: When a ladder program is changed while it is running, it is not saved in the
EEPROM but is saved in the SRAM, then will be saved in the EEPROM when the
power is next turned on. If the power OFF period is 2 months or longer at 25C (20
days or longer at 25C for the KV-10xx) after a ladder program is changed in RUN
mode, the changed ladder program may become corrupted. To prevent inconsistencies, turn on the power once so that the changed program is saved in the EEPROM.
Note 2: If an error occurs in the Visual KV Series basic unit while a program is being
written in RUN mode, the Visual KV Series basic unit changes to PROGRAM mode
and the existing program which is being written may be deleted. In such a case,
transfer the program again.

(6)

How this manual is organized


The Visual KV Series Users Manual is composed of 3 separate manuals;
1-Installation, 2-Support Software, 3-Programming. Please read each manual
relevant to your purpose.

1 Installation
Chapter 1

Configuration and Specifications [Visual KV Series Only]


Describes the system configuration of the Visual KV Series, the names and functions of
each part, and the specifications.

Chapter 2

System Installation [Visual KV Series Only]


Describes the installation and connection of each Visual KV Series unit as well as
system maintenance.

Chapter 3

Access Window [Visual KV Series Only]


Describes the Access Window used for changing and monitoring data.

Chapter 4

KV-D20 Operator Interface Panel [Visual KV Series Only]


Describes the KV-D20 Operator Interface Panel used for changing, monitoring, and
displaying the status of inside relays, timers, counters and data memories.

Chapter 5

KV-300, KV-10/80 Hardware [KV-300, KV-10/80 Series Only]


Describes the hardware specifications and wirings for KV-300 and KV-10/80 Series.

Chapter 6

Handheld Programmer
Describes how to use the handheld programmer and memory card.

Chapter 7

KV-L2 Serial Interface Module [KV-300 Series Only]


Describes the serial interface modules for KV-300 Series.

Chapter 8

KV-AN6 Analog I/O Module [KV-300 Series Only]


Describes the optional Analog I/O module for KV-300 Series

Chapter 9

KV-AD4/DA4 Analog I/O Unit [KV-10/80 Series Only]


Describes the optional Analog I/O unit for KV-10/80 Series.

Chapter 10

Troubleshooting
This chapter describes the error code list, countermeasures against problems, and error
indications for each unit.

Appendices
The appendix includes a list of ladder program applications and the index.

2 Support Software
Chapter 1

Introduction
Describes the items included in the package, the product outline, the method to connect
a personal computer, the installation method, etc.

(7)

Chapter 2

Editor
Describes the operating procedures in Editor mode.

Chapter 3

Simulator
Describes the operating procedures in Simulator mode.

Chapter 4

Monitor
Describes the operating procedures in Monitor mode.

Appendices
Includes instructions list, devices list, sample program list and quick reference for key
operation and shortcuts.

3 Programming
Chapter 1

Programming
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.

Chapter 2

Instructions
Describes the concrete usage of instructions in the KV Series.
Refer to "Chapter 3 Interrupts" on page 3-183 for details of interrupt instructions.
Refer to "Chapter 4 High-speed counters" on page 3-195 for details of the high-speed
counters used in the application instruction.

Chapter 3

Interrupts [Visual KV Series Only]


The interrupt processing function executes an interrupt program when an external input
or request from the high-speed counter comparator (interrupt factor) is encountered
during KV operation.
This chapter describes the types of interrupt factors as well as inputs and outputs
encountered during interrupt processing.

Chapter 4

High-speed Counters [Visual KV Series Only]


Describes high-speed counters and high-speed counter comparators, which allow highspeed pulse measurement and pulse output, independent of the scan time.

Chapter 5

Positioning Control [Visual KV Series Only]


Describes ramp-up/down control of stepping motors and servo motors.

Chapter 6

Interrupts, High-speed Counters, Positioning Control [KV-300, KV-10/80 Series Only]


Describes ramp-up/down control of stepping motors and servo motors.

Chapter 7

Serial Communication
The KV Series can be connected to an external device with an RS-232C interface to
establish communication.
This chapter describes communications specifications, how to connect the KV Series to
external devices, and how to perform communication.

Chapter 8

Programming Examples
Describes the typical programming examples for KV-10/80 Series. These programs can
be used for Visual KV Series. However, pay attention to the I/O addressing compatibility
before use.

(8)

Contents
2

Support software

Chapter 1

Introduction
1.1

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

1.2
Outline of the Ladder Builder for KV .............................................................. 2-3
1.2.1 Operating environment and system configuration .............................................. 2-3
1.2.2 Features and functions of the Ladder Builder for KV .......................................... 2-4
Features of the Ladder Builder for KV ......................................................... 2-4
Functions of the Ladder Builder for KV ........................................................ 2-6
1.3

Before Programming ....................................................................................... 2-7


Machines to be prepared ............................................................................. 2-7
1.3.1 Differences from the KV IncrediWare (DOS) ...................................................... 2-8
1.3.2 Differences from the Ladder Builder for KV Ver 1.0 ........................................... 2-8
1.4
Installing the Software ..................................................................................... 2-9
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-12

1.6
1.6.1
1.6.2
1.6.3
1.6.4
1.6.5

Basic Operations ........................................................................................... 2-13


Program creation flow and available modes ..................................................... 2-13
Starting up and exiting from the software ......................................................... 2-15
Screen .............................................................................................................. 2-17
Mouse operation and keyboard operation ........................................................ 2-20
Online Help ....................................................................................................... 2-21

Editor
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

(9)

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

2.7.4 Replacing operands .......................................................................................... 2-64


2.7.5 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
2.12.1
2.12.2
2.12.3

Compilation .................................................................................................... 2-75


Executing compilation ....................................................................................... 2-75
Error display ...................................................................................................... 2-76
Double coil check .............................................................................................. 2-76

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


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

(10)

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

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

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

(11)

2-215

Installation

Chapter 1

Configuration and Specifications

Visual KV

1.1
System Configuration ...................................................................................... 1-2
1.1.1 System Configuration ......................................................................................... 1-2
1.2
Specifications ................................................................................................... 1-4
1.2.1 General Specifications ........................................................................................ 1-4
1.2.2 AC Power Specifications .................................................................................... 1-5
Visual KV Series operation at power interruption ........................................ 1-5
1.2.3 Performance Specifications ................................................................................ 1-6
Data backup function against instantaneous power interruption ................. 1-7
1.3
Common I/O Specifications of Basic Units ................................................... 1-8
1.3.1 Model of a Basic Unit .......................................................................................... 1-8
1.3.2 Common I/O Specifications ................................................................................ 1-8
1.4
KV-10AR/AT(P)/DR/DT(P) (10-I/O Basic Unit) ............................................. 1-10
1.4.1 Part Names and Functions ............................................................................... 1-10
1.4.2 Terminal Layout Drawings and I/O Circuit Diagrams ........................................ 1-11
KV-10AR/DR (Relay output type) .............................................................. 1-11
KV-10AT(P)/DT(P) (Transistor output type) ............................................... 1-13
1.4.3 AC Power Input (KV-10AR/AT(P)) .................................................................... 1-14
1.4.4 Relationship between Continuous Simultaneous ON Ratio and Ambient Temperature 1-15
1.4.5 Dimensions ....................................................................................................... 1-16
1.5
KV-16AR/AT(P)/DR/DT(P) (16-I/O Basic Unit) ............................................. 1-17
1.5.1 Part Names and Functions ............................................................................... 1-17
1.5.2 Terminal Layout Drawings and I/O Circuit Diagrams ........................................ 1-18
KV-16AR/DR (Relay output type) .............................................................. 1-18
KV-16AT(P)/DT(P) (Transistor output type) ............................................... 1-20
1.5.3 AC Power Input (KV-16AR/AT(P)) .................................................................... 1-21
1.5.4 Relationship between Continuous Simultaneous ON Ratio and Ambient Temperature 1-22
1.5.5 Dimensions ....................................................................................................... 1-23
1.6
KV-24AR/AT(P)/DR/DT(P) (24-I/O Basic Unit) ............................................. 1-24
1.6.1 Part Names and Functions ............................................................................... 1-24
1.6.2 Terminal Layout Drawings and I/O Circuit Diagrams ........................................ 1-25
KV-24AR/DR (Relay output type) .............................................................. 1-25
KV-24AT(P)/DT(P) (Transistor output type) ............................................... 1-27
1.6.3 AC Power Input (KV-24AR/AT(P)) .................................................................... 1-28
1.6.4 Relationship between Continuous Simultaneous ON Ratio and Ambient Temperature 1-29
1.6.5 Dimensions ....................................................................................................... 1-30
1.7
KV-40AR/AT(P)/DR/DT(P) (40-I/O Basic Unit) .............................................. 1-31
1.7.1 Part Names and Functions ............................................................................... 1-31
1.7.2 Terminal Layout Drawings and I/O Circuit Diagrams ........................................ 1-32
KV-40AR/DR (Relay output type) .............................................................. 1-32
KV-40AT(P)/DT(P) (Transistor output type) ............................................... 1-34
1.7.3 AC Power Input (KV-40AR/AT(P)) .................................................................... 1-35
1.7.4 Relationship between Continuous Simultaneous ON Ratio and Ambient Temperature 1-36
1.7.5 Dimensions ....................................................................................................... 1-37
1.8
1.8.1
1.8.2
1.8.3

KV-E4X/E8X/E16X (Expansion Input Unit) .................................................. 1-38


Part Names and Functions ............................................................................... 1-38
Input Specifications ........................................................................................... 1-38
Terminal Layout Drawings and Input Circuit Diagrams .................................... 1-39
KV-E4X (4-I/O expansion input unit) .......................................................... 1-39
KV-E8X (8-I/O expansion input unit) .......................................................... 1-40
KV-E16X (16-I/O expansion input unit) ...................................................... 1-41
1.8.4 Dimensions ....................................................................................................... 1-42
1.9
KV-E4R/E4T/E8R/E8T(P)/E16R/E16T(P) (Expansion Output Unit) ............. 1-43
1.9.1 Part Names and Functions ............................................................................... 1-43
1.9.2 Output Specifications ........................................................................................ 1-43
KV-E4R/E8R/E16R (Relay output type) ..................................................... 1-44
KV-E4T/E8T(P)/E16T(P) [Transistor output type (NPN/PNP)] .................. 1-44
1.9.3 Terminal Layout Drawings and Input Circuit Diagrams .................................... 1-45
KV-E4R [4-I/O expansion output unit (relay output type)] .......................... 1-45
KV-E4T [4-I/O expansion output unit transistor output type)] .................... 1-46
KV-E8R [8-I/O expansion output unit (relay output type)] .......................... 1-47

(12)

KV-E8T(P) [8-I/O expansion output unit (transistor output type)] .............. 1-48
KV-E16R [16-I/O expansion output unit (relay output type)] ...................... 1-49
KV-E16T(P) [16-I/O expansion input unit (transistor output)] .................... 1-50
1.9.4 Dimensions ....................................................................................................... 1-51
1.10
1.10.1
1.10.2
1.10.3

KV-E4XR/E4XT(P) (Expansion I/O Unit) ....................................................... 1-52


Part Names and Functions ............................................................................... 1-52
Input Specifications ........................................................................................... 1-53
Output Specifications ........................................................................................ 1-53
KV-E4XR (Relay output type) .................................................................... 1-53
KV-E4XT(P) (Transistor output type) ......................................................... 1-53
1.10.4 Terminal Layout Drawings and Input Circuit Diagrams .................................... 1-54
KV-E4XR (Relay output type) .................................................................... 1-54
KV-E4XT(P) (Transistor output type) ......................................................... 1-56
1.10.5 Dimensions ....................................................................................................... 1-58
1.11
1.11.1
1.11.2
1.11.3
1.11.4

Chapter 2

KV-D20 (Operator Interface Panel) ............................................................... 1-59


Part Names and Functions ............................................................................... 1-59
General Specifications ...................................................................................... 1-60
Functional Specifications .................................................................................. 1-60
Dimensions ....................................................................................................... 1-61

System Installation

Visual KV

2.1
2.1.1
2.1.2
2.1.3

Installation Environment ............................................................................... 1-64


Installation Environment ................................................................................... 1-64
Installation Position ........................................................................................... 1-65
Installation Procedure ....................................................................................... 1-66
Expansion unit spacer ................................................................................ 1-66
2.1.4 Cautions on Wiring for Each Unit ...................................................................... 1-67
Wiring procedures for basic units ............................................................... 1-67
Cautions on wiring for I/O units .................................................................. 1-68
Terminal ..................................................................................................... 1-68
Cautions on grounding ............................................................................... 1-69
2.1.5 Contact Protection ............................................................................................ 1-69
2.2
Connecting Visual KV Series Expansion Units .......................................... 1-70
2.2.1 Visual KV Series Expansion Units .................................................................... 1-70
2.2.2 Connecting Visual KV Series Expansion Units ................................................. 1-71
Connection methods .................................................................................. 1-72
Number of connectable units ..................................................................... 1-73
2.2.3 Confirming the Connection Settings of Expansion Units .................................. 1-74
Expansion unit relay list ............................................................................. 1-74
Connection information for expansion units ............................................... 1-75
Input time constant for expansion units ..................................................... 1-76
Clearing the input value when disconnecting ............................................. 1-76
2.2.4 Transferring I/O Information between Expansion Units and the Basic Unit ...... 1-77
When inputting ........................................................................................... 1-77
In the case of output .................................................................................. 1-77
2.3
Inspection and Maintenance ......................................................................... 1-78
2.3.1 Inspection ......................................................................................................... 1-78
2.3.2 Maintenance ..................................................................................................... 1-78

Chapter 3

Access Window

Visual KV

3.1
Overview of the Access Window .................................................................. 1-80
3.1.1 What is the Access Window ............................................................................. 1-80
3.1.2 Access Window Use Examples ........................................................................ 1-80
3.2
3.2.1
3.2.2
3.2.3
3.2.4
3.2.5

Basic Operating Procedures ......................................................................... 1-81


Operation Mode ................................................................................................ 1-81
Access Window Modes ..................................................................................... 1-81
Part Names and Functions of the Access Window ........................................... 1-82
Selecting Modes and Setting/Resetting Key Lock ............................................ 1-82
Turbo Function .................................................................................................. 1-83

3.3
Digital Trimmer Mode .................................................................................... 1-84
3.3.1 Function and Operating Procedure ................................................................... 1-84
Key operation and screen display .............................................................. 1-84
Function and operating procedure ............................................................. 1-84

(13)

3.4
Device Mode ................................................................................................... 1-87
3.4.1 Function and Operating Procedure ................................................................... 1-87
Devices that can be displayed and changed ............................................. 1-87
Key operation and screen display .............................................................. 1-87
Selecting the device and displaying the current value/set value ................ 1-88
Changing a numeric value ......................................................................... 1-89
Holding the setting ..................................................................................... 1-91
3.4.2 Screen Display for Each Device Type .............................................................. 1-91
Data memory (DM) .................................................................................... 1-91
Temporary data memory (TM) ................................................................... 1-91
Timer/counter (T/C) .................................................................................... 1-92
High-speed counter comparator (CTC) ...................................................... 1-92
Trimmer (TRM) .......................................................................................... 1-93
Relay (RLY) ............................................................................................... 1-93
3.5
System Mode .................................................................................................. 1-94
3.5.1 Function and Operating Procedure ................................................................... 1-94
Key operation and screen display .............................................................. 1-94
LOAD mode and SAVE mode .................................................................... 1-96
Display in LOAD/SAVE mode .................................................................... 1-96
3.6
Message Display ............................................................................................ 1-97
3.6.1 Error Messages and Error Status ..................................................................... 1-97
3.6.2 User Messages ................................................................................................. 1-97
How to use the user messages .................................................................. 1-98

Chapter 4

KV-D20 Operator Interface Panel

Visual KV

4.1
4.1.1
4.1.2
4.1.3

Before Operation .......................................................................................... 1-100


Checking Package Contents .......................................................................... 1-100
Part Names and Functions ............................................................................. 1-101
Details about the KV-D20 ............................................................................... 1-102
General specifications .............................................................................. 1-102
Functional specifications .......................................................................... 1-102
Dimensions .............................................................................................. 1-103
4.1.4 Installation and Environment .......................................................................... 1-104
Use environment ...................................................................................... 1-104
Panel mounting ........................................................................................ 1-105
4.1.5 Inspection and Maintenance ........................................................................... 1-106
Inspection ................................................................................................. 1-106
Maintenance ............................................................................................ 1-106
4.2
Overview and Operation .............................................................................. 1-107
4.2.1 Use Examples for the KV-D20 ........................................................................ 1-107
4.2.2 Connection with the KV Series ....................................................................... 1-108
Connection ............................................................................................... 1-108
Precautions .............................................................................................. 1-108
4.2.3 Overview of the KV-D20 ................................................................................. 1-109
Switching the display mode ..................................................................... 1-109
Overview of each display mode ............................................................... 1-110
Assignment of relays/DM ......................................................................... 1-111
Other functions ......................................................................................... 1-112
Precautions about screen change function .............................................. 1-115
4.2.4 Operator Mode ................................................................................................ 1-117
Screen selection in operator mode .......................................................... 1-117
Operator screen ....................................................................................... 1-118
Direct access screen ................................................................................ 1-126
KV-I/O monitor screen ............................................................................. 1-127
Switch comment screen ........................................................................... 1-128
Lamp comment screen ............................................................................ 1-128
Screen change permission in operator mode .......................................... 1-129
4.2.5 Device Mode ................................................................................................... 1-130
Device mode ............................................................................................ 1-130
Operation example for device mode ........................................................ 1-132
4.2.6 System Mode .................................................................................................. 1-134
System mode ........................................................................................... 1-134
4.3
Examples of Ladder Programs ................................................................... 1-135
4.3.1 Basic Ladder Programs .................................................................................. 1-135
Before creating ladder programs ............................................................. 1-135

(14)

Basic ladder programs ............................................................................. 1-136


4.3.2 Examples of Ladder Programs ....................................................................... 1-143
Example of displaying user messages ..................................................... 1-143
Example of displaying messages with titles ............................................. 1-145
Example of position control ...................................................................... 1-146
Example of frequency counter ................................................................. 1-149
Example of 24-bit high-speed counter ..................................................... 1-152
Example of cam switch function ............................................................... 1-154
4.4
4.4.1
4.4.2
4.4.3

Chapter 5

Appendix ....................................................................................................... 1-158


Troubleshooting .............................................................................................. 1-158
Available Character List .................................................................................. 1-162
Comment Draft Sheet ..................................................................................... 1-163

KV-300, KV-10/80 Hardware

KV-300, KV-10/80

5.1
System Configuration .................................................................................. 1-166
5.1.1 KV-300 ............................................................................................................ 1-166
5.1.2 KV-10/80 ......................................................................................................... 1-167
5.2
Module/Unit Specifications ......................................................................... 1-168
5.2.1 Wiring: KV-U4 Power Supply Module ............................................................. 1-168
Parts and functions .................................................................................. 1-168
5.2.2 Wiring: KV-U5 DC Power Distribution Module ................................................ 1-169
Parts and functions .................................................................................. 1-169
5.2.3 Wiring: KV-300 CPU ....................................................................................... 1-170
Parts and functions .................................................................................. 1-170
5.2.4 Wiring: KV-C16X/C32X Connector Input Module ........................................... 1-171
Parts and functions .................................................................................. 1-171
5.2.5 Wiring: KV-C32T/B16R/B16S Connector Output Module ............................... 1-172
Parts and functions .................................................................................. 1-172
5.2.6 Wiring: KV-R1A I/O Distribution Module ......................................................... 1-173
Parts and functions .................................................................................. 1-173
5.2.7 Wiring: KV-R8X/R16X/R8R/R16R/R8T/R16T I/O Terminal Modules ............. 1-174
Parts and functions .................................................................................. 1-174
5.2.8 Module Names and Functions ........................................................................ 1-175
5.2.9 Peripheral Equipment Names and Functions ................................................. 1-176
5.3
5.3.1
5.3.2
5.3.3
5.3.4
5.3.5
5.3.6

5.3.7

5.3.8

5.3.9
5.3.10
5.3.11
5.3.12

Chapter 6

Module/Unit Connections ............................................................................ 1-178


Environmental Requirements ......................................................................... 1-178
Installation Guidelines ..................................................................................... 1-178
Assembling the System .................................................................................. 1-179
Connecting modules ................................................................................ 1-179
Mounting to the DIN Rail ................................................................................. 1-180
Removing the Terminal Block ......................................................................... 1-181
Connecting the AC Power Supply Module and DC Power Distribution Module .... 1-182
KV-U4 AC Power Supply Module ............................................................ 1-182
KV-U5 DC Power Distribution Module ..................................................... 1-182
I/O Connectors ................................................................................................ 1-183
KV-300 CPU ............................................................................................ 1-183
KV-C16X/C32X ........................................................................................ 1-184
KV-C32T/B16R/B16S .............................................................................. 1-185
KV-R8X/R16X/R8R/R16R/R8T/R16T ...................................................... 1-186
I/O Terminal Modules: Communication Cables and Power Distribution ......... 1-187
Transmission distance by cable type ....................................................... 1-187
Connection patterns ................................................................................. 1-187
Incorrect wiring patterns ........................................................................... 1-188
Power distribution .................................................................................... 1-188
Connector Assembly Instructions ................................................................... 1-189
KV-300 CPU I/O Indicators ............................................................................. 1-191
KV-10/80 Expansion Units .............................................................................. 1-192
Mounting Environment .................................................................................... 1-194

Handheld Programmer
6.1
Using the Handheld Programmer ............................................................... 1-196
6.1.1 Outline of the Handheld Programmer ............................................................. 1-196
6.1.2 Precautions ..................................................................................................... 1-198
6.2

(15)

Basic Operations ......................................................................................... 1-200

6.2.1 Basic Programming Operation ........................................................................ 1-200


6.3

Functions ...................................................................................................... 1-216


Function Nos. list ..................................................................................... 1-216
ALL CLEAR .............................................................................................. 1-217
HANDHELD PROGRAMMER CLEAR ..................................................... 1-217
COUNTER CLEAR .................................................................................. 1-218
HIGH-SPEED COUNTER CLEAR ........................................................... 1-218
ALL DATA MEMORY CLEAR .................................................................. 1-219
ALL LATCHING RELAYS RESET ........................................................... 1-219
PROGRAM SENT OR RECEIVED .......................................................... 1-220
OFFLINE EDITOR START ...................................................................... 1-221
OFFLINE EDITOR STOP ........................................................................ 1-221
TIMER/COUNTER CURRENT VALUE CHANGE ................................... 1-222
TIMER/COUNTER SETTING CHANGE .................................................. 1-224
RELAY ON/OFF ....................................................................................... 1-226
WRITE INTO DATA MEMORY ................................................................ 1-227
READ TRIMMER SETTING ..................................................................... 1-228
SYNTAX CHECK ..................................................................................... 1-228
PROGRAM CAPACITY CHECK .............................................................. 1-229

6.4
Memory Card ................................................................................................ 1-230
6.4.1 Functions [used with KV-P3E(01)] .................................................................. 1-230
6.4.2 Storage Capacity ............................................................................................ 1-230
CLEAR ..................................................................................................... 1-232
NEW ......................................................................................................... 1-233
ACCS ....................................................................................................... 1-234
ACCS: SAVE ........................................................................................... 1-235
ACCS: LOAD ........................................................................................... 1-236
ACCS: VERIFY ........................................................................................ 1-236
ACCS: DELETE ....................................................................................... 1-237

Chapter 7

KV-L2 Serial Interface Module

KV-300

7.1
Outline ......................................................................................................... 1-240
7.1.1 Features ..........................................................................................................1-240
7.2
7.2.1
7.2.2
7.2.3

Configuration ............................................................................................... 1-241


Parts and Functions ........................................................................................ 1-241
System Configuration ..................................................................................... 1-242
Outline of Operation Modes ............................................................................ 1-244

7.3
7.3.1
7.3.2
7.3.3
7.3.4

Installation .................................................................................................... 1-245


Setting the Operation Mode ............................................................................ 1-245
Communications Protocols ............................................................................. 1-247
Connector Wiring ............................................................................................ 1-248
Connecting to External Units .......................................................................... 1-249
Connecting to An External Display .......................................................... 1-249
Connecting to an IBM PC-AT Computer .................................................. 1-249
Connecting to the KV-10/16/24/40/80 ...................................................... 1-250
Connecting KV-L2s .................................................................................. 1-250

7.4
Software Setup ............................................................................................. 1-252
7.4.1 Using KV Software [KV IncrediWare (DOS)] .................................................. 1-252
Starting KV IncrediWare (DOS) from the KV-L2 ........................................................ 1-252
7.5
KV Mode Programming ............................................................................... 1-253
7.5.1 Operating in KV Mode .................................................................................... 1-253
Communications protocol ........................................................................ 1-253
7.5.2 Serial Communications Procedure ................................................................. 1-255
Command transmission procedure .......................................................... 1-255
Command/response format ..................................................................... 1-256
Communications commands and responses ........................................... 1-256
Communications commands .................................................................... 1-257
7.5.3 Transmission and Reception of Text Data ...................................................... 1-262
Assigning relay nos. and data memory address nos. .............................. 1-262
Transmitting Text Data ............................................................................. 1-264
Receiving text data .................................................................................. 1-265
ASCII code/binary conversion function .................................................... 1-266
Example program ..................................................................................... 1-269
7.6

Display Interface Mode Programming ....................................................... 1-270

(16)

7.6.1 Operating in Display Interface Mode .............................................................. 1-270


Communications protocols ....................................................................... 1-270
Communications control procedure ......................................................... 1-271
7.6.2 Command and Response Format ................................................................... 1-273
7.6.3 Commands and Responses ........................................................................... 1-275
List of commands and responses ............................................................ 1-275
Description of commands and responses ................................................ 1-277
End codes ................................................................................................ 1-291
7.7
Non-procedure Mode Programming .......................................................... 1-292
7.7.1 Operating in Non-procedure Mode ................................................................. 1-292
Communications protocol ........................................................................ 1-292
Connecting to the KV-L2 .......................................................................... 1-293
7.7.2 Assignment of Relay Nos. and Data Memory Address Nos. .......................... 1-294
Assigning relay nos. and data memory address nos. .............................. 1-294
7.7.3 Transmitting Text Data ................................................................................... 1-297
Data transmission and internal data memory addresses ......................... 1-297
7.7.4 Receiving Text Data ....................................................................................... 1-298
Format of received data and data memory addresses ............................ 1-298
7.7.5 ASCII code/Binary Conversion Function ........................................................ 1-300
7.8
Troubleshooting Guide ............................................................................... 1-304
7.8.1 Troubleshooting .............................................................................................. 1-304
7.8.2 Precautions ..................................................................................................... 1-305
7.9
Specifications ............................................................................................... 1-306
7.9.1 Specifications .................................................................................................. 1-306
General specifications .............................................................................. 1-306
Communications protocol ........................................................................ 1-306
RS-232C connector specifications ........................................................... 1-306
RS-422A terminal block specifications ..................................................... 1-306
7.9.2 Dimensions ..................................................................................................... 1-307
7.10 Command List .............................................................................................. 1-308
7.10.1 List of Commands and Responses ................................................................. 1-308
7.10.2 List of Commands and Responses in Display Interface mode ....................... 1-309

Chapter 8

KV-AN6 Analog I/O Module


8.1

KV-300

Outline ......................................................................................................... 1-312


Features ................................................................................................... 1-312

8.2
Configuration ............................................................................................... 1-313
8.2.1 Parts and Functions ........................................................................................ 1-313
8.2.2 System Configuration ..................................................................................... 1-314
8.3
8.3.1
8.3.2
8.3.3
8.3.4
8.3.5

Installation .................................................................................................... 1-315


Terminal Nos. ................................................................................................. 1-315
Removing the Terminal Block ......................................................................... 1-316
Example of Voltage I/O Wiring ........................................................................ 1-317
Example of Current I/O Wiring ........................................................................ 1-318
Setting I/O Ranges ......................................................................................... 1-319

8.4
8.4.1
8.4.2
8.4.3
8.4.4
8.4.5
8.4.6
8.4.7
8.4.8
8.4.9

Programming ................................................................................................ 1-320


Input Characteristics (A/D) .............................................................................. 1-320
Calculating Input Data (A/D) ........................................................................... 1-321
Output Characteristics (D/A) ........................................................................... 1-322
Calculating Output Data (D/A) ........................................................................ 1-323
Assigning Data Memory (DM) Addresses ....................................................... 1-324
Reading Analog Input ..................................................................................... 1-325
Measuring Analog Input Average ................................................................... 1-326
Writing Analog Output ..................................................................................... 1-327
Converting Analog Input to Analog Output ..................................................... 1-328

8.5
8.5.1
8.5.2
8.5.3

KV-AN6 Appendices .................................................................................... 1-329


Troubleshooting .............................................................................................. 1-329
Precautions ..................................................................................................... 1-330
Specifications .................................................................................................. 1-331
Environmental specifications ................................................................... 1-331
System specifications .............................................................................. 1-331
8.5.4 Dimensions ..................................................................................................... 1-332

(17)

Chapter 9

KV-AD4/DA4 Analog I/O Unit


9.1

KV-10/80

Outline ......................................................................................................... 1-334


Features ................................................................................................... 1-334

9.2
Configuration ............................................................................................... 1-335
9.2.1 Part Names and Functions ............................................................................. 1-335
KV-AD4 .................................................................................................... 1-335
KV-DA4 .................................................................................................... 1-336
9.2.2 Specifications .................................................................................................. 1-337
KV-AD4 .................................................................................................... 1-337
KV-DA4 .................................................................................................... 1-339
9.2.3 System Configuration ..................................................................................... 1-341
9.3
9.3.1
9.3.2
9.3.3

Installation .................................................................................................... 1-342


Installation Procedure ..................................................................................... 1-342
Checking the Installation Environment ........................................................... 1-343
Setting the KV-AD4 Input Mode ...................................................................... 1-344
Setting the input mode ............................................................................. 1-344
9.3.4 Connecting External Instruments .................................................................... 1-345
Wiring ....................................................................................................... 1-345
Wiring diagrams ....................................................................................... 1-346
9.3.5 Connecting to the KV-10 to 80 ........................................................................ 1-348
9.3.6 Maintenance ................................................................................................... 1-349
Inspection and Cleaning .......................................................................... 1-349
9.4
Programming ................................................................................................ 1-350
9.4.1 Programming the KV-AD4 .............................................................................. 1-350
A/D Conversion Mechanism .................................................................... 1-350
About Digital Data after A/D Conversion .................................................. 1-351
Calculating Voltage and Current Values from Digital Data ...................... 1-352
9.4.2 Programming the KV-DA4 .............................................................................. 1-353
D/A Conversion Mechanism .................................................................... 1-353
Converting Digital Data to Voltage or Current Values to be Output ......... 1-354
Writing Digital Data to Data Memory for D/A Conversion ........................ 1-356
9.4.3 A/D and D/A Conversion Tables ..................................................................... 1-357
Voltage Conversion Table ........................................................................ 1-357
Current Conversion Table ........................................................................ 1-358

Chapter 10

9.5

Programming Examples .............................................................................. 1-359


Calculating Analog Data Values from Digital Data ................................... 1-359
Writing Data to be Analog-output ............................................................. 1-361
Outputting Analog Trimmer Values .......................................................... 1-364
Outputting Analog Input Data ................................................................... 1-365
Outputting Analog Input from a Pressure Sensor to an Air Valve ............ 1-366
Setting the Minimum and Maximum Voltage Limits and Measuring the
Average Voltage ...................................................................................... 1-367

9.6

Troubleshooting ........................................................................................... 1-370

Troubleshooting
10.1
10.1.1
10.1.2
10.1.3
10.1.4

Error List ....................................................................................................... 1-372


List of Error Codes in Basic Units ................................................................... 1-372
Error indication in Expansion Units ................................................................. 1-374
Program Errors ............................................................................................... 1-375
Memory Card Errors and Other Errors ........................................................... 1-376

10.2

Replacing Relays ......................................................................................... 1-377


Replacement procedure ........................................................................... 1-377

10.3 Troubleshooting ........................................................................................... 1-378


10.3.1 Troubleshooting List ....................................................................................... 1-378
10.4

Error Messages ............................................................................................ 1-380

Appendices
Appendix A. Specifications and Dimensions [Visual KV Series] .................... 1-382
A.1
System Specifications [Visual KV Series] ....................................................... 1-382
Hardware ................................................................................................. 1-382
Software and Programming ..................................................................... 1-383

(18)

A.2

A.3
A.4

AC power supply unit ............................................................................... 1-384


Common I/O Specifications of Basic Units ..................................................... 1-384
Input specifications .................................................................................. 1-384
Output specifications (relay output): KV-10AR/DR, KV-16AR/DR,
KV-24AR/DR, and KV-40AR/DR .............................................................. 1-385
Output specifications (transistor output): KV-10AT(P)/DT(P),
KV-16AT(P)/DT(P), KV-24AT(P)/DT(P), and KV-40AT(P)/DT(P) ............ 1-385
Expansion Unit Specifications ........................................................................ 1-385
Dimensions ..................................................................................................... 1-389

Appendix B. Specifications and Dimensions [KV-300 Series] ......................... 1-392


B.1
System Specifications [KV-300 Series] .......................................................... 1-392
Hardware ................................................................................................. 1-392
Software and Programming ..................................................................... 1-393
AC Power supply module/DC power distribution module ........................ 1-394
B.2
Module Specifications ..................................................................................... 1-398
KV-300 CPU ............................................................................................ 1-398
KV-C16X/C32X Input Modules ................................................................ 1-399
KV-C32T/B16R/B16S Output Modules ................................................... 1-400
KV-R8X/R16X I/O Terminal Modules ....................................................... 1-401
KV-R8T/R16T/R8R/R16R I/O Terminal Modules ..................................... 1-402
KV-R8T/R16T/R8R/R16R I/O Terminal Modules (RUN Output) .............. 1-403
KV-R1A I/O Distribution Module .............................................................. 1-403
B.3
Dimensions ..................................................................................................... 1-404
Appendix C.

Ladder Program List ...................................................................... 1-406

Appendix D. A/D and D/A Conversion Tables [KV-AN6] ..................................... 1-408


Voltage conversion table .......................................................................... 1-408
Current conversion table .......................................................................... 1-409

WARRANTIES AND DISCLAIMERS

1-419

Programming

Chapter 1

Programming
1.1
Before Creating Programs .............................................................................. 3-2
1.1.1 Flow from Introduction to Operation ................................................................... 3-2
1.1.2 Scan Time ........................................................................................................... 3-3
Scan time ..................................................................................................... 3-3
Input response time delay ............................................................................ 3-3
1.2
User Memory .................................................................................................... 3-4
1.2.1 Program Capacity ............................................................................................... 3-4
Maximum number of lines in a program ....................................................... 3-4
Calculating the byte count used ................................................................... 3-4
1.3
Device Configuration ....................................................................................... 3-5
1.3.1 Device List .......................................................................................................... 3-5
Relay list ...................................................................................................... 3-5
List of I/O relays in basic units ..................................................................... 3-5
List of relays in expansion units ................................................................... 3-6
1.3.2 Relay No. ............................................................................................................ 3-7
Address No. ................................................................................................. 3-7
Contact No. .................................................................................................. 3-8
Channel No. ................................................................................................. 3-8
1.3.3 Assigning Relay Nos. .......................................................................................... 3-8
1.3.4 Input Relays ........................................................................................................ 3-9
Basic unit ..................................................................................................... 3-9
Expansion unit ........................................................................................... 3-10
1.3.5 Output Relays ................................................................................................... 3-10
Output operation time ................................................................................ 3-10
1.3.6 Internal Utility Relays ........................................................................................ 3-11
Retentive function of internal utility relays .................................................. 3-11
1.3.7 Special Utility Relays ........................................................................................ 3-12
Description ................................................................................................. 3-12
1.3.8 Special Utility Relay List ................................................................................... 3-14
Special relays and arithmetic operation flags ............................................ 3-14
Special utility relays for high-speed counter(0) .......................................... 3-14
Special utility relays for high-speed counter(1) .......................................... 3-15

(19)

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)

4.2
Outline of High-speed Counters ................................................................. 3-206
4.2.1 High-speecCounters 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)

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)

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)

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-12

1.6
1.6.1
1.6.2
1.6.3
1.6.4
1.6.5

Basic Operations ................................................................................... 2-13


Program creation flow and available modes ............................................ 2-13
Starting up and exiting from the software ................................................. 2-15
Screen ...................................................................................................... 2-17
Mouse operation and keyboard operation ................................................ 2-20
Online help ............................................................................................... 2-21

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 CD-ROM

Connection cable
See page 2-7.

2-2

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

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.

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

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.

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

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

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

Chapter 1 Introduction

1.3

Before Programming
The personal computer should be connected to a Visual KV or a conventional KV to
transfer the programs to the Visual KV or the conventional KV and to use the monitor function.

Machines to be prepared

You must prepare the following machines before beginning programming.


PC
Connect it to the D-Sub 9-pin type serial port.
Connection cable
D-sub 9-pin type conversion connector

Model: OP-26487
Model: OP-26486

KV Series PLC
To RS-232C
connector

OP-26486

OP-26487

To RJ-11 modular
connector

CAUTION

PC

If a Visual KV or a conventional KV is accidentally connected to the personal


computers printer port, the personal computer, the basic unit or the CPU unit
may be damaged. Pay careful attention.
Note: Make sure to use a dedicated cable. If any other cable is used, the unit may
not operate properly.
Standard cable

SD
RD

KV
3
5

SG

RJ-11 Modular
Connector

When the PC has 25-pin


connector
PC
2
3
4
5
6
7
8
9-pin D-sub connector

SD
RD

KV
3
5

SG

PC (DTE)
2 SD
3 RD
4 RS
5 CS
6 DR
20 ER
7 SG

25-pin D-sub connector

2-7

Chapter 1 Introduction

1.3.1

Differences from the KV IncrediWare (DOS)


Because the Ladder Builder for KV is a Windows application, its specifications are
slightly different from the KV IncrediWare (DOS) for MS-DOS, as listed below.

Some of the keys assigned to keyboard functions are different.


Refer to Appendix G Quick Reference on page 2-180.

1.3.2

The timing chart simulator and the timing chart monitor are provided as the
registration monitor screen.

The function to set the trigger on the timing chart monitor is not provided.

The memory card operation function is not provided.

The timing chart save/read function is not provided.

The "extended ladder normal ladder" conversion function is not provided.

Differences from the Ladder Builder for KV Ver 1.0


From the Ladder Builder for KV Ver 1.5, the following changes and additions were
made to the specifications and functions.

2-8

The editor function allows the selection to show/hide contact comments.

You can edit ladder diagrams while checking the use status list of devices on the
monitor.

The operation of switching the numbering system between decimal (#) and
hexadecimal ($) is assigned to shortcut key [Ctrl]+[E].

The Visual KV Series units are newly supported.

Chapter 1 Introduction

1.4

Installing the Software


This section describes how to install the Ladder Builder for KV on the personal
computers hard disk.

1.4.1

Preparation for installation


Confirm the following points before installing the software.
Free hard disk space
The Ladder Builder for KV must be installed on the hard disk. The free space required is 4.5 MB. Ensure that this space is available.
Installation in a Windows environment
The Ladder Builder for KV runs in Windows, and must be installed from Windows.
Ensure that Windows 3.1 or Windows 95 is installed and operating correctly in your
personal computer.
RS-232C (serial port)
The RS-232C (serial port) on the personal computer should be ready before transferring programs to a Visual KV or a conventional KV and using the Ladder Builder
for KVs monitor functions.
For the setup procedure, refer to your personal computers instruction manual.
Note 1: The serial port must also be set up in the Ladder Builder for KV after this
program is installed.
Refer to "Setting the serial port" on page 2-136.

Note 2: It is recommended that you make a backup copy of the master disks in case
the disks are accidentally damaged.

2-9

Chapter 1 Introduction

1.4.2

Installation procedure
This section describes how to install the software.
The installation procedure varies depending on which Windows version you are
using. Refer to the section appropriate for your operating environment.
Installation in Windows 95 ( See below)
Installation in Windows 3.1 ( Page 2-12)

Installation in Windows 95
As an example, this section describes how to install the software in Windows95
using the following drive configurations.
Drive C: Hard disk drive
Drive D: CD-ROM drive
Note: Close all other applications before beginning installation.
1. Insert the Ladder Builder for KV master disk #1 into the floppy disk drive.
2. Click My Computer.
3. Click [Ladder Builder for KV] in the CD-ROM drive.
Next, click [disk 1] and then double-click [setup.exe].
4. The graph is displayed, and preparation for installation begins.

5. When the following screen is displayed, click the [Next] button. To cancel installation, click the [Cancel] button.

2-10

Chapter 1 Introduction
6. Confirm the drive name and the folder (directory) name in which the software is
to be installed.
The default path is "C:\KEYENCE\Lbk". To install the software to this location,
click the [NEXT (N)] button.
To change the installation destination, click the [Reference] button and then
specify the drive name and the folder (directory) name.

7. The file copy status graph is displayed on the screen.

8. Recent information not included in this manual is saved in the README file. Be
sure to click the [Yes] button to read this file.

9. Installation is now completed. Click the [OK] button.

2-11

Chapter 1 Introduction

Installation in Windows 3.1


As an example, this section describes how to install the software in Windows3.1
running on a DOS machine using the following drive configurations.
Drive C: Hard disk drive
Drive D: CD-ROM drive
1. Insert the Ladder Builder for KV CD-ROM into the CD-ROM drive.

2. Select "Run" and "Command Line" from the program manager menu.
3. Click [Ladder Builder for KV] in the CD-ROM drive.
Next, click [disk 1] and then double-click [setup.exe].
The rest of the installation procedure is the same as step 4 to step 10 in "Installation
in Windows 95" ( page 2-10).

1.5

Cautions for Use


This section describes the cautions for using the Ladder Builder for KV. Be sure to
read this section.
When a notebook personal computer is used
When a notebook personal computer is used, ensure that the RS-232C is set up. If it
is not, a communication error will occur while the monitor is operating and monitor
operation may not be correct.
For the setup procedure, refer to your personal computers instruction manual.
While the monitor is operating
Never turn off the power of the Visual KV, the conventional KV or unplug the connection cable while the monitor is operating. This may cause a communication error
to occur and the monitor to be forcibly terminated.
Monitor after the ladder diagram is changed
Be sure to select "Convert Transfer Monitor" from the menu and transfer
programs to the PLC when operating the monitor after changing the ladder diagram.
Resolution of the screen
Ensure that the resolution of the screen is at least 640 x 480. It is recommended that
the highest possible resolution be used to ensure comfortable operation. (1,024 x
768 or higher is recommended.)
Long file names
The Ladder Builder for KV runs in Windows 95, but it does not support long file
names. File names can only consist of up to 8 half-width characters and the file
extension (3 characters).

2-12

Chapter 1 Introduction

1.6

Basic Operations
This section describes what you should know before using the Ladder Builder for
KV, such as the programming flow, available modes, software startup procedure,
and software termination procedure.

1.6.1

Program creation flow and available modes


Three modes are available in the Ladder Builder for KV. These are the editor,
monitor and simulator modes. The actual programming procedure, the modes used
in each procedure and the major functions available in each mode are described
below.

1. Creating the ladder diagram


Create the ladder diagram based on the design drawing indicating the operations to
be performed by the PLC.
Editor p. 2-25
Save and read a file in the original LDR format or another format.
Save and read mnemonic lists and comments.
Enter and delete symbols.
Enter and delete connection lines.
Insert and delete lines.
Move and copy ladders.
Edit contacts/line comments/labels.
Change the display color on the screen.
Undo function.
Jump.
Search for instruction words/operands.
Replace operands.
Convert a/b contacts.
Edit lists.
Device use status.
Set the automatic save function.
Create macros.
Print out ladder diagrams, etc.

2. Compiling the ladder diagram


Compile the ladder diagram into machine code that can be read by a Visual KV or a
conventional KV. Although compilation is automatically performed when the monitor
is started up (only when "Transfer Program to PLC" is selected), nothing else can be
executed at the same time as the compilation job.
Editor p. 2-25
Transfer a program to the PLC.
Select this function when changing over to the monitor.
Simulator
Select this function when changing over to the simulator.
Compilation

2-13

Chapter 1 Introduction
3. Debugging the program
Read the machine code created by the editor, and confirm the operation status
including changes in devices. This allows errors to be detected and the ladder
program to be changed accordingly.

You can use either the simulator or the monitor when debugging the program.
When using the simulator, you can simulate the status in which a Visual KV or a
conventional KV is connected. When using the monitor, you actually connect a
Visual KV or a conventional KV and write programs to it.

The method for using the ladder monitor, the monitor all and registration monitor
which indicate the device status; the method for setting up the current value/
preset value/attribute from the dialog bar; and the method for printing out the
registration monitor are shared between the simulator and the monitor with the
exception of certain functions. These methods are described in the simulator
section.

When a CPU unit is not connected: Simulator p. 2-83


Set the break condition, the wait time, the scan time, etc.
Execute scan continuously or once.
Executes a step continuously, a step continuously in the reverse direction, a step
once or a step once in the reverse direction.
Change the timing chart size.
Display the mnemonic list.
Search for devices.
When a CPU unit is connected: Monitor p. 2-133
Serial port setting
Start and stop the monitor, and reconstruct the record.
Set up the PLC mode.
Disable input refresh, disable output (Visual KV Series and KV-300)
Transfer programs (When the menu is selected from the editor and executed,
programs are transferred to the monitor.)
Search for devices.
Simulator and monitor
Save and read the ladder monitor, monitor all, and registration monitor.
p. 2-88, 2-108, 2-118
Display the operation status of the ladder monitor, monitor all, and registration
monitor.
p. 2-88, 2-108, 2-118
Display the timing chart (on the registration monitor).
Set up the current value/preset value/attribute. p. 2-117
Print out the registration monitor. p. 2-131

4. Debugging the program using the ladder diagram and transferring the
program
In addition to debugging using the monitor or simulator, the ladder diagram can also
be changed using the editor. A program (machine code) which has been transferred
to a basic unit or a CPU unit can be read, and the ladder diagram can then be
displayed.
Editor p. 2-25
When debugging is completed and the program runs correctly, transfer the finished
program (machine code) to a Visual KV or a conventional KV and write it.

2-14

Chapter 1 Introduction

1.6.2

Starting up and exiting from the software


The procedures for starting up and exiting from the Ladder Builder for KV are described below.

To start up the software


In Windows 95
Select "Program", "KEYENCE Applications" and "LADDER BUILDER for KV" from
the Start menu.
In Windows 3.1
Double-click the Ladder Builder for KV icon in the KEYENCE Applications group in
the program manager.

The ladder software starts up.

To exit from the software


Perform one of the following procedures to exit from the software.

Select "File" and "Exit" from the menu.


Press the Alt and F4 keys at the same time.
In Windows 95, click the close button provided at the right end of the title bar.
In Windows 3.1, double-click the control menu box provided at the left end of the
title bar.

2-15

Chapter 1 Introduction

Setting and changing the model used


File Change Models
When a new file is created, the dialog box to set the model used is displayed.
Select the PLC model connected, and click the [OK] button.
To change the model while the Ladder Builder for KV is running, select "Change
Models" from the "File" menu.

CAUTION

2-16

If the PLC model connected is not set correctly, the error message
Unmatched model" is displayed when communicating with a KV Series
PLC. Transferring of programs to the PLC and the monitor function are also
disabled. If the model is not set correctly, failure may occur.

If the model is specified as "KV-10(16)A/D" or "KV-24(40)A/D", created


ladder diagrams cannot be opened with Ladder Builder for KV Ver 1.0 or KV
IncrediWare (DOS). To use ladder diagrams with either of these programs,
specify the model as "KV-300".

Chapter 1 Introduction

1.6.3

Screen

Windows in each mode


The screens of the Ladder Builder for KV in each mode are related to each other as
described below.
Editor

1
Simulator

Changed over to monitor


Transfer Program
to PLC Monitor

Monitor

Simulator

Editor
Editor after devices are
cleared

Editor

The name and functions of each window are described on the following pages.
Editor p. 2-25
Simulator p. 2-83
Monitor p. 2-133

Current window
The currently selected active window is called "current window".
To select a window while two or more windows are displayed on the screen in each
mode, use one of the following methods. (The color of the current windows title bar
is typically different than the color of the other title bars.)

Click the title bar of the window you wish to select as the current window.

Select the "Window" menu to view a list of all of the windows that are currently
open. Select the title of the window you wish to select as the current window.

2-17

Chapter 1 Introduction

Showing/hiding the tool bar, status bar and dialog bar


The display status of the tool bar, status bar and dialog bar can be changed.
Select "View" from the editors menu bar.
Check mark
Tool bar

Dialog bar
Status bar

When the check mark is visible: Show mode


When the check mark is not visible: Hide mode
A check mark appears before each bar by default. Every time the check mark is
clicked, the display status is toggled between show mode and hide mode.
* The dialog bar is not provided in the editor.

Display mode
The screen display can be viewed in 5 different sizes.
In the editor, you can set whether or not labels and comments are displayed for
each screen.
Changing the display size
Five different sizes are available to display the ladder diagram. When the software is
started up, "100%" is selected by default. Use the following method to change the
display size. (In the editor, size can be set in the "Display Mode Setup" dialog box.)
View Zoom In
View Zoom Out

Ctrl + PageDown keys: Selects a higher mode.


Ctrl + PageUp keys: Selects a lower mode.

Changing the display size (only in the editor)


The display size can be set in the "Display Mode Setup" dialog box using the following procedure.
1. Select "Display Mode" from the "View" menu on the editors menu bar, or click
button.
the
The "Display Mode Setup" dialog box is displayed.

2-18

Chapter 1 Introduction
2. Set each item, and click the [OK] button.
To cancel the changes you made and close the dialog box, click the [CANCEL]
button.

Display
Size

Displays a ladder diagram at twice the standard size.


This size is useful when characters are small and
difficult to read.

150%

Displays a ladder diagram at 1.5 times the standard


size.

120%

Displays a ladder diagram at 1.2 times the standard


size.

100% (Normal)

Displays a ladder diagram in the standard size.

80%

Displays a ladder diagram in the smallest size. This


size is useful when checking the entire operation
because the maximum number of cells can be dis
played on the screen.

Show in XYM

Displays device names in the ladder diagram using


"X", "Y" and "M".

Show Decimal Constant


with Sign

Displays decimal constants with sign in the ladder


diagram.

Show Device Label

Displays the label name of each device in the ladder


diagram.

Show Comment

Displays comments in the ladder diagram.

Comment
type

Comment 1

Displays comment 1 [which is completely shared with


the KV IncrediWare (DOS)]

Comment 2

Displays comment 2 (which cannot be transferred to


the PLC)

Comment 3

Displays comment 3 (which cannot be transferred to


the PLC)

Current Edit
Screen

Reflects the setting on the edit screen


(current window).

Current Reference
Screen

Reflects the setting on the reference screen


(current window).

Current Screens

Reflects the setting on both the edit screen and the


reference screen (both current windows).

All Windows

Reflects the setting on all the windows.

Mode
Setting
Range

*
*

200%

The current window refers to the currently selected active window.


Line comments cannot be transferred.

2-19

Chapter 1 Introduction

Show/hide comments
You can select to show or hide contact comments on the editor screen.
"Comment 1" is displayed.
Show comments

Hide comments

0000

0000

0001

0001

Click

1.6.4

Lamp ON

Mouse operation and keyboard operation


The Ladder Builder for KV can be operated using the mouse except when input of
characters is required. This improves efficiency when creating the ladder diagram
and during debugging.
Each job can be performed even more efficiently by using keyboard commands
(shortcuts).

How to execute each function (command)


Commonly used functions are assigned to the tool bar and the function keys. Commands selected from the menu can also be executed quickly by using the shortcut
keys and the shortcut menu displayed by right-clicking.

In this manual, the menu, buttons and keys available for each function are
indicated at the right end of each title for quick reference.

The shortcut keys are indicated on the right side of each menu in the software.

Example
The following two methods can be used to enter connection lines.

Pressing the keys or clicking the icon


F8 and / (front-slash) or
: Draws a connection line downward from the
cursor position.
F9 and - (hyphen key) or

: Draws a connection line to the right of the cursor


position.

Using the mouse and cursor control keys in connection line edit mode
To draw connection lines using the mouse, first change the input mode.
The following four methods can be used to change modes.
Select "Edit Connection Line" from the menu displayed by right-clicking.
Select "Edit Connection Line" from the "Edit" menu.
Press the Ctrl and K keys at the same time.
Press the \ key.
Several methods are offered so that the most efficient operation for the situation can
be chosen.

2-20

Chapter 1 Introduction

1.6.5

Online help
The Ladder Builder for KV includes online help.
button on the tool bar or select
If you are not sure about a function, click the
"Help" from the menu bar to open the help window.
Operation help window

Instruction word help window

2-21

Chapter 1 Introduction

2-22

Chapter 1 Introduction

2-23

Chapter 1 Introduction

2-24

Chapter 2
Editor
2.1
2.1.1
2.2
2.2.1
2.2.2
2.3
2.3.1
2.3.2
2.3.3
2.3.4
2.3.5
2.3.6
2.3.7
2.4
2.4.1
2.4.2
2.4.3
2.4.4
2.4.5
2.4.6
2.5
2.5.1
2.5.2
2.5.3
2.6
2.6.1
2.6.2
2.7
2.7.1
2.7.2
2.7.3
2.7.4
2.7.5
2.8
2.8.1
2.8.2
2.9
2.9.1
2.10
2.10.1
2.11
2.11.1
2.11.2
2.12
2.12.1
2.12.2
2.12.3
2.13
2.13.1
2.13.2
2.14
2.14.1

Outline of the Editor Functions ...........................................................


Cautions for editing ladder programs .......................................................
Edit Screen ............................................................................................
Name and function of each part of the screen .........................................
Ladder program window screen ...............................................................
File Management ...................................................................................
Creating a new file ...................................................................................
Setting the automatic file read function ....................................................
Setting automatic file save for the file ......................................................
Saving and reading files ...........................................................................
Reading and saving a file in another format .............................................
Saving a ladder diagram in text format ....................................................
Verifying files ............................................................................................
Entering/Deleting Symbols and Connection Lines ............................
Entering symbols ......................................................................................
Deleting symbols ......................................................................................
Entering contacts/coils directly .................................................................
Changing the device at the current cursor position ..................................
Entering/Deleting connection lines ...........................................................
Canceling edit operations .........................................................................
Entering Comments/Labels ..................................................................
Editing comments/labels ..........................................................................
Editing line comments ..............................................................................
Changing ladder lines into comments ......................................................
Edit and Arrangement ...........................................................................
Copy, move, and delete ...........................................................................
Inserting and deleting lines ......................................................................
Jump, Search, and Replace .................................................................
Jump ........................................................................................................
Searching for instruction words/operands ................................................
Searching for the device at the cursor position ........................................
Replacing operands .................................................................................
Converting a/b contacts ...........................................................................
Editing the Mnemonic List ...................................................................
Displaying and terminating a mnemonic list .............................................
Copy, move, and delete ...........................................................................
Displaying the Use Status ....................................................................
Displaying a use status list .......................................................................
Setting the System ................................................................................
Setting the system ....................................................................................
Entering and Developing Macros ........................................................
Creating a macro file ................................................................................
Entering and developing macros ..............................................................
Compilation ...........................................................................................
Executing compilation ..............................................................................
Error display .............................................................................................
Double coil check .....................................................................................
Printing Functions ................................................................................
Printing .....................................................................................................
Preview display ........................................................................................
Changing the Display Color on the Screen ........................................
Changing display colors on the screen ....................................................

2-26
2-26
2-27
2-27
2-28
2-29
2-29
2-30
2-31
2-32
2-33
2-36
2-36
2-37
2-37
2-42
2-42
2-43
2-44
2-45
2-46
2-46
2-50
2-51
2-52
2-52
2-57
2-58
2-58
2-62
2-63
2-64
2-65
2-67
2-67
2-69
2-70
2-70
2-71
2-71
2-72
2-72
2-74
2-75
2-75
2-76
2-76
2-77
2-77
2-81
2-82
2-82

Chapter 2 Editor

2.1

Outline of the Editor Functions


This section outlines each function available in the editor. For detailed descriptions
of each function, refer to the corresponding page.
The editor allows you to create ladder diagrams, and provides editing functions
including input of instruction words and registration of comments.
The editor offers the following functions.

Creates ladder diagrams using diversified instructions of the ladder language.


Performs editing functions including copy and move.

Registers a comment for a contact and transfers it to the Visual KV or the conventional KV.

Converts ladder diagrams, and transfers the converted diagrams to a PLC.


Prints out ladder diagrams, mnemonic lists, label comments, device status lists,
etc.

2.1.1

Cautions for editing ladder programs


The maximum number of editable lines is 9,999.
The maximum number of lines that can be edited for one ladder program window by
the Ladder Builder for KV is 9,999. The maximum size of one block is 100 lines.
Keep in mind that a ladder program exceeding 9,999 lines cannot be created.
When the program is running slowly
When many applications are simultaneously running on a personal computer with
low memory capacity, the memory and the source become insufficient. As a result,
the swap file is frequently accessed and operating speed deteriorates. If this occurs,
close other applications to decrease the load on the system.
It is also effective to increase the memory.

2-26

Chapter 2 Editor

2.2

Edit Screen
This section describes the configuration and functions of the screen displayed in the
editor.

2.2.1

Name and function of each part of the screen


When the Ladder Builder for KV is started up, the ladder program window is not
initially displayed. To create a new ladder program, select "New" from the "File"
menu to open the new window, and then edit it.
To open an existing ladder program, select "Open" from the "File" menu, and specify
the desired ladder program.
The name and function of each part of the screen are described below.
Normal mode and connection line edit mode are available in the editor.
2.4.5 Entering/Deleting connection lines (p. 2-44)

Note: When the automatic read function is set, the selected file is automatically read
and displayed when the software is started up.
Setting the automatic file read function (p. 2-30)

Example
Normal edit mode screen using the file "SAMP*.LDR"
Main window title
bar
Displays the name
of the file being
edited in the current
window.

Main window
The entire editor screen.

Ladder program
window
One window is displayed
for each ladder program
file.

Menu bar
Displays the menu
to execute commands.
Tool bar
Provides buttons to
execute commands.
Only commonly used
commands are
provided as buttons.
Each command can
be executed by
clicking the corresponding button
once.

Status indication bar


Indicates the function currently selected and the key
status.

Ladder diagram line No.


Indicates a line number in
the ladder diagram.

Step No.
Indicates a step number in the
ladder diagram.
A step number is displayed only
after conversion, and is deleted
when the ladder diagram is
changed.

Title bar
Displays the name of the
file being edited.

Function menu
Displays the functions
assigned to the function
keys.
Because each function is
displayed as an icon, an
instruction can be
directly entered by
clicking the corresponding icon.

Connection line

Ladder symbol
Displayed when an
instruction word, etc.
is entered.

Cursor
Allows selection of a device, etc., and can
be moved in the vertical and horizontal
directions.

2-27

12

Chapter 2 Editor

2.2.2

Ladder program window screen


Contact

Line No.
Step No.
Cursor
Scroll bar

Use the scroll bar or the cursor control keys ([LEFT] [RIGHT] [UP] [DOWN]) to
look at the hidden (undisplayed) portion.

Moving the cursor


LEFT/RIGHT/UP/DOWN keys
Pageup/PageDown keys
Ctrl + UP/DOWN keys
Home key
End key

: Move the cursor in the corresponding direction.


: Move the cursor up or down one
page (screen).
: Move the cursor by one block.
: Move the cursor to the first line.
: Move the cursor to the last line.

When dividing the screen into two windows


When the pointer is placed between the bottom of the scroll bar and the window
frame, the pointer is changed into " ". (While the pointer shape is " ", the window
size can be changed but the screen cannot be divided.)
When the left button is pressed and held and moved upward in this status, the
screen is divided into the upper and lower windows. Different contents can be
displayed in each window.
When the "Edit" menu is selected and you click "Link Screens" so that the check
mark is added, these two windows can be scrolled while interlocking each other.
This function is convenient when viewing a long ladder line all at once.
To switch the active window between the upper and lower windows, click the mouse
on the desired window or press the [Shift] and [F6] keys at the same time.

Note: While the pointer shape is " ", the window size can be changed but the
screen cannot be divided.

2-28

Chapter 2 Editor

2.3

File Management
This section describes how to create a new ladder program and how to read/save
the ladder program file, code file, comment file and mnemonic list file.

2.3.1

Creating a new file

File New

When creating a new ladder program, first create a new file.


When the Ladder Builder for KV is started up for the first time, the ladder program
window is not initially displayed.
When creating a new ladder program, perform the following procedure.
Select "New" from the "File" menu, or click
.
Select the target model for which a ladder program is to be created.

A new ladder program window is open.

Note 1: When you finish editing a newly created file, be sure to save it.
Note 2: If the model is specified as "KV-10(16)A/D" or "KV-24(40)A/D", created
ladder diagrams cannot be opened with Ladder Builder for KV Ver 1.0 or KV
IncrediWare (DOS). To use ladder diagrams with either of these programs, specify
the model as "KV-300".
File name of a ladder program
The ladder program file name is unique in the Ladder Builder for KV.
The file extension is "ldr".
Ladder programs can be shared with the KV IncrediWare (DOS).

2-29

12

Chapter 2 Editor

2.3.2

Setting the automatic file read function

File Auto Read

Specify the file to be automatically read when the software is started up. This function is convenient when the same file is always required to be read at startup.
Up to 16 files can be specified for the automatic read function.
The setup and cancellation procedures are described below.
Setting the automatic file read function
1. Set the ladder program window to be automatically read as the current window.

2. Select "Auto Read" from the "File" menu.


3. The message "Set this file for auto read?" is displayed. To set it for the automatic
file read function, click the [Yes] button.
The specified file is set for the automatic file read function. The next time you
start up the Ladder Builder for KV, this file is automatically read.

4. To specify another file, repeat steps 1 to 3 above.


Canceling the automatic file read function
1. Set the file set for the automatic read function as the current window. Select
"Auto Read" from the "File" menu.
2. The message "Cancel auto read?" is displayed. To cancel the setting of the
automatic read function, click the [Yes] button.

Note 1: A file not yet saved cannot be selected for the automatic file read function.
Save the file before selecting it.
Note 2: When the number of files specified for the automatic file read function
exceeds 16, the alarm message is displayed.

2-30

Chapter 2 Editor

2.3.3

Setting automatic file save for the file

File Set Auto Save

Temporary copies of the ladder diagram, comments and labels are automatically
saved at constant intervals while you are working on the file.
When the automatic file save function is set, the file is automatically copied for a
temporary save at the specified interval. This will minimize the damage caused by
power interruptions or other accidents that may occur before you save the file.
The setup and cancellation procedures are described below.

12

Setting the automatic file save function


1. Select "Set Auto Save" from the "File" menu.
2. The "Set Auto Save" dialog box is opened. Click "Auto Save" to add the check
mark, and then enter the time interval for automatic save.

The automatic file save function is set to every 5 minutes by default.

3. Click the [OK] button.


Canceling the automatic save function
1. Select "Set Auto Save" from the "File" menu.
2. The "Set Auto Save" dialog box is opened. Delete the check mark next to "Auto
Save", and click the [OK] button.
Note 1: The automatic file save function set here is applied to all the ladder program
files currently open.
Note 2: The file saved automatically is automatically erased when the Ladder
Builder for KV is closed normally. If the Ladder Builder for KV is closed abnormally,
the files saved automatically are automatically read when the Ladder Builder for KV
is started up the next time.

2-31

Chapter 2 Editor

2.3.4

Saving and reading files

Saving files
File Save, File Save As

When you have finished working on a ladder program, save the file.
Two methods are available for saving a file: "save (overwrite)" and "save as (save
with a different name)". Select either one.
is clicked, "save" is selected.
When
Save
Save As

: Saves a file with the current file name.


: Saves a file with a new name.

Note 1: Every time a new file is created, a number is automatically added after the
extension "ldw" of the file name such as "ldw1.ldr", "ldw2.ldr", "ldw3.ldr", etc.
Note 2: When "Save" is executed for a new file, "Save As" is automatically executed.

Example
When saving a file with a new name
1. Select "Save As" from the "File" menu.
2. The "Change File Comment" dialog box is displayed. Enter file comments, and
click the [OK] button. When file comments are not required, click the [X] button.
The "Save Ladder Diagram" dialog box is displayed.
The file comment is also displayed when the file is selected in the KV-Ladder
(DOS version).
3. Specify the folder (directory) to which the file is to be saved, and enter the file
name.

Folder (directory)

Select the folder (directory) in which the file is to be saved.


The current folder (directory) is selected by default.

File Name

Enter the file name consisting of up to 8 characters. The extension is


set to "ldr". Never change the extension.

File Type

"Ladder diagram (*.ldr)" is selected. Do not change this setting.

4. Click the [OK] button.


The file is saved with the specified file name.

2-32

Chapter 2 Editor

Reading files
File Open

When editing an existing file, select and read the file to be edited.
1. Select "Open" from the "File" menu.
The "Open" dialog box is displayed.
2. Specify the folder (directory) in which the file to be read is saved, and select the
file name.

12

Folder (directory)

Select the folder (directory) in which the file to be read is saved.


The current folder (directory) is selected by default.

File Name

Specify the file name to be read. The extension is "ldr".

File Type

"Ladder diagram (*.ldr)" is selected. Do not change this setting.

3. Click the [OK] button.


The specified file is read, and the ladder program window is open.

2.3.5

Reading and saving a file in another format


This section describes the method used to save and read files in any format other
than the "ldr" format such as mnemonic list files, comments in other files, comment
files in text format, etc.
Note: This function can only be selected while the ladder program window is selected. Display the ladder program window by selecting "New" from the "File" menu,
and then select "Other Format".

Saving and reading a mnemonic list


File Other Format Save Mnemonic List, File Other Format Read Mnemonic List

The ladder program being created can be saved as a mnemonic list (text format).
Saved mnemonic lists (text format) can also be read.
Specify the desired mnemonic list file in the "Save As" or "Open" dialog box.
Note: When read is executed, the specified mnemonic list file is read on the current
window. In this case, the ladder program in the current window is erased. When the
ladder program on the current window is required, be sure to save it in a file before
reading the mnemonic list.
File name of a mnemonic list
A mnemonic list file adopts the normal text format.
The extension of a mnemonic file is "mnm".

2-33

Chapter 2 Editor

Reading comments in other files


File Other Format Read Other File Comment

Only comments can be read from other ladder program files.


In the "Open" dialog box, specify the file in which the comments to be read are
saved.
Note 1: When read is executed, the specified comments are read on the current
window. In this case, the comments in the current window are overwritten. When the
comments on the current window are required, be sure to save them in a file before
reading comments from another file.
Note 2: This function extracts only comments from a ladder program. This function
does not read the entire ladder diagram.

File name of a contact comment file


The extension for each comment file is shown below.
Comment 1: rcm
Comment 2: cm2
Comment 3: cm3

2-34

Chapter 2 Editor

Saving and reading comments in text format


File Other Format Save Comment in Text Format, File Other Format Read Comment in Text Format

Labels and comments in the ladder program being created can be saved in text
format. Comment files saved in text format can also be read.
Specify the desired comment file in the "Save As" or "Open" dialog box.
Note 1: When read is executed, the specified comments are read on the current
window. In this case, the comments in the current window are overwritten. When the
comments on the current window are required, be sure to save them in a file before
reading the specified comments.
Note 2: If the text format is different when read is executed, an error message is
displayed.
Format of a comment file in the text format
A comment file adopts the normal text format as shown below.
The extension for comment files is "txt".
Device name

1 Comment 2 Comment 3
, Label name Comment
,
,
,

5 digits max.

8 digits max.

32 digits max.

32 digits max.

32 digits max.

Comma

Each element is delimited with a comma. When the character string is short, it
can be read even if unnecessary portions are omitted in the description.

The length of the character string is fixed as shown above when a file is saved.

The table below shows the character types and the number of characters.
Label name

Letters. 8 characters maximum.


Space and comma cannot be entered.

Comment 1
Comment 2

32 characters maximum

Comment 3

When reading/saving data using other software


Comments saved in text format can be read by spreadsheet software and data base
software. Comments can also be edited by spreadsheet software and data base
software, saved in a file, and then read by the Ladder Builder for KV.
When reading or saving data using such software as described above, specify the
CSV format (in which each item is delimited with comma).

Example
When Microsoft Excel Ver. 5.0 spreadsheet software is used
When reading data
Select a text file (*.prn, *.txt or *.csv) in "File Type" in the "Open File" dialog box.
Next, select "Data delimited into each field by delimiters such as comma and tab" in
"Data Format" in "Text File Wizard". Select "Comma" in "String Delimiter". Select
"No" in "Character String Quotation Mark".
When saving data
Select "CSV (delimited with comma)" in "File Type" in the "Save As" dialog box.
Select "*.txt" which can be read by the ladder buffer for KV as the extension of the
file.

2-35

12

Chapter 2 Editor

2.3.6

Saving a ladder diagram in text format

File Other Format Save Ladder Diagram in Text Format

The ladder program being created can be saved in text format.


When the "Save As" dialog box is opened, enter the file name, and save it.

Example
This is useful when reading a ladder diagram saved in text format to a word processor software, and then reformatting it. Use "Notepad" provided as a WINDOWS
accessory.

2
2.3.7

Verifying files

File File-Verify File

The ladder diagram in the editor can be verified against the contents of the ladder
program saved in the personal computer. For verification, perform the following
procedure.
1. Select "File-Verify File" from the "File" menu.
The "Open File" dialog box is displayed.
2. Select the verification source file, and click the [OK] button.
3. If a difference is detected, the message "Verification error" is displayed. Click the
[OK] button. The error list is displayed.
4. Select the desired verification error, and click the [JUMP] button. The cursor is
moved to the location at which the verification error has occurred in the ladder
diagram in the editor.

2-36

Chapter 2 Editor

2.4

Entering/Deleting Symbols and Connection Lines


This section describes how to enter/delete symbols and connection lines to/from a
ladder diagram.

2.4.1

Entering symbols
A ladder symbol is automatically entered when an instruction word is specified.
An instruction word can be entered using either of the following two methods.
In the first method, you can select the desired instruction word type and the desired
instruction word code from the "Enter Instruction Word" window. In the second
method, you can directly enter the desired instruction word from the dialog box
displayed when the first character of the desired instruction word is entered.
Or you can enter an a (N.O.) contact, a b (N.C.) contact, an a (N.O.) contact OR, a b
(N.C.) contact OR, or a coil in the current cursor position.
2.4.3 Entering contacts/coils directly (p. 2-42)

Selective input

Direct input p. 2-41

2-37

12

Chapter 2 Editor

Entering symbols by selection


Edit Symbol Input Symbol Selective Input (Tab)

When the desired instruction word type is selected on the "Enter Instruction Word"
window, instruction codes available for the selected instruction word can be selected
from the list. As well, a device can be specified for each operand. If you are not
familiar with creation of ladder programs and handling of instruction words, it is
recommended that you enter symbols from the "Enter Instruction Word" window to
ensure they are correct.
To open the "Enter Instruction Word" window, select "Edit", "Symbol Input" and
"Symbol Selective Input" from the menu. In addition, the following two methods are
also available. These two methods offer quicker operation.

Place the mouse cursor in the cell in the ladder diagram to which an instruction word
is to be entered, and double-click it.
Select the desired cell using the LEFT, RIGHT, UP and DOWN keys, and then press
the Tab key.

Note: When an instruction word has already been entered in the selected cell, it is
opened in the edit mode.
Setting the "Enter Instruction Word" window
Radio button

Sequence selection

2-38

Chapter 2 Editor
1. Select the desired instruction word type from "Instruction Type" located in the
right portion of the window.
Click the desired radio button.
2. Select the desired instruction word from the "Instruction Word" list.
When selecting an instruction word to be executed only once at the ON signal,
click the "Execute Once at ON" check box to add the check mark, and then select
the desired instruction word.

12

Instruction words and their types


Instruction word type

Instruction word
Executed only once at the
ON signal

Basic Instructions

LD, LDB, AND, ANB, OR,


ORB, ANL, ORL, OUT. OUB,
SET, RES, TMR, TMH, TMS,
C, UDC, DIFU, DIFD, KEEP,
SFT, HSP, MC, MCR, MEMSW,
END, ENDH

Application Instructions

W-ON, W-OFF, W-UE, W-DE,


STG, JMP, ENDS, STP, SET,
ITVL, CTH, CTC, CALL, SBN,
RET, FOR, NEXT, HKEY

Arithmetic Instructions

DW, TMIN, LDA, STA, CMP,


ADD, SUB, MUL, DIV, ANDA,
ORA, EORA, SRA, SLA, RRA,
RLA, COM, INC, DEC, MPX,
DMX, TBCD, TBIN, ASC,
RASC, ROOT

Interrupt Instructions

DI, EI, INT, RETI

@TMIN, @LDA, @STA,


@CMP, @ADD, @SUB,
@MUL, @DIV, @ANDA,
@ORA, @EORA, @SRA,
@SLA, @RRA, @RLA,
@COM, @INC, @DEC,
@MPX, @DMX, @TBCD,
@TBIN, @ASC, @RASC,
@ROOT

2-39

Chapter 2 Editor
3. Specify a device for each operand.
Click the
button to display the device type list. Select the desired device type
from this list, and enter the corresponding number directly.

4. When setup is complete, click the [OK] or [Insert] button.


[OK]
: Overwrites a ladder symbol.
[Insert]
: Inserts a ladder symbol in the cursor position.
[Cancel] : Cancels the setting entered, and closes the window.
5. The selected ladder symbol is entered. When a symbol has already been entered
in the position, it is replaced with the new symbol selected.

Example
When the relay 2008 is entered

LD
Relay 2008

2-40

Chapter 2 Editor

Entering symbols directly


Edit Symbol Input Symbol Direct Input (Enter)

Instruction words can also be directly entered.


When you are familiar with creation of ladder programs and handling of instruction
words, direct input is recommended because it is quicker and more efficient than
input through the "Enter Instruction Word" window.
To open the dialog box for directly entering instruction words, select "Edit", "Symbol
Input" and "Direct Symbol Input" from the menu. The following two methods are also
available for quicker operation.
Select the desired cell using the LEFT, RIGHT, UP and DOWN keys, and then enter
the first character of the instruction word to be entered. You can also press the
ENTER key when changing an existing input.
The dialog box is opened in which the first character is displayed.

Example
When "A" is entered

Entering symbols in the direct input dialog box


1. Enter an instruction word directly from the keyboard into the text box.

Note 1: Enter an instruction word in mnemonic format, and enter a space between
the instruction word and the device name.
LD 0001
Note 2: For LD and LDB, "A" and "B" can be entered instead respectively.
LD 0001 A 0001
LDB 0001 B 0001
2. When input is complete, click the [OK] or [Ins] button.
[OK]
: Overwrites the existing ladder symbol.
[Ins]
: Inserts the ladder symbol entered in the cursor position.
[Cancel] : Cancels the setting entered, and closes the window.
3. The ladder symbol is entered.

2-41

12

Chapter 2 Editor

2.4.2

Deleting symbols

Edit Symbol Input Delete Symbol (Delete)

To delete a symbol, place the cursor in the symbol to be deleted, click it, and then
perform either of the following operations. (This procedure is equivalent in principle
to the character deletion procedure.)

2
2.4.3

Press the space bar.


Press the Delete key.
(When the Backspace key is pressed, the symbol just before the cursor is
deleted.)

Entering contacts/coils directly


Enter a contact or coil directly in the current cursor position.

Entering a/b contacts


Edit Symbol Input a (N.O.) Contact Input (F5)
b (N.C.) Contact Input (Shift + F5)
a (N.O.) Contact OR Input (F4)
b (N.C.) Contact OR Input (Shift + F4)

To enter a contact, perform the following procedure.


1. Place the cursor in the input position.
2. Select "Symbol Input" from the "Edit" menu, and select the contact type to be
entered from the submenu.
The corresponding function key can be pressed instead or the corresponding
icon can be clicked.
The "Change Device" dialog box is displayed.
When entering an a contact:
a (N.O.) Contact Input
When entering a b contact
b (N.C.) Contact Input
When entering an a contact OR
a (N.O.) Contact OR Input
When entering a b contact OR
b (N.C.) Contact OR Input

(F5) key

button

(Shift + F5) keys

button

(F4) key

button

(Shift + F4) keys

button

3. Enter a device name directly from the keyboard into the text box.

4. When input is complete, click the [OK] button.


When the [Cancel] button is clicked, the setting entered is canceled and the
dialog box is closed.
5. The ladder symbol is entered.

2-42

Chapter 2 Editor

Entering coils
Edit Symbol Input Coil Input (F7)
b (N.C.) Contact Coil Input (Shift +F7)

To enter a coil, perform the following procedure.


1. Place the cursor in the input line.
2. Select "Symbol Input" from the "Edit" menu, and select the coil type to be entered
from the submenu.
The corresponding function key can be pressed instead or the corresponding
icon can be clicked.
The "Change Device" dialog box is displayed.
When entering a coil

: Coil Input

F7 key

button

When entering the b contact coil

: Coil Input

Shift + F7 keys

button

3. Enter a device name directly from the keyboard into the text box.

4. When input is complete, click the [OK] button.


When the [Cancel] button is clicked, the setting entered is canceled and the
dialog box is closed.
5 The ladder symbol is entered.

2.4.4

Changing the device at the current cursor position

Edit Change Device at Cursor Position (Esc) Right-click

To change the device at the current cursor position, perform the following procedure.
1. Place the cursor in the device to be changed.
2. Select "Change Device at Current Position" from the "Edit" menu or right-click
menu or press the Esc key.
The "Change Device" dialog box is displayed.
3. Enter a device name directly from the keyboard into the text box.

4. When input is complete, click the [OK] button.


When the [Cancel] button is clicked, the setting entered is canceled and the
dialog box is closed.
5. The device is changed.

2-43

12

Chapter 2 Editor

2.4.5

Entering/Deleting connection lines

Edit Edit Connection Line (Ctrl + K + \)

Entering connection lines


The following two methods can be used to enter connection lines.
Pressing the keys or clicking the icon
(F8) + (/) (slash key) or

(F9) + (-) (minus key) or

Draws a connection line downward from the cursor


position.
: Draws a connection line to the right of the cursor
position.

Using the mouse and cursor control keys in connection line edit mode
To draw connection lines using the mouse, first change the input mode.
The following four methods can be used to change the mode.
Select "Edit Connection Line" from the menu displayed by right-clicking.

Select "Edit Connection Line" from the "Edit" menu.

Press the Ctrl and K keys at the same time.

Press the \ key.

When connection line edit mode is selected, the cursor shape is changed as follows.

To return to the normal edit mode, perform this procedure again.


1. Place the mouse cursor at the desired connection line start position. When using
the keyboard, press the ENTER key.
2. While pressing and holding the left mouse button, move the mouse cursor in the
desired direction (drag). When using the keyboard, press either the LEFT,
RIGHT, UP or DOWN key.
3. Release the button at the desired connection line end position. When using the
keyboard, press the [ENTER] key again. (If the [Delete] key is pressed, the
connection line is deleted.)

2-44

Chapter 2 Editor

Deleting connection lines


To delete a connection line, press the Delete key while dragging the connection line
to be deleted in connection line edit mode.
The following procedures are also available to delete connection lines.
When deleting a vertical connection line
Press the Shift and F8 keys at the same time.

While dragging the connection line to be deleted in connection line edit mode,
press the Shift key and release the left mouse button at the same time.

Click the

button.

When deleting a horizontal connection line


Press the space bar.
Press the Backspace key. (The connection line just before the cursor is deleted.)
Press the Delete key.
While dragging the connection line to be deleted in connection line edit mode,
press the Shift key and release the left mouse button at the same time.
Click the

2.4.6

button.

Canceling edit operations

Canceling an edit operation (UNDO)


Edit Undo (Ctrl + Z)

The last edit operation (input, move or copy of a symbol) that was performed can be
canceled, and the previous status can be recovered.
When the last edit operation is unrecoverable and the undo operation is disabled,
the selection item "Undo" is shown in a lighter color to indicate the selection is
disabled.
Unrecoverable operations
Replacement of operands

Conversion of N.O./N.C. contacts

Read/save of programs, mnemonic files, etc.

Change of labels or comments

Input of macros

Canceling an undo operation (REDO)


Edit Redo (Ctrl + Y)

The last undo operation that was performed can be canceled.


When the last undo operation cannot be canceled, the selection item "Redo" is
shown in a lighter color to indicate the selection is disabled.

2-45

12

Chapter 2 Editor

2.5

Entering Comments/Labels
This section describes how to enter comments/labels to contacts, how to change
these comments/labels, and how to enter/change line comments.

2.5.1

Editing comments/labels
The label name, comment 1, comment 2, and comment 3 can be entered for a
contact.
Comments are entered so that the contents of a contact can be easily deduced
when editing a ladder diagram. Comments are displayed in the ladder diagram
monitor, the simulator and the monitor.

Manipulate the "Edit Comment/Label" dialog box. This dialog box is displayed for
each device type, and allows you to edit two or more comments at a time.
The label name and comment can also be changed by selecting the device to be
changed in the ladder diagram.
Making changes directly in the ladder diagram (p. 2-49)

The comment/label edit method is described below.


Note: The comment 2 and comment 3 files are dedicated to the Ladder Builder for
KV. When the comment is to be shared with the KV IncrediWare (DOS), use comment 1.

Editing the list for each device


Comment Edit Comment/Label (Ctrl + F7)

1. Select "Edit Comment/Label" from the "Comment" menu, or click the

button.

The "Edit Comment/Label" dialog box is displayed.


The relays 0000 to 0415 are displayed by default.

Reading device
selection area

Label/comment
input area

Device list display


area

The "*" symbol is displayed beside devices used in the ladder diagram.
2. Select the device to be edited in the "Reading Device" area.
3. Specify the device range to be displayed in the list in the "Device Range" area.

2-46

Chapter 2 Editor
4. Click and select the device for which a label/comment is to be edited, and then
click the [Edit] button. (Or the desired device displayed in the list can be clicked
and selected.)
When using the keyboard, select the desired device using the UP and DOWN
keys, and press the ENTER key.
The cursor is displayed in "Label Name" in the label/comment input area so that
characters can be entered.
5. Enter or change the label/comment. A label/comment can be copied from or
exchanged with another device.

The table below shows the available character types and the maximum number
of characters allowed.
Label name

Alphabet. 8 characters maximum.


Spaces and commas cannot be entered.

Comment 1

32 characters maximum
(This comment is compatible with KV IncrediWare (DOS) relay comments.)

Comment 2

32 characters maximum

Comment 3

32 characters maximum

To register basic relays, click the [Register Basic Relay] button in the "Edit Comment/Label" dialog box, and then enter the basic relays of the model used into
comment 1.
6. When input is complete, click the [Write] button.
To close the "Edit Comment/Label" dialog box, click the [Exit] button.
The label/comment is entered.

To display labels/comments, select the "View" menu. When the submenu is displayed, select "Show Label" or "Show Comment".
For the method to specify the comment to be displayed, refer to the display mode (p. 2-19).

Note: A label name can be used instead of a device name when entering, searching
for or replacing a symbol.
For example, when the label "SW1" is attached to the device "0000", the program
can be written as follows.
Instead of entering "0000"
: SW1
Instead of entering "LD0000"
LD: SW1
Labels cannot be entered in the instruction selection window.

2-47

12

Chapter 2 Editor
When selecting the devices to be displayed in the list
The devices to be displayed in the list can be selected by checking the following
item.
Show Registered Device Only: Displays the devices in which labels/comments are
registered.
Show Using Device Only:
Displays the devices used in the ladder diagram.
When neither item is checked, all the devices are displayed.

When copying a label/comment from another device


1. Place the cursor in the copy source device, and click the [Copy] button.
2. Place the cursor in the copy destination device, and click the [Write] button.
When the [Exchange] button is clicked instead of the [Write] button, the contents
of the input area are exchanged with the comments of the selected device.
When deleting registered labels/comments
To delete only the selected device, place the cursor in the device to be deleted, and
press the Delete key or click the [Delete Selected Line] button.
To delete all of the devices, click the [Delete All] button.
When copying a comment block from other devices
1. Select the comment range of the device to be copied as a block in the device list
display area.
Selecting the range (p. 2-52)

2. Click the [Block Edit] button.


The "Block Edit" dialog box is displayed.

Radio buttons

3. Select the comment type to be copied by selecting the corresponding radio


button.
4. Click the [Copy] button.
5. Specify the start device in the copy destination device range in the device list
display area.
6. Click the [Block Edit] button.
The "Block Edit" dialog box is displayed.
7. Click the [Paste] button.
The contact comments in the device range covering the number of devices
specified in step 1, starting from the device number selected in step 5 are copied.

2-48

Chapter 2 Editor
When moving a comment block from other devices
Perform steps 1 to 7 described above. However, click the [Cut] button instead of the
[Copy] button in step 4.
Using this procedure, the comment block of the selected devices can be moved.
When deleting a comment block from other devices
Perform steps 1 to 4. However, click the [Cut] button in step 4.
Using this procedure, the comment block of the selected devices can be deleted.

Making changes directly in the ladder diagram

12

Comment Change Label Name of Current Device (Ctrl + B)


Change Comment of Current Device (Ctrl + M)

Perform the following procedure when entering a label name or comment in the
ladder diagram.
1. Place the cursor in the device to be entered.
2. When entering a label name, select "Change Label Name of Current Device Ctrl
+ B" from the "Comment" menu.
When entering a comment, select "Change Comment Name of Current Device
Ctrl + M" from the "Comment" menu.
The "Change Label" or "Change Comment X" dialog box is displayed.
The dialog box name in which comments can be changed varies depending on
the comment type selected in "Comment Type" in "Display Mode".
When a label name or comment has already been registered in the device, the
registered character string is displayed.
3. Enter the desired character string.
The comment selected in "Comment Type" in "Display Mode" can be entered.
Display mode (p. 2-19)

* Example: When "Comment 2" is displayed in "Comment Type"

4. The displayed character string is entered when the [OK] button is clicked.
To cancel the input, click the [Cancel] button.

2-49

Chapter 2 Editor

2.5.2

Editing line comments

Comment Edit Line Comment (Ctrl + Enter)

A line comment can be described in each line of the ladder diagram.


Line comments are entered so that the contents of each circuit block can be easily
deduced when editing the ladder diagram. Line comments are displayed in the
ladder diagram monitor, the simulator and the monitor.
To enter a line comment or change a comment, perform the following procedure.
1. Place the cursor in the line for which a line comment is to be entered/changed.
When changing a comment that has already been entered, double-click the
comment. The "Enter Line Comment" dialog box is then displayed.

2. Select "Edit Line Comment" from the "Comment" menu, or click the
The "Enter Line Comment" dialog box is displayed.

button.

3. Enter or change the comment.


Up to 70 characters can be entered.

4. When the [Insert] button is clicked, a new line is inserted.


When the [Overwrite] button is clicked, a new line is written over the current line.
To cancel, click the [Cancel] button.
The entered comment is displayed in the ladder diagram.

Line comment

Note 1: When the [Overwrite] button is clicked, the portion of the ladder diagram
located in the cursor line is deleted. Make sure it is okay to delete the corresponding
portion of the ladder diagram before clicking the [Overwrite] button.
Note 2: Line comments cannot be transferred to the PLC. Accordingly, line comments are not included in a program read from the PLC.

2-50

Chapter 2 Editor

2.5.3

Changing ladder lines into comments

Comment Change Ladder Line into Comment Settings (Ctrl + Q) Right-click


Change Ladder Line into Comment Cancel (Ctrl + W) Right-click

When you specify a ladder line to be treated as a comment, only this specified
portion is ignored during conversion. Set this function temporarily when you do not
want a certain portion to be converted.
To set ladder lines to be changed into comments or to reverse this setting, perform
the following procedure.
1. Select the range of the ladder lines to be changed into comments or for which the
setting is to be reversed.
Selecting the range (p.2-52)

2. To set the line range to be changed into comments, select "Comment", "Change
Ladder Line into Comment and Settings Ctrl + Q" from the menu or right-click
menu. To cancel the setting, select "Cancel Ctrl + W" from the submenu.
3. The selected line range is changed into comments.
When the setting is canceled, the specified range can be converted.

Note 1: The ladder lines set to be changed into comments cannot be transferred to
the PLC. Accordingly, the ladder lines set to be changed into comments are not
included in a program read from the PLC.
Note 2: The ladder lines set to be changed into comments cannot be read by the KV
IncrediWare (DOS). Accordingly, when a program is read by the KV IncrediWare
(DOS) and saved with the same name, the ladder lines set to be changed into
comments are deleted.

2-51

12

Chapter 2 Editor

2.6

Edit and Arrangement


This section describes ladder diagram edit procedures, such as copy/movement/
deletion of the range selected in the ladder diagram, insertion/deletion of lines, how
to change the number of columns, arrangement of circuits, etc.

2.6.1

Copy, move, and delete


Copy, move or delete the range selected in a ladder diagram.
To copy, move or delete the selected range, use the "cut & paste" method which is a
standard Windows editing procedure.

Selecting the range


To copy, move or delete data, first select the range. The range can be selected
using the mouse or keyboard.
Note: Copy, move and delete functions cannot be performed while in connection
line edit mode. If connection line edit mode is selected, select "Edit Connection Line"
from the "Edit" menu, and select the normal edit mode (in which the check mark is
not added).
Selecting the range using the mouse
1. Place the mouse pointer in the selection start position, and click.
The cursor is displayed.

2-52

Chapter 2 Editor
2. While pressing and holding the left button, move the pointer to the selection end
position (drag).
The selected range is displayed in yellow.

Selecting the range in units of cells


While dragging the mouse pointer, move it in the horizontal direction up to the
target cell until the desired range is selected.

12

Selecting the range in units of lines


While dragging the mouse pointer, move it in the vertical direction up to the target
line until the desired range is selected.

Note: A portion of a cell covering two or more lines cannot be selected.


3. Release the left button in the selection end position.
To cancel the selection, click anywhere in the ladder diagram.
Selecting the range using the keyboard
1. Place the cursor in the selection start position using the LEFT, RIGHT, UP and
DOWN keys.
2. While pressing and holding the Shift key, press the LEFT, RIGHT, UP or DOWN
key, and move the cursor to the selection end position.
The selected range is displayed in yellow.
Note: A portion of a cell covering two or more lines cannot be selected.
3. Release the [Shift] key in the selection end position.
To cancel the selection, press the LEFT, RIGHT, UP or DOWN key again.
Note: When the range is selected in units of cells from the right to the left, the cell at
the left end cannot be selected. When the range is selected in units of lines in an
upward direction, the line at the top end cannot be selected.

2-53

Chapter 2 Editor

Copy/move/delete operation
Edit Cut (Ctrl + X) Right-click
Copy (Ctrl + C) Right-click
Paste (Ctrl + V) Right-click

1. After selecting the desired range, perform the following procedure.


When copying data
Perform any of the following operations.

Select "Copy" from the "Edit" menu on the tool bar, or select "Copy" from the
right-click menu.

Click the

While pressing and holding the Ctrl key, press the C key.

button.

When copying data from another file


When two or more windows are open, the desired range can be selected on another
file window, and then copied or moved to the current window.
1. Click the copy source window to set it as the current window.
2. Select the desired range, and copy it.
3. Click the copy destination window to set it as the current window.
4. Perform the paste operation.
Step 3 on page 2-56.

2-54

Chapter 2 Editor
When moving/deleting data
Perform any of the following operations.

Select "Cut" from the "Edit" menu on the tool bar, or select "Cut" from the shortcut menu displayed by right-clicking.

Click the

While pressing and holding the Ctrl key, press the X key.

button.

12

2. Perform the following procedure when copying or moving data.


When pasting data to a ladder diagram
Place the mouse pointer in the copy destination or the move destination, then click
it. You can also move the cursor to the copy destination or the move destination
using the LEFT, RIGHT, UP and DOWN keys.

2-55

Chapter 2 Editor
3. Perform any of the following operations.
Select "Paste" from the "Edit" menu on the tool bar, or select "Paste" from the
shortcut menu displayed by right-clicking.

Click the

button.

While pressing and holding the Ctrl key, press the V key.

While pressing and holding the Shift key, press Insert key.
The selected range is pasted.

Note 1: The cut portion is temporarily copied to the cut buffer. Accordingly, even if
the portion is cut to be deleted, the cut portion can be pasted again by performing
step 3 above.
Note 2: When the number of cells copied is larger than the paste destination space,
the message "Cant write at current position." is displayed, and the cells equivalent
to only the paste destination space are pasted. The remaining cells are not pasted.

2-56

Chapter 2 Editor

2.6.2

Inserting and deleting lines


To insert lines into a ladder diagram or delete existing lines, perform the following
procedure.

Inserting blank lines


Edit Insert Empty Line (Shift + Enter) Right-click

1. Place the cursor in the position at which blank lines are to be inserted.
To insert two or more blank lines at once, first select the insertion range. Then,
the selected blank lines can be inserted all at once.

2. Select "Insert Empty Line" from the "Edit" menu or right-click menu, or press the
ENTER key while pressing and holding the Shift key.
Blank lines are inserted above the cursor.

Deleting lines
Edit Delete Line (Shift + Delete)

1. Place the cursor in the line to be deleted.


To delete two or more lines at once, first select the deletion range.

2. Select "Delete Line" from the "Edit" menu, or press the DEL key while pressing
and holding the Shift key.
The specified lines are deleted.

2-57

12

Chapter 2 Editor

2.7

Jump, Search, and Replace


This section describes how to jump to any position in a ladder diagram, search for
an instruction word/operand, and replace operands or N.O./N.C. contacts.

2.7.1

Jump
The edit control can jump to any position by specifying the desired line number or
step number of the program. The edit control can also be jumped to the first or last
line. Use the jump function to quickly change the edit position.

Jump to the specified line/step


Edit Jump Line/Step No.

To jump to another position by specifying the desired line number or step number of
the ladder program, perform the following procedure.
1. Select "Edit", "Jump," and "Line/Step No." from the menu. You can also enter the
desired line number or step number directly from the keyboard.
The "Jump to Specified Line" dialog box is displayed.
2. Specify the line number or step number as the jump destination.
When a line number or step number is entered from the keyboard in step 1, it is
already specified.

3. Click the [Line] button when jumping the edit control by specifying a line number.
Click the [Step] button when jumping the edit control by specifying a step number.
Click the [Cancel] button to cancel jumping.
The specified line or step is displayed, and the cursor is moved to the specified
line or step.
Note: When a number larger than the last line or step number is selected, the last
line or step is displayed.

2-58

Chapter 2 Editor

Jump to the first/last line


Edit Jump Top (Ctrl + Home)
Bottom (Ctrl + End)

To jump to the first line or the last line of a ladder diagram, perform the following
procedure.
When jumping to the first line
Select "Edit", "Jump" and "Top" from the menu.
When jumping to the last line
Select "Edit", "Jump" and "Bottom " from the menu.

12

Jump to the registered line


Edit Jump Line Registration (Ctrl + L)
Registered Line (Ctrl + J)

The desired lines can be temporarily registered together with comments, and the
edit control can be jumped by specifying the jump destination from the registered
line list.
This function is useful when a jump to the same line is performed many times or
when the line number does not help you recognize the line.
Registering lines
Register lines using the following procedure.
1. Place the cursor in the line to be registered.
2. Select "Edit", "Jump" and "Line Registration" from the menu.
The "Line Registration" dialog box is displayed.
3. Enter the desired comment for the line to be registered into "Comment" if necessary.
When registering the same comment for another line, change "Line No." to the
line number to be registered.
Up to 70 characters can be entered.

2-59

Chapter 2 Editor
4. Click the [Register] button when registering the specified line.
Click the [Cancel] button to cancel registration.
The specified line is registered.
Note: Up to 32 lines can be registered. When the number of registered lines exceeds 32, lines are deleted beginning at the oldest one.
Jump to a registered line
To jump to a registered line, perform the following procedure.

1. Select "Edit", "Jump" and "Registered Line" from the menu.


The "Jump to Registered Line" dialog box is displayed.

2. Position the pointer over the jump destination line in the line No./comment list
displayed, and then click it. Double-click it to jump immediately.
3. Click the [Jump] button.
To cancel jumping, click the [Cancel] button.
The specified line is displayed, and the cursor is moved to the specified line.
Deleting a registered line
Place the cursor in the line to be deleted in the "Jump to Registered Line" dialog
box, and click the [Delete Registration] button. The specified line is deleted.
Note 1: Set registration for each ladder program window.
Note 2: When a file is saved, data on registered lines is also saved.
Note 3: When data is saved by the KV IncrediWare (DOS), registration becomes
invalid.

2-60

Chapter 2 Editor

Jump to the next/previous block


Edit Jump Next Block (Ctrl + DOWN)
Previous Block (Ctrl + UP)

To jump to the next circuit block or to the previous circuit block from the current
cursor position, perform the following procedure.
Jump to the next circuit block
Select "Edit", "Jump" and "Next Block" from the menu.
Press the DOWN key while pressing and holding the Ctrl key.

12

Note: Jump from a comment line to the next circuit block is disabled.
Jump to the previous circuit block
Select "Edit", "Jump" and "Previous Block" from the menu.
Press the UP key while pressing and holding the Ctrl key.

Jump to the beginning/end of the line


Edit Jump Beginning of Line (Home)
End of Line (End)

To jump to the beginning or end of the line in which the cursor is currently placed,
perform the following procedure.
Jump to the beginning of a line
Select "Edit", "Jump" and "Beginning of Line" from the menu.

Press the Home key.

Jump to the end of a line


Select "Edit", "Jump" and "End of Line" from the menu.

Press the End key.

2-61

Chapter 2 Editor

2.7.2

Searching for instruction words/operands

Edit Find (Ctrl + F)

To search for an instruction and a device in a program by specifying an instruction


word or operand, perform the following procedure.
1. Select "Edit" and "Find" from the menu. Or click the

button.

The "Find Instruction" dialog box is displayed.

2. Enter an instruction word to be found into the "Instruction Word" text box. Enter
an operand to be found into the "Operand" text box.
You can also search for either one alone.

Note 1: When searching for a timer instruction, counter instruction or high-speed


counter instruction, specify "TMR", "CTC", etc. as the instruction word to be found
and "T0", "C0" , etc. as the operand to be found.
Note 2: When two or more operands are used, specify both the instruction and the
operand to be found.
3. Select the search direction.
Forward: Searches forward from the current cursor position.
Backward: Searches backward from the current cursor position.
4. Click the [Search Next] button.
Search is started, and the first block found containing the instruction or operand
is displayed.
When the specified instruction word or operand is not found, the message "Cant
find specified symbol." is displayed.

5. When searching continuously, click the [Search Next] button.


To stop searching, click the [Cancel] button.
Note 1: Two or more search windows can be opened.
Note 2: Search is executed for the current ladder window. Because the search
condition remains valid even after the current ladder window is changed, the same
condition can be used for searching a different ladder window.

2-62

Chapter 2 Editor

2.7.3

Searching for the device at the cursor position

Edit Find Device at Cursor Position in Ladder Search Backward (U) (F2)
Search Forward (F3)
Search for OUT Backward (Shift + F2)
Search for OUT Forward (Shift + F3)

To search for the device equivalent to the device at the current cursor position,
perform the following procedure.
1. Place the cursor in the device to be found.

12

2. Select "Find Device at Cursor Position in Ladder" from the "Edit" menu.

3. Select the search direction.


Search Backward
: Searches backward from the current cursor position.
Search Forward
: Searches forward from the current cursor position.
Search for OUT Backward : Searches for OUT backward from the current cursor
position.
Search for OUT Forward : Searches for OUT forward from the current cursor
position.
4. Search is started, and the first device found is displayed.

5. When searching continuously, repeat steps 2 to 4 above.

2-63

Chapter 2 Editor

2.7.4

Replacing operands

Edit Replace Operand (Ctrl + R)

When replacing an operand by specifying the replacement range and the replacement width, perform the following procedure.
1. Select "Replace Operand" from the "Edit" menu, or click the

button.

The "Replace Operand" dialog box is displayed.

2. Enter the operand before replacement into the "Before Replacement" text box.
Enter the operand after replacement into the "After Replacement" text box.

3. Enter the replacement width.

What is the replacement width?


The replacement width indicates how many operands are to be treated as the
replacement target.
For example, when "3" is set while replacing "3000" with "0500", "3000" to "3002"
will be replaced with "0500" to "0502".
4. Specify the replacement range using the line number. By default, all the lines are
replaced (from the first line to the last line).
5. Specify the replacement method. Add a check mark to the desired method by
clicking it.
Replace All without Check

The message to confirm execution of replacement is


not displayed at all.

Show Cant Replace Message

For an operand which cannot be replaced, the mes


sage is displayed.

Move Comment and Label

The comment and the label attached to the operand


before replacement are attached to the operand after
replacement.

6. To execute replacement, click the [OK] button. To cancel replacement, click the
[Cancel] button.
The operand set to the "Before Replacement" text box is indicated with the grey
cursor, and the confirmation message "Replace this operand?" is displayed.

2-64

Chapter 2 Editor
7. Click the [Yes] button to execute replacement.
Click the [No] button not to execute replacement.
Click the [Cancel] button to cancel replacement.
The operand indicated with the brown cursor is replaced with the operand set to
the "After Replacement" text box.

12

Note 1: When "Replace All without Check" is selected, the confirmation message is
not displayed.
Note 2: When "Move Comment and Label" is selected, all the comments of the
devices in the set range are replaced. For example, when "0000" is replaced with
"0010", the "0000" comment is deleted, and the "0010" comment replaces it.
8. When all replacements are complete, the number of operands replaced is displayed.
Click the [OK] button.

2.7.5

Converting a/b contacts

Edit Convert a-b (N.O.-N.C.) Contacts (Ctrl + A)

To convert an a (N.O.) contact into a b (N.C.) contact or to convert a b (N.C.) contact into an a (N.O.) contact, perform the following procedure.
1. Select "Convert a-b (N.O.-N.C.) Contacts" from the "Edit" menu.
The "Convert a-b (N.O.-N.C.) Contacts" dialog box is displayed.
2. Enter the operand to be converted. Click "Convert All without Check" to attach
the check mark so that the message to confirm execution of conversion is not
displayed.

2-65

Chapter 2 Editor
3. To execute conversion, click the [OK] button.
To cancel conversion, click the [Cancel] button.
The specified operand is indicated with the grey cursor, and the confirmation
message "Covert this contact?" is displayed.

Note : When "Convert All without Check" is selected, the confirmation message is
not displayed.
4. Click the [Yes] button to execute conversion.
Click the [No] button not to execute conversion.
Click the [Cancel] button to cancel conversion.
The a (N.O.) contact is converted into a b (N.C.) contact. The b contact is converted into an a contact.

5 When all conversions are complete, the number of contacts converted is displayed.
Click the [OK] button.

2-66

Chapter 2 Editor

2.8

Editing the Mnemonic List


This section describes how to display each block of circuit in a ladder diagram as a
mnemonic list, and how to edit the mnemonic language directly.

2.8.1

Displaying and terminating a mnemonic list

Displaying a mnemonic list


Edit Edit List

To display mnemonic lists by specifying blocks and to enter symbols by editing


mnemonic lists, perform the following procedure.
1. Place the cursor in the block for which a mnemonic list is to be displayed or in
which the edit contents of the mnemonic list are to be inserted/replaced.
In the case of insertion, the edit contents are inserted above the cursor line.

2. Select "Edit List" from the "Edit" menu, or click the

button.

The mnemonic list of the block at the cursor position is displayed on the list edit
window.

The mnemonic language can be directly edited on this screen.


For a compiled block, step numbers are displayed.
When entering a new mnemonic, a step number and comment do not have to be
entered.
For the compilation procedure, refer to "2.12 Compilation" on page 2-75.

2-67

12

Chapter 2 Editor

Terminating a mnemonic list


Inserting the mnemonic list edited into the cursor position, and terminating
edits
When edits are complete, click the [Insert] button.
The list edit window is closed, and the edit contents are inserted at the cursor
position in the ladder diagram.
Replacing the block in the cursor position with the mnemonic list edited,
and terminating edits
When edits are complete, click the [Replace Blocks] button.

The list edit window is closed, and the block at the cursor position in the ladder
diagram is overwritten with the edit contents.

Format of a mnemonic list


The following format is used in a mnemonic list.
Keep in mind that compilation is disabled if the format is different.

Step No.

Mnemonic
Operand

2 spaces

2 spaces

Comment

2 spaces
Semicolon

Note 1: Comments cannot be edited in a mnemonic list.


Note 2: Step numbers and comments do not have to be entered while editing a
mnemonic list.

2-68

Chapter 2 Editor

2.8.2

Copy, move, and delete


Copy, move and delete in a mnemonic list can be performed using the "cut & paste"
operation in the same way as in a ladder diagram.
1. Place the cursor in the start position of the copy/move/delete range.
2. While pressing and holding the [Shift] key, move the cursor to the end position of
the range using the UP and DOWN keys.
The selected range is displayed in blue.

12

3. Release the key when in the end position.


When canceling the selection, press the UP or DOWN key without pressing and
holding the [Shift] key.
4. Perform the cut, copy or paste operation using the shortcut keys.
Copy/move/delete operation (p. 2-54)

Cut
[Ctrl] + [X] : Cuts the selected range.
Copy [Ctrl] + [C ] : Copies the selected range.
Paste [Ctrl] + [V] : Pastes the cut or copied range.
Note: In Windows 95, the mouse (right-click) can be used instead of the keys.

2-69

Chapter 2 Editor

2.9

Displaying the Use Status


This section describes how to display the list of relays, timers, counters, comparators, data memory and temporary memory used in the program while editing a
ladder diagram.

2.9.1

Displaying a use status list

Displaying the use status

Edit Usage Information

To display lists of relays, timers, counters, comparators, data memory and temporary memory used in the program while editing a ladder diagram, perform the following procedure.
1. Select "Usage Information" from the "Edit" menu, or click the

button.

The "Usage Information" dialog box is displayed.


2. Select the item to be checked from "Type". The use status list is then displayed.

3. You can edit ladder diagrams while checking the use status list on the display. To
reflect the latest use status for the ladder diagram being created, click the
[Update(U)] button.
4. To close the use status list, click the [Close(C)] button.

2-70

Chapter 2 Editor

2.10

Setting the System


This section describes how to set the directory used for the auto save function, and
how to select the decompilation error check.

2.10.1 Setting the system


Edit System Settings

To set the directory used for the auto save function and to select the decompilation
error check, perform the following procedure.

12

1. Select "System Settings" from the "Edit" menu.


The "System Settings" dialog box is displayed.
When setting the work directory used for the automatic save function
Specify the directory (folder) used for the automatic save function as "Work
Directory" using a full path.

When selecting the decompilation error check


Click the "Code Check" check box to add a check mark. Decompilation errors will
then be automatically checked when a ladder program is compiled.
If an error is detected, the message "Reverse Compile Error" is displayed when
compilation is complete.
H.3 Programs which cannot be decomplied (Appendices p. 2-203)

The code check is specified by default.


When the deconversion error check is not required, delete the check mark.
Note: When the code check is specified, the compilation time is longer because a
program in which errors will be detected during decompilation and whose transfer
will be aborted is checked while the program is transferred from the KV main body to
the personal computer.

2-71

Chapter 2 Editor

2.11

Entering and Developing Macros


The Ladder Builder for KV is equipped with a macro function. By using macros,
programs in which the same process is repeated many times and for which there are
extended instructions can be entered efficiently. The Ladder Builder for KV is
equipped as standard with the macro file to enter frequently used circuits.

2.11.1 Creating a macro file


To use a macro, first create a macro file saving the contents to be processed in the
macro.
To create a macro, perform the following procedure.

1. Select "New" from the "File" menu, and open a new ladder program window in
accordance with the model.
2. Place the cursor in the first line. Select "Edit Line Comment" from the "Comment"
menu.
The "Enter Line Comment" dialog box is displayed.
3. In the first line, enter the macro name, the number of arguments and the comment in the following format as the macro start declaration line.
@ Macro name, Number of arguments, Comment

Include "@" at the beginning.

Macro name

Enter up to 8 characters. Do not enter spaces.

Number of arguments

Enter the number of devices to be variable. Temporary


devices (shown below) contained in a ladder diagram can be
replaced with arbitrary devices (up to 10 devices).

Comment

Enter a comment on an argument, etc.

@TEST.4.test macro

Number of
arguments

2-72

Separate each item with a comma (,).

Comment

Chapter 2 Editor
4. Under the macro start declaration line, enter the symbol to be processed by the
macro. At this time, describe the devices to be treated as arguments as temporary devices.

What are temporary devices?


Temporary devices indicate devices described temporarily when actual devices
are not yet determined. Up to 1,000 temporary devices from "@0" to "@999" can
be described. Each temporary device will be automatically replaced while a
macro is developed.
Note: Up to 10 devices from "@0" to "@9" can be used in each macro. When using
them, make sure to assign temporary devices sequentially starting from "@0".
5. In the last line, enter two "@" symbols from "Edit Line Comment" as the macro
end declaration line.

Example
Macro which writes data (constant) to the DM0000 when three relays are turned on
(Four arguments are used.)
Macro start
declaration
line
Macro
Macro end
declaration
line

6. Two or more macros can be described in one macro file. When describing
another macro, repeat steps 3 to 5 above.
Note: Make sure to describe each macro in the portion between the macro start
declaration line and the macro end declaration line.
7. Select "Save As" from the "File" menu, and save the file with the desired macro
file name. The extension of the file name is "ldr" which is the same as the extension for a ladder program.
Creation of the macro file is now completed.
The Ladder Builder for KV is equipped with the macro file "IMACRO.LDR" to enter
frequently used circuits. Use this file when entering circuits.
Note 1: The macro start declaration line is entered as a line comment. Enter up to
70 characters.
Note 2: Timer/counter instructions cannot use temporary devices.

2-73

12

Chapter 2 Editor

2.11.2 Entering and developing macros


Edit Macro Input Develop (Shift + F1)

To use a macro, macro instructions must be entered.


1. Open the macro file in which the macro to be entered is saved.
Specify frequently used macros for the auto file read function.
2. Set the ladder program window to which the macro is entered as the current
window.

3. Select "Macro Input Develop" from the "Edit" menu.


The "Macro Input" dialog box is displayed.
4. Select the name of the macro to be entered in the "Macro Name" text box.
The macro name described in the macro start declaration line is displayed here.

5. Enter macro operands to "@0", "@1" . . .


You can enter as many macro operands as the number specified as the arguments in the macro file.
The comment described in the macro start declaration line is displayed in the
"Comment" column.
6. When input is complete, click the [OK] button.
To cancel input, click the [Cancel] button.
The macro is entered.

Note: Macros that have been changed cannot be returned to their original state.

2-74

Chapter 2 Editor

2.12

Compilation
This section describes how to compile ladder programs created using the editor.

2.12.1 Executing compilation


Compile Compile (Ctrl + F9)

Ladder programs created using the editor cannot be transferred to a PLC. They
must be compiled into machine code.

12

To compile a ladder program, perform the following procedure.


1. Set the ladder diagram of the program to be compiled as the current window.

2. Select "Compile" from the "Compile" menu, or click the


The compilation process is performed.

button.

3. When the program is correctly compiled, the message "Compilation successful."


is displayed. Click the [OK] button.

2-75

Chapter 2 Editor

2.12.2 Error display


Compile Show Error (Ctrl + F10)

When an error occurs during compilation, a message is displayed and you can
confirm the contents of the error.
1. When an error occurs, the message "Compilation Error" is displayed.

2. Click the [OK] button.


The error list window is displayed.

Error code

Contents

3. To jump to the location in the program in which an error has occurred, specify the
desired error and click the [Jump] button.
The error location is displayed.
4. To display the error list again, select "Show Error" from the "Compile" menu, or
click the
button.

2.12.3 Double coil check


Double coil check
Compile Check Double Coil

Double coil locations in a ladder program can be checked. (Double coil locations are
not detected as errors during compilation.)
Select "Check Double Coil" from the menu. Double coils are then detected.
Note: The double-coil check uses three instruction words: OUT, DIFU, and DIFD.
Even if double coil locations are not detected by the double coil check, they may
function as double coils depending on the assembly of ladder circuits.

2-76

Chapter 2 Editor

2.13

Printing Functions
This section describes how to print out ladder diagrams, mnemonic lists, labels/
comments/references, device use status, and parameters.

2.13.1 Printing
File Print (Ctrl + P)

Connect the personal computer to a printer before starting the printout.

12

The contents to be printed out must be set before starting the printout.
1. Select "Print" from the "File" menu, or click the
The "Print Setup" dialog box is displayed.

button.

2. You can select whether or not each item is printed. Click "Yes" to print the item,
and click "No" not to print the item.
"Yes" is selected only for ladder diagrams by default.

The following four items can be printed out.


Ladder diagrams
Mnemonic lists
Labels/comments/references
Device use status
3. The printout range can be set for each item. Set the range in the dialog box
displayed when the [Detail] button is clicked.
For the setup procedure for each item, refer to page 2-78.

4. Click the [OK] button to start printing.


Click the [Cancel] button to cancel printing.
Note 1: If the settings are changed, the changes are not saved if the [Cancel] button
is clicked.
Note 2: When "Show in XYM" and "Show Decimal Constant with Sign" are selected
in the display mode, printout is performed according to the setting.
Display mode (p. 2-19)

2-77

Chapter 2 Editor
Ladder diagram (details)

2
Example of printout
LADDER

Name : SAMP01.LDR (KV10)

0001

**

Date : 1997/09/06

**

0000

$00024
T 000

T000

$00020
T 001

T001

$00054
T 002

0002

0003

0004
0000

Page (1/1)

L0002 (A)
L0006 (A)

L0005 (%)

L0006 (A)
L0007 (A)

L0008 (%)

L0007 (A)

T000

0005

Item

Setting contents (input range)

Initial value

Print Start Line No.

Line number from which printout is started

Print Finish Line No.

Line number at which printout is ended

Last line on edit


screen

No. of Lines in Page

Number of lines printed on one page (5 to 50)

20

Print Comment

Comment 1, Comment 2, Comment 3, or No

No

Print Device

Device Name or Label Name

Device Name

Divide Block

Consider (divided) or Ignore (not divided)

Consider

Mnemonic list (details)

Example of printout
Name : TRST02 LDR (KV01)

0000
0001
0002
0003
0004
0005
0006
0007
0008
0009
00010
00011
00012

00013

2-78

**
LD
MPS
CTC
CON
CTC
CON
CTH
MPP
CTC
CON
CTC
CON
CTH
**
LD

LIST

Date : 1997/08/22

Page (1/3)

**
2002
1

#020

#255

2101

#65535

#65535

0500

**
2008

Item

Setting contents (input range)

Initial value

Print Start Step

Step number from which printout is started

Print Finish Step

Step number at which printout is ended

65534

No. of Lines in Page

Number of lines printed on one page (30 to 120)

60

Print Comment

Comment 1, Comment 2, Comment 3, or No

No

Print Device

Device Name or Label Name

Device Name

Chapter 2 Editor
Labels/comments/references (details)
Add the check mark to the devices to be printed out, and set the printout range.
By default, all devices are selected and the entire range is specified.

12

Example of printout
Label

Name : SAMP01.LDR (KV10)

< >
<N0.>
0000

<Label>
:
L002(A)

<Comment1>
SWO
L0006(A)

0500

:
OUTPUT 500
L006(OUT)

0501

:
OUTPUT 501
L008(OUT)

0502

:
OUTPUT 502
L007(OUT)

Date : 1997/09/06

<Comment2>
SWITCH

Page (1/1)

<Comment2>
SWITCH

Item

Input range (initial value)

Relay

Available range according to the model

Timer
Counter
High-Speed Counter

Comparator

Data Memory

Available range according to the model

Temporary Memory

Item

Setting contents (input range)

Initial value

No. of Lines in Page

Number of lines printed on one page (30 to 120)

70

Print References

Yes or No

No

2-79

Chapter 2 Editor
Device use status
Add a check mark to the devices to be printed out, and set the printout range.
By default, all devices are selected to be printed out.

Example of printout (relay)


Name : SAMP01.LDR (KV10)

Date : 1997/09/11

Page (1/5)

]
0123456789ABCDEF 0123456789ABCDEF 0123456789ABCDEF 0123456789ABCDEF 0123456789ABCDEF

0000 0415: X
0500 0915: XXX
1000 1415:
1500 1915:
2000 2415:
2500 0915:

2-80

Chapter 2 Editor

2.13.2 Preview display


File (F) Print Preview (V)

To preview on the screen the contents to be printed out, perform the following
procedure.
1. Select "Print Preview" from the "File" menu.
The "Print Setup" dialog box is displayed.
2. Set the contents to be printed out.

12

For the setup procedure, refer to page 2-79.

3. Click the [Execute] button.


The actual image to be printed out is displayed.
The [Print] button can be clicked on this screen to print out the contents displayed.

2-81

Chapter 2 Editor

2.14

Changing the Display Color on the Screen


In the Ladder Builder, the color layout of the screen can be changed. This section
describes how to change display colors on the screen.

2.14.1 Changing display colors on the screen


View Change Ladder Diagram Color

This function sets the color layout of the Ladder Builder screen.
The setup procedure is described below.

1. Select "Change Ladder Diagram Color" from the "View" menu.


The "Change Ladder Diagram Color" dialog box is displayed.
The "Color" box provided on the side of each item indicates the color currently
set.

Object screen

2. Select the item whose color is to be changed in the "Section to be Specified" text
box, and click the
button of "Color".
The "Section to be Specified" text box can be set by clicking the desired position
in the diagram displayed on the object screen.
The "Color Setup" dialog box is displayed.
Select the desired color, and click the [OK] button.
You can create an intermediate color by clicking the [Create Color] button.
To determine the intermediate color created, click the [Add Color] button.

Sets the color tint.

Sets the brightness.

3. When changes are complete, click the [OK] button.


Click the [OK] button to confirm the setting. Click the [Cancel] button to cancel
the setting.
To return the screen colors to the default setting, click the [Back to Initial Setting]
button.
Note: When the number of display colors on the screen is set to 256 or less, some
colors may not be displayed correctly.

2-82

Chapter 3
Simulator
3.1
3.1.1
3.1.2

Outline of the Simulator Functions ..................................................... 2-84


Outline of the functions ............................................................................ 2-84
Restrictions in the simulator ..................................................................... 2-84

3.2
3.2.1
3.2.2

Starting up and Exiting from the Simulator ........................................ 2-86


Operating procedure for startup and exit ................................................. 2-86
Name and function of each part of the screen ......................................... 2-88

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

Chapter 3 Simulator

3.1

Outline of the Simulator Functions


This section outlines the simulator functions and the precautions for use.

3.1.1

Outline of the functions


The simulator simulates the operations of the ladder diagram created by the editor
without having to connect to the PLC.
The simulator offers the following functions.

Confirms a programs operation status in real-time using the ladder monitor,


registration monitor (timing chart) and monitor all.

Performs simulations using diversified execution methods such as continuous


scan, continuous step, one step and one scan.

Enables efficient debugging due to the undo function for execution of one step in
the reverse direction and execution of continuous step in the reverse direction.

Provides easy adjustment of preset values, and current values of timers,


counters and devices, as well as contact comments.

Sets and resets contacts forcibly.

3.1.2

Restrictions in the simulator

Special utility relays 2002 to 2012 and 2206 are actuated. Other special utility
relays are not actuated.

High-speed counters are not actuated.

The direct clock pulse function is not available.

The positioning control function is not available.

The following restrictions are provided in operations of interrupt programs.


INT CTC*

2-84

Is not executed.

INT 0000 to INT 0003

Executed in the early portion of a scan.

INT 0003

The timing edge can be changed over when 2206 goes ON/
OFF. At this time, the current value of the CTH1 is not as
signed to the TM30.

Data memory is not actuated if external data input is used.


KV-10 to 80: DM700 to DM799
KV-300: DM9000 to DM9299, DM9407, DM9517

Because simulation is performed in Windows, the scan time is longer than the
actual time required. Pay careful attention to the timer setting.

A small difference is generated in the cycle time indication depending on the


personal computer model. This occurs even when the same ladder program is
used because operations equivalent to those in the KV main body are simulated
internally in the personal computer.

Chapter 3 Simulator
Special utility relays supported
The table below shows the special utility relays which can be processed by the
simulator.

Special utility relays


Relay No.

Function

2002

Always ON

2003

Always OFF

2004

0.01 sec clock pulse (duty = 50%)

2005

0.1 sec clock pulse (duty = 50%)

2006

1.0 sec clock pulse (duty = 50%)

2007

OFF for only one scan when operation is started

2008

ON for only one scan when operation is started

2009

ON when arithmetic result is negative or when overflow occurs (<)

2010

ON when arithmetic result is 0 (=)

2011

ON when arithmetic result is positive (>)

2012

ON when arithmetic error occurs

13

When conventional KV Series is selected:


2206

Selects edge of INT3 (ON: Down edge, OFF: Up edge)

When Visual KV Series is selected:


2402/2403: Interrupt polarity of INT0
2402
2403

OFF
OFF

ON
OFF

At rising edge

OFF
ON

At falling edge ON
ON

At both edges

OFF
ON

At falling edge ON
ON

At both edges

OFF
ON

At falling edge ON
ON

At both edges

OFF
ON

At falling edge ON
ON

At both edges

2404/2405: Interrupt polarity of INT1


2404
2405

OFF
OFF

ON
OFF

At rising edge

2410/2411: Interrupt polarity of INT2


2410
2411

OFF
OFF

ON
OFF

At rising edge

2412/2413: Interrupt polarity of INT3


2412
2413

OFF
OFF

ON
OFF

At rising edge

Reset operation
Relays are cleared by the MEMSW. All the relays whose latching is not specified
by the MEMSW are cleared.
When clearing all the relays whose latching is specified, perform the following.
"Execute" "Device All Clear" "Latching Relay All Clear"
When clearing all the data memory whose latching is specified, perform the
following.
"Execute" "Device All Clear" "DM All Clear"
Device all clear (p. 2-108)

All the temporary data memory (TM00 to TM31) and all the timers are cleared.

Counters and high-speed counters are cleared according to the MEMSWs


specification.

Trimmer status is retained.

2-85

Chapter 3 Simulator

3.2

Starting up and Exiting from the Simulator


This section describes the simulator startup method, screen layout, simulator functions, etc.

3.2.1

Operating procedure for startup and exit

Startup procedure
File Simulator (Ctrl + F2)

The simulator can be started up by opening a ladder program created using the
editor.
Perform the following procedure in the editor.

1. In the editor, set the window of the ladder program to be simulated as the current
window.
2. Select "Simulator" from the "File" menu.

Simulator mode is selected, and the ladder monitor window is displayed in the
same way as in editor mode.

When the same ladder program was previously simulated, the window is displayed the same way it was when it was last simulated.

Note: Simulation is disabled when a compile error is present.


Repair the error so that compile can be performed correctly, and then run the simulation again.

2-86

Chapter 3 Simulator

Exit procedure
File Editor (Ctrl + F1)
Clear Device and Go to Editor (Ctrl + F2)

The following two methods are available to exit from the simulator and return to the
editor.
Returning to the editor without clearing device values
Select "Editor" from the "File" menu.
Note: When this operation is performed, the information on bus, etc. is cleared.
Therefore, when the mode is changed back to the simulator from the editor and
simulation is performed, differential type instructions, etc. may result in unexpected
operations.
Returning to the editor after clearing device values
Select "Clear Device and Go to Editor" from the "File" menu.
Note: You cannot exit from the ladder software itself while in simulator mode. To exit
from the ladder software, return to the editor and then select "Exit" from the "File"
menu.

2-87

13

Chapter 3 Simulator

3.2.2

Name and function of each part of the screen


When the simulator is started up, the ladder monitor window of the last edited ladder
program is displayed. If the monitor all window and registration monitor window were
previously displayed, they are also displayed when the simulator is started. In
addition, you can view the mnemonic list window and break condition window by
selecting them from the menu.

Sample screen
Main window title bar
Displays the file name of the ladder
program currently being simulated.

Menu bar
Displays the menu to
execute commands.

Tool bar
Provides buttons to execute commands.
Only commonly used commands are
provided as buttons. Each command
can be executed by clicking the
Main window
corresponding button once.
The entire simulator
screen.

Ladder monitor
window
p. 2-90
Monitor all
window
p. 2-113
Registration
monitor window
p. 2-122

Dialog bar
Allows you to register devices, assign device
values and preset values, and reset timers
and counters.

The name and function of each part of each window are described on the pages listed below.
Ladder monitor window

2-88

Status indication bar


Indicates the currently selected
function and the monitors
operating status.

p. 2-90

Monitor all window

p. 2-113

Registration monitor window

p. 2-122

Chapter 3 Simulator

3.3

Ladder Monitor
This section describes the ladder monitor window displayed while the simulator is
running, the scan/step execution procedure, the current/preset value change procedure, etc.

3.3.1

Outline of the ladder monitor


The ladder monitor offers the following functions.

3.3.2

Executes the scan of the ladder.

Executes the step of the mnemonic.

Turns ON/OFF the bit device.

Changes the current value using the dialog bar.

Displays all of the registered comments.

Sets the break condition.

Sets the scan time.

Sets the watch dog timer.

13

Executing scans
Execution of scans is described below.

Outline of the scan execution function


"To execute a scan" means to start a program at the initialization process and run it
through to the end process. This is one scan cycle.
Execution of scans is classified into two types, "execution of continuous scan" and
"execution of one scan". "Execution of continuous scan" is equivalent to the "RUN"
operation in the monitor.
The one-scan time and the watch dog timer can be set. Current values and preset
values can be changed.

Displaying the ladder monitor window


File Ladder Monitor

If a displayed ladder diagram is closed, select "Ladder Monitor" from the "File" menu
to display it again, or click the
button.
Note 1: This operation is not typically required because the ladder monitor window
is always displayed when the simulator is started up from the editor.
Note 2: Only one ladder monitor window can be opened at a time.

2-89

Chapter 3 Simulator

Ladder monitor window

Contact

Cursor
Line No.
Step No.
Scroll bar

Use the scroll bar or the cursor control keys (LEFT/RIGHT/UP/DOWN) to look at
the hidden (undisplayed) portion.

When a scan or step is executed, device values and the ON/OFF indication are
changed continuously according to the operation speed.

When a step is executed, the current position is scrolled (only in the upper
window) according to the operation speed, and the cursor is moved in the line
executed. The mnemonic list window is displayed to indicate the step executed.

Moving the cursor


LEFT/RIGHT/UP/DOWN keys
Pageup/PageDown keys
Ctrl + UP/DOWN keys
Home key
End key

: Move the cursor in the corresponding


direction.
: Move the cursor up or down one page
(screen).
: Move the cursor by one block.
: Move the cursor to the first line.
: Move the cursor to the last line.

When dividing the screen into two windows


When the pointer is placed between the bottom of the scroll bar and the window
frame, the pointer is changed into " ". (While the pointer shape is " ", the window
size can be changed but the screen cannot be divided.)
When the left button is pressed and held and moved upward in this status, the
screen is divided into the upper and lower windows. Different contents can be
displayed in each window. However, only the upper window is scrolled when a step
is executed. (The lower screen is not scrolled.)
To switch the active window between the upper and lower windows, click the mouse
on the desired window or press the Shift and F6 keys at the same time.

2-90

Chapter 3 Simulator
Status indication during execution
While a scan or step is executed, the current operation status and the scan time are
displayed in the status indication area on the main window.
Step No. being executed

Status (Operating, Stopped or Paused)

Operation mode being executed

Scan time

Note: While the continuous scan operation is executed, "Execute Scan" is displayed. While the continuous step operation is executed, "Execute Step" is displayed.
Changing the display size and the display method
Five different sizes are available to display the ladder diagram. The ladder monitor
window can be always displayed below other windows.
When changing the display size
The following five display sizes can be selected.
200% : Displays a ladder diagram at twice the standard size. This size is useful
when characters are small and difficult to read.
150% : Displays a ladder diagram at 1.5 times the standard size.
120% : Displays a ladder diagram at 1.2 times the standard size.
100% (Normal): Displays a ladder diagram in the standard size.
80% : Displays a ladder diagram in the smallest size. This size is useful when
checking the entire operation because the maximum number of cells can be
displayed on the screen.
To set the display mode, perform the following procedure.
Selecting the upper mode: View Zoom In (Ctrl + PageDown)
Selecting the lower mode: View Zoom Out (Ctrl + PageUp)
When displaying the ladder monitor window at the bottom
The ladder monitor window can always be displayed below the mnemonic list
window and other windows. Therefore, each device can be registered to each
monitor by dragging and dropping it even if the registration monitor window and the
monitor all window are placed on top of the ladder monitor window.
To display the ladder monitor window at the bottom of the screen, perform the
following procedure.
To return the display status to the previous setting, repeat the same procedure.
View Move Ladder to Bottom

2-91

13

Chapter 3 Simulator

Executing continuous scan


Execute Execute Continuous Scan (F5)

A program can be executed continuously.

Program is executed.
One scan is repeated.
One scan

3
End process

To execute a program continuously, select "Execute Continuous Scan" from the


"Execute" menu, or click the
button.
The operation status is displayed on the ladder monitor window.
Ladder monitor window (p. 2-90)

2-92

Chapter 3 Simulator

Executing one scan


Execute Execute One Scan (F9)

A program can be executed only once. When only one scan is executed while scans
are continuously executed or one step is executed, operation is paused.

Program is executed.
One scan

13

End process

To execute a program only once, select "Execute One Scan" from the "Execute"
menu, or click the
button.
Ladder monitor window (p. 2-90)

Note 1: When only one scan is executed while steps are executed, the program is
executed from the current step to "END" or "ENDH".
Note 2: When only one scan is executed, execution of one step in the reverse
direction is disabled.

2-93

Chapter 3 Simulator

Selecting devices
On the ladder monitor window, the current and preset values of the selected device
can be changed. To select a device, perform the following procedure.
Selecting a device using the mouse
Place the mouse pointer over the device to be selected, and click it.
The cursor becomes gray to indicate that it is selected.
Selecting a device using the keyboard
While the cursor is green, place the cursor in the device to be selected using the
LEFT, RIGHT, UP and DOWN keys, and then press the ENTER key.

The cursor becomes gray to indicate that it is selected.

0000

0000

Changing the current value, etc.


Once a device is selected, the current value, etc. can be changed using the dialog
bar.

For the procedure for changing the current value, preset value, etc. using the dialog bar, refer to
"Changing the current value/preset value/attribute" (p. 2-96).

Note: When the cursor is displayed in gray, all key operations are disabled on the
ladder monitor window. To move the cursor using the [LEFT], [RIGHT], [UP] and
[DOWN] keys or turn on/off a device using the space bar, press the [Esc] key once
to change the cursor back to green, and then perform the desired operation.

2-94

Chapter 3 Simulator

Turning on/off bit devices


To turn on/off a bit device, perform the following procedure.
Turning on/off a bit device using the mouse
Place the cursor over the device to be turned on/off, and double-click it.

The color of the contact changes to indicate that the ON/OFF status has been
toggled.

When the mouse is used for operation, the cursor is selected as soon as it is
double-clicked.

Turning on/off a bit device using the keyboard


While the cursor is green, place the cursor in the device to be turned on/off using the
LEFT, RIGHT, UP and DOWN keys, and then press the space bar.

The color of the contact changes to indicate that the ON/OFF status has been
toggled.

ON status
While the mouse is used
0000

While the cursor is manipulated


0000

OFF status
While the mouse is used
0000

While the cursor is manipulated


0000

Note 1: When the cursor is displayed in gray, all key operations are disabled on the
ladder monitor window. To move the cursor using the LEFT, RIGHT, UP and DOWN
keys or turn on/off a device using the space bar, press the Esc key once to change
the cursor back to green, and then perform the desired operation.
Note 2: Timer/counter contacts cannot be turned on/off.

2-95

13

Chapter 3 Simulator

Changing the current value/preset value/attribute


To change the current value, preset value or attribute (radix, comment) of the
selected device, use the dialog bar.
The dialog bar is displayed at the bottom of the screen, and allows you to register a
device on the monitor all window and registration monitor window. To change the
current value, preset value and attribute (radix, comment), perform the following
procedure.

For registration of devices, refer to Monitor All on page 2-109 and Registration Monitor on
page 2-119.

1. Select the device to be changed on the ladder monitor window.

Selecting devices (p. 2-94)

The values corresponding to the selected device are displayed in the current
value box and preset value box (offered for a timer/counter only) respectively.
2. Change the radix, comment, current value and preset value using the dialog bar.
The cursor can be moved in each direction using the Tab key (in the forward
direction) and the Tab + Shift keys (in the reverse direction).
When the ENTER key is pressed, the following operation is performed.
When the cursor is placed in "Type" or "No.": Registers a new value.
When the cursor is placed in "Bit", "Radix" or "Comment": Writes a value to the
current device.
Comment

Radix

Current value write button

Preset value write button

Preset value write box


Current value write box

Note 1: The attribute (Comment) box is displayed on the dialog bar only when both
the monitor all and the registration monitor are active.
The attribute (Comment) box is not displayed when the ladder monitor is active.
To change the comment type displayed, select "Show Mode" from the "View" menu.
Display mode (p. 2-19)

Note 2: When data which cannot be set is entered, the message "Current value is
unacceptable." is displayed.

2-96

Chapter 3 Simulator
3. Click the [Write Current Value] button or the [Write Preset Value] button.

The current value or preset value is changed.

Set items and available contents/values


Available values
Item

Contents

Ladder
monitor

Monitor all/registration monitor

Type

Select the device


type.

Relay, timer, counter, counter comparator, high-speed counter, data memory,


temporary data memory, trimmer No.

No.

Enter the device


No.

Available numbers vary depending


on the device.

Attribute Bit

Select the data


bit length.

1*1, 16, 32*2


*1: "1" is available in relay exclusively.
*2: "32" is available in relay, data
memory, temporary memory and
trimmer number only.

Radix Select the device


Decimal, Binary*1, octal, decimal, - decimal*2,
current/preset value hexade- hexadecimal
display method.
cimal
*1: "2" is not available when the bit length is set
to "32".
*2: Binary with sign (twos complement)
* The radix is fixed to "2" when the bit length is
set to "1".
* Change of the radix is reflected on the entire
window.
* When the radix is changed, the current value is
cleared.
Com- Select the type
ment of comment
displayed.

Comment 1, Comment 2, Comment 3 or None

Current value

Enter the current


value.

A value of up to 17 digits is available.

Preset value

Enter the preset


value.

The preset value can be entered only for timers/


counters.
A value of up to 7 digits can be entered.

Note 1: The bit length setting has priority over the radix setting. (For example, if the
bit length is changed to "1" when the bit length was set to "16" and the radix was set
to "decimal", the radix is automatically changed to "binary".)
Note 2: Each of the 32 bits and 16 bits can be registered from an appropriate
position only.
Note 3: When the bit length is "32", the lower 16 bits are assigned to a smaller
device number, and the upper 16 bits are assigned to a larger device number.
To cancel the settings
Click the [Cancel] button.
To return the timer/counter setting to the default value
Click the [Reset] button. (This button is only displayed when a timer/counter is set.)
Shortcut key
The operation of changing the numbering system is assigned to shortcut key
[Ctrl]+[E]. Decimal (#) and hexadecimal ($) are switched each time the [Ctrl]+[E]
keys are pressed.

2-97

13

Chapter 3 Simulator

Setting break conditions


Settings Set Break Condition Break Condition
OR condition Right-click

The break condition is the condition which stops a program while execution of one
scan or step is repeated continuously. The break condition can be specified for each
device. Use the break condition to confirm the partial operation status or to detect a
defective location.
When using the break condition together with the step function, operations can be
confirmed in a shorter time.
To set the break condition, perform the following procedure.
1. Select "Settings", "Set Break Condition" and "Break Condition" from the menu, or
button.
click the

The "Register Break Condition" dialog box and the break condition window are
displayed.
The AND condition and the OR condition can be set. The OR condition is selected as the default. When setting the AND condition, first select "OR Condition"
so that the check mark is deleted.
The AND condition and the OR condition can also be toggled using the short-cut
menu displayed by right-clicking the break condition window.

2. Select "Bit" when the device for which the condition is to be set is a bit device.
Select "Word" when it is a word device.
3. Specify the device name and the condition.
For word devices, specify the condition using comparison arithmetic.
For bit devices
Device name

Specify one device name.

Condition

ON

Sets "contact ON" as the condition.

OFF

Sets "contact OFF" as the condition.

For word devices


Device name
Comparison arithmetic

2-98

Specify two device names.


<

Sets "Right is larger than left." as the condition.

Sets "Left is equivalent to right." as the condition.

>

Sets "Left is larger than right." as the condition.

<
=

Sets "Right is larger than or equivalent to left." as the


condition.

>
=

Sets "Left is larger than or equivalent to right." as the


condition.

Chapter 3 Simulator
4. Click the [Register] button.
The specified condition is registered, and the contents are displayed on the break
condition window.

13

5. When registering two or more conditions, repeat steps 2 to 4.


6. When all conditions are registered, click the [Exit] button.
The "Register Break Condition" dialog box is closed.
When the program is stopped by the break condition, the line of the condition satisfied is highlighted in red in the case of an OR condition, or all the lines are highlighted in red in the case of an AND condition.

Changing and deleting registered contents


All the registered conditions are displayed on the break condition window.
The registered contents can be changed or deleted from this window.
Changing the registered contents
Place the cursor over the condition to be changed, and double-click it. The "Register/Change Break Condition" dialog box is then displayed. (See the figure above.)
Set a new break condition, and click the [Change] button. The break condition in the
line with the cursor is changed.
When first registering the condition, click the [Register] button instead.
Deleting the registered contents
The following three methods are available to delete the registered contents.

Place the cursor in the condition to be changed, and then select "Delete Break
Condition" from the "Edit" menu.

Place the cursor in the condition to be changed, and right-click it. Then, select
"Delete" from the menu displayed.

Place the cursor in the condition to be changed, and press the Delete key.

2-99

Chapter 3 Simulator

Setting the scan time


Settings Scan Time

Set the time for execution of one scan or step. For execution of one scan, there are
two time settings: the measured value indicating the actual time and the virtual fixed
value (fixed scan). (For execution of one step, only the virtual fixed value can be
set.)
1. Select "Scan Time" from the "Settings" menu.
The "Set Scan Time" dialog box is displayed.
2. When setting the fixed scan, click "Set Fixed Scan" to add a check mark.

3. Set the scan time to a value between 0 and 5,000 msec. The default value is set
to "10 msec" for execution by step, or set to the actual required time for execution
by scan.

4. Click the [OK] button to save the displayed value. To cancel the setting, click the
[Cancel] button.
Fixed scan
The length of the scan time while the simulator is running usually depends on the
personal computers processing speed. When the fixed scan mode is selected,
simulation can be performed in a scan time equivalent to that processed virtually on
the PLC side. Use this function to perform simulation of a program in which scan
time is important.

Setting the watch dog timer


Settings Set Watch Dog Timer

The watch dog timer detects abnormal delays in the program execution cycle. These
delays can be due to programming errors (i.e. infinite loops), or any other condition
that may cause the program to take too long to finish. The default value is "3,000
msec (= 3 sec)".
When the scan time exceeds the preset value of the watch dog timer plus the wait
time, a watch dog timer error occurs.
To set the watch dog timer, perform the following procedure.
1. Select "Set Watch Dog Timer" from the "Settings" menu.
The "Set Watch Dog Timer" dialog box is displayed.
2. Enter the watch dog timer within the range of "500 msec (0.5 sec) to 5,000 msec
(5 sec)".

2-100

Chapter 3 Simulator

3.3.3

Executing steps
Execution of steps is described below.

Outline of the step execution function


"To execute a step" means to simulate the program one instruction at a time. While
a step (one instruction) is executed, a mnemonic list is displayed and the line currently being executed can be verified.
When specification of the break condition or setting of break points is combined, the
operation status of the program from the specified input to the specified output can
be checked at each step, so a location of nonconformity can be quickly detected.
There are five step execution methods available: "executing a step continuously ",
"executing a step once", "executing steps at a high speed", "executing a step continuously in the reverse direction" and "executing a step once in the reverse direction".

Mnemonic list window


When a step is executed, the displayed device values and ON/OFF status are
changed continuously on the ladder monitor window according to the operation
speed. The current position is also scrolled according to the operation speed.
In addition, the mnemonic list window is opened and the mnemonic line currently
being executed is highlighted.

Line No. Mnemonic

Operand

Current cursor position


Displays the position in which
the cursor is currently
located.
Execution line cursor
Highlights the line currently
being executed.

Blue

Break point cursor


Displays the break point by
double-clicking.

Yellow (when
changing setting)

Scroll bar

When the execution line cursor is


superimposed on the break point
cursor, it is displayed in red.

2-101

13

Chapter 3 Simulator

Executing a step once


Execute Execute One Step (F8)

A step in a program can be executed only once. When a step is executed only once
during a scan, execution is stopped.

1 step = 1 instruction

When execution reaches


"ENDH", the cursor
returns to the top.

One step (instruction) is


executed every time the
clicked.

To execute a step once, select "Execute One Step" from the "Execute" menu, or
click the
button.
The mnemonic list window is displayed, and the line currently being executed is
highlighted.

Mnemonic window (p. 2-101)

Executing a step continuously


Execute Execute Continuous Step (Shift + F8)

A step in a program can be continuously executed.

When execution
reaches "ENDH", the
cursor returns to the top.
One step (instruction) is
continuously executed.

To execute a step continuously, select "Execute Continuous Step" from the "Execute" menu, or click the
button.
A mnemonic list window is displayed, and the line currently being executed is
highlighted.

Mnemonic window (p. 2-101)

The portion currently being executed is scrolled on the ladder monitor window
according to the operation speed.

2-102

Ladder monitor window (p. 2-90)

is

Chapter 3 Simulator

13
Note 1: Only the upper window is scrolled according to the operation speed. To
confirm the operation of a certain portion, use the lower screen.
Note 2: If the speed is too fast, increase the wait time appropriately.

Executing steps at a high speed


Execute Execute High-speed Step (Shift + F9)

You can specify the program to stop execution at a certain step. The program will
then be executed quickly without displaying the progress at each step. When the
program reaches the specified step, it will stop execution.
When a jump instruction is provided in the specified range, execution is stopped
after the specified line.
This type of execution is useful when the portion to be simulated is located near the
end of a long program.

The program is executed up


to the specified step.

To execute steps at high speed, perform the following procedure.


1. Select "Execute High-speed Step" from the "Execute" menu, or click the
button.
The "Execute High-speed Step" dialog box is displayed.
2. Specify the step number to which the program is to be executed, and then click
the [OK] button. To cancel execution, click the [Cancel] button.

2-103

Chapter 3 Simulator

Executing a step once in the reverse direction


Execute Execute One Step in Reverse (F7)

After a step is executed once, a step is executed continuously, or steps are executed at high speed, these steps can be re-executed one at a time in the reverse
direction.

When execution reaches


the top, the cursor
returns to "ENDH".

One step (instruction) is


executed every time the
button is clicked.

To execute a step once in the reverse direction, select "Execute One Step in Rebutton.
verse" from the "Execute" menu, or click the

Executing a step continuously in the reverse direction


Execute Execute Continuous Step in Reverse (Shift + F7)

After a step is executed once, a step is executed continuously, or steps are executed at a high speed, these steps can be re-executed continuously in the reverse
direction.

When execution reaches


the top, the cursor
returns to "ENDH".

One step (instruction) is


continuously executed in
the reverse direction.

To execute a step continuously in the reverse direction, select "Execute Continuous


Step in Reverse" from the "Execute" menu, or click the
button.
Executing a step in the reverse direction
When a step is executed in the reverse direction, all the items which changed due to
the execution of the program are returned to their original status. This includes the
device values and the bus status.
By using this function, debugging can be performed efficiently because the operation
of the ladder program (changes in the operation caused by ON/OFF of contacts and
word device values entered) can be recovered for each instruction, and then confirmed.

2-104

Chapter 3 Simulator

Specifying a break point


A break point is the position in which a program is to be stopped. When a break
point is first specified, the program is automatically stopped in the specified position
while a step is continuously executed.
To specify a break point, place the cursor in the line to be specified, and then
double-click it or press the space bar.
The break point cursor is displayed in yellow. When the cursor position in the line
currently being executed is specified, the cursor color changes to red. When the
program is stopped at the break point, the cursor color changes to red. (These
cursor colors are used when the system is set to the standard Windows color settings.)
Two or more break points can be specified.
When the cursor position in the line
currently being executed is specified

To cancel a break point setting, place the cursor in the specified line, and then
double-click it or press the space bar.
The break point cursor is deleted.

3.3.4

Jump and search


The simulation control can be jumped to a different position by specifying a line
number or step number in the program. Instructions and devices can be found while
setting an instruction word and an operand as the key words. A cross reference
search can be performed from the current position.

Jump to the specified line/step


Edit Jump in Ladder Monitor

To jump to a different position by specifying a line number or step number, perform


the following procedure.
1. Select "Jump in Ladder Monitor" from the "Edit" menu.
The "Jump to Specified Line" dialog box is displayed.
2. Specify a line number or step number as the jump destination.

2-105

13

Chapter 3 Simulator
3. Click the [Line] button when specifying a line number to jump to. Click the [Step]
button when specifying a step number to jump to. Click the [Cancel] button to
cancel jump.
The specified line or step is displayed, and the cursor is moved to the specified
line or step.
Note 1: When a number larger than the last line/step number is specified, the last
line/step is displayed.
Note 2: Jump to the specified line/step can be performed only while the ladder
monitor is active.

Searching by specifying an instruction word/operand


Edit Search in Ladder Monitor

To find instructions and devices in a program by specifying an instruction word and


operand, perform the following procedure.
Note: A search can be performed only when simulation is stopped and the ladder
monitor is active.
1. Select "Search in Ladder Monitor" from the "Edit" menu.
The "Find Instruction/Device" dialog box is displayed.
2. Enter the instruction word to be found into the "Instruction Word" text box. Enter
the operand to be found into the "Operand" text box. A search can only be
performed by specifying either an instruction word or operand.

3. Select the search direction.


Forward: Searches forward from the current cursor position.
Backward: Searches backward from the current cursor position.
4. Click the [Next] button.
The search is started, and the first block containing the instruction or operand is
displayed.
When the specified instruction or operand is not found, the message "Cant find
specified symbol." is displayed.

5. To perform a continuous search, click the [Next] button. To stop the search, click
the [Cancel] button.

2-106

Chapter 3 Simulator

Cross reference search


Edit Find Device at Cursor Position on Ladder Monitor
Search Backward (F2) Right-click
Search Forward (F3) Right-click
Search for OUT Backward (Shift + F2) Right-click
Search for OUT Forward (Shift + F3) Right-click

To perform a cross reference search means to search for a device equivalent to the
device in the current cursor position or an instruction which sets the device to OUT.
The following four search methods are available.
Search in the backward direction
Search Backward (F2) Right-click
Searches for a device equivalent to the device in the current cursor position in the
area before the current position.
Search in the forward direction
Search Forward (F3) Right-click
Searches for a device equivalent to the device in the current cursor position in the
area after the current position.
Search for OUT in the backward direction
Search OUT Backward (Shift + F2) Right-click
Searches for an instruction which sets the device in the current cursor to OUT in the
area before the current position.
Search for OUT in the forward direction
Search OUT forward (Shift + F3) Right-click
Searches for an instruction which sets the device in the current cursor to OUT in the
area after the current position.
Note 1: When the search reaches the last line or the first line, the message
"Searched to end (beginning) of program" is displayed.
Note 2: The cross reference search is available only while the ladder monitor is
active.

2-107

13

Chapter 3 Simulator

3.3.5

Stop/reset and device all clear


To stop/reset execution of scans or steps, or to clear all the devices, perform the
following procedure.

Stopping/pausing the operations


Execute Stop (Shift + F5)
Pause (F4)

Operations can be stopped or paused.


Select "Stop" or "Pause" from the "Execute" menu, or click the

or

button.

When "Stop" is specified, all types of operations are stopped and the output Y is
cleared.

When "Pause" is specified, all types of operations are temporarily stopped.

Note: When operations are stopped, execution of a step in the reverse direction is
not available. To execute a step in the reverse direction after stopping operations,
you must execute the steps again. When operations are paused, execution of a step
in the reverse direction can be performed.

Reset
Execute Reset (F10)

The current value can be returned to the default value.


Select "Reset" from the "Execute" menu, or click the

button.

When this procedure is performed during operation, the operation is stopped.

The system is processed as if the power of the PLC is turned off, and is then
turned on again.

Device all clear


Execute Device All Clear DM All Clear
Latching Relay All Clear
Counter All Clear

By the device all clear function, the current value of some devices can be initialized.
The following three initialization methods are available.
Clearing all data memory
Execute Device All Clear DM All Clear
Clearing all latching relays
Execute Device All Clear Latching Relay All Clear
Clearing all counters
Execute Device All Clear Counter All Clear

2-108

When device all clear is performed during operation, the operation is stopped.

Chapter 3 Simulator

3.4

Monitor All
Monitor all displays the current value of all devices, the ON/OFF status of contacts,
and registered comments for each device type. This section describes the operations available in monitor all.

3.4.1

Outline of monitor all


Monitor all offers the following functions.

3.4.2

Displays the current value and preset value of all devices, and the ON/OFF
status of the contacts and coils for each device type.

Displays all the registered comments.

Turns on/off bit devices.

Changes the current value, etc. using the dialog bar.

Sets the break condition.

Sets the scan time.

Sets the watch dog timer.

13

Displaying, saving, and reading the monitor all window


To display the monitor all window, a device must be selected on the ladder monitor
window. The contents registered to the monitor all window can be saved in a file for
each device type, to be read at a later time.

Displaying the monitor all window


File Monitor All

The method for displaying the monitor all window is different depending on whether
you are opening a new window or changing the contents of a currently open window.
When displaying a new window
To display the monitor all window for the first time or to display it in another window,
perform the following procedure.
1. On the ladder monitor window, select the device to be displayed.
When a device is clicked, its color is changed to indicate that it is selected.

2-109

Chapter 3 Simulator
2. Select "Monitor All" from the "File" menu, or click the

button.

The monitor all window is opened.


A list is displayed in the window, with the selected device at the top.
The line of the selected device is highlighted to indicate that it is selected.

3
Note: Every time this procedure is performed, a new window is opened.
When changing the contents displayed on an open window
When the monitor all window is already open and you want to change its contents,
perform the following procedure. For more details, refer to the corresponding section.

2-110

Registering a device by dragging and dropping from the ladder monitor window

Registering a device by dragging it from the ladder monitor window (p. 2-114)

Registering a device by specifying the type and number of the device from the
dialog bar

Registering a device by specifying it using the dialog bar (p. 2-115)

Chapter 3 Simulator

Saving the monitor all window


File Save Window As

To save the monitor all window, perform the following procedure.


1. Select the monitor all window to be saved as the current window.
2. Select "Save Window As" from the "File" menu, or click the
The "Save Window As" dialog box is displayed.

button.

3. Specify the folder (directory) and the file name in which the file is to be saved.

13

Folder (directory)

Select the folder (directory) in which the file is to be saved.


The current folder (directory) is selected as the default.

File Name

Enter the file name using up to 8 letters or numbers.


The extension is set to "kal", and should not be changed.

Note 1: The monitor all window cannot be saved while a scan is being continuously
executed.
Note 2: Current values/preset values are not saved.

Reading the monitor all file


File Open Window

To read a monitor all file, perform the following procedure.


1. Select "Open Window" from the "File" menu.
The "Open Window" dialog box is displayed.
2. Click the

button of "File Type", and select "Monitor All (*.kal)".

3. Specify the folder and file name in which the file to be read is located.

2-111

Chapter 3 Simulator
Folder (directory)

Select the folder (directory) in which the file to be read is saved.


The current folder (directory) is selected as the default.

File Name

Specify the file name to be read.

File Type

Select the type of the file to be read.


"Registration Monitor (*.kre)" and "Monitor All (*.kal)" are available.

4 Click the [OK] button.

2-112

The specified file is read, and the monitor all window is opened.

Chapter 3 Simulator

3.4.3

Monitor all window

Contact status

Device No.

Current value

Preset value

Comment

Cursor

Scroll bar

13

To look at the hidden (undisplayed) portion, use the scroll bar or the [PageUp]
and [PageDown] keys.

The cursor can be moved using the [LEFT] [RIGHT] [UP][DOWN] keys.

While the simulator is running, the current values are changed accordingly.
Current value display format

3.4.4

Display
format

Bit

Radix

Sign

B1

Not provided

B16

16

Not provided

O16

16

Not provided

O32

32

Not provided

D16

16

10

Not provided

D32

32

10

Not provided

d16

16

10

Provided

d32

32

10

Provided

H16

16

16

Not provided

H32

32

16

Not provided

A16

16

ASC

A32

32

ASC

B: Bit
O: Byte
D: Binary without sign
d: Binary with sign
H: Hexadecimal
A: ASCII

Registering devices
To perform a simulation using the monitor all window, a device must be registered.
Three methods are available to register a device.

Selecting and registering a device on the ladder monitor window


File Monitor All

1. On the ladder monitor, select the device to be displayed.

When a device is clicked, its color is changed to indicate that it is selected.

2-113

Chapter 3 Simulator

2. Select "Monitor All" from the "File" menu, or click the

button.

The monitor all window is opened.


A list is displayed in the window, with the selected device at the top.
The line of the selected device is highlighted to indicate that it is selected.

Registering a device by dragging it from the ladder monitor window


Drag and drop a device from the ladder monitor window, and register it to the monitor all or registration monitor window.
In this case, it is recommended to display the ladder window at the bottom by
selecting "Move Ladder to Bottom" from the "View" menu or clicking the
button.
This allows dragging and registration to be performed even while the registration
destination window is positioned above the ladder monitor window.
1. While a device is selected, press and hold the left mouse button.
The cursor shape is changed.

2. While pressing and holding the left button, move the cursor to the monitor all
window (drag).

2-114

Chapter 3 Simulator

13

3. Release the left button (drop).

In the monitor all window, a list of devices with an equivalent type to the selected
device is displayed.
The line of the selected device is highlighted to indicate that it is selected.

Registering a device by specifying it using the dialog bar


The dialog bar is a tool shared by the ladder monitor window, the monitor all window
and the registration monitor window. It allows you to register new devices and
change the setting of the selected device.
The following items can be set using the dialog bar.

Device type

Device No.

Bit count

Radix

Comment display method *1.

Current value

Preset value (in a timer/counter exclusively)

*1. It is not displayed while the ladder monitor window is active.

Changing the current value/preset value/attribute: Note (p. 2-96)

1. When registering a device, first perform the following procedure.


When the registration destination window is not open
Specify the device to be registered using the dialog bar, and then select the monitor
to which the device is to be registered.
When the registration destination window is open
Set the monitor window to which a device is to be registered as the current window,
and then set the device to be registered using the dialog bar.

2-115

Chapter 3 Simulator
2. Set the device to be registered using the dialog bar.

For items, contents and precautions on changing settings, refer to "Changing the current value/preset
value/attribute" on page 2-96.
Preset value write button
Comment
Radix

Current value write button

Preset value write box


Current value write box

3. Click the [Register] button.

The device satisfying the contents set is registered to each monitor.

To cancel the setting entered


Click the [Cancel] button.

3.4.5

Selecting and changing devices


Devices can be selected on the monitor all window, and then the ON/OFF status
and the current value of bit devices can be changed.

Selecting devices
To select a device, perform the following procedure.
Selecting a device using the mouse
Place the cursor over the device to be selected, and click it.

The cursor changes to gray to indicate that the device is selected.

Selecting a device using the keyboard


When the cursor color is the same as the title bar color, place the cursor in the
device to be selected using the UP and DOWN keys, and press the ENTER key.

The cursor changes to gray to indicate that the device is selected.

Status in which a device is selected

2-116

Chapter 3 Simulator
Changing the current value, etc.
Once a device is selected, the current value, etc. can be changed using the dialog
bar.

For the procedure for changing the current value, preset value, etc. using the dialog bar, refer to
"Changing the current value/preset value/attribute" on page 2-118.

Turning on/off bit devices


To turn on/off a bit device, perform the following procedure.
Turning on/off a bit device using the mouse
Place the cursor over the device to be turned on/off, and double-click it.

13

The ON/OFF indication is toggled.

Turning on/off a bit device using the mouse


When the cursor color is the same as the title bar color, place the cursor in the
device to be turned on/off using the UP and DOWN keys, and press the space bar.

The ON/OFF indication is toggled.


ON status
7015
7100
7101

OFF status
B01
B01
B01

7015
7100
7101

B01
B01
B01

Turning on/off each bit using the bit cursor


When a bit device consists of 16 bits and is set to binary, the bit cursor is displayed.
Place the bit cursor in the device to be turned on/off, and double-click it. Or when the
cursor color is equivalent to the title bar color, place the cursor in the device to be
turned on/off using the LEFT and RIGHT keys and press the space bar. The indication is toggled between "0" and "1", and each bit can be turned on/off separately.
7000 0000000000000000 B16
7100 0000001000000000 B16
7200 0000000000000000 B16

2-117

Chapter 3 Simulator

Changing the current value/preset value/attribute


The dialog bar is a tool shared by the ladder monitor window, the monitor all window
and the registration monitor window, and allows you to register new devices and
change the setting of the selected device.
The following items can be set using the dialog bar.

Device type

Device No.

Bit count

Radix

Comment display method

Current value

Preset value (only in a timer/counter)

Setting procedure
1 Select the monitor window for which devices are to be changed as the current
window. Place the cursor over the device to be changed, and click it.
2 Change the current value, preset value and attribute using the dialog bar.

For items, contents and precautions on changing settings, refer to "Changing the current value/
preset value/attribute" on page 2-96.
Comment
Radix

Preset value write button

Current value write button

Current value write box

Preset value write box

3 Click the [Write Current Value] or [Write Preset Value] button.

The contents set using the dialog bar are written to the selected device.

To cancel the setting entered


Click the [Cancel] button.
To return the setting of a timer/counter to the default value.
Click the [Reset] button. (This button is displayed only when a timer/counter is set.)
Note: Even if bit devices are turned on/off or the current/preset values are changed
while operation is stopped, these settings are reset when an operation is started up.
Pause the operation, and then change the device status.

Resetting devices
Edit Reset Device in Monitor All/Registration Monitor

To reset the selected device to the default value, perform the following procedure.
Select "Reset Device in Monitor All/Registration Monitor" from the "Edit" menu.

2-118

The current value of the selected device is returned to the default value.

Chapter 3 Simulator

3.5

Registration Monitor
The registration monitor displays timing charts for registered devices. When steps
are executed, the current status is displayed in real-time so that program operations
can be confirmed. This section describes how to view and manipulate the registration monitor.

3.5.1

Outline of the registration monitor


The registration monitor offers the following functions.

3.5.2

Registers up to 40 devices.

Changes the position of registered devices.

Displays timing charts for registered devices (both bit devices and word devices).

Displays the ON/OFF status and comments of bit devices.

Turns on/off bit devices.

Changes the current value, etc. using the dialog bar.

Sets the break condition.

Sets the scan time.

Sets the watch dog timer.

13

Displaying, saving, and reading the registration monitor


The registration monitor registers devices and displays timing charts.
The registration monitor window in which devices are registered can be saved in a
file.

Displaying the registration monitor


File Registration Monitor

When displaying the registration monitor for the first time, display the registration
monitor window, and then register devices by dragging and dropping them from the
ladder monitor or by using the dialog bar.

For the procedure for registering devices by specifying the type and number from the dialog bar, refer
to "Changing the current value/preset value/attribute" on page 2-118.

2-119

Chapter 3 Simulator
To register devices by dragging and dropping them from the ladder monitor window,
perform the following procedure.
1. Select "Registration Monitor" from the "File" menu, or click the

button.

The registration monitor window is open.

Note: Every time this operation is performed, a new window is opened.


2. On the ladder monitor window, select devices to be registered, and press and
hold the left mouse button.

The cursor shape is changed.

When you press the left mouse button while pressing and holding the [Ctrl] key
on the ladder monitor window, all the devices displayed in the ladder monitor
window are selected.

3. While pressing and holding the left mouse button, move the cursor to the registration monitor window (drag), and release the left button.

The selected devices are displayed on the registration monitor window.

Timing charts are displayed by default. To display comments, select the comment type using "Comment" on the dialog bar.
When registering one device

Drag

When registering all the devices displayed on the screen

[Ctrl] +
Drag

Saving the registration monitor


File Save Window As

To save the registration monitor window, perform the following procedure.


1. Select the registration monitor window to be saved as the current window.

2-120

Chapter 3 Simulator
2. Select "Save Window As" from the "File" menu, or click the

button.

The "Save Window As" dialog box is displayed.

3 Specify the folder (directory) and the file name in which the file is to be saved.

13

Folder (directory)

Select the folder (directory) in which the file is to be saved.


The current folder (directory) is selected as the default.

File Name

Enter the file name using up to 8 letters and numbers.


The extension is set to "kre", and should not be changed.

Reading the registration monitor file


File Open Window

To read a registration monitor file, perform the following procedure.


1. Select "Open Window" from the "File" menu.

The "Open Window" dialog box is displayed.

2. Specify the folder and file name in which the file to be read is located.

Folder (directory)

Select the folder (directory) in which the file to be read is saved.


The current folder (directory) is selected as the default.

File Name

Specify the file name to be read. The extension is set to "kre".

File Type

Select the type of the file to be read.


"Registration Monitor (*.kre)" and "Monitor All (*.kal)" are available.

3. Click the [OK] button.

The specified file is read, and the registration monitor window is opened.

2-121

Chapter 3 Simulator

3.5.3

Registration monitor window


On the registration monitor window, timing charts and comments are displayed
along with the device data, current values and preset values.
Device No.

Bit device status

Vertical cursor

Cursor

Current value

Preset value

Comment

Timing chart

When many devices are registered, it is recommended that you open two or
more windows for easier viewing.

The cursor can be moved using the LEFT/RIGHT/UP/DOWN keys.

While the simulator is running, the current values are changed continuously
according to the operation speed.

Displaying comments or timing charts


Whether timing charts or comments are to be displayed can be set for each device
using "Comment" on the dialog bar.
No: Timing charts are displayed.
Comment 1, Comment 2 or Comment 3: Comments are displayed (along with the
preset value in the case of a timer/counter).

3.5.4

Registering devices
To perform a simulation using the registration monitor, a device must be registered.
Two methods are available to register a device.

Registering a device by dragging it from the ladder monitor window

The registration procedure is the same as step 2 and onward in the procedure described for the
monitor all. Refer to page 2-114.

Registering a device by specifying it using the dialog bar

2-122

The registration procedure is the same as that described for the monitor all. Refer to page 2-115.

Chapter 3 Simulator

3.5.5

Selecting and changing devices


Devices can be selected on the registration monitor window, and then the ON/OFF
status and the current value of bit devices can be changed.
Note: Devices must first be registered before using the registration monitor.
The device registration procedure is described in "3.5.2 Displaying, saving, and
reading the registration monitor" ( p. 2-118)

Selecting devices
To select a device, perform the following procedure.

13

Selecting a device using the mouse


Place the cursor over the device to be selected, and click it.

The cursor changes to gray to indicate that the device is selected.

Selecting a device using the keyboard


When the cursor color is the same as the title bar color, place the cursor in the
device to be selected using the UP and DOWN keys, and press the ENTER key.

The cursor changes to gray to indicate that the device is selected.


Status in which a device is selected

2-123

Chapter 3 Simulator

Turning on/off the bit device


To turn on/off a bit device, perform the following procedure.
Turning on/off a bit device using the mouse
Place the cursor over the device to be turned on/off, and double-click it.

The ON/OFF indication is toggled.

Turning on/off a bit device using the mouse


When the cursor color is the same as the title bar color, place the cursor in the
device to be turned on/off using the UP and DOWN keys, and press the space bar.

The ON/OFF indication is toggled.


ON status
7015
7100
7101

OFF status
B01
B01
B01

7015
7100
7101

B01
B01
B01

Changing the current value/preset value/attribute


The dialog bar allows you to change the type, number, attribute, current value and
preset value of devices.

The procedure for changing these items is the same as that described for the monitor all. Refer to
"Changing the current value/preset value/attribute" on page 2-118.

Note: Even if bit devices are turned on/off or the current/preset values are changed
while operation is stopped, these settings are reset when an operation is started up.
Pause the operation, and then change the device status.

2-124

Chapter 3 Simulator

Copying the device attribute


Edit Copy Device Attribute in Registration Monitor Right-click (Copy Attribute)

Only the device attribute (bit count, radix, comment type) of another device can be
copied. This function can be used to copy only the attribute of another device while
retaining the device type and device number.
To copy the attribute, perform the following procedure.
1. Left-click the copy source device.

13

2. Place the cursor in the copy destination device, and right-click it. When the menu
is displayed, select "Copy Attribute".

The attribute is copied.

Note 1: Never left-click a device when specifying the copy destination. Leftclicking
specifies the copy source.
Note 2: Step 2 can be performed by pressing the Esc key so that the cursor color
becomes the same as the title bar color. Place the cursor in the copy destination
device using the UP and RIGHT keys, and then select "Copy Device Attribute in
Registration Monitor" from the "Edit" menu.

2-125

Chapter 3 Simulator

Moving devices
The device in the currently selected cursor position can be moved to another position by dragging and dropping to change the device order. To move a device,
perform the following procedure.
1. Place the cursor in the device to be moved.
2. While pressing and holding the left mouse button, move the mouse cursor to the
device in the position below the destination (drag).

3. Release the left button (drop).


The device is inserted at the mouse cursor position.

2-126

Chapter 3 Simulator

Deleting devices
Edit Delete Devices in Registration Monitor Right-click (Delete)

To delete the device in the currently selected cursor position, perform the following
procedure.
Select "Delete Devices in Registration Monitor" from the "Edit" menu.

The selected device is deleted.

The device below the deleted device is selected.


Before deletion

13

After deletion

Sorting devices
Edit Sort Devices in Registration Monitor Right-click (Sort)

To sort devices by type or number, perform the following procedure.


Select "Sort Devices in Registration Monitor" from the "Edit" menu.

Devices are sorted by the "Type" list on the dialog bar.

Resetting devices
Edit Reset Device in Monitor All/Registration Monitor Right-click (Reset)

To reset the selected device to the default value, perform the following procedure.
Select "Reset Device in Monitor All/Registration Monitor" from the "Edit" menu.

The current value of the selected device is returned to the default value.

Note: Only the device in the cursor line is reset by this operation. To reset all the
displayed devices, select "Reset" from the "Execute" menu. Devices cannot be reset
in the monitor.

2-127

Chapter 3 Simulator

3.5.6

Manipulating timing charts


This section describes timing charts displayed in the registration monitor.
When steps are executed, timing charts are displayed in real-time to indicate the
value history. You can confirm the operation status of a program such as the timing
at which the ON/OFF status of the contact of each registered device is changed
over, etc.
When a step is executed in the reverse direction after a step has been continuously
executed, symmetry timing charts are displayed.
However, when steps are executed at high speed, the progress for each individual
step is not displayed and each timing chart is progressed by only one scale. Accordingly, timing charts displayed are not symmetrical even if a step is executed in the
reverse direction.

How to interpret a timing chart


Timing charts for all the registered devices are displayed on the screen. For contacts, the ON/OFF status can be determined by the shape. For word devices, the
ON/OFF status can be determined by a change in the value.
The time axis of a timing chart proceeds from the right to the left. The further right on
the chart, the closer to the current time.
The cursor on a timing chart indicates the part currently being simulated. The cursor
position can be moved.
The scale for a timing chart is different depending on whether scans or steps are
being executed. [This difference is provided only in the simulator. It is not provided in
the monitor.] One scale in the monitor indicates the timing inside the monitor, and
has nothing to do with the PLC scan.)
While scans are executed: One scale indicates one scan.
While steps are executed: One scale indicates one instruction.
When the execution method is changed over, the timing chart color changes.

Moving the vertical cursor


The vertical cursor is displayed when a scale is clicked. The vertical cursor can be
moved using either of the following two procedures.

2-128

While pressing and holding the left mouse button on the cursor pointer, move it to
the movement destination, and then release the left button.

Press the Esc key to change the cursor on a device to blue, and then move the
cursor using the LEFT and RIGHT keys.

The active status of the vertical cursor can be changed by pressing the Tab key.

Chapter 3 Simulator
Note 1: The current values displayed indicate the values in the positions in which
the active vertical cursor is located. Even when a reset is executed, the values in the
vertical cursor positions are displayed as the current values. When the vertical
cursor is not provided, the current values displayed indicate the actual current
values. The actual current values can be entered while the vertical cursor is not
displayed. In the monitor, the vertical cursor can be manipulated only when the
monitor is stopped.
Note 2: The vertical cursor can be used to change the ON/OFF status of contacts,
the current values and the preset values of devices.

Setting the number of scales for timing charts


Settings Set No. of Scales for Timing Chart

13

Scales are provided at the top of timing charts. One scale indicates one scan while
scans are executed or one instruction while steps are executed.
By default, 32 scales are displayed on the screen. The number of scales can be set
anywhere between 1 and 511.
Timing charts are easier to view when you adjust the number of scales when the
interval between ON and OFF of contacts is short, for example.
To set the number of scales, perform the following procedure.
1. Select "Set No. of Scales for Timing Chart" from the "Settings" menu, or click the
button.

The "Set No. of Scales for Timing Chart" dialog box is displayed.

2. Set the number of scales between 1 and 511. The default value is 32.

Note: When scales cannot be displayed on the window because there are too many
scales, the message "Cant write scales." is displayed. If this occurs, either widen
the window or reduce the number of scales.

The number of scales for timing charts is changed to the value entered.
When "32" is entered

When "100" is entered

2-129

Chapter 3 Simulator

Setting the wait time


Settings Wait Time

The wait time available while scans are executed can be set.
The wait time is applied to all the operations performed by the simulator. When the
execution speed is too fast or slow, adjust the wait time value accordingly. The wait
time cannot be set in the monitor.
To set the wait time, perform the following procedure.
1. Select "Wait Time" from the "Settings" menu, or click the

button.

The "Set Wait Time" dialog box is displayed.

2. Set the wait time between 0 and 10000 ms. The default value is 90 ms.

3. Click the [OK] button to register the value entered. To cancel the setting, click the
[Cancel] button.

2-130

Chapter 3 Simulator

3.5.7

Printing out the registration monitor


The contents of the registration monitor can be printed out. This section describes
the printout procedure.
Only the registration monitor can be printed out.
First select the registration monitor to be printed out as the current window.
Note: Before performing a printout, confirm the following.
The printer should be correctly connected.
The printer should be correctly set by selecting "Printer Setup" from the "File"
menu.
If the printer is not correctly set, correct the settings according to the requirements
for your printer.

Preview display
File Print Preview

To confirm the contents to be printed out on the preview screen, perform the following procedure.
1. Select the registration monitor to be printed out as the current window.
2. Select "Print Preview" from the "File" menu.

The image that will be printed out is displayed on the screen.

The [Print] button on the screen can be clicked to print out the image displayed.

2-131

13

Chapter 3 Simulator

Executing printout
File Print

To execute printout, perform the following procedure.


1. Select the registration monitor window to be printed out as the current window.
2. Select "Print" from the "File" menu.

The "Print" dialog box is displayed.

3. Select "All" in "Print Range", and click the [OK] button.

Printout is executed.
Note: If printout is not correctly performed, confirm the settings and connection
status of the printer.

2-132

Chapter 4
Monitor
4.1
4.1.1
4.1.2
4.1.3

Outline of the Monitor Functions .......................................................


Outline of the functions ..........................................................................
Restrictions in the monitor ......................................................................
Precautions for communication ..............................................................

2-134
2-134
2-134
2-135

4.2
4.2.1
4.2.2

Communicating with the PLC ............................................................ 2-136


Setting the PLC communication parameters .......................................... 2-136
Setting the comment transfer ................................................................. 2-138

4.3
4.3.1
4.3.2

Starting up and Exiting from the Monitor ......................................... 2-139


Operating procedures for startup and exit .............................................. 2-139
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 ....................................................................................


Outline of the ladder monitor ..................................................................
Displaying the ladder monitor window ....................................................
PLC error check .....................................................................................
Starting the monitor ................................................................................
Stopping the monitor ..............................................................................
Screen displayed while the monitor is running .......................................
Setting the PLC operation mode ............................................................

4.5
4.5.1
4.5.2

Monitor All and Registration Monitor ................................................ 2-148


Functions of the monitor all window ....................................................... 2-148
Functions of the registration monitor ...................................................... 2-148

4.6
4.6.1
4.6.2
4.6.3

Monitor Function .................................................................................


Disabling the input refresh/Disabling the output .....................................
Changing the current values all at once .................................................
Device all clear .......................................................................................

2-144
2-144
2-144
2-144
2-145
2-145
2-146
2-147

2-149
2-149
2-150
2-154

Chapter 4 Monitor

4.1

Outline of the Monitor Functions


This section outlines the monitor functions and the precautions for use.

4.1.1

Outline of the functions


The monitor compiles (converts) ladder programs created by the editor, transfers the
converted programs to the PLC (Visual KV or conventional KV), and executes them
to confirm the operation status.
As well, programs saved in the currently connected PLC can be transferred to the
personal computer, decompiled, and then executed to confirm the operation status.
The monitor offers the following functions.

Allows you to confirm the operation status of a program in real-time using the
ladder monitor, timing charts, etc.

Changes the operation mode of the PLC.

Allows you to operate input contacts on the monitor screen by disabling the input
refresh and the output. (Visual KV and KV-300 only)

Easily changes the preset values and current values of timers, counters and
devices.

Changes the current values of devices all at once by specifying the range.

Returns some devices to the default values.

4.1.2

2-134

Restrictions in the monitor

After the monitor is stopped, never disconnect the PLC and connect another PLC
while the monitor window is displayed. If you do this, the contents of the ladder
monitor on the monitor may be different from the contents of the ladder program
in PLC, and the program may not operate correctly.

Write is disabled in the KV-10R(W)/T(W), KV-16R(W)/T(W), KV-24R(W)/T(W),


and KV-40R(W)/T(W)/80R(W)/T(W) while a program is running.

Minimized windows are not monitored. (The operation speed becomes slow if
there are many devices to be monitored. To prevent this, it is recommended that
you minimize or close the windows which do not need to be monitored.)

When the entire monitor window is minimized, the monitor is stopped. When
performing monitoring again, select "Start Monitor" from the menu or click the
button.

Timing charts in the registration monitor are not actuated by a scan on the PLC
side.

Up to 1000 comments can be transferred. (Visual KV and KV-300 only)

When "Transfer comment" is specified, comments are always transferred even


when the program has no change. (Visual KV and KV-300 only)

Chapter 4 Monitor

4.1.3

Precautions for communication

Connect the PLC to the personal computer with the connection cable, and
confirm that the serial port of the monitor is correctly connected before starting up
the monitor.
If it is not correctly set, the error message "Check connection cable with the
PLC." is displayed when the monitor is started up, and monitoring is disabled.
The initial preset values of the serial port are "COM port: No. 1" and "Baud rate:
AUTO". When using any other setting, read the description in "4.2 Communicating with the PLC" ( p. 2-136), and then change the setting.

Never disconnect the connection cable from the PLC while monitoring is being
performed. If you do this, a communication error may occur or the system may
be reset.

Never perform communication in a location with excessive noise. A communication error may occur.

Never disconnect the connection cable or abort communication while a program


is being written, as programs saved in the Visual KV or the conventional KV will
be deleted.

If communication errors occur often, set the baud rate (communication speed) to
a lower value.

2-135

14

Chapter 4 Monitor

4.2

Communicating with the PLC


This section describes how to transfer ladder programs created using the editor to
the PLC and how to transfer programs from the PLC.

4.2.1

Setting the PLC communication parameters

File Communication Setup Set PLC Communication Parameters

Before communicating with the PLC, the COM port and the baud rate (communication speed) on the personal computer connected to the PLC should be set.
To set these parameters, open the monitor from the editor.
1. Select "File", "Communication Setup" and "Set PLC Communication Parameters"
from the menu on the editor screen.
The monitor is displayed.

2. Select "Serial Port" from the monitors "Settings" menu.

The "Set Communication Parameters" dialog box is displayed.


For the setting procedure, refer to "Setting the serial port" below.

3. When the communication port is set, the monitor mode is automatically selected.
button.
To continue edits, select "Editor" from the "File" menu or click the

Setting the serial port


Settings Serial Port

To set the serial port, perform the following procedure while the monitor is stopped
(while communication is not being performed).
1. Select "Serial Port" from the "Settings" menu.

The "Set Communication Parameters" dialog box is displayed.

2. Set the COM port and the baud rate (communication speed) to be used.

COM Port

Select the COM port number connected to the cable. The initial value is
"COM1". "COM port" refers to a serial port, and the RS-232C interface is
used for communication. Only one COM port may be provided in some
personal computers.

Baud Rate

Select the baud rate from "AUTO", "9600", "19200" and "38400" (some of
them may not be available in some personal computers). The default value
is "AUTO". "Baud rate" refers to the communication speed, and indicates the
number of bits which can be transferred in a second. As the baud rate value
becomes larger, communication is performed at a higher speed. Normally
"AUTO" should be selected.

3. Click the [OK] button to register the setting. To cancel the setting, click the
[Cancel] button.

2-136

Chapter 4 Monitor

Setting the machine number

KV-300 Series Only

Set Set Machine Number

The Ladder Builder for KV can specify the station number of two or more KV-L2
units connected in the multi-drop method so that one personal computer can transfer
programs to and monitor programs in two or more KV-300 units.
To set the machine number, perform the following procedure while the monitor is
stopped (while communication is not being performed).
Station No.

F (when port 1 is used)


0 (when port 2 is used)

LADDER
BUILDER for KV

Port 1: RS-232C

14
Port 2: RS-422A

RS-232C/RS-422A
converter

1. Select Set Machine Number from the Settings menu.

The Set Machine Number dialog box is displayed.

2. Set the machine number of the communication destination KV-L2.

The machine number refers to the number set by the station number setting
switch on the KV-L2 unit.

Refer to the Chapter 7 KV-L2 Serial Interface Module on page 1-239.

3. Click the [OK] button to register the setting. To cancel the setting, click the
[Cancel] button.

2-137

Chapter 4 Monitor

4.2.2

Setting the comment transfer

KV-300 and Visual KV Series


Only
File Communication Setup Set Comment Transfer
Set the comment range to be transferred to the PLC.
Note 1: Make sure to set the comment range when comments are transferred along
with programs to the PLC.
Note 2: Comments can be transferred to the KV-300 and Visual KV Series only.
Comments cannot be transferred to the KV-10R(W)/T(W), KV-16R(W)/T(W), KV24R(W)/T(W) and KV-40R(W)/T(W)/80R(W)/T(W).
Note 3: Up to 1,000 comments can be transferred. When more than 1,000 comments are set, 1,000 comments are transferred from the top of the device list.
To set the comment range to be transferred, perform the following procedure.

1. Select "File", "Communication Setup" and "Set Comment Transfer".

The "Set Comment Write Range" dialog box is displayed.

2. Enter the range to be transferred for each device.

When the [Auto Setup] button is clicked, all the registered comments are selected.

3. To register the setting and close the dialog box, click the [OK] button. To cancel
the setting, click the [Cancel] button.

2-138

Chapter 4 Monitor

4.3

Starting up and Exiting from the Monitor


This section describes how to start up the monitor, how to view the screen displayed
and how to use the monitor functions.

4.3.1

Operating procedures for startup and exit

Transfer programs from the PLC and starting them up


File Monitor PLC Monitor [Ctrl] + [F1]

A new window can be created, a ladder program saved in the PLC can be transferred to the personal computer and deconverted, and then a ladder drawing can be
displayed and monitored.
Make sure that the PLC is correctly connected, and then perform the following
procedure using the editor.
Note: When using the monitor for the first time, ensure that the PLC communication
parameters are correctly set.
Refer to "4.2.1 Setting the PLC communication parameters" on page 2-136.

To transfer a program from the PLC and start up the monitor, perform the following
procedure.
1. Select "File", "Monitor" and "Monitor PLC" from the editor menu.
2. The transfer status of the program from the PLC is indicated on the graph.

3. When a transfer ends normally, the monitor is automatically started up.

Transferring programs
File Monitor Compile Transfer Monitor (Ctrl + F8)

Programs created using the editor can be compiled into machine code, and then
transferred to the program memory area of the PLC.
Connect the PLC to the personal computer before starting the transfer.
To transfer a program, perform the following procedure.
1. Select the ladder diagram of the program to be transferred as the current window.

2-139

14

Chapter 4 Monitor

2. Select "File", "Monitor" and "Convert Transfer Monitor" from the menu, or
button.
click the

The ladder program created by the editor is converted.


The monitor window is displayed.
The "Transfer Program" dialog box is displayed.

Note 1: Write is not performed when there is no difference between the program
saved in the PLC and the program transferred.
Note 2: If conversion is not performed normally, the message "Conversion error
exists. Data cant be transferred." is displayed. When the [OK] button is clicked, the
error list is displayed. Correct the cause of error, and then transfer the program
again.
Note 3: When the code check is specified, the message "Reverse conversion error"
is displayed for the ladder containing a deconversion error. When the [OK] button is
clicked, the ladder is transferred to the PLC. However, the transferred program
cannot be read. Correct the cause of error, and then transfer the program again.
H-3 Programs which cannot be decompiled (p. 2-203)

WARNING

If a program is written while running, serious danger may be generated depending on the status of the control equipment connected to the PLC. Pay
careful attention.
3. The program is transferred to the PLC, and the write status is indicated on the
graph.

4. When a transfer ends normally, the monitor is automatically started up.

2-140

Chapter 4 Monitor

Reading programs
File Monitor Read Program from PLC

Programs which have been transferred to the PLC can be decompiled, and then
read in the editor.
Connect the PLC to the personal computer before starting to read.
To read a program, perform the following procedure.
1. Select the window from which a PLC program is to be read as the current window on the editor screen.
2. Select "File", "Monitor" and "Read Program from PLC" from the menu, or click the
button.

The program is decompiled.

3. The transfer status of the program from the PLC is displayed on the graph.

The program is read from the PLC.


When contact comments are transferred from the KV-300, they are also read.

Verifying against the PLC programs


File Monitor Verify against PLC Program

The program in the editor can be verified against the program currently saved in the
PLC memory.
Connect the PLC to the personal computer before starting verification.
To perform verification, perform the following procedure.
1. Select "File", "Monitor" and "Verify against PLC Program" from the menu on the
editor screen.

The monitor screen is displayed, the program currently saved in the PLC is
transferred, and then the editor screen is automatically displayed again.

2. When no difference is detected during verification, the message "Verify completed." is displayed.

Click the [OK] button.

3. When a difference is detected during verification, the message "Verify error" is


displayed.

Click the [OK] button to display the error list.

2-141

14

Chapter 4 Monitor

Editing devices in offline mode


File Monitor Edit Offline Device

Specified devices can be read all at once from the PLC by specifying the range, and
then can be edited.
1. Select "File", "Monitor" and "Edit Offline Device" from the editor menu.

The monitor is started up in the device setting mode.

2. Select "Change All" from the monitors "File" menu

The change all window is opened.

Refer to "4.6.2 Changing the current values all at once " (p. 2-150).

Note: When the monitor is started up in the device setting mode, the ladder monitor,
registration monitor and monitor all cannot be opened.

Exit procedure
File Editor

You can exit from the monitor and return to the editor.
When switching to the monitor again using the same program, select "File", "Monitor" and "Compile _ Transfer _ Monitor" from the editor menu.

When the program is the same as that saved in the PLC, the monitor is selected
again without transferring the program.

Select "Editor" from the "File" menu, or click the

button.

Note: The Ladder Builder for KV itself cannot be terminated directly from the monitor. To exit from the Ladder Builder for KV, return to the editor, and then select "Exit"
from the editors "File" menu.

2-142

Chapter 4 Monitor

4.3.2

Name and function of each part of the screen


When the monitor is started up, the ladder monitor window of the last edited ladder
program is displayed. If the monitor all window and registration monitor window were
previously displayed, they are also displayed when the monitor is started.
Sample screen
Main window
The entire simulator screen.

Main window title bar


Displays the file name of the ladder
program currently being monitored.
Menu bar
Displays the menu
to execute commands.

Ladder
monitor
window
p. 2-90

Tool bar
Provides buttons to
execute commands.
Only commonly used
commands are
provided as buttons.
Each command can be
executed by clicking
the corresponding
button once.
Dialog bar
Allows you to register
devices, assign device values
and preset values, and reset
timers and counters.

Monitor all
window
p. 2-113
Registration
monitor
window
p. 2-122

Status indication bar


Indicates the currently selected function
and the monitors operating status.

The name and function of each part of each window are described on the pages listed below.
Ladder monitor window

p. 2-90

Monitor all window

p. 2-113

Registration monitor window

p. 2-122

2-143

14

Chapter 4 Monitor

4.4

Ladder Monitor
This section describes the monitor start/stop procedure, the screen displayed while
the monitor is running, the PLC mode setting, etc.

4.4.1

Outline of the ladder monitor


The ladder monitor transfers ladder programs to the PLC, displays the actual PLC
operation in real-time, and offers the following functions.

4
4.4.2

Starts and stops the monitor.

Changes the operation mode (RUN or STOP).

Displays registered comments.

Changes the current values, etc. using the dialog bar.

Displaying the ladder monitor window

File Ladder Monitor

If a displayed ladder diagram is closed, select "Ladder Monitor" from the "File" menu
button.
to display it again, or click the
Note 1: This operation is not typically required because the ladder monitor window
is always displayed when the simulator is started up from the editor.
Note 2: Only one ladder monitor window can be opened at a time.
Note 3: This function is disabled when the ladder window is already open.

4.4.3

PLC error check


A PLC error check is always performed while the monitor is running.
When an error occurs in the PLC, an error message is displayed.

2-144

For error messages and countermeasures, refer to "Appendix A Error Message List" on page 2-156.

Chapter 4 Monitor

4.4.4

Starting the monitor

Monitor Start Monitor [F4]

Communication with the PLC can be started, and the operation status of the PLC
can be displayed on each window.
To start the monitor, perform the following procedure.
Note 1: If a conversion error is present, the monitor cannot be started. Make sure
that the ladder program can be correctly compiled (converted) before starting up the
monitor.
Note 2: When the monitor is started up for the first time, the monitor is automatically
started.
Select "Start Monitor" from the "Monitor" menu, or click the

CAUTION

4.4.5

button (green).

Never disconnect the connection cable to the PLC while the monitor is running. If you do this, a communication error may occur or the personal computer may be reset.

Stopping the monitor

Monitor Stop Monitor [F5]

Communication with the PLC can be stopped.


To stop the monitor, perform the following procedure.
Select "Stop Monitor" from the "Monitor" menu, or click the

button (red).

The monitor is stopped.

When the entire monitor window is minimized, the monitor is automatically


stopped.

2-145

14

Chapter 4 Monitor

4.4.6

Screen displayed while the monitor is running


When the monitor is started, the operation status is displayed on each window. The
status bar provided at the bottom of the monitor screen indicates the operation mode
currently being executed, etc.

Status indication
While the monitor is running or while data is reconstructed in the record reconstruction mode, the PLC mode, scan time, etc. are displayed in the status indication area
on the monitor window.

Status indication area


Communication indicator
Rotates while communication is performed.

PLC mode
Indicates the operation
mode of the PLC.

Scan time
Indicates the scan time in
increments of "0.1 msec".

Registration consumption
quantity
Indicates the monitor registration
consumption quantity of the
current window.

Registration consumption
quantity of entire monitor
Indicates the monitor registration
consumption quantity in the entire
monitor mode.

Caution on monitor registration consumption quantity


As the registration consumption quantity of the entire monitor is smaller, the monitor
speed becomes faster.
If the monitor speed is slow, minimize unnecessary windows.

2-146

Chapter 4 Monitor

4.4.7

Setting the PLC operation mode


Set the operation mode of the conventional KV.
When the monitor is started up for the first time, the PLC mode is selected.
To change the PLC mode, select the desired mode from "PLC Mode" on the menu
or click the button.

Operation (RUN mode)


PLC Mode Run (Shift + F7)

In this mode, a program operates normally.

Stop (STOP mode)


PLC Mode Stop (Shift + F8)

14

In this mode, program execution is stopped.


All the outputs are turned off.

2-147

Chapter 4 Monitor

4.5

Monitor All and Registration Monitor


This section briefly describes the functions of the monitor all and registration monitor. For details, refer to "Chapter 3 Simulator" on page 2-83.

4.5.1

Functions of the monitor all window


Monitor all offers the following functions.

4.5.2

Displays the current value and preset value of all devices, and the ON/OFF
status of the contacts and coils for each device type.

Displays all the registered comments.

Turns on/off bit devices.

Changes the current value, etc. using the dialog bar.

For execution and operating procedures for the monitor all window, refer to "3.4 Monitor All" on
page 2-109.

Functions of the registration monitor


The registration monitor offers the following functions.

Registers up to 40 devices.

Changes the position of registered devices.

Displays the current values of registered devices, and the ON/OFF status of bit
devices and comments.

Displays timing charts for registered devices (both bit devices and word devices).

Turns on/off bit devices.

Changes the current value, etc. using the dialog bar.

For execution and operating procedures for the registration monitor, refer to "3.5 Registration Monitor"
on page 2-119.

Note: Timing charts are not actuated by a scan on the PLC side.
Only one vertical cursor is displayed on timing charts.

2-148

Chapter 4 Monitor

4.6

Monitor Function
This section describes the functions which can be executed by the monitor such as
disabling the input refresh/disabling the output, change all of current values, device
all clear, etc.

4.6.1

Disabling the input refresh/Disabling the output Visual KV and KV-300 Only
A Visual KV and KV-300 are equipped with the input refresh disable function and the
output refresh disable function.

Disabling the input refresh


Monitor Disable Input Refresh

When input refresh is disabled, read (input refresh) of input relays of the PLC is
stopped, and write from the monitor is enabled.
To set the input refresh disable function, select "Disable Input Refresh" from the
"Monitor" menu when the monitor is started.

When this function is selected, a check mark is added.


When this function is selected again, the setting is reset and the check mark is
deleted.

Check mark

If input refresh is disabled, read (input refresh) of input relays of the PLC is dis
abled, and write from the monitor is enabled. The setting status is saved in the PLC.
However, when the PLC operation mode is changed from STOP to RUN or when
the power is turned off and on again, the setting is not saved.

Disabling the output


Monitor Disable Output

When output is disabled, the output status is not updated even if a program is
executed. Select this function when outputs from output relays are not desired.
To set the output refresh disable function, select "Disable Output " from the "Monitor" menu when the monitor is started.

When this function is selected, a check mark is added.


When this function is selected again, the setting is reset and the check mark is
deleted.

Check mark

If output refresh is disabled, write (output) to output relays of the PLC is disabled.
The setting status is saved in the PLC. However, when the PLC operation mode is
changed from STOP to RUN or when the power is turned off and on again, the
setting is not saved.

2-149

14

Chapter 4 Monitor

4.6.2

Changing the current values all at once

File Change All

The specified devices can be read all at once by specifying the range from the PLC.
The current values can then be changed and written to the PLC. In addition, the
setting of the read devices can be saved, and the setting of saved devices can be
read.
Change all can be performed on the change all window displayed when "Change
All" is selected from the "File" menu. Two or more change all windows can be
displayed.
When the devices to be read are specified using the dialog bar and the [Register]
button is clicked, all the specified devices are read to the change all window.
Change all window

Device Range

Specify the device range to be read.

Value

Enter a value.

[Partial Change] button Changes all the contents of the selected device range.
[File Read] button

Reads the text file of the contents of devices saved by change all.

[File Write] button

Saves the contents of devices in the selected range to a text file.

PLC [Write] button

Writes the contents of devices in the selected range to the PLC.

PLC [Read] button

Reads the contents of devices from the PLC.

Device

Indicates the device type and the device number.

Current Value

Indicates the current value of a device.

Comment

Displays a comment if it is registered.

The cursor can be moved between items using the Tab key (forward direction) or
the Tab + Shift keys (reverse direction).

When the [X] button located in the upper right corner of the window is clicked, the
change all window is closed.

When a current value outside the acceptable range is entered, "NG" is displayed.

Note 1: Only one consecutive range can be read to one window. Separate ranges
cannot be read to one window. When reading separate ranges, select "Change All"
from the "File" menu, open a new change all window, specify and register the
desired range using the dialog bar, and then read it.
Note 2: Only the current value can be manipulated for timers/counters.
Note 3: Writing to the PLC requires a longer time than reading from the PLC.

2-150

Chapter 4 Monitor

Reading devices from the PLC


1. Enter the device range to be read into "Device Range", or specify the range by
dragging using the mouse.
2. Click the PLC [Read] button.

The specified device data is read from the PLC, and displayed in the window.

While in this state, the attribute (radix, bit count, comment) can be changed using
the dialog bar.

Refer to "Changing the current value/preset value/attribute" on page 2-118.

Writing devices to the PLC


1. Enter the device range to be written into "Device Range", or specify the range by
dragging using the mouse.
2. Click the PLC [Write] button.

The specified device data is written to the PLC.

Note: Only one consecutive range can be written at a time. Separate ranges cannot
be written at the same time.

Saving/reading devices
The setting of devices read from the PLC can be saved to a file. The setting of
devices saved in a file can be read.
Saving devices to a file
1. Select the change all window to be saved as the current window.
2. Select "Save Window As" from the "File" menu, or click the

button.

The "Save Window As" dialog box is displayed.

2-151

14

Chapter 4 Monitor
3. Specify the folder (directory) and file name to which data is to be saved.

Folder (directory)

Select the folder (directory) in which the file is to be saved.


The current folder (directory) is selected as the default.

File Name

Enter the file name using up to 8 letters and numbers.


The extension is set to "kdv", and should not be changed.

Note: When data is already saved in a file and you want to save new data with the
same file name, select "Save" from the "File" menu. If you do this, the original data
will be erased because the existing file is overwritten by the new file.
How to print out device contents lists
To print out device contents, perform the following procedure.
1. Specify the device range to be printed out in the change all window. Click the
[File Read] button.
The "Save" dialog box is displayed. Enter the file name.
2. Read the change all text file (*.txt) saved in step 1 that is to be printed out using
the Windows memo, editor or word processor software.
(The file is saved in text format. Be sure to select text format when opening the
file in the word processor software.)
3. Print out the file from the software used to read the file.

2-152

A device list is printed out.

Chapter 4 Monitor
Reading devices from a file
1. Select "Open Window" from the "File" menu

The "Open" dialog box is displayed.

2. Click the

button of "File Type", and select "Change All (*.kdv)".

3. Specify the folder (directory) and file name in which the file to be read is saved.

14

Folder (directory)

Select the folder (directory) in which the file is to be read is saved.


The current folder (directory) is selected as the default.

File Name

Enter the file name to be read.

File Type

Select "Change All (*.kdv)" as the file type to be read.

4. Click the [OK] button.

The specified file is read, and the change all window is opened.

2-153

Chapter 4 Monitor

4.6.3

Device all clear


Devices on the PLC can be initialized.

Initializing devices
Settings Device All Clear DM All Clear
Latching Relay All Clear
Counter All Clear

To initialize the device setting, perform the following procedure.


1. Select "Device All Clear" from the "Settings" menu, and then specify the devices
to be initialized.
2. A message to confirm clear is displayed.
To clear data memory, click the [Yes] button. To cancel execution of clear, click
the [No] button.

If the PLC operation mode is set to "RUN" when devices other than data memory
are cleared, the message "Set STOP and execute?" is displayed.

When the PLC is set to RUN mode while "All Clear" is executed (below).

When the PLC is set to RUN mode while "All Clear" is executed
If the PLC operation mode is set to "RUN" when devices other than data memory
are cleared, the message "Set STOP and execute?" is displayed.
To select the STOP mode and then execute all clear, click the [Yes] button. To
cancel execution of all clear, click the [No] button.

2-154

Appendices
Appendix A
A-1
A-2
A-3
A-4
A-5
A-6
A-7
A-8
A-9

Error Message List ....................................................................


System errors ................................................................................
Memory errors ...............................................................................
File errors ......................................................................................
Installation errors ..........................................................................
Errors that occur in the editor ........................................................
Errors that occur in the monitor/simulator .....................................
Communication errors (displayed in the monitor) .........................
PLC errors .....................................................................................
Errors that occur during compilation .............................................

2-156
2-156
2-156
2-157
2-157
2-158
2-159
2-159
2-160
2-161

Appendix B
B-1
B-2
B-3
B-4

Instruction List ...........................................................................


Basic instructions ..........................................................................
Application instructions .................................................................
Arithmetic instructions ...................................................................
Interrupt instructions .....................................................................

2-163
2-163
2-164
2-165
2-166

Appendix C Relay No. List ............................................................................. 2-167


C-1
Relays, timers, counters, and memory numbers for each model .. 2-167
Appendix D
D-1
D-2
D-3
D-4
D-5
D-6

Special Utility Relay List ............................................................


Special relays and arithmetic operation flags ...............................
Special utility relays for high-speed counter (0) ............................
Special utility relays for high-speed counter (1) ............................
Other special utility relays .............................................................
Memory switches ..........................................................................
Special memory list .......................................................................

2-168
2-168
2-168
2-169
2-169
2-172
2-172

Appendix E
E-1
E-2
E-3

Devices for KV-10R(W)/T(W) to 80R(W)/T(W), KV-300 ............


Special utility relays ......................................................................
Memory switches ..........................................................................
Special memory list .......................................................................

2-174
2-174
2-176
2-176

Appendix F Sample Program List ................................................................. 2-178


F-1
Description of sample ladder programs ........................................ 2-178
Appendix G
G-1
G-2
G-3

Quick Reference .........................................................................


Editor .............................................................................................
Simulator .......................................................................................
Monitor ..........................................................................................

2-180
2-180
2-188
2-195

Appendix H
H-1
H-2
H-3

Notes for Programming .............................................................


Circuits that must be modified .......................................................
Precautions for programming ........................................................
Programs which cannot be decompiled ........................................

2-201
2-201
2-202
2-203

Appendix I

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

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

Appendices

Appendix A

Error Message List


This section describes error messages displayed during operation and the countermeasures to be taken when an error message is displayed.

A-1

System errors
A system error message is displayed when the entire system (including Windows)
becomes unstable.

Appendices

When a system error message is displayed, save required files immediately,


exit from the Ladder Builder for KV, and then restart Windows.
If system errors occur frequently, contact our sales representative.
Error message

Error message

Cant open document.

Cant release machine code memory.

Cant obtain font.

Jump failed.

Cant create window.

ClrList execution error.

Start up from Editor.

AddlList execution error.

Cant open window which should exist.

GetList execution error.

Initialize window failed.

Program is empty.

Cant obtain information on window.

Specification of list type is illegal.

Monitor handle not registered.

Position of writing line is illegal.

Simulator handle not registered.

Position of writing row is illegal.

Cant obtain information on symbol.

Data on starting line of display is abnormal.

Ladder data error

Cant find program to be deleted.

Write cell data failed.

Contents of line cut buffer is abnormal.

Read cell data failed.

Error obtaining Program Information.

Content of LDKPRG.DLL is illegal.

Reverse conversion failed.

Content of LCK.DLL is illegal.

Change failed.

Content of KVCOM.DLL is illegal.

Obtain comment failed.

Obtain device context failed.

Invalid comment area.

Write device failed.

Not enough memory for macro information.

Device information list access error.

Illegal Element.

Obtain machine code failed.

A-2

Memory errors
A memory error message is displayed when Windows does not have enough
memory.
When a memory error is displayed, exit from other applications that are open,
or increase the amount of memory.
Error message

Error message

Not enough memory.

Not Enough Memory.


Quit other applications and restart.

Error Obtaining Memory.


Global Ladder Line Replication Error
Cant allocate memory.

2-156

Cant register new program with


LDKPRG.DLL.

Appendices

A-3

File errors
A file error is displayed when a file is damaged.

When a file error is displayed, check the disk using "SCANDISK", and then restore
the file if an error is detected. Reinstall the Ladder Builder for KV.
Error messages displayed in the editor are shown below.
Error message

Error message

Error [file name]: Read ladder diagram file failed.

Cant open ladder diagram file.


Cant open text file.

Error [file name]: Write file failed.

Cant open comment file.

Error [file name]: Read text file failed.

Content of LDKPRG.DLL is illegal.


Content of LCK.DLL is illegal.

Error [file name]: Write text file failed.

Content of KVCOM.DLL is illegal.

Appendices

Error [file name]: Read file failed.

Error [file name]: Read comment file failed.

A-4

Installation errors
An installation error is displayed when the target file does not exist in the appropriate
location. The target file may have been deleted from the installation destination
folder (directory).

When an installation error message is displayed, reinstall the Ladder Builder for KV.

Error message

Error message

Cant Load LDKPRG.DLL.

Error LBK.KSU: Read text file failed.

Cant Load LCK.DLL.


Cant Load KVCOM.DLL.

Error LBK.EMS: Read text file failed.

Monitor startup failed.


Simulator startup failed.

2-157

Appendices

A-5

Errors that occur in the editor


Error messages displayed in the editor are shown below.
Error message
Reverse Compilation Error.

Compilation Error.

Appendices

Specified label
already used.
Write/Develop
macro failed.

Cause
A grammar error occurred
when a program was read from
the KV and converted into a
ladder diagram, or when a
ladder diagram was converted
while the code check system
setting was selected.
A grammar error occurred
when edit was terminated.

The specified label has already


been assigned to another
device.
An error occurred while a
macro was being written and
developed.

Program is too
large.

The program is too large to be


edited.

No. of instruction
word or operand is
illegal.

Too many or too few operands


have been entered.

Contact name is
illegal.
Temporary device
cant be used for
TMR, TMH and
TMS.
Temporary device
cant be used for C.
Temporary device
cant be used for
CTH.

An unaccepted
device is specified.
These devices cannot be used
as temporary devices.

Countermeasures
Display the error list [ Error
display (p. 2-76)], confirm the
contents of the error, and then
correct the program
[ H-3 Programs which cannot be
decompiled (p. 2-203)].
Display the error list [ Error
display (p. 2-76)], confirm the
contents of the error, and then
correct the program.
Specify a different label for each
device.
Confirm the contents of temporary
devices. Confirm that the limitation
in the editor was satisfied while the
macro was written and developed.
The maximum number of lines
allowed in a ladder program is
9999.
Confirm the format of the
corresponding instruction using
the manual or the help function.

Do not use them as temporary


devices.

Temporary device
cant be used for
CTC.
Temporary device
cant be used for
UDC.
Illegal operand.

The mnemonic of an instruction


Illegal first operand. word is incorrect.
Illegal second
operand.
Cant overwrite on
comment ladder
line.
Illegal Comment
File.
Illegal file format.
Cancel reading.
This file is not
found in [File
Names]. Check for
directory and file
name and input
correct name.

2-158

Confirm the specifications of the


instruction using the manual or the
help function.

A file may be damaged.

Use "SCANDISK" to check for disk


errors.

The file set in the automatic file


read function was not found.

Check whether the corresponding


file exists in the displayed location,
and set it again.

Appendices

A-6

Errors that occur in the monitor/simulator


The error message displayed in the monitor/simulator is shown in the table below.
Error message
Cant write scales.
Widen the width
of registration
monitor window.

Countermeasures
Increase the width of the
registration monitor window.

Communication errors (displayed in the monitor)


The error message displayed during communication with the PLC is shown in the
table below.
Error message
Communication
error occurred.
Check for communication setting
and connection
lines.

Cause
An error occurred during
communication.

Unregistered
program

The attempt is made to execute


PLC monitor or to call up or
verify the program in the CPU,
although the KV main unit has
no program.

Countermeasures
Confirm that the personal
computers RS-232C port is
correctly connected to the PLC.
Confirm that the communication
(COM1/2) port and baud rate are
set correctly in "Settings"-"Serial
Port".
Transfer a program to the KV
before making these attempts.

2-159

Appendices

A-7

Cause
Because the width of the
registration monitor window is
too narrow, the specified
number of scales cannot be
drawn.

Appendices

A-8

PLC errors
Error messages displayed when problems occur in a Visual KV or a conventional KV
are shown in the table below.
Error message
Analysis Disabled
Error
System Error
Run Time Error

Cause
An unexpected error occurred
in the KV main unit.

Countermeasures
Turn off power to the KV main
unit, and then turn it on again. If
the same error occurs frequently, contact your nearest
KEYENCE office.

RUN mode is selected while


there is not a program in the
KV main unit.
The cycle time has exceeded
208 ms. (300 ms for KV-300)

Transfer a program to the KV


main unit, and then select RUN
mode.
Change the program so that the
cycle time is shorter.

Memory Error

The contents of the KV main


units memory have been
erased.

Reset the error, and then select


RUN mode.

CALL Instruction
Nest Error

The number of nested levels in


the subroutine exceeds 4.

FOR Instruction
Nest Error

The number of nested levels in


the FOR - NEXT instruction
exceeds 8.

An error occurred when the


program was executed. Check the
program and correct the error.

MPS Instruction
Nest Error

The number of nested levels in


the MPS - MPP instruction
exceeds 8.

Divided by 0
Address Error
Illegal Instruction
Error

Appendices

Watchdog Timer
Error
Program Error

Cycle Time Error

INI Instruction Nest Five or more interrupts occurred Correct the program so that only
Error
at once.
one interrupt occurs at once.

2-160

Appendices

Errors that occur during compilation


Error messages displayed during compilation are shown in the table below.
When this type of error message is displayed, eliminate the cause of the error, and
then perform compilation again.
Error message
Not enough memory.
Abort conversion.
Too many errors.
Abort conversion.
First operand is
unnecessary.
Second operand is
unnecessary.
Third operand is
unnecessary.
First operand form is
illegal.
Second operand
form is illegal.
Third operand form
is illegal.
First operand value
is illegal.
Second operand
value is illegal.
Third operand value
is illegal.
First operand is not
found.
Second operand is
not found.
Third operand is not
found.

Cause
There is not enough memory to
complete the compilation.
Because 100 errors or more
occurred during compilation,
compilation was aborted.
The mnemonic of an instruction
word is incorrect. (This error often
occurs when a file created by a
commercial editor or word processor is opened and the mnemonic list
is edited.)

Countermeasures
Confirm that there is enough memory
and hard disk space.
Correct each error.

Confirm the specifications of the


instruction using the manual or the
help function.

Appendices

A-9

Instruction is
repeatedly used.

An instruction which can be used


only once has been used two or
more times.

Use the instruction only once.

Operand is repeatedly used.

An operand which can be used only


once has been used two or more
times.
An unusable instruction is used in
an interrupt program.

Use the operand only once.

Nested levels in
subroutine is too many.
Undefined subroutine
exists.

A subroutine or an interrupt program


is described before the END
instruction.
The number of nested levels in the
subroutine exceeds 4.
The program is terminated without a
called subroutine being defined.

Describe the program between the


END instruction and the ENDH
instruction.
Change the program so that the
number of nested levels is 4 or less.
Describe the subroutine program
between the END instruction and the
ENDH instruction.

Subroutine No. is
repeatedly used.

Two or more subroutines with the


same number are defined.

Unusable in interrupt
program.
Instruction position
error.

Nested levels of
paired instruction is
too many.
Usage of paired
instruction is incorrect.
Parallel connection is
used in STG instruction.
END instruction is not
found.
ENDH instruction is
not found.
STG instruction
position error.
SFT instruction
operand error.

Change the program so that another


method is used.

The number assigned to each


subroutine should be different.
Change the program.
The number of nested levels of
Change the program so that the
paired instructions exceeds the
number of nested levels is within the
maximum number.
maximum.
An instruction to be used as a pair is Change the program so that it is used
not used as a pair.
as a pair.
The STG instruction contains an
OR (parallel) connected block.
The END instruction is not found in
the program before the ENDH
instruction.
The ENDH instruction is not found
in the last line of the program.
The STG instruction is not present
at the head of a block.
The SFT instruction operand is
outside the available range.

Never use an OR (parallel) connection


in the STG instruction.
Include the END instruction in the
program before the ENDH instruction.
Include the ENDH instruction in the last
line of the program.
Include the STG instruction at the
head of a block.
Include the SFT instruction within the
available range.

2-161

Appendices
Error message
Corresponding CTH
instruction is not
found.

Cause
Although the CTC instruction is
used, the corresponding CTH
instruction is not included in the
program.

Countermeasures
Include the corresponding CTH
instruction in the program before the
END instruction.

Corresponding
instruction is
undefined.

Although contacts of timers and


counters are used, the corresponding instructions are not present in
the program.
There are unusable instructions
included in a subroutine.
The mnemonic of an instruction
word is incorrect. (This error often
occurs when a file created by a
commercial editor or word processor is opened and the mnemonic list
is edited.)

Include the corresponding instructions in the program before the END


instruction.

Unusable in subroutine.
Model code is
incorrect.
First line is illegal.
Mnemonic is illegal.

Appendices

First operand is
illegal.
Second operand is
illegal.
Third operand is
illegal.
After mnemonic is
unnecessary.
After first operand is
unnecessary.
After second operand
is unnecessary.
After third operand is
unnecessary.
Code file was not
generated.
Ladder diagram cant
be drawn.
Number of instructions is too large.
Previous connecting
block is not found.
Following connecting
block is not found.
Instructions are not
paired.
Usage of CON
instruction is incorrect.
Connection of multiple
input elements is illegal.
Output elements cant be
connected in parallel.
Input element connected
to output line.
Output element
connected to bus.
Termination element not
connected to output line.
Block has too long
parallel connection.

Lines in block exceeds


maximum number.
No connection.

Because instructions are sorted


incorrectly, they cannot be
compiled into a ladder diagram.

Confirm the specifications of the


instructions, and correct the program.

Because there are too many


instructions in a parallel connected
block, it cannot be compiled into a
ladder diagram.
A block in the ladder diagram
exceeds 100 lines.

Change the circuit to reduce the


number of instructions in the parallel
connected block.

An instruction symbol does not exist


on a path between buses.

Include an instruction symbol on a path


between buses.

Illegal short-circuiting. Two points are short-circuited when


they should not be.
Blocks are not correctly parallel
Illegal parallel
connected.
connection.
The instruction symbol connection
Illegal connection.
method is incorrect.

2-162

Change the program and use another


method.
Confirm the specifications of the
instruction using the manual or the
help function.

Change the program so that no more


than 100 lines are included per block.

Never short-circuit them.


Change the circuit so that they are
correctly parallel connected.
Change the circuit so that the symbol
is correctly connected.

Appendices

Appendix B

Instruction List
This appendix includes a list of instructions and an outline of their processes. For
details, refer to Chapter 2, "Instructions" on page 3-33.

Basic instructions
Instruction name

Mnemonic

Outline of process

Load

LD

Connects N.O. contact to bus.

Load Bar

LDB

Connects N.C. contact to bus.

Out

OUT

Outputs ON/OFF status of input to relay coil.

Out Bar

OUB

Outputs inverted ON/OFF status of input to relay coil.

And

AND

Connects N.O. contact in series.

And Bar

ANB

Connects N.C. contact in series.

Or

OR

Connects N.O. contact in parallel.

Or Bar

ORB

Connects N.C. contact in parallel.

And Load

ANL

Connects in series the blocks made of one or more


contacts.

Or Load

ORL

Connects in parallel the blocks made of one or more


contacts.

Set

SET

Turns ON specified relay forcibly, and enables it to


remain ON.

Reset

RES

Turns OFF specified relay forcibly.

Timer

TMR

Sets an on-delay timer that counts down in 0.1 s


increments.

High-Speed Timer

TMH

Sets an on-delay timer that counts down in 0.01 s


increments.

High-Speed 1-ms
Timer

TMS

Sets an on-delay timer that counts down in 0.001 s


increments.

Counter

Sets an up counter.

Up-Down Counter

UDC

Sets an up-down counter.

Differentiate Up

DIFU

Detects rising edge of input signal and turns ON


specified relay for first scan time only.

Differentiate Down

DIFD

Detects falling edge of input signal and turns ON


specified relay for first scan time only.

Keep

KEEP

Turns ON specified relay when SET input relay turns


ON, and enables this relay to remain ON. Turns OFF
specified relay when RESET input relay turns ON.

Shift

SFT

Sets a shift register.

High Speed

HSP

Shortens time constant of specified input relay to be


ready for high speed.

Master Control

MC

Selects ON/OFF status of relays, timers or counters


set before MCR instruction.

Master Control
Reset

MCR

Ends the execution of MC instruction.

Memory Switch

MEMSW

Sets memory switches.

No Operation

NOP

Performs no operation.

End

END

Indicates end of each routine in the program.

End Hi

ENDH

Indicates end of entire program.

2-163

Appendices

B-1

Appendices

Application instructions

Appendices

B-2

2-164

Instruction name

Mnemonic

Outline of process

Wait ON

W-ON

Turns ON output operand relay when input operand


relay/timer/counter turns ON.

Wait OFF

W-OFF

Turns ON output operand relay when input operand


relay/timer/counter turns OFF.

Wait Up Edge

W-UE

Turns ON output operand relay at rising edge of input


operand relay/timer/counter.

Wait Down Edge

W-DE

Turns ON output operand relay at falling edge of input


operand relay/timer/counter.

Stage

STG

Executes instructions in STG block when operand relay


is ON.

Connect

CON

Represents series connection after output status.

Push

MPS

Stores input status and arithmetic flag status.

Read

MRD

Reads input status and arithmetic flag status stored


with Push (MPS).

Pop

MPP

Reads input status and arithmetic flag status stored


with Push (MPS), and clears memory.

Jump

JMP

Turns current stage OFF, and then transfers execution


to another stage.

End Stage

ENDS

Turns OFF relay of current stage.

Step

STP

Executes instructions between STP and STE when


operand relay is ON.

Step End

STE

Used with STP as a pair to make a program step.

Interval Timer

ITVL

Measures pulse-to-pulse interval or pulse width in


specified mode.

8-bit (16-bit) High


Speed Counter

CTH

Functions as a general-purpose high-speed counter


with a response frequency of 10 kHz.

8-bit (16-bit) High


Speed Counter

CTC

Comparator: Compares preset value with current value


of CTH0, and turns ON when they become equivalent.
It is also used as an interrupt source.

Subroutine Call

CALL

Executes subroutine with the specified number.

Subroutine Entry

SBN

Represents beginning of subroutine.

Subroutine Return

RET

Represents end of subroutine.

Repeat Start

FOR

Executes program range between FOR and NEXT by


the number of times specified by operands.

Repeat End

NEXT

Represents end of repetition.

16-Key Input

HKEY

Reads hexadecimal key data on time-sharing basis,


and outputs these data to special utility relays 2900 to
2915.

Appendices

Arithmetic instructions
Instruction name

Mnemonic

Outline of process

Data Memory Write DW

Writes constant directly into data memory.

Trimmer Setting

TMIN
@TMIN

Converts rotation angle of trimmer into a number from


0 to 249, and inputs it back to internal register.

Load A

LDA
@LDA

Inputs value specified by operand to internal register.


* Inputs current value to internal register when timer/
counter is specified by operand.

Store A

STA
@STA

Transfers content of internal register to destination


specified by operand.
* Preset value is changed when timer/counter is
specified by operand.

Compare

CMP
@CMP

Compares content of internal register with value


specified by operand, and outputs result to 2009 to
2011.

Add

ADD
@ADD

Adds value specified by operand to content of internal


register, and inputs result back to same internal
register.

Subtract

SUB
@SUB

Subtracts value specified by operand from content of


internal register, and inputs result back to same internal
register.

Multiply

MUL
@MUL

Multiplies content of internal register by value specified


by operand, and inputs result back to same internal
register.

Divide

DIV
@DIV

Divides content of internal register by value specified


by operand, and inputs result back to same internal
register.

And A

ANDA
@ANDA

ANDs content of internal register and value specified


by operand for each of 16 bits, and inputs result back
to same internal register.

Or A

ORA
@ORA

ORs content of internal register and value specified by


operand for each of 16 bits, and inputs result back to
same internal register.

Exclusive Or A

EORA
@EORA

EXCLUSIVE ORs content of internal register and value


specified by operand for each of 16 bits, and inputs
result back to same internal register.

Shift Right A

SRA
@SRA

Moves content of internal register serially right by value


specified by operand.

Shift Left A

SLA
@SLA

Moves content of internal register serially left by value


specified by operand.

Rotate Right A

RRA
@RRA

Rotates content of internal register clockwise by value


specified by operand.

Rotate Left A

RLA
@RLA

Rotates content of internal register counterclockwise by


value specified by operand.

Complement

COM
@COM

Inverts content of each bit in internal register.

Increment Memory

INC
@INC

Adds 1 to content of data memory specified by


operand.

Decrement
Memory

DEC
@DEC

Subtracts 1 from content of data memory specified by


operand.

Multiplexer

MPX
@MPX

Converts one digit data of internal register specified by


operand into 16-bit data.

Demultiplexer

DMX
@DMX

Converts into a value in position of most significant bit


in internal register.

2-165

Appendices

B-3

Appendices

Appendices

B-4

Instruction name

Mnemonic

Outline of process

Transfer BCD

TBCD
@TBCD

Converts content of internal register into 4-digit BCD


data.

Transfer BIN

TBIN
@TBIN

Converts content of internal register into 16-bit binary


data.

ASCII Convert

ASC
@ASC

Converts content (2 digits) of lower order byte of


internal register into 2-digit ASCII code.

Reverse ASCII
Convert

RASC
@RASC

Converts 2-digit ASCII code into 1-byte data


representing 2-digit number.

Square Root

ROOT
@ROOT

Takes square root of 32-bit data (TM00: higher order


byte, internal register: lower order byte), and inputs
result back to same internal register.

Differentiation

@xxxx

Executes instructions only at rising edge of input to


input relay.

Instruction name

Mnemonic

Outline of process

Interrupt Disabled

DI

Disables execution of diversified interrupt programs.

Interrupt Enabled

EI

Enables execution of diversified interrupt programs.

Interrupt

INT

Executes interrupt between INT and RETI at rising


edge of inputs 0000 to 0002.

Interrupt instructions

Executes interrupts between INT and RETI at rising or


falling edge or input 0003 (Rising or falling edge can
be selected by ON/OFF of 2206). Transfers current
value up to CTH0 to TM30.
Executes interrupts up to RETI when comparison
result by comparator is matched.
Return Interrupt

2-166

RETI

Represents end of interrupts.

Appendices

Appendix C

Relays, timers, counters, and memory numbers for each model


KV-10
R(W)/T(W)

KV-16
R(W)/T(W)

KV-24
R(W)/T(W)

KV-40/80
R(W)/T(W)

KV-300

KV-10 (16) KV-24 (40)


AR/AT/DR/DT AR/AT/DR/DT

Basic input relay 0000 to 0005 0000 to 0009 0000 to 0015 KV-40
0000 to 0009
R(W)/T(W):
0000 to 0107
KV-80
R(W)/T(W):
0000 to 0125

KV-10
AR/AT/DR/DT:
0000 to 0005
KV-16
AR/AT/DR/DT:
0000 to 0009

Extended input
relay

0100 to 0415 0100 to 0415 0100 to 0415 KV-40


R(W)/T(W):
0200 to 0415
KV-80R
(W)/T(W):
0300 to 0415

0100 to 0415 KV-24


AR/AT/DR/DT:
0100 to 0415
KV-40
AR/AT/DR/DT:
0200 to 0415

0500 to 0503 0500 to 0505 0500 to 0507 KV-40


0500 to 0503
R(W)/T(W):
0500 to 0507
0600 to 0607
KV-80
R(W)/T(W):
0500 to 0615

KV-10
AR/AT/DR/DT:
0500 to 0503
KV-16
AR/AT/DR/DT:
0500 to 0505

Basic output
relay

Extended output 0600 to 0915 0600 to 0915 0600 to 0915 0700 to 0915
relay

KV-24
AR/AT/DR/DT:
0000 to 0015
KV-40
AR/AT/DR/DT:
0000 to 0107

KV-24
AR/AT/DR/DT:
0500 to 0507
KV-40
AR/AT/DR/DT:
0500 to 0515

0600 to 0915 0600 to 0915

Internal utility
relay

1000 to 1915 1000 to 1915 1000 to 1915 1000 to 1915 1000 to 1915 1000 to 1915 1000 to 1915
3000 to 6915 3000 to 6915 3000 to 6915 3000 to 15915 3000 to 15915

Special utility
relay

2000 to 2915 2000 to 2915 2000 to 2915 2000 to 2915 2000 to 2915 2000 to 2915 2000 to 2915

External I/O relay

7000 to 17915

Timer/counter

T/C000 to 063 T/C000 to 063 T/C000 to 119 T/C000 to 119 T/C000 to 249 T/C000 to 249 T/C000 to 249

High-speed
timer/counter

CTH0 to 1

CTH0 to 1

CTH0 to 1

CTH0 to 1

CTH0 to 1

CTH0 to 1

CTH0 to 1

High-speed
comparator

CTC0 to 3

CTC0 to 3

CTC0 to 3

CTC0 to 3

CTC0 to 3

CTC0 to 3

CTC0 to 3

Data memory

DM0 to 0999 DM0 to 0999 DM0 to 1999 DM0 to 1999 DM0 to 9999 DM0 to 1999 DM0 to 1999

Temporary
memory

TM0 to 31

TM0 to 31

TM0 to 31

TM0 to 31

TM0 to 31

TM0 to 31

TM0 to 31

2-167

Appendices

C-1

Relay No. List

Appendices

Appendix D
D-1

Special Utility Relay List

Visual KV Series Only

Special relays and arithmetic operation flags


Relay No.
Always ON.

2003*

Always OFF.

2004*

0.01-s clock pulse (duty cycle: 50%)

2005*

0.1-s clock pulse (duty cycle: 50%)

2006*

1.0-s clock pulse (duty cycle: 50%)

2007*

Remains OFF during first scan after startup.

2008*

2010*

Remains ON during first scan after startup.


Turns ON when result of arithmetic operation is negative or when an
overflow is generated.
Turns ON when result of arithmetic operation is 0.

2011*

Turns ON when result of arithmetic operation is positive.

2012*

Turns ON when an arithmetic operation generates an error.

2009*

Appendices

Function

2002*

* Read-only relay.

D-2

Special utility relays for high-speed counter (0)


Relay No.

Function

2100*

Internal clock used only for CTH0 (1 s)

2101*

Internal clock used only for CTH0 (10 s)

2102*

Internal clock used only for CTH0 (100 s)


Automatic clear of CTH0 when comparator CTC0
turns ON.
Prohibits/permits direct output to 0500 when
comparator CTC0 turns ON.
Direct output to 0500 is set to OFF when comparator
CTC0 turns ON.
Direct output to 0500 is set to ON when comparator
CTC0 turns ON.
ON/OFF status of output to 0500 is reversed each
time comparator CTC0 turns ON.
Prohibits/permits direct output to 0500 when
comparator CTC1 turns ON.
Direct output to 0500 is set to OFF when comparator
CTC1 turns ON.
Direct output to 0500 is set to ON when comparator
CTC1 turns ON.
ON/OFF status of output to 0500 is reversed each
time comparator CTC1 turns ON.
Automatic clear of CTH0 when comparator CTC1
turns ON.
Selects multiplication mode for comparator CTH0.
OFF
ON
OFF
ON
OFF: 1 pulse
OFF: x2
ON: x4 ON: 2 pulses

2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114

ON: Cleared
OFF: Not cleared
ON: Prohibited
OFF: Permitted
ON: Set to OFF
OFF: Not set to OFF
ON: Set to ON
OFF: Not set to ON
ON: Reversed
OFF: Not reversed
ON: Prohibited
OFF: Permitted
ON: Set to OFF
OFF: Not set to OFF
ON: Set to ON
FF: Not set to ON
ON: Reversed
OFF: Not reversed
ON: Cleared
OFF: Not cleared

* Read-only relay.

Multiplication
mode
2113
2114

1 pulse

x2

x4

2 pulses

OFF

ON

OFF

ON

OFF

OFF

ON

ON

Note: Never use special utility relays that are not shown above.

2-168

Appendices

D-3

Special utility relays for high-speed counter (1)


Relay No.

Function

2200*

Internal clock used only for CTH1 (1 s)

2201*

Internal clock used only for CTH1 (10 s)

Internal clock used only for CTH1 (100 s)


Automatic clear of CTH1 when comparator CTC2
2203
turns ON.
Prohibits/permits direct output to 0501 when
2204
comparator CTC2 turns ON.
Direct output to 0501 is set to OFF when comparator
2205
CTC2 turns ON.
Direct output to 0501 is set to ON when comparator
2206
CTC2 turns ON.
ON/OFF status of output to 0501 is reversed each
2207
time comparator CTC2 turns ON.
Prohibits/permits direct output to 0501 when
2208
comparator CTC3 turns ON.
Direct output to 0501 is set to OFF when comparator
2209
CTC3 turns ON.
Direct output to 0501 is set to ON when comparator
2210
CTC3 turns ON.
ON/OFF status of output to 0501 is reversed each
2211
time comparator CTC3 turns ON.
Automatic clear of CTH1 when comparator CTC3
2212
turns ON.
Selects multiplication mode for comparator CTH1.
2213
OFF
ON
OFF
ON
2214
OFF: 1 pulse OFF: x2 ON: x4 ON: 2 pulses
* Read-only relay.
Multiplication
mode
2213

1 pulse

2214

ON: Cleared
OFF: Not cleared
ON: Prohibited
OFF: Permitted
ON: Set to OFF
OFF: Not set to OFF
ON: Set to ON
OFF: Not set to ON
ON: Reversed
OFF: Not reversed
ON: Prohibited
OFF: Permitted
ON: Set to OFF
OFF: Not set to OFF
ON: Set to ON
OFF: Not set to ON
ON: Reversed
OFF: Not reversed
ON: Cleared
OFF: Not cleared

x2

x4

2 pulses

OFF

ON

OFF

ON

OFF

OFF

ON

ON

Note: Never use special utility relays that are not shown above.

D-4

Other special utility relays


Relay No.

2305

Function
External outputs disabled
(outputs 0500 to 0915)
External refresh inputs disabled
(inputs 0000 to 0415)
Constant scan time mode
(write preset value in TM29)
Remains ON for one scan when scan time exceeds
preset constant scan time.
Start flag for frequency counter operation.

2306

Specified frequency pulse output

2307
2308

Error flag for specified frequency pulse output


Stops motor driver when turned ON.
Turns ON when motor driver is in operation. Stops motor driver in
emergencies when turned OFF by interrupt instruction.
Starts motor driver when turned ON (detection at rising edge).
Start flag for cam switch operation.
Turns ON when an error occurs in cam switch operation.

2300
2301
2303
2304

2309
2310
2314
2315

ON: Disabled
OFF: Not disabled
ON: Disabled
OFF: Not disabled
ON: Enabled
OFF: Disabled

ON: Enabled
OFF: Disabled

2-169

Appendices

2202*

Appendices
Relay No.
2400
2401
2402
2403
2404
2405
2406
2407
2408

Appendices

2409
2410
2411
2412
2413
2414
2415

2500
2501
2502
2503
2504
2505
2506
2507
2508

2509
2510
2511
2512
2513
2515

2-170

Function
Timing of CTH0 external signal
OFF

External preset

OFF

OFF

not used

ON

At falling edge

ON
OFF

At rising edge

ON
ON

Level

Interrupt polarity of INT


OFF
OFF

At rising edge

OFF
ON

At falling edge

ON
OFF

At rising edge

ON
ON

At both edges

Interrupt polarity of INT1


OFF
OFF

At rising edge

OFF
ON

At falling edge

ON
OFF

At rising edge

ON
ON

At both edges

CTH0 set as ring counter


ON: Set
OFF: Not set
Ignore phase B input when CTH0 is set to no multiplication mode.
ON: Ignore phase B input and always count up.
OFF: Use phase B input as usual.
Timing of CTH1 external preset
OFF

External preset

OFF

OFF

not used

ON

At falling edge

ON
OFF

At rising edge

ON
ON

Level

Interrupt polarity of INT2


OFF
OFF

At rising edge

OFF
ON

At falling edge

ON
OFF

At rising edge

ON
ON

At both edges

Interrupt polarity of INT3


OFF
OFF

At rising edge

OFF
ON

At falling edge

ON
OFF

At rising edge

ON
ON

At both edges

CTH1 set as ring counter


ON: Set
OFF: Not set
Ignore phase B input when CTH1 is set to no multiplication mode.
ON: Ignore phase B input and always count up.
OFF: Use phase B as usual.
Customized switch [F1] on KV-D20 operator interface panel is assigned.
Customized switch [F2] on KV-D20 operator interface panel is assigned.
Customized switch [F3] on KV-D20 operator interface panel is assigned.
Customized switch [F4] on KV-D20 operator interface panel is assigned.
Customized indicator lamp 1 on KV-D20 operator interface panel is
assigned.
Customized indicator lamp 2 on KV-D20 operator interface panel is
assigned.
Customized indicator lamp 3 on KV-D20 operator interface panel is
assigned.
Customized indicator lamp 4 on KV-D20 operator interface panel is
assigned.
Permits change between operator
OFF: Not
mode and device mode of KV-D20
ON: Permitted
permitted
operator interface panel .
Permits the KV-D20 operator interface
OFF: Not
panel to be shifted between operator
ON: Permitted
permitted
mode and system mode.
Specifies the display language for the
ON: Japanese
OFF: English
KV-D20 operator interface panel
Sets the beep for the KV-D20 operator
ON: Use beep
OFF: No beep
interface panel
Reserved for system
Reserved for system
Displays a user message (contents of ON: Display
OFF: Do not
DM1950) in the Access Window
message
display message

Appendices

2609
2610
2611
2612
2613

2712

Function
Input time constant of input expansion unit with relay
Nos. 0100 to 0115
Input time constant of input expansion unit with relay
Nos. 0200 to 0215
Input time constant of input expansion unit with relay
Nos. 0300 to 0315
Input time constant of input expansion unit with relay
Nos. 0400 to 0415
Clearing of input at expansion disconnect

Disconnect error OFF: Normal


ON: Disconnection in connected unit

OFF: 10 ms
ON: 10 s
OFF: 10 ms
ON: 10 s
OFF: 10 ms
ON: 10 s
OFF: 10 ms
ON: 10 s
OFF: Cleared
ON: Not cleared
This area is stored
even when the
operation mode is
changed from
PROGRAM to RUN,
or when the power is
turned off (without
being affected by the
MEMSW instruction).
This area is not
cleared even if the
utility relay All Clear
function is activated.
However, this area is
cleared when an All
Clear is executed
without registering a
program.

2714

Use of high-speed input correction circuit


ON: Used OFF: Not used

2715

ON while cam switch is in operation.

2800

Break signal send to communication port A (remains ON while sending).


Receives text data from communication port A, and remains ON during only
1 scan while receiving text data.
Communication port A text data acceptance error. Remains ON during only
1 scan ON when text data is received while either relay 2801 or relay 2803
is ON.
Communication port A text data receive error
Remains ON during only 1 scan when a text data receive error occurs.
Communication port A text data send start (remains ON during sending.)
Break signal send to communication port B (remains ON while sending).
Receives communication port B text data, and remains ON during only 1
scan while receiving text data.
Communication port B text data acceptance error.
Remains ON during only 1 scan ON when text data is being received while
relay 2806 or relay 2808 is ON.
Communication port B text data receive error
Remains ON during only 1 scan when a text data receive error occurs.
Communication port B text data send start (remains ON during sending.)
Turns ON when an abnormality occurs with backup battery.

2801
2802
2803
2804
2805
2806
2807
2808
2809
2812

2813

Sets input time constant to all inputs in basic module (except inputs used by
HSP instruction).
OFF: Sets input time constant to 10 ms.
ON: Refers to value stored in DM1940, then determines input time constant.

2814
HKEY instruction: Multiple keys are prohibited.
2815
HKEY instruction: Scan is finished.
2900 to 2915 HKEY information storage area.

Note: Never use special utility relays that are not shown above.

2-171

Appendices

Relay No.

Appendices

Memory switches

Appendices

D-5

D-6

bit0

Cancels error when power is ON.

1: Retains
0: Clears them and starts
operation.

bit1

Cancels error message "MEMORY ERASED" when


1: Memory error
value in data memory/counter or latch setting is erased. 0: Clears error and
continues operation.

bit2

Uses latch function of internal utility relays 1000


through 1915.

1: Yes

0: No

bit3

Uses latch function of internal utility relays 3000


through 3915.

1: Yes

0: No

bit4

Uses latch function of internal utility relays 4000


through 4915.

1: Yes

0: No

bit5

Uses latch function of internal utility relays 5000


through 5915.

1: Yes

0: No

bit6

Uses latch function of internal utility relays 6000


through 6915.

1: Yes

0: No

bit9

Clears DM0000 to DM0999 at power-on.

1: Clears

0: Retains

bit10 Clears DM1000 to DM1899 at power-on.

1: Clears

0: Retains

bit11 Switches between 24- and 16-bit comparators


for CTH0.

1: 24-bit

0: 16-bit

bit12 Switches between 24- and 16-bit comparators


for CTH1.

1: 24-bit

0: 16-bit

bit13 Clears values of counter, CTH, and CTC.

1: Clears

0: Retains

bit14 Write-protects program in KV PLC.

1: Yes

0: No

bit15 Read-protects program in KV PLC.

1: Yes

0: No

Special memory list


Temporary memory
TM00

Used for arithmetic operations (DIV/MUL)

Attribute: R/W

TM01

Used for arithmetic operations (DIV)

Attribute: R/W

TM02 to TM27

Can be used by user

Attribute: R/W

TM28

Stores scan time beyond set value while constant scan


time operation is performed.

Attribute: R

TM29

Stores set value of constant scan time operation

Attribute: R/W

TM30

Stores CTC0 value when INT3 interruption is given.

Attribute: R

TM31

Stores measured scan time (mean value of


every 10 scans).

Attribute: R

Attribute R: Read, W: Write


Communication data memory

2-172

DM1000 to DM1099

Stores received text (PORT A)

DM1100 to DM1199

Stores text to be transmitted (PORT A)

DM1200 to DM1299

Stores received text (PORT B)

DM1300 to DM1399

Stores text to be transmitted (PORT B)

Appendices
Data memories for motor drive
Setting range

DM1480

Ramp up-and-down control startup frequency (Hz)

200 to 50000

DM1481

Ramp up-and-down control operating frequency (Hz)

200 to 50000
(value larger than
startup frequency)

DM1482

Ramp up-and-down control acceleration/deceleration


time (ms)

0 to 4000

DM1484

Number of output pulses (lower 16 bits)

0 to 65535
(2 or more when
DM1485 is 0)

DM1485

Number of output pulses (upper 16 bits)

0 to 65535

DM1486

Set value error code

When an error
occurs, a
corresponding error
code 11 to 17 is
stored.

Frequency (Hz)

DM1481
(operation)

DM1485 X #65536 + DM1484


(output pulses)

DM1480
(startup)

DM1482
(acceleration time)

DM1482
Time (ms)
(deceleration time)

2-173

Appendices

Setting contents

Appendices

Appendix E
E-1

Devices for KV-10R(W)/T(W) to 80R(W)/T(W),


KV-300

Special utility relays

Appendices

Special relays and arithmetic flags


Relay No.

Function

2000

Undefined

2001

Undefined

2002

Always ON

2003

Always OFF

2004

0.01 s clock pulse (duty cycle: 50%)

2005

0.1 s clock pulse (duty cycle: 50%)

2006

1.0 s clock pulse (duty cycle: 50%)

2007

OFF for first scan time at startup

2008

ON for first scan time at startup

2009

ON when result of arithmetic operation is negative or an overflow is


generated.

2010

ON when result of arithmetic operation is 0.

2011

ON when result of arithmetic operation is positive.

2012

ON when arithmetic operation generates an error.

Utility relays for high-speed counter (0)


Relay No.

Function

2100

Internal clock (0.8 s/1 s in KV-300) used only for CTH0

2101

Internal clock (6.4 s/10 s in KV-300) used only for CTH0

2102

Internal clock (102.4 s/100 s in KV-300) used only for CTH0

2103

When comparator CTC0 is ON, clear CTC0 automatically.

2104

Direct output to 0500.

1: Disabled 0: Enabled

2105

Turns OFF output to 0500.

1: Yes

0: No

2106

Turns ON output to 0500.

1: Yes

0: No

2107

Reverses (toggles) output to 0500. 1: Yes

0: No

1: Yes 0: No.
Level of
direct output
to 0500 by
comparator
CTC0
(either one
is ON)

2108

Direct output to 0500.

1: Disabled 0: Enabled

2109

Turns OFF output to 0500.

1: Yes

0: No

2110

Turns ON output to 0500.

1: Yes

0: No

2111

Reverses (toggles) output to 0500. 1: Yes

0: No

*2112

When comparator CTC1 is ON, clears CTC0 automatically. 1: Yes 0: No.

*2113

Uses CTH0 in multiply mode.

1: Yes 0: No

*2114

Selects multiply mode for CTH0.

1: x4

*2115

Enables external reset of CTH0.

1: Yes 0: No

Level of
direct output
to 0500 by
comparator
CTC1
(either one
is ON)

0: x2

* Valid with the KV-300 only.


Utility relays for high-speed counter (1)

2-174

Relay No.

Function

2200

Internal clock (0.8 s/1 s in KV-300) used only for CTH1

2201

Internal clock (6.4 s/10 s in KV-300) used only for CTH1

2202

Internal clock (102.4 s/100 s in KV-300) used only for CTH1

2203

When comparator CTC2 is ON, clears CTC1 automatically. 1: Yes 0: No

2204

Direct output to 0501 by comparator CTC2.

1: Yes 0: No

2205

Level of direct output to 0501 by comparator CTC2.

1: ON 0: OFF

Appendices
Relay No.

Function

2206

Selects edge of INT3.

*2207

Reverses (toggles) output to 0501 by comparator 0501.

*2208

Direct output to 0501.

1: Disabled 0: Enabled

*2209

Turns OFF output to 0501.

1: Yes

0: No

*2210

Turns ON output to 0501.

1: Yes

0: No

*2211

Reverses (toggles) output to 0501. 1: Yes

0: No

*2212

When comparator CTC3 is ON, clears CTC1 automatically. 1: Yes 0: No

*2213

Uses CTH1 in multiply mode.

1: Yes 0: No

*2214

Selects multiply mode for CTH1.

1: x4

*2215

Enables external reset of CTH1.

1: Yes 0: No

0: Rising edge

1: Falling edge
1: ON 0: OFF
Level of
direct output
to 0501 by
comparator
CTC3
(either one
is ON)

0: x2

Other special utility relays

Relay No.

Function

*2300

Disables output to all relays (500 to 515, 7000 to 17915).

1: Yes 0: No

*2301

Disables input to all relays.

1: Yes 0: No

*2302

Stops execution of user program (Does not stop interrupts.). 1: Stop 0: Run

*2304

Constant scan time mode (preset value in TM29).

*2305

Remains ON only for first scan when constant scan time is exceeded.
Forced reset (Initializes DM/TM/TMR/C utility relays by MEMSW except
high-speed counters.).
1: Yes 0: No

*2306

Turns ON when remote is disconnected, and is cleared when operation is


started. (Refer to DM9500 to DM9517.)

*2308

Stops X-axis motor driver.

*2309

Remains ON while X-axis motor driver is operating or in emergency stop


status.

*2310

Starts operation of X-axis motor driver (by detecting rising edge).

*2311

Stops Y-axis motor driver.

*2312

Remains ON while Y-axis motor driver is operating or in emergency stop


status.

*2313

Starts operation of Y-axis motor driver (by detecting rising edge).

*2314

Converts ASCII character string into BIN (32 bits) (by detecting rising edge).

*2315

Converts BIN (32 bits) into ASCII character string (by detecting rising edge).

2600 to 2608

Used to convert extended ladder into standard ladder.

*2803

Sends break signal (during ON).

2804

Text data receive relay. Remains ON for one scan when text data is
received.

2805

Text data overflow. Remains ON for one scan when text data is not correctly
received.

2806

Text data communication error. Remains ON for one scan when a text data
communication error occurs.

1: Valid

*2807

Starts transmission of text data. Remains ON during transmission.

*2812

Power supply error

*2813

Sets input time constant for 0108 to 0215 (KV-80) to 25 s.

2: Invalid

1: Yes 0: No

Sets input time constant for 0000 to 0009 (KV-300) to 10 s. 1: Yes 0: No


2814

Disables any other key input during HKEY instruction.

2815

Terminates scan in HKEY instruction.

2900 to 2915

Stores key information on HKEY instruction.

Appendices

* Valid with the KV-300 only.

* Valid with the KV-300 only.

2-175

Appendices

Memory switches

Appendices

E-2

E-3

bit0

Manipulates all error flags when power is ON.

1: Retains
0: Clears them and starts
operation.

bit1

Performs process when RAM is cleared.

1: Memory error
0: Clears error and
continues operation.

bit2

Retains utility relays 1000 to 1915.

1: Yes

0: No

bit3

Retains utility relays 3000 to 3915.

1: Yes

0: No

bit4

Retains utility relays 4000 to 4915.

1: Yes

0: No

bit5

Retains utility relays 5000 to 5915.

1: Yes

0: No

bit6

Retains utility relays 6000 to 6915.

1: Yes

0: No

bit7

Unused (KV-300: Used as relays 2009 to 2011 by


MPS instruction).

1: Without MPS
0: With MPS

bit8

Unused

bit9

Unused (KV-300: Processes DM0000 to DM4999


when operation is started.)

1: Clears

0: Retains

bit10 Unused (KV-300: Processes DM5000 to DM8999


when operation is started.)

1: Clears

0: Retains

bit11 Processes DM when operation is started.


(KV-300: Processes DM9000 to DM9999 when
operation is started.)

1: Clears

0: Retains

bit12 Resets counter when operation is started.

1: Yes

0: No

bit13 Resets high-speed counter when operation is started.

1: Yes

0: No

bit14 Write-protects program in KV PLC.

1: Yes

0: No

bit15 Read-protects program in KV PLC.

1: Yes

0: No

Special memory list


Temporary memory
TM00

Stores higher-order 16 bits of product (MUL instruction), dividend and


quotient (DIV instruction).

TM01

Stores remainder (DIV instruction).

TM29

Not used.

TM30

Stores CTH1 current value transferred as soon as INT3 is executed


(read only).

TM31

Stores current scan time in unit of 0.1 ms (read only).

Data memory for communication


DM0700 to DM0799

Receives text [valid in KV-10R(W)/T(W)/16R(W)/T(W)/24R(W)/T(W)/


40R(W)/T(W)/80R(W)/T(W) only].

DM9200 to DM9299

Receives text (valid in KV-300 only).

DM9300 to DM9399

Receives text (valid in KV-300 only).

Memory for A/D units and D/A units (valid in the KV-300 only)
DM9000 to DN9029

2-176

Stores A/D or D/A unit data (for up to 5 units).

Appendices
I/O module error information (valid in the KV-300 only)
DM9500

Slot number in which the error occurred

DM9501

Channel number within slot in which the error occurred

DM9507 to DM9517

I/O module connection information map

Data memory for motor drive (valid in the KV-300 only)


Allowable setting range

Preset value error code

11 to 7

DM9408

X-axis startup frequency (Hz)

153 to 50000

DM9409

X-axis operation frequency (Hz)

153 to 50000

DM9410

X-axis acceleration/deceleration time (ms)

0 to 4096

DM9411

X-axis output pulses (higher-order 16 bits)

0 to 65535

DM9412

X-axis output pulses (lower-order 16 bits)

2 to 65535

DM9413

Y-axis startup frequency (Hz)

153 to 50000

DM9414

Y-axis operation frequency (Hz)

153 to 50000

DM9415

Y-axis acceleration/deceleration time (ms)

0 to 4096

DM9416

Y-axis output pulses (higher-order 16 bits)

0 to 65535

DM9417

Y-axis output pulses (lower-order 16 bits)

2 to 65535

Appendices

Set item
DM9407

Frequency (Hz)

DM1481
(operation)

DM1485 X #65536 + DM1484


(output pulses)

DM1480
(startup)

DM1482
(acceleration time)

DM1482
Time (ms)
(deceleration time)

Data memory to convert ASCII character string into BIN value (32 bits)
DM9600

First DM number that stores ASCII code

DM9601

First DM number to which converted BIN value is written

Data memory to convert BIN value (32 bits) into ASCII character string
DM9602

First DM number to which converted ASCII code is written

DM9603

First DM number that stores BIN value

2-177

Appendices

Appendix F

Sample Program List


This appendix describes sample ladder programs installed by default. Sample
programs are saved in "\LBK\SAMPLE".

F-1

Description of sample ladder programs


Samp01.ldr
Sequential turning ON of relays
Applicable models : All KV Series models (KV-10 is used in the program.)
Description
: When the power switch is turned on, indicators are turned ON
one by one.

Appendices

Samp02.ldr
Automatic flashing of indicators
Applicable models : All KV Series models (KV-10 is used in the program.)
Description
: When the program is executed, indicators automatically flash.
The flash speed can be set using an analog trimmer built into
the KV unit.
Samp03.ldr
Perfect emergency stop circuit
Applicable models : All KV Series models (KV-10 is used in the program.)
Description
: Offers an emergency stop circuit using MC and MCR instructions.
Samp04.ldr
Calculation of analog input mean value in KV-AD4
Applicable models : KV Series (except KV-300) and KV-AD4 (KV-10 is used in the
program.)
Description
: Obtains the mean value of analog input values received by the
KV-AD4.
Samp05.ldr
Controlling cylinder
Applicable models : All KV Series (KV-10 is used in the program.)
Description
: The cylinder starts moving when the work piece arrives. It
returns when it reaches to the end of stroke.
Samp06.ldr
Direct clock pulse
Applicable models : All KV Series (KV-10 is used in the program.)
Description
: The basic usage of high-speed counters.
Samp07.ldr
Ramp-up/down program
Applicable models : All KV Series (KV-10 is used in the program.)
Description
: The program is used to control the stepper motor motion and
position. The motor slowly starts rotating and maintains when it
reaches at the specified frequency. It stops gradually in a
specified duration.
Samp08.ldr
High-speed input
Applicable models : All KV Series (KV-10 is used in the program.)
Description
: Using HSP instruction, a fast input signal can be detected
stably and retained until reset.

2-178

Appendices
Samp09.ldr
Various timer circuits
Applicable models : All KV Series (KV-10 is used in the program.)
Description
: Three typical timer circuits are shown: On-delay, Off-delay and
One-shot timers.

Samp11.ldr
Setting value for internal counter by using BCD digital switch
Applicable models : All KV Series (KV-10 is used in the program.)
Description
: The set value of counter can be changed using external BCD
digital switch.
Samp12.ldr
Positioning control in KV-300 CPU (with return to home function)
Applicable models : KV-300
Description
: Performs trapezoid control and return to home using the positioning control function built into the KV-300 CPU unit.
Samp13.ldr
Direct memory sharing between KV-L2 units
Applicable models : KV-300 and KV-L2
Description
: Sets one KV-L2 as the parent station (no-procedure protocol
mode), sets the other KV-L2 as the child station (KV mode), and
reflects values of DMs changed in the parent station on the
child station.
Samp14.ldr
Convenient instruction to measure a pulse-to-pulse interval
Applicable models : All KV Series models (KV-10 is used in the program.)
Description
: Measures a pulse-to-pulse interval using ITVL instruction.
Samp15.ldr
Calculation of analog input mean value in KV-AN6
Applicable models : KV-300 and KV-AN6
Description
: Obtains the mean value of analog input values received by the
KV-AN6.

2-179

Appendices

Samp10.ldr
One-shot timer with adjustable set value by using Analog timer
Applicable models : All KV Series (KV-10 is used in the program.)
Description
: The set value of this one-shot timer can be adjusted using
Analog timer on the KV PLC.

Appendices

Appendix G

Quick Reference
This appendix provides a brief description of each function as well as lists of commands (menu buttons) and tool bars used to execute the functions.

G-1 Editor
Function list and menu
A brief description of functions and commands (menu buttons) used to execute the
functions are given below.
For detailed descriptions, refer to the corresponding reference page.

Appendices

Creating/reading/saving a file
Creating a new ladder program

File New

2-29

Creates a new ladder program.


Reading a ladder program

File Open

2-33

Reads a saved ladder program.


Saving a ladder program

File Save
Save As
Overwrites an existing ladder program or saves a new file with a
new name.
Reading and saving a file in another format File Other Format
Saves/reads a mnemonic list.
Saves/reads comments in another LDR file.
Saves a ladder diagram in text format.
Verifying a ladder program
File File-Verify File
Compares/verifies a program in the editor to/against a saved program.

2-32

2-33

2-36

Entering/deleting symbols and connection lines


Entering/deleting symbols
Edit Symbol Input Symbol Selective Input
Symbol Direct Input
Delete Symbol
Enters/deletes ladder symbols.
Two input methods are available. In the first method, an instruction
word type and an instruction word code can be specified in the
instruction selection window. In the second method, an instruction
word can be entered directly from the direct input window displayed
when the first character of an instruction word is entered.
Entering "a contacts"/"b contacts"/coils
Edit Symbol Input a (N.O.) Contact Input
b (N.C.) Contact Input
a (N.O.) Contact OR Input
b (N.C.) Contact OR Input
Coil Input
b (N.C.) Contact Coil Input
Specifies a device, and enters an a contact/b contact/coil, or deletes
an existing a contact/b contact.
Changing to connection line edit mode Edit Edit Connection Line
Changes to connection line edit mode in which connection lines can
be entered or deleted. Changes to normal edit mode when selected
again while connection line edit mode is selected. (In normal edit
mode, connection lines cannot be entered or deleted.) "Edit Connection Line" can also be selected from the popup menu displayed by
right clicking.

2-180

2-38
2-41
2-42

2-42

2-43

2-44

Appendices
Entering/deleting symbols and connection lines
Entering/deleting connection lines
Edit Symbol Input Vertical Connection Line
Horizontal Connection Line
Delete Vertical Connection Line
Delete Horizontal Connection Line
Horizontal Connection Line to End of Line
Enters or deletes a connection line. This operation can be performed
more quickly when the mouse or keyboard is used.

2-44
2-45

Changing a device in the current position


Changing a device in the current position
Edit Change Device at Cursor Position
Changes a device in the cursor position.

2-43

Undoing the last edit operation

Edit Undo

2-45

Cancels the last edit operation.


Redoing the last canceled edit operation

Edit Redo

2-45

Performs the last canceled operation again.


Inserting/deleting lines
Edit Insert Empty Line
Delete Line
Inserts an empty line in the current cursor position, or deletes the line
in the current cursor position.

Entering/deleting connection lines

2-57

Editing comments/labels
Editing comments/label
Comment Edit Comment/Label
Enters/deletes/changes comments/labels from a device list.
Changing the label name/comment of the current device
Comment Change Label Name of Current Device
Change Comment of Current Device
Changes the label name or the comment of the device at the current
cursor position.
Editing line comments
Comment Edit Line Comment
Enters line comments into a program.
Changing ladder lines into comments
Comment Change Ladder Line into Comment
Treats ladder lines as comments. Ladder lines changed into
comments are ignored during conversion.

2-46

2-49

2-50

2-51

Copy/move/delete
Copying/moving/deleting a selected range

Edit Cut
Copy
Paste

2-54

Edit System Settings

2-71

Copies/moves/deletes a selected range.


System setting
System setting

Sets the directory for the automatic file save function, reverse conversion error check, etc.

2-181

Appendices

Edit operations

Appendices
Jump/find/replace
Jump
Edit Jump
Moves the cursor to a specified line, specified step number, top of the
program, bottom of the program, etc.
As well the cursor can be moved by registering lines.
Finding instruction words/operands
Edit Find
Searches for the specified instruction word/operand.
Replacing operands
Edit Replace Operand
Replaces an existing operand with another operand by specifying the
replacement width.
Converting a-b contacts
Edit Convert a-b (N.O.-N.C.) Contacts
Converts an a contact into a b contact or a b contact into an a contact
by specifying an operand.

2-58

2-62

2-64

2-65

Appendices

Linking screens
Linking the upper screen and the lower screen

Edit Link Screens

2-28

Scrolls the lower screen when the upper screen is scrolled.


Editing lists
Editing mnemonic lists

Edit Edit List

2-67

Edits a ladder diagram by the unit of circuit block using a mnemonic


list.
Displaying the usage status
Displaying the usage status
Edit Usage Information
Displays the usage status of relays, timers/counters, comparators/
high-speed counters, data memory and temporary data memory.

2-70

Entering and developing macros


Creating macro files
Creates a new macro file.
Entering and developing macros

File New

2-72

File Macro Input Develop

2-74

Compile Compile

2-75

Develops a macro.
Compilation and error display
Compilation

Compiles the ladder program into machine code.


Error display
Compile Show Error

2-76

Displays error codes generated during compilation.


Double coil check
Compile Check Double Coil

2-76

Checks double coil sections.

2-182

Appendices
Communicating with PLC
Setting PLC communication parameters
File Communication Setup Set PLC Communication Parameters
Sets parameters required for communication with the PLC.
Transferring, reading, and verifying programs
File Monitor Compile Transfer Monitor
Read Program from PLC
Verify against PLC Program
Transfers compiled ladder programs to the PLC, and switches to
monitor mode. Reads programs transferred from the PLC. Verifies a
program in the PLC against a program on the editor.
Editing devices while offline
File Monitor Edit Offline Device
Edits devices in the PLC while off-line in monitor mode.

2-136

2-139
2-141

2-142

Monitor
File Monitor PLC Monitor
Compile Transfer Monitor
Changes to the monitor. Note that the monitor cannot be started up if
compilation errors are present.
Simulator
File Simulator
Changes to the simulator. If the ladder program is not yet compiled, it
is compiled when the simulator is started up.

2-139

2-86

Changing the display mode


Setting the display mode and the change range
View

Display Mode
Zoom In
Zoom Out
Show Label
Show Comment
Sets the display size and display status of labels/comments.
Sets the range in which the display mode setting is valid.

2-19

2-21

Changing colors in ladder diagrams


Changing colors in ladder diagrams
View Change Ladder Diagram Color
Sets the color layout of ladder diagrams.

2-82

Setting/changing the model


Setting and changing the model

File Change Models

2-17

Sets/changes the model of the connected PLC.


Printout
File Print
Print Preview
Prints out ladder diagrams, mnemonic lists, labels/comments/
references and the device usage status. The printout range can be
specified precisely.
Printout and print preview

2-132
2-131

Exiting from a program


Exiting from a program

File Exit

Exits from a program.

2-183

Appendices

Changing the mode

Appendices

Appendices

Tool bar list


New

Creates a new ladder program.

Open file

Opens a saved ladder program.

Save file

Saves (overwrites) an existing ladder program.

Cut

Cuts the specified range (and copies it to the clipboard).

Copy

Copies the specified range (to the clipboard).

Paste

Pastes the cut or copied range (from the clipboard).

Print

Prints out ladder diagrams, mnemonic lists, etc. (Opens


the printout setting dialog box.)

Undo

Cancels the last edit operation.

Redo

Performs the last edit operation canceled using the


UNDO function again.

Edit Comment/
Label

Edits comments/labels. (Displays the comment/label edit


dialog box.)

Edit Line
Comment

Enters line comments. (Displays the line comment input


dialog box.)

Show/hide
comment

Specifies whether to show or hide comments.

Jump to
specified line/step

Jumps to a specified line/step.

Find

Specifies instruction words/operands to be found.

Replace Operand

Specifies operands to be replaced.

Usage Information Displays the device usage status.

2-184

Edit List

Edits mnemonic lists.

Compile

Performs compile.

Show Error

Displays list of errors that occurred during compilation.

Transfer to PLC

Transfers programs to the PLC, and changes to monitor


mode.

Read from PLC

Reads programs from the PLC.

PLC Monitor

Reads programs from the PLC, and changes to monitor


mode.

Simulator

Changes to simulator mode.

Display Mode

Sets the display size and display mode (for labels,


comments, etc.).

Operating
procedure

Displays the online help information.

Appendices

a (N.O.) Contact
OR Input

Enters an a (N.O.) contact OR in the current cursor


position.

b (N.C.) Contact
OR Input

Enters a b (N.C.) contact OR in the current cursor position.

a (N.O.) Contact
Input

Enters an a (N.O.) contact in the current cursor position.

b (N.C.) Contact
Input

Enters a b (N.C.) contact in the current cursor position.

Coil Input

Enters a coil in the current cursor position.

b (N.C.) Contact
Coil Input

Enters a b (N.C.) contact coil in the current cursor


position.

Vertical
Draws a vertical connection line down from the current
Connection Line cursor position.
Delete Vertical
Deletes the vertical connection line in the current cursor
Connection Line position.
Horizontal
Draws a horizontal connection line down from the current
Connection Line cursor position.
Delete Horizontal Deletes the horizontal connection line in the current cursor
Connection Line position.

2-185

Appendices

Function menu list

Appendices
Shortcut key list
File

[ ] indicates the space bar.

New

[Ctrl] + [N]

Open

[Ctrl] + [O]

Save

[Ctrl] + [S]

Print

[Ctrl] + [P]

PLC Monitor

[Ctrl] + [F1]

Convert Transfer Monitor

[Ctrl] + [F8]

Simulator

[Ctrl] + [F2]

Appendices

Edit

2-186

Undo

[Ctrl] + [Z]

Redo

[Ctrl] + [Y]

Symbol Selective Input

[Tab]

Symbol Direct Input

[ENTER] (Mnemonic can be entered.)

Delete Symbol

[ ]
[BackSpace]
[Delete]

a (N.O.) Contact Input

[F5]

b (N.C.) Contact Input

[Shift] + [F5]

a (N.O.) Contact OR Input

[F4]

b (N.C.) Contact OR Input

[Shift] + [F4]

Coil Input

[F7]

b (N.C.) Contact Coil Input

[Shift] + [F7]

Vertical Connection Line

[F8], [ / ]

Horizontal Connection Line

[F9], [ ]

Horizontal Connection Line to End of Line

[Ctrl] + [Tab]

Delete Vertical Connection Line

[Shift] + [F8]

Delete Horizontal Connection Line

[Shift] + [F9]

Macro Input Develop

[Shift] + [F1]

Range selection

[Shift] + [UP][DOWN][LEFT][RIGHT]

Cut

[Ctrl] + [X]
[Ctrl] + [Delete]

Copy

[Ctrl] + [C]
[Ctrl] + [Insert]

Paste

Ctrl] + [V]
[Shift] + [Insert]

Insert Empty Line

[Shift] + [ENTER]

Delete Line

[Shift] + [Delete]

Edit Connection Line

[Ctrl] + [K], [\]

Change Device at Cursor Position

[Esc]

Edit List

[Ctrl] + [F3]

Appendices
Jump to the top

[Ctrl] + [Home]

Jump to the bottom

[Ctrl] + [End]

Jump to a registered line

[Ctrl] + [J]

Line Registration

[Ctrl] + [L]

Next Block

[Ctrl] + [DOWN]

Previous Block

[Ctrl] + [UP]

Find

[Home]

Search

[Ctrl] + [F]

Search Backward

[F2]

Search Forward

[F3]

Search for OUT Backward

[Shift] + [F2]

Search for OUT Forward

[Shift] + [F3]

Replace Operand

[Ctrl] + [R]

Convert a-b (N.O.-N.C.) Contacts

[Ctrl] + [A]

Usage Information

[Ctrl] + [E]

Appendices

[End]

Comment
Edit Comment/Label

[Ctrl] + [F7]

Edit Line Comment

[Ctrl] + [ENTER]

Change Ladder Line into Comment-Set

[Ctrl] + [Q]

Change Ladder Line into Comment-Cancel

[Ctrl] + [W]

Change Label Name of Current Device

[Ctrl] + [B]

Change Comment of Current Device

[Ctrl] + [N]

Compile
Compile

[Ctrl] + [F9]

Show Error

[Ctrl] + [F10]

View
Zoom In

[Ctrl] + [PageDown]

Zoom Out

[Ctrl] + [PageUp]

Show Label

[Ctrl] + [BackSpace]

Show Comment

[Ctrl] + [ ]

Help
Using Help

[F1]

Instruction Word

[Ctrl] + [1]

Operations in the ladder window


Close window

[Ctrl] + [F4]

Move between windows

[Ctrl] + [F6]

Move between windows (reverse direction)

[Ctrl] + [Shift] + [F6]

Move between panes

[F6]

2-187

Appendices

G-2 Simulator
Function list and menu
A brief description of functions and commands (menu buttons) used to execute the
functions are given below.
For detailed descriptions, refer to the corresponding reference page.
Reading/saving a window
File Open Window
Save Window As
Reads a monitor all file. Saves the current monitor all window with a
new file name (extension: kal).
Reading and saving a registration monitor window
File Open Window
Save Window As
Reads a registration monitor file. Saves the current registration monitor
window with a new file name (extension: kre).

Appendices

Reading and saving a monitor all window

2-111

2-121
2-120

Setting the simulator operation status


Setting and deleting the break condition
Settings Set Break Condition
Edit Delete Break Condition

2-98

Setting the wait time

Settings Wait Time

2-130

Setting the scan time


Setting the watch dog timer

Settings Scan Time


Settings Set Watch Dog Timer

2-100
2-100

Executing and stopping the simulator


Execute Execute Continuous Scan
Execute One Scan
Two execution modes are available: continuous scan and one scan.
Executing steps
Execute Execute Continuous Step
Execute One Step
Execute High-speed Step
Execute Continuous Step in Reverse
Execute One Step in Reverse
Five execution modes are available: continuous step, one step,
high-speed step, continuous step in reverse, and one step in reverse.
When steps are executed, the mnemonic window is displayed.
Stopping and pausing execution of step/scan
Execute Stop
Pause
Reset
Execute Reset
Returns the current values to the default values according to the
specification given by "MEMSW".
Device all clear
Execute Device All Clear DM All Clear
Latching Relay All Clear
Counter All Clear
Sets the current value of each device to 0 (OFF).
Executing scans

2-92
2-93
2-102
2-103
2-104

2-108
2-108

2-108

Ladder monitor
Displaying a ladder monitor window
File Ladder Monitor
Displays the ladder diagram of the ladder program currently being
simulated.
In this window, the ON/OFF status of bit devices can be changed, and
the attribute (bit count and radix) can be changed using the dialog bar.
Registering devices to another monitor
For registration, select a device to be monitored, and then drag and
drop it to the registration monitor window or the monitor all window
while pressing and holding the left mouse button.

2-188

2-144

2-114

Appendices
Jump and search Edit Jump in Ladder Monitor
Search in Ladder Monitor
Search for Device at Cursor Position in Ladder Monitor
Searches for instruction words and operands, or jumps to a specified line.

2-105
2-106
2-107

Monitor all
2-109

2-113

2-118

2-118

Registration monitor
Displaying a registration monitor window
File Registration Monitor
Displays current values, comments and timing charts for the registered devices. In this window, the ON/OFF status of bit devices can be
changed, and the attribute (bit count, radix and comment type) can be
changed using the dialog bar.
Registering devices
Devices to be displayed on the registration monitor window can be
registered by dragging and dropping them from a ladder diagram or by
using the dialog bar.
Setting the number of scales for timing charts
Settings Set No. of Scales for Timing Chart
Allows you to set the number of scans/steps (= number of scales) to
be displayed on timing charts.
Copying and deleting the device attribute
Edit Copy Device Attribute in Registration Monitor
Delete Device in Registration Monitor
Copies the attribute (bit count, radix and comment type) set for the
currently selected device to another device, or deletes the device.
Sorting devices
Edit Sort Devices in Registration Monitor
Sorts (arranges) devices in order.
Resetting devices Edit Reset Device in Monitor All/Registration Monitor
Returns the selected devices to their default values.
Timing chart
Timing charts for the registered devices are displayed while scans or
steps are executed (only when "Comment" on the dialog bar is set to
"No").

2-119

2-122

2-129

2-125
2-127

2-127
2-127
2-128

Mnemonic list window


When steps are executed, a mnemonic list window is displayed to
indicate the mnemonic line currently being executed.

2-101

Changing the current value/preset value/attribute (dialog bar)


Change device types, device numbers, current values, preset values,
etc. using the dialog bar, or register new devices to each monitor.
Set the bit count, radix and comment display method.

2-96

2-189

Appendices

Displaying a monitor all window


File Monitor All
Displays devices, current values, preset values, contacts, coils and
comments.
In this window, the ON/OFF status of bit devices can be changed,
and the attribute (bit count, radix and comment type) can be changed
using the dialog bar.
Registering devices
Devices to be displayed on the monitor all window can be registered
by dragging and dropping them from a ladder diagram or by using the
dialog bar.
Changing current values/preset values for devices
Using the dialog bar, current values can be specified and written to
devices. Currently saved values/preset values can be changed.
Resetting devices
Edit Reset Device in Monitor All/Registration Monitor
Returns the currently selected device to the default value.

Appendices
Changing the mode
Editor

File Editor

Changes to editor mode.


Clearing devices and selecting the editor
File Clear Device and Go to Editor
Clears devices, and then changes to the editor.

2-87

2-87

Printout

Appendices

Printing the registration monitor


File Print
Prints out the contents currently displayed on the registration monitor.

2-190

2-132

Appendices
Tool bar list

Editor

Returns to the editor without clearing device values.

Show Ladder
Monitor Always
at Bottom

Always shows the ladder monitor window at the bottom


when two or more windows are displayed. This function is
convenient when registering devices from the ladder
monitor to the monitor all or the registration monitor.

Ladder Monitor

Displays a ladder monitor window.

Registration
Monitor

Displays a new registration monitor window.

Monitor All

Displays a new monitor all window.

Open Window

Reads a saved monitor all file or registration monitor file.

Save Window

Saves a monitor all file or registration monitor file with a


new name.

Execute
Executes steps continuously in the reverse direction
Continuous Step (continuous undo).
in Reverse
Execute One
Step in Reverse

Executes one step in the reverse direction (undo).

Execute One
Step

Executes one step.

Execute
Executes steps continuously.
Continuous Step
Execute
Executes steps at a high speed.
High-speed Step
Pause

Temporarily stops all operations.

Stop

Stops all operations.

Execute Scan

Executes one scan.

Appendices

Clear Device
Clears device values, and returns to the editor.
and Go to Editor

Execute
Executes scans continuously.
Continuous Scan

2-191

Appendices

Appendices

2-192

Break Condition

Registers the break condition, and displays the break


condition window.

Wait Time

Sets the wait time.

No. of Scales
for Timing Chart

Sets the number of scales (one scale = one scan or one


instruction) shown on timing charts displayed on the
registration monitor.

Reset

Returns current values to their default values. Stops


operations if operations have been performed.

Using Help

Displays the online help.

Appendices
Shortcut key list

[ ] indicates the space bar.

File
Editor

[Ctrl] + [F1]

Clear Device and Go to Editor

[Ctrl] + [F2]

Edit
Search Ladder Monitor

[Ctrl] + [F]

Search Backward

[F2]

Search Forward

[F3]

Search for OUT Backward

[Shift] + [F2]

Search for OUT Forward

[Shift] + [F3]

Execute Continuous Scan

[F5]

Execute One Scan

[F9]

Execute Continuous Step

[Shift] + [F8]

Execute One Step

[F8]

Execute High-speed Step

[Shift] + [F9]

Execute Continuous Step in Reverse

[Shift] + [F7]

Execute One Step in Reverse

[F7]

Pause

[F4]

Stop

[Shift] + [F5]

Reset

[F10]

Appendices

Execution

View
Enlarge Display

[Ctrl] + [PageDown]

Reduce Display

[Ctrl] + [PageUp]

Help
Using Help

[F1]

Instruction Word

[Ctrl] + [1]

2-193

Appendices
Operations in the ladder monitor
Move between panes

[F5]

Move cursor

[LEFT][RIGHT][DOWN][UP]

Move cursor by unit of block

[Ctrl] + [DOWN][UP]

Move cursor to the beginning of line

[Home]

Move cursor to the end of line

[End]

Reverse bit devices

[ ]

Read values to dialog bar

[ENTER]

Switch numbering system (decimal hexadecimal)

[Ctrl]+[E]

Operations in the registration monitor

Appendices

Move cursor

[DOWN][UP]

Move vertical cursor on timing chart

[LEFT][RIGHT]

Changes over selection of vertical cursor


on timing chart

[Tab]

Reverse bit devices

[ ]

Reads values to dialog bar

[ENTER]

Delete devices

[Delete]

Operations in the monitor all


Move cursor

[DOWN][UP]

Move bit cursor


(only for binary 16-bit bit devices)

[LEFT][RIGHT]

Reverse bit devices

[ ]

Reads values to dialog bar

[ENTER]

Operations on the mnemonic window


Move cursor

[DOWN][UP]

Sets/cancels break point

[ ]

Operations on the break condition window


Move cursor

[DOWN][UP]

Change/register break condition

[ENTER]

Delete break condition

[Delete]

Other operations common to all the windows


Close window

2-194

[Ctrl] + [F4]

Move between windows

[Ctrl] + [F6]

Move between windows (reverse direction)

[Ctrl] + [Shift] + [F6]

Appendices

G-3 Monitor
Function list and menu
A brief description of functions available in the monitor are given below.
For detailed descriptions, refer to the corresponding reference page.
Reading/saving a window
2-111

2-121
2-120

2-150

Setting communication parameters


Setting serial ports
Settings Serial Port
Sets the COM port and baud rate (communication speed).
Setting the machine number (KV-300 Series only)

2-136
2-137

PLC operation mode


Setting the PLC operation mode

Execute RUN
STOP

2-147

Selects the operation mode of the PLC.


Starting and stopping the monitor
Starting the monitor
Monitor Start Monitor
When the monitor is started, the operation status of the program
transferred to the PLC is displayed on the ladder monitor window, the
registration monitor window and the monitor all window in real-time.
Stopping the monitor
Monitor Stop Monitor

2-145

2-145

Stops the monitor.


Disabling input refresh/output
Disabling the input refresh
Monitor Disable Input Refresh
Disables reading of input relays (input refresh) in the PLC.
* This setting is available in the KV-300 and Visual KV Series only.
Disabling the output
Monitor Disable Output
Disables update of the output status.
* This setting is available in the KV-300 and Visual KV Series only.

2-149

2-149

2-195

Appendices

File Open Window


Save Window As
Reads a monitor all file. Saves the current monitor all window -with
a new file name (extension: kal).
Reading and saving a registration monitor window
File Open Window
Save Window As
Reads a registration monitor file. Saves the current registration monitor
window with a new file name (extension: kre).
Reading and saving change all
File Open Window
Save Window As
Saves the device setting read from the PLC with a new file name,
or reads the saved device setting (extension: kdv).
Reading and saving a monitor all window

Appendices
Initializing devices
Device all clear
Settings Device All Clear DM All Clear
Latching Relay All Clear
Counter All Clear
Sets the current value of each device to 0 (OFF).

2-154

Ladder monitor

Appendices

Displaying a ladder monitor window


File Ladder Monitor
Displays the ladder diagram of the ladder program currently being
simulated.
In this window, the ON/OFF status of bit devices can be changed, and
the attribute (bit count and radix) can be changed using the dialog bar.
Registering devices to another monitor
For registration, select a device to be monitored, and then drag and
drop it to the registration monitor window or the monitor all window
while pressing and holding the left mouse button.
Jump and search
Edit Jump in Ladder Monitor
Search Ladder Monitor
Search for Device at Cursor Position in Ladder Monitor
Searches for instruction words and operands, or jumps to a specified
line.

2-144

2-114

2-58

Monitor all
Displaying a monitor all window
File Monitor All
Displays devices, current values, preset values, contacts, coils and
comments.
In this window, the ON/OFF status of bit devices can be changed,
and the attribute (bit count, radix and comment type) can be changed
using the dialog bar.
Registering devices
Devices to be displayed on the monitor all window can be registered
by dragging and dropping them from a ladder diagram or by using the
dialog bar.
Changing current values/preset values of devices
Using the dialog bar, current values can be specified and written to
devices. Currently saved values/preset values can be changed.

2-109

2-114

2-118

Registration monitor
Displaying a registration monitor window File Registration Monitor
Displays current values, comments and timing charts for the registered
devices. In this window, the ON/OFF status of bit devices can be
changed, and the attribute (bit count, radix and comment type) can be
changed using the dialog bar.
Registering devices
Devices to be displayed on the registration monitor window can be
registered by dragging and dropping them from a ladder diagram or
by using the dialog bar.

2-196

2-119

2-122

Appendices

2-129

2-125
2-127

2-127
2-128

Changing the current value/preset value/attribute (dialog bar)


Change device types, device numbers, current values, preset values,
etc. using the dialog bar, or register new devices to each monitor.
Set the bit count, radix and comment display method.

2-96

Changing the current values all at once


Changing the current values all at once
File Change All
Reads devices in the specified range from the PLC, changes the
current values on an on-line basis, and then writes the changed
current values to the PLC.

2-150

Changing the mode


Editor
File Editor
Terminates communication with the PLC, and changes to editor mode.

2-142

Printout
Printing out the registration monitor
File Print
Prints out the contents currently displayed on the registration monitor.

2-132

2-197

Appendices

Setting the number of scales for timing charts


Settings Set No. of Scales for Timing Chart
Allows you to set the number of scales to be displayed on timing
charts.
Copying and deleting the device attribute
Edit Copy Device Attribute in Registration Monitor
Delete Device in Registration Monitor
Copies the attribute (bit count, radix and comment type) set in the
currently selected device to another device, or deletes the device.
Sorting devices
Edit Sort Devices in Registration Monitor
Sorts (arranges) devices in order.
Timing chart
Timing charts for the registered devices are displayed while scans or
steps are executed (only when "Comment" on the dialog bar is set
to "No").

Appendices

Appendices

Tool bar list

2-198

Editor

Exits from the monitor, and returns to the editor.

Show Ladder
Monitor Always
at Bottom

Always shows the ladder monitor window at the bottom


when two or more windows are displayed. This function is
convenient when performing operations on another
window.

Ladder Monitor

Displays a ladder monitor window.

Registration
Monitor

Displays a registration monitor window.

Monitor All

Displays a monitor all window.

Change All

Specifies the range of current values of devices to be


changed, and then changes them all at once.

Open Window

Opens a monitor all file or registration monitor file.

Save Window

Saves a monitor all file or registration monitor file with a


new name.

Stop Monitor
(red)

Stops the monitor.

Start Monitor
(green)

Starts the monitor.

Run

Sets the PLC to RUN mode.

Stop

Sets the PLC to STOP Mode.

No. of Scales for


Timing Chart

Sets the number of scales for timing charts.

Using Help

Displays the on-line help.

Appendices
Shortcut key list
File

[ ] indicates the space bar.

Editor

[Ctrl] + [F1]

Edit
Search in Ladder Monitor

[Ctrl] + [F]

Search Backward

[F2]

Search Forward

[F3]

Search for OUT Backward

[Shift] + [F2]

Search for OUT Forward

[Shift] + [F3]

RUN

[Shift] + [F7]

STOP

[Shift] + [F6]

Appendices

PLC mode

Monitor

Start Monitor

[F4]

Stop Monitor

[F3]

View
Enlarge Display

[Ctrl] + [PageDown]

Reduce Display

[Ctrl] + [PageUp]

Help
Using Help

[F1]

Instruction Word

[Ctrl] + [1]

Operations in the ladder monitor


Move between panes

[F6]

Move cursor

[LEFT][RIGHT][DOWN][UP]

Move cursor by unit of block

[Ctrl] + [DOWN][UP]

Move cursor to the beginning of line

[Home]

Move cursor to the end of line

[End]

Reverse bit devices

[ ]

Read values to dialog bar

[ENTER]

Switch numbering system (decimal

hexadecimal)

[Ctrl]+[E]

2-199

Appendices
Operations in the registration monitor
Move cursor

[UP][DOWN]

Move vertical cursor on timing chart

[LEFT][RIGHT]

Reverse bit devices

[ ]

Reads values to dialog bar

[ENTER]

Delete devices

[Delete]

Operations in the monitor all


Move cursor

[DOWN][UP]

Move bit cursor


(only for binary 16-bit bit devices)

[LEFT][RIGHT]

Reverse bit devices

[ ]

Reads values to dialog bar

[ENTER]

Appendices

Other operations common to all the windows


Close window

2-200

[Ctrl] + [F4]

Move between windows

[Ctrl] + [F6]

Move between windows (reverse direction)

[Ctrl] + [Shift] + [F6]

Appendices

Appendix H

Notes for Programming


This appendix describes important points and precautions for creating ladder programs.

Circuits that must be modified

The circuit shown on the left cannot be programmed. Modify it as shown on the
right.
A

0500

0500

A
E
A

Appendices

H-1

Output is disabled in 0500 in the circuit shown on the left. By modifying it as


shown on the right, output of one scan only is disabled.
1000

1000

0500

0500

1000

1000

If the same coil is used in two positions, the latter position has the priority and the
coil in the former position is ignored.
A

0500

0500

0500

The circuit shown on the left cannot be programmed. Modify it as shown on the
right.
A

0500

D E

0500

The circuit shown on the left cannot be programmed. Modify it as shown on the
right.
A

0500

0500

D
E

0501

0501

2-201

Appendices

H-2

Precautions for programming

A coil output or timer/counter cannot be connected directly from a bus. When an


output coil or a timer/counter is required, insert a b contact of an unused internal
utility relay, a b contact of an unused special utility relay, or a special utility relay
2002 (always ON) as a dummy.
0500

0500

2002
#0010
T000

#0010
T000

A contact cannot be connected to an output line.

Appendices

0500

Make sure that every contact/coil is located on a path from a bus to an output
line. Make sure that there are no unconnected portions.

0500

Make sure that illegal short-circuits are not generated in parallel connection.

X X
A

0500

Circuits including output coils cannot be connected in parallel.


A

0501

0500

However, parallel connection is enabled when each circuit in parallel connection


is connected to an output line respectively.
A

2-202

0500

0501

Appendices

Programs which cannot be decompiled


When a return is included in parallel connection in a ladder program, a
decompilation (reverse compilation) error is generated as shown in Fig. a below.
To prevent this, change the ladder diagram to eliminate the return, or separate the
parallel connection.

Appendices

H-3

Fig. a

Fig. b

2-203

Appendices

Appendix I

List of Files Used


This appendix describes files generated when the Ladder Builder for KV is executed.

Files generated in the data directory

Appendices

********.LDC
********.LDR
********.RCM
********.CM2
********.CM3
********.LVL
********.ERR
********.MNM
********.COD
********.KRE
********.KAL
********.KDV
********.INT
********.KEN

Source file dedicated to the Ladder Builder


Ladder diagram source file [usable by the KV IncrediWare (DOS)]
Contact comment 1 file [usable by the KV IncrediWare (DOS)]
Contact comment 2 file
Contact comment 3 file
Label file
Error file [usable by the KV IncrediWare (DOS)]
Mnemonic list file [usable by the KV IncrediWare (DOS)]
Code file [usable by the KV IncrediWare (DOS)]
Registration monitor information file
Monitor all information file
Change all information file
Ladder diagram comment transfer range setting file
MDI setting file

Files generated in the working directory


These files are automatically saved, and deleted when the software is closed normally.
********.$DC
********.$CM
********.$M2
********.$M3
********.$M3
********.$VL

Ladder diagram source file


Contact comment 1 file
Contact comment 2 file
Contact comment 3 file
Contact comment 3 file
Device label file

Note: When a file with the extension shown above is edited or deleted by any
software other than the LADDER BUILDER for KV or the KV IncrediWare (DOS), it
may not work correctly.

2-204

Appendices

Appendix J Countermeasures for Frequent Communication


Errors
Check the following points if communication errors frequently occur while you
monitor the KV Series with the LADDER BUILDER for KV.
Note: Each parameter setting may vary depending on the computer. For setting
details, refer to the instruction manual supplied with your computer or ask the
manufacturer of the computer.

Isnt a modem assigned to a specific communication port?


Some personal computers may assign a modem to a communication port. If so,
disconnect the modem or use another communication port.
Isnt a serial mouse assigned to a specific communication port?
If you use a laptop computer with a serial mouse and replace the mouse with a
communication cable to start communication, the communication port is not
enabled. To solve this problem, if your computer has another available communication port, specify that port with the LADDER BUILDER for KV. If there is no
available communication port, disconnect the mouse and restart the KV unit.
Isnt infrared communication specified?
Some personal computers may specify infrared communication for the communication port. In this case, if your computer has another available communication
port, specify that port with the LADDER BUILDER for KV. If there is no available
communication port, cancel the infrared communication setting.
Isnt the Suspend function activated?
If the Suspend function is activated with Windows 95, the communication will fail.
Do not use the Suspend function.

2-205

Appendices

Does the Windows system allow the use of a specific communication port?
Check that Windows has enabled the communication port specified with the
LADDER BUILDER for KV.

Appendices

Appendices

2-206

Index

Index For Visual KV Users Only

Index For Visual KV Users Only


The following is the index with some descriptions for your reference.
Purpose

Title

Page

Index

A
Access Window, changing device value in

Device mode

1-87

Access Window, changing modes in

Selecting modes and setting/resetting key lock

1-82

Access Window, displaying directions in

User messages

1-97

Access Window, displaying errors in

Error messages and error status

1-97

Access Window, error display in

Error List

1-372

Access Window, increasing device selection speed in

Turbo function

1-83

Access window, part names functions of

Part names and functions of the Access Window

1-82

Access Window, switching the KV PLC between RUN and


PROGRAM (stop) modes in

System Mode

1-94

Access Window, using digital trimmer in

Digital Trimmer Mode

1-84

Application instructions, learning about

Application instructions

3-36

Arithmetic instructions, learning about

Arithmetic instructions

3-38

Basic instructions

3-34

Device used for cam switch function

3-233

Cam switch, using KV as

Cam switch function

3-233

CE marking, acquiring

Restriction on acquiring the CE marking

B
Basic instructions, learning about
C
Cam switch function, setting item for

(2)

Command transmission between KV and personal computer

Communication command/response list

3-310

Command transmission, when error occurs during

Error code list

3-316

Communication port, specifications of

Communications Specification

3-306

Contact comments, transmitting them to KV PLC

Contact comment save function

3-27
1-69

Contacts, protecting

Contact protection

Conventional KV series, differences with

Compatibility with conventional KV peripheral units

(4)

Current consumption

General specifications

1-4

Data memories

3-19

D
Data memory, functions assigned to
Direct clock pulse, outline of

Outline of direct clock pulse output

3-237

Direct clock pulse, outputting pulses with 1:1 ON/OFF ratio using

ON/OFF ratio of 1:1

3-238

Direct clock pulse, outputting pulses with variable pulse width

Variable pulse width

3-238

Direct clock pulse, setting item for

Pulse output setting with the high-speed counter


comparator

3-238

E
Expansion unit, checking operation of

Connection information for expansion units

1-75

Expansion unit, connecting

Connecting Visual KV Series expansion units

1-71

Expansion unit, maximum number to be connected to

Number of connectable units

1-73

Expansion unit, setting its height flush with AC-type basic unit

Expansion unit spacer

1-66

External output, disabling

Output prohibition function

3-26

F
Forcing input ON/OFF without switch

Input refresh disabled function

3-26

Frequency counter function, setting item for

Devices used with the frequency counter

3-231

High-speed counter, increasing measurement range of

24-bit high-speed counter

3-221

High-speed counter, measuring frequency with

Frequency counter function

3-231

High-speed counter, outputting pulses using

Direct Clock Pulse Output

3-237

High-speed counter, reading current value of

Reading the current value of the high-speed counter

3-211

High-speed counter, resetting the value to other than "0"

Preset function

3-215

2-208

Index

Index For Visual KV Users Only


Purpose

Title

Page

High-speed counter, resetting the value to "0"

Resetting the high-speed counter

3-214

High-speed counter, selecting input source for

Count input method

3-212

High-speed counter, specifications of

Specifications of high-speed counters

3-208

High-speed counter, specifying the preset value of

Preset value of the high-speed counter comparator

3-211

High-speed counter, using, as ring counter

Ring counter function

3-225

Input time constant of basic unit, changing

Input time constant change function

3-23

Input time constant of expansion unit, setting

Input time constant for expansion units

1-76

Interrupt instruction, outputting relay status independent of scan


time

Direct Input/Output

3-197

Interrupt instructions, learning about

Interrupt instruction

3-41

Interrupt programs, instructions that cannot be used within

Instructions that cannot be used

3-196

Interrupt, reading current value of high-speed counter by

Input capture

3-195

Interrupt, setting input condition for

Polarity setting for interrupts by an external input

3-195

Interrupt: when several interrupts are executed

Interrupt priority

3-196

KV IncrediWare (DOS)/LADDER BUILDER for KV, using

Cautions when using the previous version of ladder


support software

KV-P3E(01), entering instructions using

Function No. list (alphabetical order)

(5)
3-41

KV-P3E(01), functions available with

Function Nos. list

1-216

KV-P3E(01), operating

Basic programming operation

1-200

Memory card, capacity of

Storage capacity

1-230

Memory card, replacing battery of

To replace battery

1-238

Multi-step comparator operation of DM, executing

Multi-step comparator mode

3-234

Output disabled function

3-26

Index

O
Output, disabling output from KV
P
Panel mounting of KV

Attaching a unit directly to a panel

1-66

Personal computer, receiving data from

Receiving text data

3-318

Personal computer, transmitting data from KV to

Transmitting text data

3-319

Program capacity, calculation of

Calculating the byte count used

3-4

Program capacity, learning about

Program capacity

3-4

Programs, saving into memory card

Functions [used with KV-P3E(01)]

1-230

Pulse motor, driving

Parameter setting procedure

3-255

Pulse output at desired frequency

Specified frequency pulse output function

3-228

Relay Nos. assigned to basic unit

Relay list

3-5

Relay Nos. assigned to expansion unit

List of relays in expansion units

3-6

Relay Nos., assigning

Assigning relay Nos.

3-8

LOAD and SAVE modes

1-96

S
Saving current value of counter/DM into ROM
Scan time

Scan time

3-3

Sensors or other devices, connecting to KV

Wiring procedures for basic units

1-67

Special utility relays, change in status of, when arithmetic


instruction is used

Change in status of special utility relays (arithmetic


flags) by arithmetic instructions

3-186

Special utility relays, functions assigned to

Special utility relay list

3-86

Specified frequency pulse output function, setting item for

Device used for specified frequency pulse output

3-228

Temporary data memory, functions assigned to

Temporary data memory

3-21

Timers/counters, maximum number of

Timer/Counter list

3-18

Index

2-209

Index For KV-300, KV-10/80 Users Only

Index For KV-300, KV-10/80 Users Only


A

A/D converter .......................... 1-312 [AN6], 1-334 [AD4]


A/D conversion table ............... 1-408 [AN6], 1-357 [AD4]
ADD/@ADD: Add .................................................... 3-150
AND: And .................................................................. 3-58
ANB: And Bar ............................................................ 3-58
ANDA/@ANDA: And A ............................................ 3-159
ANL: And Load .......................................................... 3-61
Application Instructions ........................... 3-36, 3-45, 3-95
Arithmetic Instructions ........................... 3-38, 3-48, 3-134
ASC/@ASC: ASCII Convert ................................... 3-183
Assignment of Data Memory ..................................... 3-19
Assignment of I/O relay numbers .............................. 3-22

Index

B
Basic Instructions .................................... 3-34, 3-42, 3-56
Baud rate ....................................... 2-136, 1-247 [KV-L2]
Break signal ............................................................ 3-308

C
C: Counter ................................................................ 3-72
CALL: Subroutine Call ............................................. 3-122
CMP/@CMP: Compare ........................................... 3-146
COM/@COM: Complement .................................... 3-171
Commands [Serial communication] ........................ 3-310
Communications ....................................... 2-135, 3-306
CON: Connect ......................................................... 3-102
Connector wiring ...................................................... 1-72
CTC: Counter Comparator ...................................... 3-204
CTH1: 16-Bit Counters ............................................ 3-204

D
Data Memory ............................................................. 3-19
D/A converter .......................... 1-312 [AN6], 1-334 [AD4]
D/A conversion table ............... 1-408 [AN6], 1-357 [DA4]
DEC/@DEC: Decrement Memory ........................... 3-172
DI: Interrupt Disabled .............................................. 3-193
DIFD: Differentiate Down .......................................... 3-78
DIFU: Differentiate Up .............................................. 3-78
Dimensions ............................................................ 1-404
DIN rail (mounting) ................................................. 1-180
Direct Clock Pulse ................................................... 3-276
Display Interface Mode [KV-L2] ............................. 1-244
DIV/@DIV: Divide ................................................... 3-150
DMX/@DMX: Demultiplexer ................................... 3-176
DW: Data Memory Write ......................................... 3-136

H
High-Speed Counters .............................................. 3-276
HKEY: 16 Key Input ................................................ 3-131
HSP: High Speed ...................................................... 3-86

I
INC/@INC: Increment Memory ............................... 3-172
Indirect Addressing of Data Memory or Relay ........ 3-127
Input Relays ................................................................ 3-9
Instruction List .................................................. 3-34, 3-42
INT: Interrupt ........................................................... 3-192
Interface [RS-232C] ................................................ 3-306
Internal register ....................................................... 3-135
Internal Utility Relays ................................................ 3-11
Internal Clocks for CTH0 and CTH1 ....................... 3-278
Interrupt Instructions ............................................... 3-268
I/O distribution ........................................................ 1-187
ITVL: Interval Timer ................................................. 3-117

J
JMP: Jump .............................................................. 3-106

K
KEEP: Keep .............................................................. 3-80
KV-10/16/24/40/80 ........................... 1-167, 1-175, 1-177
KV-300 ........................................................ 1-166, 1-170
KV-AD4 .................................................................. 1-334
KV-AN6 .................................................................. 1-312
KV-B16R/B16S/C32T ............................................. 1-172
KV-C16X/C32X ...................................................... 1-171
KV-DA4 .................................................................. 1-334
KV-L2 ..................................................................... 1-240
KV-R1A/R16X/R16R/R16T/R8X/R8R/R8T . 1-173, 1-174
KV-U4/U5 .................................................... 1-168, 1-169
KV mode [KV-L2] ................................................... 1-253

L
LD: Load .................................................................... 3-57
LDA/@LDA: Load A ................................................ 3-140
LDB: Load Bar ........................................................... 3-57

E
EI: Interrupt Enabled ............................................... 3-193
END: End .................................................................. 3-94
ENDH: End Hi ........................................................... 3-94
ENDS: End Stage ................................................... 3-106
Environment requirements ....................................... 1-64
EORA/@EORA: Exclusive Or A ............................. 3-164
Error code list ......................................................... 1-372
Extended Ladder Diagrams ...................................... 3-29

2-210

FOR: Repeat Start .................................................. 3-125

Index

Macros ..................................................................... 2-72


MC: Master Control ................................................... 3-89
MCR: Master Control Reset ...................................... 3-89
Memory Card ......................................................... 1-230
MEMSW: Memory Switch ......................................... 3-92
Module names ........................................................ 1-175
Mounting Environment ............................................. 1-64
MPP: Pop ................................................................ 3-103
MPS: Push .............................................................. 3-103

Index For KV-300, KV-10/80 Users Only

N
NEXT: Repeat End .................................................. 3-125
Non-procedure mode [KV-L2] ................................ 1-292
NOP: No Operation ................................................... 3-94

O
OR: Or ....................................................................... 3-60
ORA/@ORA: Or A .................................................. 3-161
ORB: Or Bar .............................................................. 3-60
ORL: Or Load ............................................................ 3-63
OUB: Out Bar ............................................................ 3-65
OUT: Out ................................................................... 3-65
Output Relays ........................................................... 3-10

P
Peripheral equipments ........................................... 1-176
Port1/Port2 [KV-L2] ................................................ 1-245
Positionning control ................................................. 3-296
Programming examples .......................................... 3-324

R
RASC/@RASC: Reverse ASCII Convert ................ 3-183
Receiving text data .................................................. 3-318
Relay/Memory/Memory Switch Lists .................. 2-167
Relay/Memory Nos. .............................................. 2-167
Relay No. List ....................................................... 2-167
Relay Nos. and Functions ................................... 2-167
RES: Reset ............................................................... 3-66
RET: Subroutine Return .......................................... 3-122
RETI: Return Interrupt ............................................. 3-192
RLA/@RLA: Rotate Left A ...................................... 3-169
ROOT/@ROOT: Square Root ................................ 3-185
RRA/@RRA: Rotate Right ...................................... 3-169
RS-232C cable connection ..................................... 3-307
RS-232C Protocol ................................................... 3-306
RS-422A [KV-L2] .................................................... 1-248

System Configuration (Memory Card) .................... 1-196


System specifications [Visual KV Series] ............... 1-382
System specifications [KV-300 Series] .................. 1-392

T
TBCD/@TBCD: Transfer BCD ................................ 3-180
TBIN/@TBIN: Transfer BIN ..................................... 3-180
Temporary Memory ................................... 2-172, 2-176
Timers and Counters ........................................... 2-169
TMH: 0.01-s Timer .................................................... 3-68
TMIN: Trimmer In .................................................... 3-138
@TMIN: Trimmer Setting ........................................ 3-138
TMR: 0.1-s Timer ...................................................... 3-67
TMS: 1-ms Timer ...................................................... 3-69
Transmitting text data .............................................. 3-319
Troubleshooting ..................................................... 1-372

U
UDC: Up-Down Counter ............................................ 3-76

Index

MPX/@MPX: Multiplexer ........................................ 3-176


MRD: Read ............................................................. 3-103
MUL/@MUL: Multiply .............................................. 3-150

W
W-DE: Wait Down Edge ............................................ 3-98
W-OFF: Wait OFF ..................................................... 3-96
W-ON: Wait ON ......................................................... 3-96
W-UE: Wait Up Edge ................................................ 3-98

X
@xxxx: Differentiation ............................................. 3-137

SBN: Subroutine Entry ............................................ 3-122


Serial Communication ............................................. 3-306
SET: Set .................................................................... 3-66
SFT: Shift .................................................................. 3-82
SLA/@SLA: Shift Left A .......................................... 3-166
Special Utility Relays ............................................... 2-174
SRA/@SRA: Shift Right A ....................................... 3-166
STA/@STA: Store A ............................................... 3-140
Station No. [KV-L2] ................................................ 1-246
STE: Step End ........................................................ 3-114
STG: Stage ............................................................. 3-106
STP: Step ................................................................ 3-114
SUB/@SUB: Subtract ............................................. 3-150
System configuration .............................................. 1-166

Index

2-211

Index Software/P3E (handheld programmer)

Index Software/P3E (handheld programmer)


MULTI-MONITOR [P3E] ........................................ 1-212

A
ACCS ..................................................................... 1-234
ALL CLEAR [FNC60] [P3E] .................................... 1-217
ALL DATA MEMORY CLEAR
(DM ALL CLEAR): [FNC64] [P3E] ..................... 1-219
ALL LATCHING RELAYS RESET
(L-RELAY ALL RST): [FNC65] [P3E] .................. 1-219

B
Break signal ............................................................ 3-308

Index

C
CLEAR [P3E] ......................................................... 1-232
Comments (Relay comment, Line comment) ...... 2-46
Compile ................................................................... 2-75
Converting N.O./N.C. .............................................. 2-65
Copy, move and delete .......................................... 2-69
COUNTER CLEAR (CTR CLEAR): [FNC62] [P3E] 1-218
Customizing KV-LADDER ,
Defining Environment Strings .......................... 2-19
Copy, move and delete operation ......................... 2-52

D
Data Communications between KV
and Personal Computer ....................................... 3-306
Display mode ......................................................... 2-19
Double coil check ................................................... 2-76

E
Edit screen .............................................................. 2-27
Entering symbols ................................................... 2-37
Environment requirements ..................................... 2-3
Error message list ................................................ 2-156

H
HANDHELD PROGRAMMER CLEAR (P3E CLEAR):
[FNC61] ............................................................. 1-217
Handheld Programmer KV-P3E ............................. 1-196
HIGH-SPEED COUNTER CLEAR
(HIGH SPEED CTR CLR): [FNC63] [P3E] ......... 1-218

I
Installing Ladder Builder ......................................... 2-9

J
Jump ........................................................................ 2-58

L
Ladder Monitor ..................................................... 2-134
Ladder Simulator .................................................... 2-84
Line comment ........................................................ 2-46

M
Macros ..................................................................... 2-72
Memory Card [P3E] ................................................ 1-230
Monitor Mode ........................................................ 2-134
Monitor screen ..................................................... 2-143
MOVE CURSOR [P3E] .......................................... 1-202

2-212

Index

O
OFFLINE EDITOR START (OFFLINE EDITOR):
[FNC67] [P3E] ................................................... 1-221
OFFLINE EDITOR STOP (QUIT OFF-L EDIT):
[FNC68] [P3E] ................................................... 1-221
ON/OFF MONITOR [P3E] ...................................... 1-215

P
Printer Setting, Defining Environment Strings ... 2-77
Printing examples .................................................. 2-81
PROGRAM CAPACITY CHECK (PROGRAM SIZE):
[FNC75] [P3E] ................................................... 1-229
PROGRAM SENT OR RECEIVED
(COMMUNICATION): [FNC66] [P3E] ............ 1-220

Q
Quitting software .................................................... 2-16

R
READ TRIMMER SETTING (TRIMMER MONITOR):
[FNC73] [P3E] ................................................... 1-228
Registration of cursor position and
jump to registered position .............................. 2-59
RELAY ON/OFF (FORCED SET/RESET):
[FNC71] [P3E] ................................................... 1-226
Replacing relays ..................................................... 2-64
RS-232C cable connection ...................................... 2-7
RS-232C Protocol ..................................................... 2-3

S
SCAN TIME MONITOR [P3E] ................................ 1-212
SCROLL [P3E] ....................................................... 1-202
Search ..................................................................... 2-58
Searching Program [P3E] ...................................... 1-207
Selecting display mode ......................................... 2-19
Setting print range ................................................. 2-77
Simulator Mode ...................................................... 2-84
Simulator screen .................................................... 2-86
Starting and quitting software .............................. 2-16
Starting edit mode ................................................. 2-29
Starting the Monitor Function ............................. 2-139
Starting the Simulator ............................................ 2-86
SYNTAX CHECK (PROGRAM CHECK):
[FNC74] [P3E] ................................................... 1-228

T
Temporary Memory ................................................... 3-21
Time Chart Monitor .............................................. 2-157
Time Chart Viewer ..................................... 2-148, 2-167
TIMER/COUNTER SETTING CHANGE
(CHG: T/C SET-V): [FNC70] [P3E] ................... 1-224
TIMER/COUNTER CURRENT VALUE CHANGE
(CHG: T/C CURT-V): [FNC69] [P3E] ................ 1-222

W
WRITE INTO DATA MEMORY (DM WRITE):
[FNC72] [P3E] ................................................... 1-227

Index

Index

2-213

Index

2-214

Index

WARRANTIES AND DISCLAIMERS:

1
Index

(1) KEYENCE warrants the Products to be free of defects in materials and workmanship for a period of
one (1) year from the date of shipment. If any models or samples were shown to Buyer, such models or
samples were used merely to illustrate the general type and quality of the Products and not to represent
that the Products would necessarily conform to said models or samples. Any Products found to be defective must be shipped to KEYENCE with all shipping costs paid by Buyer or offered to KEYENCE for inspection and examination. Upon examination by KEYENCE, KEYENCE, at its sole option, will refund the
purchase price of, or repair or replace at no charge any Products found to be defective. This warranty
does not apply to any defects resulting from any action of Buyer, including but not limited to improper
installation, improper interfacing, improper repair, unauthorized modification, misapplication and mishandling, such as exposure to excessive current, heat, coldness, moisture, vibration or outdoors air. Components which wear are not warranted.
(2) KEYENCE is pleased to offer suggestions on the use of its various Products. They are only suggestions, and it is Buyers responsibility to ascertain the fitness of the Products for Buyers intended use.
KEYENCE will not be responsible for any damages that may result from the use of the Products.
(3) The Products and any samples (Products/Samples) supplied to Buyer are not to be used internally
in humans, for human transportation, as safety devices or fail-safe systems, unless their written specifications state otherwise. Should any Products/Samples be used in such a manner or misused in any way,
KEYENCE assumes no responsibility, and additionally Buyer will indemnify KEYENCE and hold
KEYENCE harmless from any liability or damage whatsoever arising out of any misuse of the Products/
Samples.
(4) OTHER THAN AS STATED HEREIN, THE PRODUCTS/SAMPLES ARE PROVIDED WITH NO
OTHER WARRANTIES WHATSOEVER. ALL EXPRESS, IMPLIED, AND STATUTORY WARRANTIES,
INCLUDING, WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF PROPRIETARY RIGHTS, ARE EXPRESSLY
DISCLAIMED. IN NO EVENT SHALL KEYENCE AND ITS AFFILIATED ENTITIES BE LIABLE TO ANY
PERSON OR ENTITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, PUNITIVE, SPECIAL OR CONSEQUENTIAL DAMAGES (INCLUDING, WITHOUT LIMITATION, ANY DAMAGES RESULTING FROM
LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF INFORMATION, LOSS OR INACCURACY OF
DATA, LOSS OF PROFITS, LOSS OF SAVINGS, THE COST OF PROCUREMENT OF SUBSTITUTED
GOODS, SERVICES OR TECHNOLOGIES, OR FOR ANY MATTER ARISING OUT OF OR IN CONNECTION WITH THE USE OR INABILITY TO USE THE PRODUCTS, EVEN IF KEYENCE OR ONE OF ITS
AFFILIATED ENTITIES WAS ADVISED OF A POSSIBLE THIRD PARTYS CLAIM FOR DAMAGES OR
ANY OTHER CLAIM AGAINST BUYER. In some jurisdictions, some of the foregoing warranty disclaimers
or damage limitations may not apply.
BUYERS TRANSFER OBLIGATIONS: If the Products/Samples purchased by Buyer are to be resold or
delivered to a third party, Buyer must provide such third party with a copy of this document, all specifications, manuals, catalogs, leaflets and written information provided to Buyer pertaining to the Products/
Samples.

Index

2-215

INDEX

Installation

Support
Software

Programming

1. Configuration and
Specifications

3. Access Window
4. KV-D20 Operator
Interface Panel

1. Programming

2. Editor

2. Instructions

3. Simulator

3. Interrupts

4. Monitor

4. High-speed Counters

5. Appendices

5. Positioning Control
6. Interrupts, High-speed
Counters, Positioning
Control

5. KV-10/80 Hardware
6. Handheld Programmer

7. Serial Communication

7. KV-L2 Serial Interface


Module

8. Programming
Examples

8. KV-AN6 Analog I/O


Module
9. KV-AD4/DA4 Analog
I/O Unit
10. Troubleshooting
11. Appendices

Specifications are subject to change without notice.


AFFILIATED COMPANIES

KEYENCE CORPORATION
1-3-14, Higashi-Nakajima,
Higashi-Yodogawa-ku,
Osaka, 533-8555, Japan
Phone: 81-6-6379-2211
Fax: 81-6-6379-2131

KEYENCE CORPORATION OF AMERICA


Phone: 201-930-0100 Fax: 201-930-0099

KEYENCE (MALAYSIA) SDN BHD


Phone: 03-2092-2211 Fax: 03-2092-2131

KEYENCE DEUTSCHLAND GmbH


Phone: 06102-36 89-0 Fax: 06102-36 89-100

KEYENCE (THAILAND) CO., LTD


Phone: 02-369-2777 Fax: 02-369-2775

KEYENCE (UK) LIMITED


Phone: 01908-696900 Fax: 01908-696777

KEYENCE TAIWAN CO., LTD


Phone: 02-2627-3100 Fax: 02-2798-8925

KEYENCE FRANCE S.A.


Phone: 01 56 37 78 00 Fax: 01 56 37 78 01

KEYENCE (HONG KONG) CO., LTD


Phone: 3104-1010 Fax: 3104-1080

KEYENCE ITALIA S.p.A.


Phone: 02-6688220 Fax: 02-66825099

KEYENCE INTERNATIONAL TRADING


(SHANGHAI) CO., LTD.
Phone: 021-68757500 Fax: 021-68757550

KEYENCE SINGAPORE PTE LTD


Phone: 6392-1011 Fax: 6392-5055

KEYENCE KOREA CORPORATION


Phone: 02-563-1270 Fax: 02-563-1271

KEYENCE CORPORATION, 2004 0034-1 96M0365 Printed in Japan

NEW KV Series 2 Support Software

2. System Installation

1. Introduction

You might also like