The NEW KV Series User’s Manual is composed of 3 separate
manuals; 1-Installation, 2-Support Software, 3-Programming.
Please read each manual relevant to your purpose.
Page 2
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.
WARNING
Failure to follow instructions may lead to injury. (electric
shock, burn, etc.)
Note:
Conventions
This manual describes the operation/function of all Keyence KV Series PLC.
Note following conventions when you use.
• 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.
CAUTION
Failure to follow instructions may lead to product damage.
Provides additional information on proper operation.
KV-300
(1)
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.
Page 3
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 KV-
40AR/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.
96M0365
(2)
Page 4
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)
Page 5
● 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)
Page 6
Cautions when using the previous version of ladder support software
Pay strict attention to the following items when using the ladder support software.
• 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.
CAUTION
When the ladder support software "LADDER BUILDER for KV Ver. 1.0x" is
used, do not use the monitor’s 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:
• 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.
(5)
Page 7
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:
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 25°C (20
days or longer at 25°C 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)
Page 8
How this manual is organized
The Visual KV Series User’s 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 1Configuration 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 2System Installation [Visual KV Series Only]
Describes the installation and connection of each Visual KV Series unit as well as
system maintenance.
Chapter 3Access Window [Visual KV Series Only]
Describes the Access Window used for changing and monitoring data.
Chapter 4KV-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 5KV-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 6Handheld Programmer
Describes how to use the handheld programmer and memory card.
Chapter 7KV-L2 Serial Interface Module [KV-300 Series Only]
Describes the serial interface modules for KV-300 Series.
Chapter 8KV-AN6 Analog I/O Module [KV-300 Series Only]
Describes the optional Analog I/O module for KV-300 Series
Chapter 9KV-AD4/DA4 Analog I/O Unit [KV-10/80 Series Only]
Describes the optional Analog I/O unit for KV-10/80 Series.
Chapter 10Troubleshooting
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.
2Support Software
Chapter 1Introduction
Describes the items included in the package, the product outline, the method to connect
a personal computer, the installation method, etc.
(7)
Page 9
Chapter 2Editor
Describes the operating procedures in Editor mode.
Chapter 3Simulator
Describes the operating procedures in Simulator mode.
Chapter 4Monitor
Describes the operating procedures in Monitor mode.
Appendices
Includes instructions list, devices list, sample program list and quick reference for key
operation and shortcuts.
3Programming
Chapter 1Programming
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 2Instructions
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 3Interrupts [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 4High-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 5Positioning 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 7Serial 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 8Programming 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)
Page 10
Contents
2Support software
Chapter 1Introduction
1.1Items Included in the Package ........................................................................2-2
1.2Outline 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
• No part of this manual may be reprinted or reproduced in any form or by any
means without the prior written permission of KEYENCE CORPORATION.
• The content of this manual is subject to change without notice.
• KEYENCE has thoroughly checked and reviewed this manual. Please contact
the sales office listed at the end of this manual if you have any questions or
comments regarding this manual or if you find an error.
• KEYENCE assumes no liability for damages resulting from the use of the information in this manual, item 3 above notwithstanding.
• KEYENCE will replace any incomplete or incorrectly collated manual.
All company names and product names in this manual are registered trademarks or
trademarks of their respective owners.
(23)
Page 25
Chapter 1
Software – Windows [KV-H6WE2]
This chapter describes the items included in the package, the product outline, the
method to connect a personal computer, the installation method, the common
operating procedures, etc.
1.1Items Included in the Package .............................................................2-2
1.2Outline 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
1.6.4 Mouse operation and keyboard operation ................................................2-20
1.6.5 Online help ............................................................................................... 2-21
Page 26
Chapter 1 Introduction
1.1Items 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
1
● Connection cable
➮
See page 2-7.
2-2
Page 27
1.2Outline 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
Chapter 1 Introduction
Printer
1
1
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
Page 28
Chapter 1 Introduction
1.2.2 Features and functions of the Ladder Builder for KV
The Ladder Builder for KV is a software program that allows you to create sequence
programs. It offers excellent functionality and advanced programming processing
ability.
Features of the Ladder Builder for KV
1
■ 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.
2-4
■ 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).
Page 29
Chapter 1 Introduction
■ Allows quick selection of the device to be monitored by dragging and
dropping from the ladder diagram.
The device to be monitored can be easily and quickly selected by dragging and
dropping it from the ladder diagram.
■ 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.
1
1
■ Allows use of the simulator functions even when not connected to a PLC.
You can monitor and simulate the operation of the program even when a PLC is
not connected. Debugging efficiency is improved because program operation can
be checked without transferring the program to the PLC. As well, the reverse
step execution function is provided both for execution of scans and execution of
steps.
■ Provides 5 different screen sizes for different applications.
There are 5 different screen display sizes that can be selected as required for
different applications. For example, the reduced size can be selected to confirm
the entire flow, and the enlarged size can be selected to edit each contact.
2-5
Page 30
Chapter 1 Introduction
Functions of the Ladder Builder for KV
The following functions are provided in the Ladder Builder for KV.
■ Editor function
• Creates the ladder diagram using diversified instruction words of the ladder
language.
• Registers comments to contacts. Comments can be transferred to a Visual KV or
1
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.
2-6
■ 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.
Page 31
1.3Before 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 cableModel: OP-26487
D-sub 9-pin type conversion connector Model: OP-26486
KV Series PLC
OP-26487
To RS-232C
connector
OP-26486
Chapter 1 Introduction
1
1
CAUTION
To RJ-11 modular
connector
PC
If a Visual KV or a conventional KV is accidentally connected to the personal
computer’s 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 cableWhen the PC has 25-pin
connector
KV
SD
3
RD
5
SG
4
RJ-11 Modular
Connector
PC
2
3
4
5
6
7
8
9-pin D-sub connector
KVPC (DTE)
SD
3
RD
5
4
SG
25-pin D-sub connector
SD
2
3
RD
4
RS
5
CS
6
DR
20
ER
7
SG
2-7
Page 32
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
• 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.
1.3.2 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.
• 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.
2-8
Page 33
1.4Installing the Software
This section describes how to install the Ladder Builder for KV on the personal
computer’s 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 KV’s monitor functions.
For the setup procedure, refer to your personal computer’s 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.
Chapter 1 Introduction
1
1
2-9
Page 34
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 (
Installation in Windows 3.1 (
1
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.
➮
See below
➮
Page 2-12
)
)
2-10
5. When the following screen is displayed, click the [Next] button. To cancel installation, click the [Cancel] button.
Page 35
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.
1
1
9. Installation is now completed. Click the [OK] button.
2-11
Page 36
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.
1
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" (
1.5Cautions 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 computer’s 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).
➮
page 2-10
).
2-12
Page 37
1.6Basic 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
Chapter 1 Introduction
1
1
2-13
Page 38
Chapter 1 Introduction
1
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
• 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
• 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.
• Print out the registration monitor.
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.
➮
p. 2-131
➮
p. 2-133
➮
p. 2-83
➮
p. 2-117
2-14
Page 39
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.
Chapter 1 Introduction
1
1
■ 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
Page 40
Chapter 1 Introduction
Setting and changing the model used
➔
Change Models
File
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
1
Models" from the "File" menu.
CAUTION
• 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".
2-16
Page 41
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
Chapter 1 Introduction
1
1
Current window
Simulator
Changed over to monitor
Transfer Program
to PLC → Monitor
▲
▲
▲ ▲
Simulator
Editor
Editor after devices are
cleared
The name and functions of each window are described on the following pages.
Editor ➮ p. 2-25
Simulator
➮
Monitor
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 window’s 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
p. 2-83
➮
p. 2-133
open. Select the title of the window you wish to select as the current window.
Monitor
Editor
▲
2-17
Page 42
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 editor’s menu bar.
Check mark
1
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.)
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 editor’s menu bar, or click
the
button.
Tool bar
Dialog bar
Status bar
2-18
The "Display Mode Setup" dialog box is displayed.
Page 43
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.
1
1
Display
Size
Show in XYMDisplays device names in the ladder diagram using
Show Decimal ConstantDisplays decimal constants with sign in the ladder
with Signdiagram.
Show Device LabelDisplays the label name of each device in the ladder
Show CommentDisplays comments in the ladder diagram.
Comment Comment 1Displays comment 1 [which is completely shared with
typethe KV IncrediWare (DOS)]
Mode
Setting
Range
200%Displays a ladder diagram at twice the standard size.
150%Displays a ladder diagram at 1.5 times the standard
120%Displays a ladder diagram at 1.2 times the standard
100% (Normal)Displays a ladder diagram in the standard size.
80%Displays a ladder diagram in the smallest size. This
Comment 2Displays comment 2 (which cannot be transferred to
Comment 3Displays comment 3 (which cannot be transferred to
Current EditReflects the setting on the edit screen
Screen(current window).
Current Reference Reflects the setting on the reference screen
Screen(current window).
Current ScreensReflects the setting on both the edit screen and the
All WindowsReflects the setting on all the windows.
This size is useful when characters are small and
difficult to read.
size.
size.
size is useful when checking the entire operation
because the maximum number of cells can be dis
played on the screen.
"X", "Y" and "M".
diagram.
the PLC)
the PLC)
reference screen (both current windows).
* The current window refers to the currently selected active window.
* Line comments cannot be transferred.
2-19
Page 44
Chapter 1 Introduction
Show/hide comments
You can select to show or hide contact comments on the editor screen.
"Comment 1" is displayed.
Hide comments
0000
0001
1
1.6.4 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
▲
▲
Click
cursor position.
Show comments
0000
0001
Lamp ON
2-20
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.
Page 45
1.6.5 Online help
The Ladder Builder for KV includes online help.
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
Chapter 1 Introduction
button on the tool bar or select
1
1
2-21
Page 46
Chapter 1 Introduction
1
2-22
Page 47
Chapter 1 Introduction
1
1
2-23
Page 48
Chapter 1 Introduction
1
2-24
Page 49
Chapter 2
Editor
2.1Outline of the Editor Functions ........................................................... 2-26
2.1.1 Cautions for editing ladder programs ....................................................... 2-26
2.14Changing the Display Color on the Screen ........................................ 2-82
2.14.1 Changing display colors on the screen .................................................... 2-82
Page 50
Chapter 2 Editor
2.1Outline 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.
2
2.1.1 Cautions for editing ladder programs
• 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.
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
Page 51
2.2Edit 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.
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.
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.
Ladder diagram line No.
Indicates a line number in
the ladder diagram.
Status indication bar
Indicates the function currently selected and the key
status.
Title bar
Displays the name of the
file being edited.
Chapter 2 Editor
Main window
The entire editor screen.
Ladder program
window
One window is displayed
for each ladder program
file.
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
1
2
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.
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
Page 52
Chapter 2 Editor
2.2.2 Ladder program window screen
Line No.
Step No.
Cursor
2
• 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: Move the cursor in the correspond-
Pageup/PageDown keys: Move the cursor up or down one
Ctrl + UP/DOWN keys: Move the cursor by one block.
Home key: Move the cursor to the first line.
End key: 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 "
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.
Contact
Scroll bar
ing direction.
page (screen).
", the window
2-28
Note: While the pointer shape is " ", the window size can be changed but the
screen cannot be divided.
Page 53
2.3File 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.
Chapter 2 Editor
1
2
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
Page 54
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
2
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.
2-30
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.
Page 55
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.
■ 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.
Chapter 2 Editor
1
2
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
Page 56
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.
When
is clicked, "save" is selected.
2
Save: Saves a file with the current file name.
Save As: 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.
2-32
Folder (directory) Select the folder (directory) in which the file is to be saved.
File NameEnter the file name consisting of up to 8 characters. The extension is
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.
The current folder (directory) is selected by default.
set to "ldr". Never change the extension.
Page 57
Reading files
File ➔ Open
Chapter 2 Editor
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.
1
2
Folder (directory) Select the folder (directory) in which the file to be read is saved.
File NameSpecify 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.
The current folder (directory) is selected by default.
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
Page 58
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
2
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
Page 59
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 Label name Comment 1 Comment 2 Comment 3
• 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.
,,,,,
Comma
Label nameLetters. 8 characters maximum.
Comment 1
Comment 232 characters maximum
Comment 3
Space and comma cannot be entered.
1
2
■ 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
Page 60
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
Page 61
Chapter 2 Editor
2.4Entering/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
1
2
2-37
Page 62
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.
2
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
2-38
Sequence selection
Page 63
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.
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
▲
Page 65
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
Chapter 2 Editor
1
2
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
Page 66
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.)
• Press the space bar.
• Press the Delete key.
(When the Backspace key is pressed, the symbol just before the cursor is
2
deleted.)
2.4.3 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.
2-42
When entering an a contact:
a (N.O.) Contact Input(F5) key
When entering a b contact
b (N.C.) Contact Input(Shift + F5) keys
When entering an a contact OR
a (N.O.) Contact OR Input(F4) key
When entering a b contact OR
b (N.C.) Contact OR Input(Shift + F4) keys
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.
button
button
button
button
Page 67
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.
Chapter 2 Editor
1
2
When entering a coil: Coil InputF7 key
When entering the b contact coil : Coil InputShift + F7 keys
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)
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.
★
Right-click
button
button
2-43
Page 68
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
2
(F9) + (-) (minus key) or
■ 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.
: Draws a connection line downward from the cursor
position.
: Draws a connection line to the right of the cursor
position.
2-44
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.)
Page 69
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.
Chapter 2 Editor
1
2
• Click the
■ 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
button.
button.
2.4.6 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
Page 70
Chapter 2 Editor
2.5Entering 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
2
Editing the list for each device
Comment ➔ Edit Comment/Label (Ctrl + F7)
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.
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.
2-46
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.
Page 71
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.
Comment 1 32 characters maximum
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.
Spaces and commas cannot be entered.
(This comment is compatible with KV IncrediWare (DOS) relay comments.)
1
2
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
Page 72
Chapter 2 Editor
2
■ 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
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.
registered.
2-48
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.
Page 73
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
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)
1
2
* 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
Page 74
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.
2
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.
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.
button.
2-50
Page 75
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.
Chapter 2 Editor
1
2
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
Page 76
Chapter 2 Editor
2.6Edit 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
2
Selecting the range
standard Windows editing procedure.
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
Page 77
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.
• 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.
1
2
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
Page 78
Chapter 2 Editor
Copy/move/delete operation
Edit➔ Cut (Ctrl + X) ★ Right-click
➔
Copy (Ctrl + C) ★ Right-click
➔
Paste (Ctrl + V) ★ Right-click
2
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.
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.
button.
2-54
Page 79
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.
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.
button.
1
2
2-55
Page 80
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
• While pressing and holding the Ctrl key, press the V key.
• While pressing and holding the Shift key, press Insert key.
2
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 "Can’t write at current position." is displayed, and the cells equivalent
to only the paste destination space are pasted. The remaining cells are not pasted.
button.
2-56
Page 81
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.
Chapter 2 Editor
1
2
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
Page 82
Chapter 2 Editor
2.7Jump, 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.
2
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.
2-58
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.
Page 83
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.
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.
Chapter 2 Editor
1
2
2-59
Page 84
Chapter 2 Editor
2
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.
2-60
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.
Page 85
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.
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.
Chapter 2 Editor
1
2
2-61
Page 86
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
The "Find Instruction" dialog box is displayed.
2
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 "Can’t
find specified symbol." is displayed.
button.
2-62
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.
Page 87
2.7.3 Searching for the device at the cursor position
Edit ➔ Find Device at Cursor Position in Ladder➔ Search Backward (U) (F2)
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.
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
Search for OUT Forward : Searches for OUT forward from the current cursor
4. Search is started, and the first device found is displayed.
➔
Search Forward (F3)
➔
Search for OUT Backward (Shift + F2)
➔
Search for OUT Forward (Shift + F3)
position.
position.
Chapter 2 Editor
1
2
5. When searching continuously, repeat steps 2 to 4 above.
2-63
Page 88
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
The "Replace Operand" dialog box is displayed.
2
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 CheckThe message to confirm execution of replacement is
Show Can’t Replace Message For an operand which cannot be replaced, the mes
Move Comment and LabelThe comment and the label attached to the operand
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.
not displayed at all.
sage is displayed.
before replacement are attached to the operand after
replacement.
button.
2-64
Page 89
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.
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.
Chapter 2 Editor
1
2
2-65
Page 90
Chapter 2 Editor
2
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.
2-66
5 When all conversions are complete, the number of contacts converted is dis-
played.
Click the [OK] button.
Page 91
2.8Editing 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.
Chapter 2 Editor
1
2
2. Select "Edit List" from the "Edit" menu, or click the
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.
button.
2-67
Page 92
Chapter 2 Editor
Terminating a mnemonic list
2
Format of 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.
The following format is used in a mnemonic list.
Keep in mind that compilation is disabled if the format is different.
Step No.
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.
Mnemonic
2 spaces 2 spaces
Operand
2 spaces
Comment
;
Semicolon
2-68
Page 93
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.
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.
Chapter 2 Editor
1
2
2-69
Page 94
Chapter 2 Editor
2.9Displaying 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
2
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
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.
button.
2-70
Page 95
2.10Setting 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.
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)
Chapter 2 Editor
1
2
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
Page 96
Chapter 2 Editor
2.11Entering 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
2
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 nameEnter up to 8 characters. Do not enter spaces.
Number of argumentsEnter the number of devices to be variable. Temporary
CommentEnter a comment on an argument, etc.
devices (shown below) contained in a ladder diagram can be
replaced with arbitrary devices (up to 10 devices).
Separate each item with a comma (,).
2-72
@TEST.4.test macro
Number of
arguments
Comment
Page 97
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.
1
2
2-73
Page 98
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
2
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.
2-74
Note: Macros that have been changed cannot be returned to their original state.
Page 99
2.12Compilation
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.
To compile a ladder program, perform the following procedure.
1. Set the ladder diagram of the program to be compiled as the current window.
Chapter 2 Editor
1
2
2. Select "Compile" from the "Compile" menu, or click the
The compilation process is performed.
3. When the program is correctly compiled, the message "Compilation successful."
is displayed. Click the [OK] button.
button.
2-75
Page 100
Chapter 2 Editor
2.12.2 Error display
Compile ➔ Show Error (Ctrl + F10)
2
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
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
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.
Contents
button.
2-76
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.