0% found this document useful (0 votes)
201 views418 pages

Kvshard PDF

Uploaded by

Zeroic Fotri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
201 views418 pages

Kvshard PDF

Uploaded by

Zeroic Fotri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 418

051GB

Programmable Controller

KV-1000 Series

User's Manual
Preface
The HI-SPEED VISUAL PLC KV-1000 Series is equipped with a hyper access window. This access
window allows you to check at a glance the I/O information and error information of Expansion Units
that has not been possible up till now unless a tool was connected. This Series is also provided with a
Memory Card slot. This enables exchanging programs using the auto-load feature, logging of
production information, and other extensive functions.
Store this manual in a safe place so that you can retrieve it whenever necessary.
See to it that this manual reaches the last person who is going to use the KV-1000 Series.

■ KV-1000 Series Related Manuals


Read the following manuals when you use the KV-1000 Series.
If you require these manuals, contact your agent.
Type of Manual Description of Manual
Ladder Support Software
KV STUDIO / KV BUILDER This manual describes how to install KV STUDIO and KV BUILDER.
Installation Manual
Programmable Controller This manual describes in simple terms the basic function and how to use
KV-1000 Series the KV-1000 Series for first time users. First-time users should read this
Introduction Manual manual.
Programmable Controller This manual.
KV-1000 Series This manual describes the specifications of the KV-1000 Series,
User's Manual integrated functions, and methods of operation.
Programmable Controller
This manual describes how to make ladder programs using the KV-1000
KV-1000 Series
Series, and modules/macros and local devices.
Programming Manual
Ladder Support Software
KV STUDIO This manual describes how to operate KV STUDIO.
User's Manual
Programmable Controller
KV-1000 Series This manual describes the instructions available for the KV-1000 Series.
Instruction Reference Manual
Programmable Controller
KV-1000 Series This manual describes the system macros available for the KV-1000 Series.
System Macro Manual
For Safe Usage
This manual describes handling, operation, and safety information for the KV-1000/700 Series.
Read this manual thoroughly in order to take full advantage of product performance, and use the
product only after fully understanding its contents.

Store this manual in a safe place so that you can retrieve it whenever necessary.
See to it that this manual reaches the last person who is going to use the KV-1000 Series.

■ This manual’s format


This manual uses the following symbols to alert you to important information.

DANGER Failure to follow these instructions may lead to death or serious injury.

WARNING Failure to follow these instructions may lead to injury.

CAUTION Failure to follow these instructions may lead to physical damage (product
malfunction, etc.).

Important
This heading is used to indicate precautions and restrictions that must be followed
when operating the product.

Note
This heading is used to indicate cautions relating to device operation where operator
error is likely.

Tip Indicates useful information or information that aids understanding of text descriptions.

Indicates a reference item or page to be referred to in this manual and a separate manual.

051GB 1
General Precautions
• Verify that this device is operating normally in terms of functionality and performance before the start
of work and when operating the device.
• Provide a safety circuit that does not pass via the programmable controller to enable failsafe
operation of the entire system in the event that the programmable controller fails.
• Output circuit or internal circuit malfunctions sometimes prevent control from being performed
normally. Be sure to provide a safety circuit in control systems where circuit malfunction may lead to
fire or other serious accidents.
• Proceed with care when modifying the KV-1000/700 Series, or when using it in a manner that falls
outside of the ranges indicated in its specifications, since KEYENCE is unable to guarantee device
functionality or performance in such situations.
• Use this product in combination with other devices only after careful consideration, since the KV-
1000/700 Series may fail to satisfy its functionality and performance capabilities as a result of the
conditions and environment in which it is used.
• Do not use this product for the purpose to protect a human body or part of a human body.
• This product is not intended for use as an explosion-proof product. Do not use this product in a
hazardous location and/or potentially explosive atmosphere.

2
CE Marking
Keyence Corporation has confirmed that this product complies with the essential requirements of the
applicable EC Directive, based on the following specifications. Be sure to consider the following
specifications when using this product inthe Member States of European Union.

EMC Directive (2004/108/EC)


• Applicable standard EMI: EN61131-2, Class A EMS: EN61131-2
• When installing the KV-1000/700 Series, it must be installed in an conductive enclosure (industrial
control panel) with IP54 or higher.
• When using a Keyence KV-U7 as the power supply for the KV-1000/700 Series, pass the power
cable through the ferrite core twice.
• When using a Keyence KV-U7 as the power supply for the KV-1000/700 Series, be sure to connect
the protective earthing terminal located on the power supply input terminal to the protective earthing
conductor in the building installation.
• When using the DC power input terminal of the KV-1000/700 Series, pass the power cable through
the ferrite core twice.
• Use a shielded cable for the signal lines located outside of the conductive enclosure (industrial
control panel). The shielded cable must be grounded.
• Be sure to use the functional earthing terminal on the unit for grounding, if applicable.
Remarks:
These specifications do not give any guarantee that the end-product with this product incorporated
complies with the essential requirements of EMC Directive. The manufacturer of the end-product is
solely responsible for the compliance on the end-product itself according to EMC Directive.

Notes on compatibility
<The industrial control panel>
• If seams exist within the top or bottom plate of the industrial control panel, strip the coating to
maintain electric potential.
• When grounding the industrial control panel, use a thick grounding wire to create low impedance
even at high frequencies.
<Grounding shielded cables>
• Ground shielded cables near the expansion unit, otherwise, the grounded cables will receive
electromagnetic induction from cables that were present before grounding was implemented.
• After removing and exposing a section of the outer covering for the shielded cable, connect this part
to the industrial control panel in a wide area. (When using clamp brackets or other such tools, be
sure to strip the paint from the contact)
• Do not ground electrical wires by soldering them to shielded wires, as this method will increase
high-frequency impedance and nullify the shield effect.

Low-voltage Directive (2006/95/EC)


The Low-voltage Directive is applied to KV-U7 and KV-B16RA. It is not applicable to any other models.
• Applicable standard EN61131-2 (KV-B16RA)
EN60950-1 (KV-U7)
• Overvoltage Category II
• Pollution degree 2

3
• When using a Keyence KV-U7 as the power supply of the KV-1000/700 Series, be sure to connect
the protective earthing terminal located on the power supply input terminal to the protective earthing
conductor in the building installation because the KV-U7 is designed as a Class I equipment.
• When installing the KV-1000/700 Series, it must be installed in an enclosure (industrial control
panel) with IP54 or higher.
• The rated relay load of the KV-B16RA is 8A per common. In other words, when all eight channels
are used, the maximum load per channel is 1A, and when four channels are used, the maximum
load per channel is 2A.

UL Certificate
The KV-1000/700 Series is an UL Listed Product.
UL-certified products display the UL mark on the label found on the side of each product.

• UL File No. E207185


• Category NRAQ

Be sure to consider the following specifications when using this product as an UL Listed product.
• When installing the KV-1000/700 Series, it must be installed in an enclosure (Industrial control panel)
with IP54 or higher.
• Supply power to the KV-1000/700 Series using either the exclusive Keyence KV-U7 power supply, or
a power supply that provides Class 2 output defined in NFPA 70 (NEC: National Electrical Code).
• When using a Keyence KV-U7 as the power supply of the KV-1000/700 Series, be sure to connect
the protective earthing terminal located on the input terminal to the protective earthing conductor in
the building installation wiring as the KV-U7 is designed as a Class I equipment.
• Use stranded copper wire having a gage of AWG#14 to #22 and temperature rating of 105°C or
higher as the lead for wiring to the terminal block on the KV-U7. The tightening torque is 0.6 N·m.
• For wiring to the power supply terminal block on KV-1000/700, use stranded copper wire having a
gage of AWG#20 and temperature rating of 60°C or higher. The tightening torque is 0.5 N·m (4.4
lbin).
• For wiring to the terminal block on the special units except for the KV-DN20 or I/O units, use
stranded copper wire having a gage of AWG#16 to #22 and temperature rating of 60°C or higher
(105°C or higher for the KV-B16RA). The tightening torque is 0.56 N·m (4.94 lb-in).
• For wiring to the functional grounding terminal on the KV-DN20, use stranded copper wire having a
gage of AWG#12 to #22 and temperature rating of 60°C or higher. The tightening torque is 1.8 N·m.
• For wiring to the DeviceNet connector on the KV-DN20, use stranded copper wire having a gage of
AWG#12 to #30 and temperature rating of 60°C or higher. The tightening torque is 0.6N·m.
• The KV-1000/700 (CPU Unit) has a built-in replaceable lithium battery. When replacing the lithium
battery, be sure to use the Replacement Lithium Battery (OP-51604 for KV-1000, OP-42139 for
KV-700) specified in this manual. The lithium battery may explode if mistreated. Explosion hazard.
Never charge, dismantle or throw the battery into fire.

4
How This Manual Is Organized

Chapter 1 THE
CONFIGURATION OF
KV-1000 SERIES
This chapter describes the configuration of the KV-1000 Series system,
names and functions of parts on units, and specifications.
1
& SPECIFICATIONS
2
Chapter 2 ACCESS WINDOW This chapter describes the access window that allows the user to change
data and easily perform monitoring.
3
4
Chapter 3 MEMORY CARD This chapter describes the Memory Card. 5
6
The interrupt processing function executes an interrupt program when there

Chapter 4 INTERRUPTS is a request (an interrupt cause is generated) from an external input or a
high-speed comparator during operation of the KV-1000. This chapter
7
describes the types of interrupt causes and I/O during interrupt processing.
8
This chapter describes high-speed counters and high-speed counter
Chapter 5 HIGH-SPEED
COUNTERS
comparators that enable high-speed pulse measurement and pulse output
independent of scan time.
9
10
Three types of output (frequency measurement, speed of rotation
Chapter 6 FREQUENCY
COUNTERS
measurement, specified frequency pulse output) can be selected using
high-speed counter functions.
A

Chapter 7 CAM SWITCHES Values input from an encoder can be converted to angle to enable virtual
execution of cam operation.

MOTOR CONTROL
Chapter 8 (POSITIONING
CONTROL)
This chapter describes functions for outputting pulses to a stepping motor
or a servo motor, and for controlling positioning.

The KV-1000 can be connected to external devices having an RS-232C-

Chapter 9 SERIAL compliant interface to perform communications.


COMMUNICATIONS This chapter describes communications specifications, connection
methods and communications methods.

This chapter describes the various functions incorporated on the KV-1000

Chapter 10 VARIOUS
FUNCTIONS
CPU Unit such as functions for setting and checking PLC operation, and
handy functions when debugging programs and performing adjustments
with external devices.

These appendices present tables for the relays, timers, counters, memory
APPENDICES Nos., and control relays/control memories on the KV-1000 Series.
Refer to these appendices when using the KV-1000.

5
Contents

For Safe Usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


How This Manual Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Conventions Used In This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Page Configuration and Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Terminology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Chapter 1 CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


1-1 Checking the Contents of the Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Checking the Contents of the Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2
Before You Turn the Power ON for the First Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-3
1-2 Basic System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-4
KV-1000 Series Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-6
1-3 CPU Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Names and Functions of Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-9
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11
RUN-PROG Selector Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-16
CPU Unit Wiring and Internal Circuit Diagrams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-16
1-4 AC Power Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
Names and Functions of Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-21
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-22
Power Unit Wiring Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-23
1-5 Expansion Input Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-24
Names and Functions of Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-24
Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-25
Expansion Input Unit Wiring and Internal Circuit Diagrams. . . . . . . . . . . . . . . . . . . . . . . .1-27
1-6 Expansion Output Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
Names and Functions of Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-31
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-32
Expansion Output Unit Wiring and Internal Circuit Diagrams . . . . . . . . . . . . . . . . . . . . . .1-34
1-7 Extension Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-38
Names and Functions of Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-38
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-39
1-8 Installation Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-41
Installation Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-41
Mounting Position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-41
1-9 Connecting Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-43
Cautions When Connecting Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-43
Assembling the Unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-44
Mounting on a DIN rail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-45
1-10 Wiring Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-46
Precautions When Wiring to Each Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-46
Assembling and Wiring Connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-48
Removing the Terminal Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-52
6
1-11 Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-53
Inspection and Daily Care . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-53
Replacing the Battery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-53

Chapter 2 ACCESS WINDOW


2-1 Outline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
What is the "Access Window?" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2
Access Window Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-3
Access Window Menu Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-4
Names of Access Window Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-5
2-2 Monitoring Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Names and Functions of Setting/Operation Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-6
Method of Operation (example: on I/O Unit) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-6
2-3 Device Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Devices That Can be Displayed and Whose Settings Can be Changed. . . . . . . . . . . . . . .2-8
Names and Functions of Setting/Operation Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-8
Method of Operation in the Device Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-9
2-4 Digital Trimmer Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Names and Functions of Setting/Operation Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-17
Changing Digital Trimmers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-17
2-5 Displaying and Setting the Date/Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19
About the Date/Time Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-19
Names and Functions of Setting/Operation Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-19
Method of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-19
2-6 Memory Card Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22
About Memory Card Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-22
2-7 CPU Monitor Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23
CPU Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-23
Positioning Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-23
Frequency Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-25
Project Name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-26
2-8 Alarm Monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27
About the Alarm Monitor Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-27
How to Register Alarms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-27
Examples of Alarm Monitor Display. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-28
How to Monitor Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-29
Displaying the Alarm Relay Record. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-31
Clearing Alarm Relay Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-32
2-9 Access Window Setup Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-33
Setup Functions Available in the Access Window Setup Mode . . . . . . . . . . . . . . . . . . . .2-33
Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-33
Display Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-34
2-10 SRAM Clear Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-35
SRAM Clear Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-35
2-11 All Clear Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-36
7
All Clear Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-36
2-12 User Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-37
About the User Message Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-37
How to Display User Messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-37
Displaying User Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-38
2-13 Setting Inhibited Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-39
Modes in Which Operation Can be Inhibited . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-39
2-14 Key Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-40
How to Set Key Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-40

Chapter 3 MEMORY CARD


3-1 About the Memory Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
About the Memory Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-2
3-2 To Enable Use of Memory Cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
To Use a Memory Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-4
Connecting a Memory Card Using the PCMCIA Card Slot . . . . . . . . . . . . . . . . . . . . . . . . .3-6
Connecting a Memory Card Using the USB Card Reader/Writer . . . . . . . . . . . . . . . . . . . .3-7
Loading and Removing a Memory Card from the KV-1000. . . . . . . . . . . . . . . . . . . . . . . . .3-8
Precautions When Using a Memory Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9
3-3 Data Management on Memory Cards. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Data Management on Memory Cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-10
Data to Store on the Memory Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-12
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO . . . . . . . . 3-13
Ladder programs, device comments/labels, unit setup information, and logging setup
information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-13
DM, CM, etc. values, and relay, control relay, etc. ON/OFF states . . . . . . . . . . . . . . . . . .3-14
3-5 Memory Card-related Access Window Operations. . . . . . . . . . . . . . . . . . . . . . 3-21
Names and Functions of Setting/Operation Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-21
Method of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-21
3-6 Transferring Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30
Transferring Programs from the Access Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-30
Auto-loading Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-30
3-7 Transferring Device Value Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-31
About Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-31
3-8 Logging Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-32
About Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-32
Structure of Memory Card Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-32
Logging Function Setup Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-32
Setting up the Logging Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-33
Logging Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-39
LOGE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-40
LOGD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-40
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-40
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-41
Logging Function Control Relays/Control Memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-42
Transferring Ladder Programs and Logging Setup Information . . . . . . . . . . . . . . . . . . . .3-44

8
Logging Function Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-45
About Logging Data (CSV file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-46
3-9 Memory Card Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-49
Memory Card Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-49
List of Memory Card Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-49
MWRIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-50
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-50
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-58
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-59
MREAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-62
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-63
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-69
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-69
MFREE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-70
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-70
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-72
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-72
MMKDIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-74
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-74
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-76
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-76
3-10 List of Devices for Memory Cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-77
List of Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-77
Control memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-77

Chapter 4 INTERRUPTS
4-1 Interrupt Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
What Is "Interrupt Processing?". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2
Interrupt Program Execution Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-4
Externally Input Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-5
Interrupts from High-speed Counter Comparators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-6
Interrupts from CPU positioning parameter comparator 2 . . . . . . . . . . . . . . . . . . . . . . . . . .4-6
Precautions in Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-6
Instructions Not Allowed in Interrupt Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-7
4-2 Direct Input/Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8
Direct Input Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-8
Direct Output Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-10
4-3 Input Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
Input Capture Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-12
4-4 Sample Interrupt Programs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-13

Chapter 5 HIGH-SPEED COUNTERS


5-1 High-speed Counters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Outline of High-speed Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-2
High-speed Counter Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-4
Linear Counters and Ring Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-6
Count Input Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-8

9
About Current Value and Setting Value of High-speed Counters . . . . . . . . . . . . . . . . . . .5-12
Reset Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-16
Preset Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-19
Counter Enable Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-21
Comparator Match Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-23
Interrupts from High-speed Counter Comparators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-24
Acquiring the Current Value by Input Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-24
Extended functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-25
Restrictions Applied to Combined Use of Extended Functions . . . . . . . . . . . . . . . . . . . . .5-25
5-2 List of Devices for High-speed Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26
Control Relays for CTH0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-26
Control Memories for CTH0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-27
Control Relays for CTH1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-28
Control Memories for CTH1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-29
5-3 Direct Clock Pulse Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-30
Outline of Direct Clock Pulse Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-30
Setting Pulse Output by High-speed Counter Comparator . . . . . . . . . . . . . . . . . . . . . . . .5-31
Example of Direct Clock Pulse Output (ON/OFF ratio 1:1) . . . . . . . . . . . . . . . . . . . . . . . .5-36
Example of Output of Variable Clock Pulse ON/OFF Ratio. . . . . . . . . . . . . . . . . . . . . . . .5-40
Example of Stopping the Clock Pulse at a Specified Number of Pulses . . . . . . . . . . . . . .5-44

Chapter 6 FREQUENCY COUNTERS


6-1 Frequency Measurement, Speed of Rotation
Measurement and Specified Frequency Pulse Output. . . . . . . . . . . . . . . . . . . . 6-2
Outline of Frequency Measurement, Speed of Rotation Measurement and Specified
Frequency Pulse Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2
Frequency measurement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2
Speed of Rotation Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2
Specified Frequency Pulse Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-2
6-2 Frequency Counter Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
List of Frequency Counter Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-3
Restrictions Applied to Combined Use of Frequency Counter Functions . . . . . . . . . . . . . .6-3
FCNT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-4
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-4
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-5
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-5
RCNT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-6
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-7
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-8
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-8
PLSOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-10
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-10
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-11
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-11

10
Chapter 7 CAM SWITCHES
7-1 Cam Switch Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Cam Switch Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-2
Multi-stage Comparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-2
Absolute Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-2
Incremental encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-2
7-2 Cam Switch Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
List of Cam Switch Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-3
Restrictions Applied to Combined Use of Cam Switch Functions . . . . . . . . . . . . . . . . . . . .7-3
MCMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-4
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-5
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-5
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-6
ABSENC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-8
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-8
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-10
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-11
INCENC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-12
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-13
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-15
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-16

Chapter 8 MOTOR CONTROL (POSITIONING CONTROL)


8-1 About Positioning Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
Outline of Positioning/Speed Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-2
8-2 Setting Up Parameters and Executing Instructions . . . . . . . . . . . . . . . . . . . . . . 8-5
Setting Up Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-5
Point Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-5
System Parameters [I/O Setup]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11
System Parameters [Comparator Setup]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-16
System Parameters [Zero Return/Jog] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-18
System Parameters [JOG]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-24
8-3 Other Positioning Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-27
Control Relays for Positioning Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-27
Control Memories for Positioning Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-29
Operation Timing Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-30
8-4 Changing Speed during Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-31
Outline of Changing Speed during Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-31
8-5 Positioning Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-33
List of Positioning Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-33
PLSX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-36
PLSY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-36
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-36
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-37
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-37
JOGX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-38

11
JOGY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-38
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-38
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-39
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-39
ORGX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-40
ORGY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-40
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-40
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-41
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-41
Zero Return Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-41
TCHX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-42
TCHY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-42
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-42
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-43
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-43
HOMEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-44
HOMEY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-44
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-44
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-45
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-45
CHGSPX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-46
CHGSPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-46
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-46
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-48
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-48
8-6 Positioning Control Reference Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-49
Positioning Control Reference Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-49
Continuous Position Control Reference Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-52
High-speed Execution Reference Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-53
Reference Example of Changing Speed during Operation (1) . . . . . . . . . . . . . . . . . . . . .8-54
Reference Example of Changing Speed during Operation (2) . . . . . . . . . . . . . . . . . . . . .8-56
Compatibility with KV-10/16/24/40. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-58
Positioning Control Exceeding 32 Points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-59
8-7 List Devices for Positioning & List of Error Codes . . . . . . . . . . . . . . . . . . . . . 8-60
List of System Parameters and Statuses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-60
List of Point Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-64
List of Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-64
List of Error Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-65

Chapter 9 SERIAL COMMUNICATIONS


9-1 Serial Communications Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Communications Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-2
How to Connect to the KV-1000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-2
9-2 Serial Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Command Send Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-3
Format of Commands and Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-4
9-3 Commands/Responses List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5
Commands/Responses List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-5
9-4 Explanation of Commands and Responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8
Start of communications [ CR ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-8
End of communications [CQ]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-8

12
Baud rate setting [SP] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-9
Model query [?K] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-10
Operation mode confirmation [ ?M ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-10
Error No. confirmation [ ?E ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11
Change mode [ Mn ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11
Clear error [ ER ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-12
Date/time setting [ WRT ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-12
Forced set/reset [ ST/RS ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-13
Continuous forced set/reset [ STS/RSS ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-13
Read [ RD ]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-14
Continuous read [ RDS ]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-16
Write [ WR ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-18
Continuous write [ WRS ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-18
Write setting value [ WS ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-19
Write continuous setting values [ WSS ]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-20
Register monitor [ MBS ]/[ MWS ]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-20
Read monitor [ MBR ]/[ MWR ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-22
Read comment [ RDC ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-23
Response during an error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-24
9-5 Sending/Receiving Text Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-25
Receiving Text Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-25
Sending Text Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-27
9-6 ASCII Code Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-29

Chapter 10 VARIOUS FUNCTIONS


10-1 Fixed Scan Time Operation Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
Fixed Scan Time Operation Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-2
10-2 I/O Inhibit Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3
Input Refresh Inhibit Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-3
Output Inhibit Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-3
Output Inhibit Function at Break . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-4
10-3 Input Time Constant Selection Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-5
About the Input Time Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-5
10-4 Latch Function (Power Interruption Hold). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-6
Latch Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-6
10-5 Clock Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-9
Clock Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-9
10-6 Other Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-10
Device Comment Store Function, Rung Comment Store Function . . . . . . . . . . . . . . . . .10-10
Password Setting Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-10
Error Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10-10
Power ON Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-11

13
APPENDICES
1 Device No. Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
Relays, Timers, Counters, Memory Nos.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
KV-1000 Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
2 Error Message Lists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-12
PLC Unit Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-12
3 Differences between the KV-1000 Series & KV-700 Series . . . . . . . . . . . . . . . A-15
Differences Relating to CPU Hardware and Special Functions. . . . . . . . . . . . . . . . . . . . A-15
Comparison of Device Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-18
Differences between Control Relays and Control Memories . . . . . . . . . . . . . . . . . . . . . . A-19
4 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-23

14
Conventions Used In This Manual
The following shows how pages in this manual are configured, and the symbols and terminology used
in this manual.

Page Configuration and Symbols

Headline
Indicates the
3-2 To Enable Use of Memory Cards
Mid-heading
main content Indicates the content that
This section describes the procedure up to enabling use of Memory Cards.
of the chapter. follows after a section is broken
Thumbnail index Loading and Removing a Memory Card from the KV-1000 down into smaller units.
Indicates the chapter. 3 Loading a Memory Card Sub-heading
1 Slide the lock on the Memory Card slot cover upwards to
Memory Card

open the Memory Card slot cover.


Chapter title
Figure illustrating operation

Method of Operation
Indicates the page or Name of product
To check the menu configuration of the access window on the KV-1000, see "Access Window
manual to refer to. Menu Tree."
The page or manual "Access Window Menu Tree" page 2-4

containing the related Load


Before you execute a load, insert the Memory Card into the CPU.
information is indicated here.
Access window operation
Operational step 1 Press the "M" key.
key. Enclosed by " "
The menu is displayed.
brackets
Operation keys
Note: Screen
Describes cautions Note
Memory Card-related operations in the access window can be executed only in the
for easily mistaken Prog mode.
operations.
Be sure to read
these. CAUTION • Insert the Memory Card into the USB card reader/writer paying attention to
Caution
the direction in which it is inserted. Using unnecessary force to insert the
Memory Card in the wrong direction may damage the Memory Card or USB Failure to observe
card reader/writer.
• For details on the connection method, refer to the User's Manual provided
the caution described here
with the USB card reader/writer. may resultin product trouble.
Be sure to read.

3-4

* This page was made for the purpose of explaining page components, and differs from an actual page.

Terminology

This manual uses the following terminology excluding some instances.


Term Explanation
CPU Unit This refers to the Programmable Controller KV-1000 made by Keyence Corporation.
KV-1000
These are generic names for the KV Series.
KV-1000 Series
This refers to the Expansion Input Unit, Expansion Output Unit, and Expansion
Expansion Unit
Special Unit other than the CPU Unit in the KV Series.
PLC This refers to the overall system of a programmable controller.
Stands for personal computer.
PC
Generally, this refers to an IBM PC or a PC/AT compatible machine (DOS/V).

15
MEMO

16
1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


CONFIGURATION OF THE KV-1000
SERIES & SPECIFICATIONS
This chapter describes the configuration of the KV-1000 Series system,
names and functions of parts on units, and specifications.

1-1 Checking the Contents of the Package . . . . . . . 1-2


1-2 Basic System Configuration . . . . . . . . . . . . . . . . 1-4
1-3 CPU Unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
1-4 AC Power Unit . . . . . . . . . . . . . . . . . . . . . . . . . 1-21
1-5 Expansion Input Unit. . . . . . . . . . . . . . . . . . . . . 1-24
1-6 Expansion Output Unit . . . . . . . . . . . . . . . . . . . 1-31
1-7 Extension Unit. . . . . . . . . . . . . . . . . . . . . . . . . . 1-38
1-8 Installation Environment . . . . . . . . . . . . . . . . . . 1-41
1-9 Connecting Units . . . . . . . . . . . . . . . . . . . . . . . 1-43
1-10 Wiring Units . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-46
1-11 Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-53

1-1
1-1 Checking the Contents of the Package
1
Checking the Contents of the Package
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

The package contains the following equipment and accessories. Before you start using KV-1000,
make sure that the package contains everything that it is supposed to contain.

Start Unit CPU Unit End Unit


(provided with CPU) KV-1000 (provided with CPU)

Battery
(provided with CPU)

User's Manual

KEYENCE

KV-1000
User's Manual

Every effort has been made in preparing this package. If, however, some of the parts are defective
or broken, contact your dealer.

1-2
1-1 Checking the Contents of the Package

1
Before You Turn the Power ON for the First Time

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


Before you turn the power ON for the first time, insert the battery (battery case) included in the
package into the bottom of the unit. After inserting the battery, tighten the screw to fasten.
"Replacing the Battery" page 1-53

Even after inserting the battery (battery case), [error 84] that indicates that SRAM data was lost
for the period that the battery was not inserted is displayed on the access window.
Be sure to follow the procedure below to initialize SRAM before using the KV-1000.

■ Initialization procedure
1 Press the "M" key. In the menu, use the "T" and "S" keys to select "9.ALL CLEAR", and
press " ".

2 The all clear confirmation message is displayed. With this message displayed, hold down
the " "key for at least one second with the " " key held down.

3 With the same message displayed for the second time, hold down the " " key for at least
one second. This executes the all clear, and the message meaning "SYSTEM INITIALIZED"
is displayed to indicate that SRAM was initialized.
When this message is appeared, the CPU unit is in the state of the factory shipment.

1-3
1-2 Basic System Configuration
This section describes the types of units, generation specifications and the configuration of the
1 basic KV-1000 Series system.
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

System Configuration

The KV-1000 Series basic system is configured as follows.

AC Power Unit CPU Unit Expansion Input Unit


KV-U7 KV-1000 KV-B16XA KV-C32XA KV-C64XA
24 VDC 1.8 A 16 inputs, 8 outputs (16-point DC input) (32-point DC input) (64-point DC input)
(w/ service power terminal)

KV-U7

OC

24 V OUT

24 VDC
1.8 A
0V

N
INPUT
100-240 V
AC
50/60 Hz
0.98 A
L

Start Unit
(provided with CPU)

SD Memory Card
KV-M1G Ladder Support Software
KV STUDIO

Multi Media Card


OP-42137
PC

1-4
1-2 Basic System Configuration

Expansion Output Unit Extension Unit End


1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


KV-B16RA KV-B16TA Unit
KV-C32TA KV-C64TA KV-EB1S KV-EB1R
(16 transistor (provided
(16 relay (32 transistor (64 transistor
outputs) with CPU)
outputs) outputs) outputs)

Cable
(1 m)
(OP-42142)

Cable
(2 m)
(OP-42141)

Other...
Special Unit
Multi-communication A/D Conversion D/A Conversion Remote Link Positioning High-speed
Unit Unit Unit Unit Unit
KV-L20R KV-AD40 KV-DA40 KL-N20V KV-H20/H20G/H20S/H40S
RS-232C/RS-422A Analog input 4 ch Analog output 4 ch

High-speed Counter Unit Ethernet Unit Multi-input PID Temperature Control Unit FL-net Unit
KV-SC20 KV-LE20 KV-TF40 KV-FL20

* Only units with a lot No. prefixed


with A can be connected.

1-5
1-2 Basic System Configuration

1 KV-1000 Series Specifications


CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

The following tables show the generation specifications and the performance specifications of the KV-
1000 Series.

General specifications
Item Specification
Power voltage 24 VDC (±10%)
CPU Unit KV-1000: 320 mA or less
Internal current
KV-C64XA: 25 mA or more KV-C32XA: 15 mA or less
consumption Expansion Input Unit
KV-B16XA: 15 mA or less
(excluding
current for Expansion Output KV-C64TA: 100 mA or more KV-C32TA: 55 mA or less
Unit KV-B16RA: 120 mA or more KV-B16TA: 35 mA or less
input circuit
drive) Extension KV-EB1S: 15 mA or less
Unit KV-EB1R: 25 mA or less
Operating ambient environment 0 to +50°C (freezing not allowed)*1, *2
Storage temperature -20 to +70°C*1
Operating ambient humidity 35 to 85% (condensation not allowed)*1
1500 VAC (1 min.) across power terminal and I/O terminals, and across all
Withstand voltage
external terminals and case
1500 V peak-to-peak or more, pulse width 1 µs, 50 ns (by noise simulator)
Noise resistance
IEC standard compliancy (IEC61000-4-2/3/4/6)
Number of
When intermittent vibration is present
sweeps
Frequency Acceleration Amplitude
JIS B 3502 10 to 57 Hz — 0.075 mm
X, Y, Z
Vibration resistance IEC61131-2 57 to 150 Hz 9.8 m/s2 — in each
compliant When continuous vibration is present direction
Frequency Acceleration Amplitude 10 times
10 to 57 Hz — 0.035 mm (for 80 mins.)
57 to 150 Hz 4.9 m/s2 —
50 MΩ (across power terminal and I/O terminals, and all external terminals and
Insulation resistance
case by 500 VDC megger)
Operating atmosphere Excessive dirt, dust or corrosive gases not allowed
Overvoltage category II (when KV-U7 is used)
Pollution class 2
KV-1000: Approx. 290 g
CPU Unit
End unit 30 g Start unit 30 g
KV-C64XA: Approx. 140 g KV-C32XA: Approx. 110 g
Expansion Input Unit
KV-B16XA: Approx. 120 g
Weight Expansion Output KV-C64TA: Aprox. 140 g KV-C32TA: Aprox. 100 g
Unit KV-B16TA: Aprox. 130 g KV-B16RA: Approx. 190 g
Extension
KV-EB1S: Approx. 90 g KV-EB1R: Approx. 115 g
Unit
Power Unit KV-U7: Approx. 190 g
*1 Assured range as a system
*2 Specified by the temperature on the bottom side of the unit in a control panel

1-6
1-2 Basic System Configuration

■ Performance specifications 1
Item Specification

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


Arithmetic operation control method Stored program system
I/O control method Refresh system
Program language Ladder chart
Basic instructions: 151 Applied instructions: 36
Number of instructions Arithmetic operation instructions: 185 Extended instructions: 106
Total 478
Instruction Basic instructions Min. 0.025 µs
execution
Applied instructions Min. 0.025 µs
speed
Program size Approx. 160k steps
Number of mounted units 16, 48 when Extension Unit is connected
Max. 3096 when expanded (KV-EB1S/KV-EB1R: when 2 units are
Max. number of I/O added on)
(64-point unit)
Input relays
Total 9536
Output relays
1 bit R00000 to R59915 (excluding R00100 to R00415)
Internal auxiliary relays
Internal auxiliary relays MR 16000, 1 bit (MR00000 to MR99915)
Latch relays LR 16000, 1 bit (LR00000 to LR99915)
Control relays CR 640, 1 bit (CR0000 to CR3915)
Timers T Total 4000, 32 bits
Counters C (T0000 to T3999)/(C0000 to C3999)
Data memory DM 65535, 16 bits (DM00000 to DM65534)
Control memory CM 11999, 16 bits (CM00000 to CM11998)
EM 65535, 16 bits (EM00000 to EM65534)
Expanded data memory
FM 32767, 16 bits (FM00000 to FM32766)
Temporary data memory TM 512, 16 bits (TM000 to TM511)
2, 32 bits (CTH0 to CTH1) Auto reset counters*1
High-speed counters CTH (input response 100 kHz/single-phase, 50 kHz/phase difference) at line
driver input*2
High-speed counter comparators CTC 4, 32 bits (2 per high-speed counter)
Index register Z 12, 16 bits (Z01 to Z12)
Positioning pulse output 2 (max. output frequency 100 kHz)
Input: 16, Output: 8
CPU Unit I/O Input common: 7 (R00000 to R00009: 1 R00010 to R00015: 6)
Output common: 1
Number of Device comment Approx. 27000 (device comments only without labels)
stored
comments/ Labels Approx. 44000 (labels only without device comments)
labels
Power Program memory Flash ROM, rewritable 100,000 times
interruption
Battery backup for 5 years (in power interruption hold state at operating
hold Devices*3
function ambient temperature of +25°C)
Self-diagnostic function CPU error, RAM error, etc.
*1 Disabling of the auto reset is also possible.
*2 "Specifications" page 1-11, “Section 5 High-speed Counters”
*3 Target devices: RLY, LR, CR, T, C, CM, DM, EM, FM, CTH, and CTC.

1-7
1-2 Basic System Configuration

1 ■ KV-1000 operation at a power interruption


Drop in power voltage
• When the power voltage drops, KV-1000 stops and output is turned OFF.
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

Automatic restore
• When the power voltage is restored, operation is automatically resumed.
Notification of momentary stop
• Operation is continued on the KV-U7 if the momentary stop is less than 10 ms and on a DC
power supply if the momentary stop is less than 2 ms.

1-8
1-3 CPU Unit KV-1000
This section describes the names and functions of parts on the KV-1000 CPU, and specifications.
1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


Names and Functions of Parts

CPU Unit front


(1) Input voltage
selector switch
(top of unit)

(2) Access window

(3) I/O display


(7) Memory Card
access LED
(6) RUN-PROG
selector switch (4) Setting/operation key
(8) Memory card
insert slot (5) I/O connector
(9) SERIAL
access LED
(10) USB
access LED (12) USB connector
(13) Memory Card Slot
lock for cover

(11) Modular connector

CPU Unit bottom

(14) Extension Unit


(16) KV-U7 Connector
connector (side of unit)
(side of unit, w/ seal)
(17) Backup battery

(15) DC power supply


Input terminal block
(MAX3.5A)

1-9
1-3 CPU Unit

1
No. Name Function
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

Switches the input voltage. (R00000 to R00009)


(1) Input voltage selector switch
24 V ⇔ 5 V
Sets the unit monitor display.
(2) Access window
Operating state is indicated by a backlight. RUN: green PROG: red
Displays the channel I/O state of the unit on which a direct access switch was
pressed.
(3) I/O display
When the CPU state is displayed, row A indicates inputs R00000 to R00015,
and row B indicates outputs R00500 to R00507.
(4) Setting/operation keys This is used for operating the access window.
(5) I/O connector I/O connector (40-pin)*
(6) RUN-PROG selector switch Switches between the RUN and PROG modes.
(7) Memory Card access LED Lights when the Memory Card is being accessed.
(8) Memory Card insert slot Slot for inserting the Memory Card
Lights during serial communications
(9) SERIAL access LED
RD: During data reception (red) SD: During data transmission (green)
(10) USB access LED Lights during data reception/transmission on the USB cable.
Connector for connecting the modular plug
(11) Modular connector
This is used for connecting to a PC or other device.
(12) USB connector Connector for USB connection
Memory Card slot
(13) Lock is unlocked when slid up, and the Memory Card slot cover opens.
Cover lock
(14) Expansion Unit connector Connector for connecting Expansion Unit
(15) Dc power input terminal block Terminal block for 24 VDC power input Max. 3.5 A
(16) KV-U7 connector Connector for KV-U7 Power Unit connection
(17) Backup battery OP-51604 (provided with CPU)
* MIL-C-83503 compliant

Note
• Communications is sometimes disrupted, for example, causes unstable USB
communications. If this happens, disconnect the USB cable then re-connect it.
• In situations (environments subject to excessive noise) where communica-
tions is extremely unstable, insert a ferrite core on the cable for PC protection
as well. (Looping the cable one turn proves more effective in countering
noise.)

CAUTION Do not connect the USB cable to the serial port. Doing so might damage
the unit.

1-10
1-3 CPU Unit

Specifications 1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


■ Input Specifications
R00000 to R00009 (general-purpose inputs 10)
Item 24 VDC input mode*1 5 VDC input mode*1
Rated max. input 26.4 VDC
Rated input
24 VDC (5.3 mA*2) 5 VDC (1 mA*2)
voltage
Min. ON voltage 19 VDC 4.5 VDC
Max. OFF current 1.5 mA —
Max. OFF voltage — 1.5 VDC
Common mode 10 points/2 commons
Normally, 10 ms
HSP instruction use 10 µs
Input time constant
Switchable in range 10 µs to 10 ms in 8 stages when control relay CR2305 is ON
(set at CM01620)
*1 Switched by input voltage selector switch "Names and Functions of Parts" page 1-9
"I/O circuit diagrams" page 1-19
*2 Input current reference value

R00010 to R00013 (high-speed phase A/phase B input 2ch total 4 points)


5 VDC Input 24 VDC Input
Item Line Driver Input
(open collector) (open collector)
Connector terminal
8, 11, 28, 31 (+5 V) 7, 10, 27, 30 (+24 V)
voltage
Rated max. input
5.5 VDC 26.4 VDC
voltage
Rated input
— 5 VDC (20 mA*1) 24 VDC (6.5 mA*1)
voltage
Min. ON voltage 2.0 VDC 19 VDC
Max. OFF current — 1.5 mA
Max. OFF voltage 1.0 VDC —
Common mode Independent common
Normally, 10 ms
HSP instruction use 10 µs
Input time constant
Switchable in range 10 µs to 10 ms in 8 stages when control relay CR2305 is ON
(set at CM01620)
100 kHz
Response Input signal: line driver 60 kHz 60 kHz
frequency AM26LS31 or equivalent 5 V ±10%, Duty 50% 24V ±10%, Duty 50%
Duty 50%
"I/O circuit diagrams" page 1-19
*1 Input current reference value

1-11
1-3 CPU Unit

1 Input waveform diagram (line driver, open collector)


High-speed input (A/B phase)
Line driver input
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

1-phase 100 kHz Duty 50% Phase difference 50 kHz Duty 50%
(line driver input) (line driver input)
*The interval between the start (end) points of change of the
A/B phases must be 2.5 µs or more.

20.0 µs or more

10.0 µs or more ON

A phase, 50%
5.0 µs or more 5.0 µs or more
OFF
ON ON

50% B phase, 50%

OFF OFF

T1 T2 T3 T4
T1, T2, T3, T4:2.5 µs or more

* When the impedance of the connection wire is large, pay attention to whether the above waveform is satisfied.

Open collector (24 V/5 V)


1-phase 60 kHz Duty 50% (24 V ±10%, 5 V ±10%) Phase difference 30 kHz Duty 50% (24 V ±10%, 5 V ±10%)
*Up/down width must be 3.0 µs or less *The interval between the start (end) points of the change of
the A/B phases must be 4.0 µs or more.

33.3 µs or more

16.6 µs or more ON

A phase, 50%
8.3 µs or more 8.3 µs or more
OFF
ON ON

50% B phase, 50%

OFF OFF
3 µs or less 3 µs or less T1 T2 T3 T4

T1, T2, T3, T4:4.0 µs or more

* When the impedance of the connection wire is large, pay attention to whether the above waveform is satisfied.

R00014 to R00015 (high-speed Z phase input 2ch total 2 points)


5 VDC Input 24 VDC Input
Item Line driver input
(open collector) (open collector)
Connection
14, 34 (+5 V) 13, 33 (+24 V)
terminal No.
Rated max. input
5.5 VDC 26.4 VDC
voltage
Rated input
— 5 VDC (8.3 mA*1) 24 VDC (3.5 mA*1)
voltage
Min. ON voltage 2.0 VDC 19 VDC
Max. OFF current — 1.5 mA
Max. OFF voltage 1.0 VDC —
Common mode Independent common
Normally, 10 ms
HSP instruction use 10 µs
Input time constant
Switchable in range 10 µs to 10 ms in 8 stages when control relay CR2305 is ON
(set at CM01620)
"I/O circuit diagrams" page 1-19
1-12 *1 Input current reference value
1-3 CPU Unit

Input waveform diagram (line driver, open collector)


High-speed input (Z phase)
1
Line driver input

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


* Both the ON and OFF widths must be 30.0 µs or more.

30.0 µs or more 30.0 µs or more

ON

50%

OFF

Open collector (24 V/5 V)


* Both the ON and OFF widths must be 30.0 µs or more.

30.0 µs or more 30.0 µs or more

ON

50%

OFF

Input derating diagram


Continuous simultaneous ON rate(%)

40˚C 45˚C
100

80

60
50%
26.4 V input
40 40%
24 V input

20

0
0 10 20 30 40 50
Peripheral temperature(˚C)

1-13
1-3 CPU Unit

1 ■ Output specifications
R00500 to R00503 (high-speed output 4 points)
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

Item Specification
Output mode Transistor NPN output
Rated load 30 VDC 0.1 A
Peak load current 0.2 A
Max. OFF voltage 30 VDC
OFF leakage current 100 µA
ON residual voltage 0.6 V DC or less
Common mode 8 points/1 common
OFFJON : 1 µs or less
ON/OFF response time*1
ONJOFF : 5µs or less
Output frequency 100 kHz (at 5 to 100 mA)
"I/O circuit diagrams" page 1-19
*1 The delay time is the response+internal processing time (scan time).

Output waveform
High-speed output
Output frequency 100 kHz (load current when Duty 50% is set: 5 to 100 mA)
2.0 µs or more 4.0 µs or more

OFF90%

10%
ON

* The load of the above output waveform is a resistive load, and influence of connected leads is not taken into consideration.
Note that the ON-OFF width becomes smaller than the above when the impedance of the connected wide is large.

R00504 to R00507 (general-purpose output 4 points)


Item Specification
Output mode Transistor NPN output
Rated load 30 VDC 0.1 A
Peak load current 0.2 A
Max. OFF voltage 30 VDC
OFF leakage current 100 µA
ON residual voltage 0.6 V DC or less
Common mode 8 points/1 common
*1 OFFJON : 5 µs or less
ON/OFF response time
ONJOFF : 30 µs or less
Output frequency 10 kHz (at 5 to 100 mA)
"I/O circuit diagrams" page 1-19
*1 The delay time is the response+internal processing time (scan time).

■ +5 V power output
S+5 V (insulated 5 V service power supply)
Use this power supply when connecting to a 5 V interface device such as a motor driver.
Item Specification
Voltage 5 VDC ±10%
Current Max. 100 mA
"Positioning Control Reference Examples" page 8-49

1-14
1-3 CPU Unit

■ External dimensions 1
Front view Side view

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


85

27.3

90 35.9

80
3.5 84
72
96.5
(130)
12.1
Bottom view

12.6

12
Unit: mm

■ External dimension diagrams (start unit, end unit)


Start Unit End Unit

90 90

8 9 8 80 Unit: mm

1-15
1-3 CPU Unit

1 RUN-PROG Selector Switch


CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

The KV-1000 CPU Unit has two modes, the RUN mode and the
PROG mode.
Each of these modes is switched by the RUN-PROG selector
switch shown in the figure on the right.

RUN mode : This mode is for executing the program


PROG mode : This mode is for stopping program execution, and
turning all outputs OFF.

CPU Unit Wiring and Internal Circuit Diagrams

■ CPU Unit
Connector wiring diagram
Connector terminal No.
1 21
2 22
3 23
4 24
5 25
6 26
7 27
8 28
9 29
10 30
11 31
Modular connector I/O connector 12 32
13 33
14 34
15 35
16 36
17 37
18 38
19 39
20 40
1 2 3 4 5 6

Modular connector
Terminal No. Direction Signal Name
1 +5 V power output
2 +5 V power output
3 Input RD
4 — SG
5 Output SD
6 GND

(terminal undefined)
SG and GND are connected internally.

1-16
1-3 CPU Unit

I/O connector
1
Terminal Line Driver Signal Name
Direction Type Relay

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


No. Input Support Interrupt High-speed Counter Positioning
General-
1 Input purpose — R00000 Interrupt — Stop sensor input
2 Input
General-
purpose — R00002 Interrupt — Origin sensor input
General-
3 Input purpose — R00004 Interrupt — X-axis limit switch CW
4 Input
General-
— R00006 Interrupt — X-axis limit switch CCW DC24V/5V
purpose
General-
5 Input purpose — R00008 Interrupt High-speed counter 0 enable input —
6 Input — — COM0 Input common (for R00000 to R00009)
7 High-
A (+24 V) —
High-speed counter 0
8 Input speed A X R00010 — A (+5 V) —
phase A phase
9 A (-COM)*1 —
10 High-
B (+24 V) —
High-speed counter 0
11 Input speed B X R00012 — B (+5 V) — page 1-18
phase B phase
12 B (-COM)*1 —
13 High-
Z (+24 V)
High-speed counter 0
14 Input speed Z X R00014 — Z (+5 V) X-axis Z phase
phase Z phase (preset)
15 Z (-COM)*1
High-
16 Output speed — R00500 — High-speed counter 0 comparator match output X-axis CW
High-
17 Output speed — R00502 — — Y-axis CW
General- *2
18 Output purpose — R00504 — (high-speed counter 0 comparator match output) —
General-
19 Output purpose — R00506 — — X-axis deviation counter clear
20 — — — S+5 V +5 V power output
General-
21 Input purpose — R00001 Interrupt — Stop sensor input
General-
22 Input purpose — R00003 Interrupt — Origin sensor input
General-
23 Input purpose — R00005 Interrupt — Y-axis limit switch CW
General-
24 Input purpose — R00007 Interrupt — Y-axis limit switch CCW
General-
25 Input purpose — R00009 Interrupt High-speed counter 1 enable input —
26 Input — — COM0 Input common (for R00000 to R00009)
27 High-
A (+24 V) —
High-speed counter 1
28 Input speed A X R00011 — A (+5 V) —
phase A phase
29 A (-COM)*1 —
30 High-
B (+24 V) —
High-speed counter 1
31 Input speed B X R00013 — B (+5 V) — page 1-18
phase B phase
32 B (-COM)*1 —
33 High-
Z (+24 V)
High-speed counter 1
34 Input speed Z X R00015 — Z (+5 V) Y-axis Z phase
phase Z phase (preset)
35 Z (-COM)*1
High-
36 Output speed — R00501 — High-speed counter 1 comparator match output X-axis CCW
High-
37 Output speed — R00503 — — Y-axis CCW
General-
38 Output purpose — R00505 — (high-speed counter 1 comparator match output)*3 —
General-
39 Output purpose — R00507 — — Y-axis deviation counter clear
40 Output — — COM1 Output common (for R00500 to R00507)*4
*1 Each of the A (-COM), B (-COM) and Z (-COM) terminals is independent.
Load power supply
*2 Selection with output R00500. KV-1000 Series Instruction Reference Manual "MEMSW
Instruction"
*3 Selection with output R00501. KV-1000 Series Instruction Reference Manual "MEMSW
Instruction"
*4 Connected internally with +5 V (S+5V) GND.

1-17
1-3 CPU Unit

1 When an open collector is connected (A phase)


Terminal No. Signal Name
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

7,27 A (+24 V)
8,28 A (+5 V)
9,29 A (-COM)

When a differential line driver is connected (A phase)


Terminal No. Signal Name
7,27 A (+24 V)
8,28 A (+5 V)
9,29 A (-COM)

* The same applies to phases B and Z.

Note
• When terminal A (+24 V) is used, be sure to leave terminal A (+5 V) open. Like-
wise, when terminal A (+5 V) is used, be sure to leave terminal A (+24 V) open.
• The same applies to phases B and Z.
• When extended wiring to the input terminal is left open, note that noise
becomes a fatigue antenna, which may result in erroneous inputs.

1-18
1-3 CPU Unit

■ I/O circuit diagrams 1


Input circuit (R00000 to R00009)

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


Photocoupler insulation
R00000 to R00009

IN

Internal circuit
4.3 kΩ
5 V, 24 V
switching circuit

COM0

Input circuit (R00010 to R00013)

3.3 kΩ
A(+24 V)/B(+24 V)
Photocoupler insulation
110 Ω

Internal circuit
A(+5 V)/B(+5 V)

910 Ω

A-COM/B-COM
100 Ω

Input circuit (R00014 to R00015)

6.2 kΩ
Z(+24 V)
1.2 kΩ Photocoupler insulation
Z(+5 V) Internal circuit

1 kΩ

Z(-COM)

Output circuit (R00500 to R00503)

Insulated +5 V power output (S+5 V)


power supply
+5 V
R00500 to R00503
Internal circuit

COM1

Output circuit (R00504 to R00507)

Insulated +5 V power output (S+5 V)


power supply
+5 V
Internal circuit

R00504 to R00507
L

COM1

1-19
1-3 CPU Unit

● Example of input wiring of an external device (when input R00010 to R00013 is used)
1 Ex: 1 When the external device is an open collector output
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

Counter input A, B +24 V Shielded twisted pair lead


24 V*
Internal circuit

+5 V
External device

A phase/
-COM B phase

Ex: 2 When the external device is a line driver output

Counter input A, B +24 V Shielded twisted pair lead


Internal circuit

External device
+5 V

-COM -

● Example of input wiring of an external device (when input R00014 to R00015 is used)
Ex: 3 When the external device is an open collector output

+24 V Shielded twisted pair lead


Counter input Z 24 V*
+5 V
Internal circuit

External
device

-COM Z-phase

Ex: 4 When the external device is a line driver output

+24 V Shielded twisted pair lead


Counter input Z
+5 V +
External device
Internal circuit

-COM -

CAUTION • During connections, do not mistake the polarity of the load power on the
output side. Connecting the load power with polarities reversed may dam-
age the KV-1000 Series.
• When a long cable is used, the input waveform may become distorted. Pay
attention to this during wiring.

1-20
1-4 AC Power Unit KV-U7
This section describes the names and functions of parts on the KV-U7AC Power Unit, and specifi-
cations.
1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


Names and Functions of Parts

Power Unit front view Power Unit side view

(6)Lock lever

KV-U7
(1)Output bar LED
OC

(2)Terminal block
cover
24 V OUT

(3)24 VDC output 24 VDC


1.8 A
0V

(4)PE terminal

N
INPUT

(5)Power input 100-240 V


AC
50/60 Hz

terminal L
0.98 A

100 VAC to 240 V

(6)Lock lever
(7)KV-1000/EB1R connector

No. Name Function


LED lighting patterns
LED No.1 green ON at voltage output
LED No.2 green ON at output
current 30% or more LED No. 1 2 3 4 5 6
LED No.3 green ON at output
current 50% or more OC
(1) Output bar LED LED No.4 green ON at output
current 60% or more
LED No.5 green ON at output current 70% or more
LED No.6 red ON at overcurrent detection

Current used has little margin with respect to power capacity when LED
No.5 (yellow) is lit. Use a separate power supply, for example.
(2) Terminal block cover Cover
24 VDC power terminal for service power supply. (M4 screws) Total 1.8
(3) 24 VDC output
A including main power supply
Protective conductor terminal for connecting to the protective earth lead
(4) PE terminal
of buildings, etc. (M4 screws)
(5) Power input terminal Connected to 100 to 240 VAC (50/60 Hz). (M4 screws)
(6) Lock lever Locks the unit coupling.
(7) KV-1000, EB1R connector Connector for the KV-1000/EB1R connector

1-21
1-4 AC Power Unit

1
CAUTION • During an overcurrent (LED No.6 lit (red)), turn the unit OFF and remove the
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

cause of the overcurrent.


• When an overvoltage is applied, output stops. Output indicator goes out.
Turn the power OFF, and wait at least 30 seconds before turning the power
ON again.
• When the KV-U7 is used, do not supply power from the power terminal on
the KV-1000.

Note
• Be sure to connect the KV-U7 immediately to the left of the KV-1000 or Exten-
sion Unit. Also, when the KV-U7 is used, 24 V is not output to the power termi-
nal on the KV-1000.
• When using the KV-U7, limit the total current consumption of the unit to 70%
(LED No.4 lit (green), approx. 1.3 A) of the KV-U7’s output capacity to prevent
defective startup caused by rush current on the unit.

Specifications

■ Specification
Item KV-U7
Input power voltage 100 to 240 VAC ±10% (50/60 Hz)
Output voltage 24 VDC±10%
Output capacity 1.8 A (total of power supply to each unit and service power supply)
Power consumption 135 VA or less
Instantaneous power interruption 10 ms or less
Startup time Max. 2 s or less

■ External dimensions
2.8

KV-U7

OC 27.3

24 V OUT

24 VDC
1.8 A
0V 90 35.9

N
INPUT
100-240 V
AC
50/60 Hz
0.98 A
L

3.5 80
35 5.2 93.2 Unit: mm

1-22
1-4 AC Power Unit

Power Unit Wiring Method 1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


The following describes how to wire the Power Unit.

■ Wiring the AC Power Unit


Wire the KV-U7 AC Power Unit as follows.

KV-U7
KV-U7

OC

24 V OUT

24 VDC
1.8 A
0V

External device INPUT


100-240 V
AC

such as sensor L
50/60 Hz
0.98 A

Class D earthing

100 to 240 VAC


±10%

Insulated transformer
noise filter, etc.

Note
• To reduce line noise, connect an insulated transformer or noise filter in a 1:1
configuration.
• To reduce dielectric influence, user twisted cables.
• When connecting the Power Unit, be sure to connect to a protective ground.

1-23
1-5 Expansion Input Unit KV-B16XA/C32XA/C64XA
This section describes the names and functions of parts on the KV-B16XA/C32XA/C64XA Expan-
1 sion Input Unit, and specifications.
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

Names and Functions of Parts

KV-B16XA KV-C32XA KV-C64XA


(front view) (front view) (front view) (side view)
(3)Direct access switch (5)Lock lever

24 V 24 V
5V 5V
L H

(4)Input terminal block (1)Input voltage selector switch (2)I/O connector (5)Lock lever

No. Name Function


Input voltage selector
(1) Switches the input voltage. 5 V ⇔ 24 V
switch
(2) Input connector Input connector
Turning the switch ON enables monitoring of the Expansion Unit on the
CPU access window. The state of the Expansion Unit changes according
to the color of the switch.
Lit (green); Normal operation (excluding some exceptions*1)
Direct access
(3) Blinking (green): When the switch is turned ON in a green lit state, and the
switch
unit is selected
Lit (red): When a unit error has occurred (excluding some exceptions*2)
Blinking (red): When the switch is turned ON in a red lit state, and the unit
is selected
(4) Input terminal block Input terminal block. Removable. (M3 screws)
(5) Lock lever Locks the unit coupling.
*1 This LED lights (green) in the following instances even if operation is not normal.
(1) When the number of connected units differs from the unit information on the CPU Unit when the power is
turned ON
(2) When the model type differs from the unit information on the CPU Unit when the power is turned ON
In these cases, an error will be displayed in the access window.
*2 This LED lights (red) in the following instances even if the state is not a unit error state:
(1) When the unit information on the CPU Unit is for a single CPU configuration when the power is turned ON
In this case, an error will be displayed in the access window.
* The 34-pin connector for connecting KV-C32XA/C64XA is available as an option.

Note
The terminal blocks on the KV-B16XA, KV-B16RA, KV-B16TA, KV-AD40, KV-
DA40, and KV-TF40 can be removed.
"Removing the Terminal Block" page 1-52
KV-AD40/DA40 User’s Manual KV-TF40 User’s Manual

1-24
1-5 Expansion Input Unit

Specification 1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


■ Specification
Item KV-B16XA (16-points) KV-C32XA (32-points) KV-C64XA (64-points)
External
connection Terminal block Connector (MIL standard)*1 Connector (MIL standard)*1
method
Input terminal 24 VDC mode 5 VDC mode 24 VDC mode 5 VDC mode 24 VDC mode*4 24 VDC mode*5
Rated max.
26.4 VDC
input
Rated input
24V DC 5.3 mA 5V DC 1 mA 24V DC 5.3 mA 5V DC 1 mA 24V DC 5.3 mA 24V DC 1.5 mA
voltage
Min. ON voltage 19 V 3.5 V 19 V 3.5 V 19 V
Max. OFF
1.5 mA — 1.5 mA — 1.5 mA 0.5 mA
current
Max. OFF
— 1.5 V — 1.5 V — —
voltage
Common mode 16-points/1 common*2 32-points/1 common*2 64-points/1 common*3
Input time OFFJON ONJOFF
constant 25 µs 25 µs ±20% 75 µs ±20%
(selected in 1 ms 1 ms ±20% 1 ms ±20%
three levels) 10 ms 10 ms ±20% 10 ms ±20%
Input impedance 4.3 kΩ 4.3 kΩ 15 kΩ
Internal current
15 mA or less 25 mA or less
consumption
Weight Approx. 120 g Approx. 110g Approx. 140g
*1 MIL-C-83503 compliant
*2 Two COMs are provided for the KV-C32XA and KV-B16XA, and are common internally.
*3 Four COMs are provided for the KV-C64XA, and are common internally at each of the locations on the H
side (two points) and L side (two points).
*4 Relay Nos. 108 to 115, 308 to 315 (2-lead type supported)
*5 Relay Nos. 000 to 015, 100 to 107, 200 to 215, and 300 to 307 (2-lead type supported)
"KV-B16XA wiring diagram" page 1-27 "KV-C32XA wiring diagram" page 1-28
"KV-C64XA wiring diagram" page 1-29

CAUTION • The unit may become damaged when the number of inputs that simulta-
neously turn ON exceeds the specification range.
• With the KV-C64XA Unit, 2-lead wire unsupported terminals can be turned
ON 100% regardless of the ambient temperature.
• With the KV-C64XA Unit, the relationship between the ambient temperature
and the continuous simultaneous ON rate on 2-lead wire supported termi-
nals is shown by the following graph:
KV-C32XA derating KV-C64XA derating
Continuous simultaneous ON rate(%)

Continuous simultaneous ON rate(%)

(2-lead wire support terminal)


120 120
17˚C 30˚C 43˚C 48˚C
100 100

80 80
75%
60 60

26.4 V input 26.4 V input


40 40
24 V input 24 V input

20 20 20%

0 0
0 10 20 30 40 50 0 10 20 30 40 50
Peripheral temperature(˚C) Peripheral temperature(˚C)

1-25
1-5 Expansion Input Unit

1 ■ External dimensions
KV-B16XA
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

2.8

27.3

90 35.9

3.5 80
9 29 3 (96.5) Unit: mm

KV-C32XA

2.8

27.3

90 35.9

3.5 80
9 23 3 96.3
(125) Unit: mm

KV-C64XA
2.8

27.3

90 35.9

3.5 80
9 29 3 96.3
( 125) Unit: mm

1-26
1-5 Expansion Input Unit

Expansion Input Unit Wiring and Internal Circuit Diagrams 1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


KV-B16XA wiring diagram KV-B16XA internal circuit diagram

Terminal No.

000 to 015 4.3kΩ


1

Internal circuit
0 IN
3
2 5 V, 24 V
5 switching
circuit
4 COM0
7
6 Photocoupler insulation
C0 COM1
8 Input power
9 supply
10
11
12
13
14
15
C1

Terminal No. Direction Signal Name


0 Input 000
1 Input 001
2 Input 002
3 Input 003
4 Input 004
5 Input 005
6 Input 006
7 Input 007
C0 Input COM0
8 Input 008
9 Input 009 24 DC/5 V
10 Input 010
11 Input 011
12 Input 012
13 Input 013
14 Input 014
15 Input 015
C1 Input COM1

24 DC/5 V
* COM is shorted internally.

1-27
1-5 Expansion Input Unit

1 KV-C32XA wiring diagram KV-C32XA internal circuit diagram


Connector pin No.
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

1 18
2 19
000 to 015
3 20 100 to 115 4.3 kΩ

Internal circuit
4 21 IN
5V. 24V
5 22 switching
circuit
6 23 COM0

7 24 Photocoupler insulation
COM1
8 25 Input power
supply
9 26
10 27
11 28
12 29
13 30
14 31
15 32
16 33
17 34

Pin No. Direction Signal Name Pin No. Direction Signal Name
1 Input 000 18 Input 100
2 Input 001 19 Input 101
3 Input 002 20 Input 102
4 Input 003 21 Input 103
5 Input 004 22 Input 104
6 Input 005 23 Input 105
7 Input 006 24 Input 106
8 Input 007 25 Input 107
9 Input 008 26 Input 108
10 Input 009 27 Input 109
11 Input 010 28 Input 110
12 Input 011 29 Input 111
13 Input 012 30 Input 112
14 Input 013 31 Input 113
15 Input 014 32 Input 114
16 Input 015 33 Input 115
17 Input COM0 34 Input COM1

24 DC/5 V 24 DC/5 V

* COM is shorted internally.

CAUTION Prevent the input simultaneous continuous ON rate from exceeding the
specification range. Otherwise, the unit might become damaged.
“KV-C32XA derating precautions” page 1-25

1-28
1-5 Expansion Input Unit

KV-C64XA wiring diagram


1
L-side H-side

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


connector pin No. connector pin No.
1 18 1 18
2 19 2 19
3 20 3 20
4 21 4 21
5 22 5 22
6 23 6 23
7 24 7 24
8 25 8 25
9 26 9 26
10 27 10 27
11 28 11 28
12 29 12 29
13 30 13 30
14 31 14 31
15 32 15 32
16 33 16 33
17 34 17 34

Pin Pin Pin Pin


Signal Name Signal Name Signal Name Signal Name
No. No. No. No.
1 000 100 18 1 200 300 18
2 001 101 19 2 201 301 19
3 002 102 20 3 202 302 20
4 003 103 21 4 203 303 21
5 004 104 22 5 204 304 22
6 005 105 23 6 205 305 23
7 006 106 24 7 206 306 24
8 007 107 25 8 207 307 25
9 008 108 26 9 208 308 26
10 009 109 27 10 209 309 27
11 010 110 28 11 210 310 28
12 011 111 29 12 211 311 29
13 012 112 30 13 212 312 30
14 013 113 31 14 213 313 31
15 014 114 32 15 214 314 32
16 015 115 33 16 215 315 33
17 COM0 COM1 34 17 COM2 COM3 34

24 VDC 24 VDC

* COM0 and COM1 are shorted internally.


COM2 and COM3 are shorted internally.
(COM0,1)-(COM2,3) are not shorted internally.

1-29
1-5 Expansion Input Unit

1 KV-C64XA internal circuit diagram


2-lead type supported inputs
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

(relay Nos. 108 to 115, 308 to 315)

108 to 115
300 to 315 4.3 kΩ

Internal circuit
IN

330 Ω
COM0 to 3

Photocoupler insulation

Input power
supply

2-lead type supported inputs


(relay Nos. 000 to 015, 100 to 107, 200 to 215, and 300

15 kΩ

Internal circuit
IN

2.7 kΩ
COM0 to 3

Photocoupler insulation

Input power
supply

CAUTION Restrictions are applied on the 2-lead wire supported input simultaneous
continuous ON rate. Prevent the input simultaneous continuous ON rate
from exceeding the specification range. Otherwise, the unit might become
damaged.
“KV-C64XA derating precautions” page 1-25

Note
Use the OP-42224 connector (34-pin) for the 64-input units. The OP-23139 cannot
be used.

1-30
1-6 Expansion Output Unit KV-B16RA/B16TA/C32TA/C64TA

This section describes the names and functions of parts on the KV-B16RA/B16TA/C32TA/C64TA
Expansion Output Unit, and specifications.
1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


Names and Functions of Parts

KV-B16RA/B16TA KV-C32TA KV-C64TA


(front view) (front view) (front view) (side view)
(2)Direct access switch (4)Lock lever

(3)I/O terminal block (1)I/O connector (4)Lock lever

No. Name Function


(1) Output connector Output connector
Turning this switch ON enables monitoring of the Expansion Unit on the CPU
access window. Changes in the state of the Expansion Unit are indicated by
the color of the switch.
Lit (green): Normal operation (excluding some exceptions*1)
Direct access
(2) Blinking (green): When the switch is turned ON in a green lit state, and the unit
switch
is selected
Lit (red): When a unit error has occurred (excluding some exceptions*2)
Blinking (red): When the switch is turned ON in a red lit state, and the unit is
selected
(3) Output terminal block Output terminal block. The output terminal block can be removed. (M3 screws)
(4) Lock lever Locks the unit coupling.
*1 This LED lights (green) in the following instances even if operation is not normal.
(1) When the number of connected units differs from the unit information on the CPU Unit when the power is
turned ON
(2) When the model type differs from the unit information on the CPU Unit when the power is turned ON
In this case, an error will be displayed in the access window.
*2 This LED lights (red) in the following instance even if the state is not a unit error state:
(1) When the unit information on the CPU Unit is for a single CPU configuration when the power is turned
ON
In this case, an error will be displayed in the access window.
* The 34-pin connector for connecting KV-C32TA/C64TA is available as an option.

Note
The terminal blocks on the KV-B16XA, KV-B16RA, KV-B16TA, KV-AD40, KV-
DA40, and KV-TF40 can be removed.
"Removing the Terminal Block" page 1-52
KV-AD40/DA40 User’s Manual KV-TF40 User’s Manual

1-31
1-6 Expansion Output Unit

1 Specifications
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

■ Specifications
Item KV-B16RA (16 points) KV-B16TA (16 points) KV-C32TA (32 points) KV-C64TA (64 points)
External connection Removable terminal Removable terminal *1
Connector Connector *1
method block block
Output mode Relay Transistor (NPN) Transistor (NPN) Transistor (NPN)
250 VAC/30 VDC 2A
Rated load 30 VDC 0.2 mA 30 VDC 0.2 mA 30 VDC 0.2 mA
(8A/1 common)
OFF leakage current — 100 µA or less 100 µA or less 100 µA or less
ON residual voltage — 0.5 V or less 0.5 V or less 0.5 V or less
ON resistance 50 mΩ or less — — —
8 points/1 common (2 16-points/2 32-points/2 64-points/4
Common mode
points) common*2 common*2 common*3
Response OFFJON 10 µs or less 10 µs or less 10 µs or less
10 ms or less
time ONJOFF 100 µs or less 100 µs or less 100 µs or less
Internal current
120 mA or less 30 mA or less 45 mA or less 100 mA or less
consumption
Weight Approx. 190 g Approx. 130 g Approx. 100 g Approx. 140 g
Electrical: 100,000
operations or more
(at 20 operations/
Relay life minute) — — —
Mechanical: 20
million operations or
more
Relay replacement Not possible — — —
*1 MIL-C-83503 compliant
*2 Two COMs are provided for the KV-C32TA and KV-B16TA, and are common internally.
*3 Four COMs are provided for the KV-C64TA, and are common internally.
"KV-C32TA internal circuit diagram" page 1-36 "KV-B16RA internal circuit diagram" page 1-34
"KZ-C16TA internal circuit diagram" page 1-35 "KV-C64TA internal circuit diagram" page 1-37

Note
The current is 1.6 A per common on the KV-C32TA and C64TA.

The unit may become damaged when the KV-B16RA derating


CAUTION 30˚C
Continuous simultaneous ON rate(%)

number of outputs that simultaneously 100

turn ON exceeds the specification range. 80


The graph on the right shows the rela-
60
tionship between the ambient tempera-
ture and the continuous simultaneous 40
37.5%
ON rate.
20

0
0 10 20 30 50
Peripheral temperature(˚C)

1-32
1-6 Expansion Output Unit

■ External dimensions 1
KV-B16RA/B16TA

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


2.8

27.3

90 35.9

3.5 80
9 29 3 (96.5) Unit: mm

KV-C32TA
2.8

27.3

90 35.9

3.5 80
9 23 3 96.3
(125) Unit: mm

KV-C64TA

2.8

27.3

90 35.9

3.5 80
9 29 3 96.3
( 125) Unit: mm

1-33
1-6 Expansion Output Unit

1 Expansion Output Unit Wiring and Internal Circuit Diagrams


CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

KV-B16RA wiring diagram KV-B16RA internal circuit diagram

Terminal No.

000 to 007
(008 to 015)
1 OUT

Internal circuit
0 Load
3
2
5
4 COM0
7
6 (COM1)
C0
8
9
10 Load power supply
11
12
13
14
15
C1

Terminal No. Direction Signal Name


0 Output 000 L

1 Output 001 L

2 Output 002 L

3 Output 003 L

4 Output 004 L

5 Output 005 L

6 Output 006 L

7 Output 007 L

C0 Output COM
8 Output 008 L

9 Output 009 L

10 Output 010 L

11 Output 011 L
12 Output 012 L
13 Output 013 L
14 Output 014 L
15 Output 015 L
C1 Output COM

* COM is not shorted internally.


They are independent.

1-34
1-6 Expansion Output Unit

KV-B16TA wiring diagram KV-B16TA internal circuit diagram


1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


Terminal No.
Insulated
power supply
1
0
3
2 000 to 015
5
4

Internal circuit
7 OUT
6 Load
C0
8
9
10
11
12 Photocoupler COM0
13 insulation
14
15 COM1
C1 Load power supply

Terminal No. Direction Signal Name


0 Output 000 L

1 Output 001 L

2 Output 002 L

3 Output 003 L

4 Output 004 L

5 Output 005 L

6 Output 006 L

7 Output 007 L

C0 Output COM0
8 Output 008 L DC
9 Output 009 L

10 Output 010 L

11 Output 011 L

12 Output 012 L

13 Output 013 L

14 Output 014 L

15 Output 015 L

C1 Output COM1
DC

* COM is shorted internally.

1-35
1-6 Expansion Output Unit

1 KV-C32TA wiring diagram KV-C32TA internal circuit diagram


CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

Connector pin No.

1 18
2 19
3 20
4 21 Insulated
power supply
5 22
6 23
7 24 000 to 015
100 to115
8 25

Internal circuit
OUT
9 26 Load
10 27
11 28
12 29 Photocoupler COM0
insulation
13 30
14 31 COM1
Load power supply
15 32
16 33
17 34

Pin No. Direction Signal Name Pin No. Direction Signal Name
1 Output 000 L 18 Output 100 L

2 Output 001 L 19 Output 101 L

3 Output 002 L 20 Output 102 L

4 Output 003 L 21 Output 103 L

5 Output 004 L 22 Output 104 L

6 Output 005 L 23 Output 105 L

7 Output 006 L 24 Output 106 L

8 Output 007 L 25 Output 107 L

9 Output 008 L 26 Output 108 L

10 Output 009 L 27 Output 109 L

11 Output 010 L 28 Output 110 L

12 Output 011 L 29 Output 111 L

13 Output 012 L 30 Output 112 L

14 Output 013 L 31 Output 113 L

15 Output 014 L 32 Output 114 L

16 Output 015 L 33 Output 115 L

17 Output COM0 34 Output COM1


DC DC

* COM is shorted internally.

1-36
1-6 Expansion Output Unit

KV-C64TA wiring diagram KV-C64TA internal circuit diagram


1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


L-side H-side
connector pin No. connector pin No.
1 18 1 18
2 19 2 19
Insulated
3 20 3 20 power supply
4 21 4 21 000 to 015
5 22 5 22 100 to 115
200 to 215
6 23 6 23 300 to 315
7 24 7 24 OUT

Internal circuit
8 25 8 25 Load

9 26 9 26 COM0

10 27 10 27 COM1
Photocoupler COM2
11 28 11 28 insulation
12 29 12 29
COM3
13 30 13 30 Load power supply
14 31 14 31
15 32 15 32
16 33 16 33
17 34 17 34

Pin Pin Pin Pin


Signal Name Signal Name Signal Name Signal Name
No. No. No. No.
L 1 000 100 18 L L 1 200 300 18 L
L 2 001 101 19 L L 2 201 301 19 L
L 3 002 102 20 L L 3 202 302 20 L
L 4 003 103 21 L L 4 203 303 21 L
L 5 004 104 22 L L 5 204 304 22 L
L 6 005 105 23 L L 6 205 305 23 L
L 7 006 106 24 L L 7 206 306 24 L
L 8 007 107 25 L L 8 207 307 25 L
L 9 008 108 26 L L 9 208 308 26 L
L 10 009 109 27 L L 10 209 309 27 L
L 11 010 110 28 L L 11 210 310 28 L
L 12 011 111 29 L L 12 211 311 29 L
L 13 012 112 30 L L 13 212 312 30 L
L 14 013 113 31 L L 14 213 313 31 L
L 15 014 114 32 L L 15 214 314 32 L
L 16 015 115 33 L L 16 215 315 33 L
17 COM0 COM1 34 17 COM2 COM3 34

* COM are all shorted internally.

Note
Use the OP-42224 connector (34-pin) for 64-point units.
The OP-23139 cannot be used.

1-37
1-7 Extension Unit KV-EB1S/KV-EB1R

This section describes the names and functions of parts on the KV-EB1S/KV-EB1R Extension
1 Unit, and specifications.
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

Names and Functions of Parts

KV-EB1S KV-EB1R
(1)Power monitor LED

(6)OP cable

(4)Power supply selector switch (bottom)

(2)Extension connector (3)DC power input terminal block


(5)KV-U7 connector (side)

No. Name Function


(1) Power monitor LED Power monitor LED*1
(2) Extension connector Connector for extension cable connection
DC power input terminal
(3) Terminal block for 24 VDC power input (3.5 A max.)*2, *3
block
This switch is for selecting the power supplied to the Expansion Unit. POWER
Power supply selector INT EXT
(4) INT: To use the power supply on the KV-1000 side
switch
EXT: To use the DC power from the EB1R or the U7
(5) KV-U7 connector Connector for KV-U7 Power Unit connection*3, *4
This is for connecting the KV-EB1S and KV-EB1R.
(6) Extension cable
(OP-42142 1 m) (OP-42141 2 m)
*1 When the LED lights red or orange, a probable cause is that the power voltage has dropped. Check the
power supply.
*2 Pay sufficient attention to reverse connection of the power supply. The unit has a built-in reverse connection
protection circuit. However, protectionmay not function depending on the power supply connection.Pay
attention to the current consumption of the Expansion Unit to prevent the current supplied from the terminal
block from falling to 3.5 A or below.
*3 When the power capacity on the KV-1000 side is limited, power is supplied to units on the extended side
from here.
*4 When the KV-U7 is connected, pay attention to the current consumption of the extended unit.

Note
Before switching the power supply selector switch, be sure to turn the power
OFF.

1-38
1-7 Extension Unit

Specifications 1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


■ Specifications
Item KV-EB1S KV-EB1R
Power voltage 24 VDC ±10%
Internal current consumption 15 mA or less 25 mA or less
Weight Approx. 90 g Approx. 115 g

Connected unit example (max.)


Max. number of horizontal units: 16
KV-1000

60 mm or more
Vertical

■ About connection
• When extension cable 1 m (OP-42142) is used
Up to 3 vertical levels (max. 48 units can be connected)
• When extension cable 2 m (OP-42141) is used
Up to 2 vertical levels (max. 32 units can be connected)

■ About installation
When the Extension Unit is used, allow 60 mm or more of space between the upper and lower
level units to allow heat to escape.
If the temperature inside the panel (temperature at the bottom of the unit) exceeds the operating
ambient temperature of the unit, lower the temperature, for example, by forced air cooling or by
providing more space between mounted units and the surrounding area to improve ventilation.
• Power supply wiring methods
"Wire the same power supply to levels 1, 2 and 3 when a separate power supply is used on the
same system. If the power supply is turned OFF on the 1st level during operation when sepa-
rate power supplies are used for the 1st level, and for the 2nd and 3rd levels, operation of the
units on the 2nd and 3rd levels will enter the state when instructions are executed with the
power supply OFF. Pay sufficient attention to operation when the power supply is OFF."
• Noise countermeasures
"When EB1 is used, and three levels are added on, and a DC power supply is used as each
power supply, loop the power cable twice through the ferrite core (Kitagawa Kogyo: RFC-10),
and when U7 is used, adopt noise countermeasures such as grounding of the FG."

1-39
1-7 Extension Unit

1 ■ Precautions when separate power supplies are used


CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

CAUTION Pay attention to the following points when supplying power from separate
power supplies from the KV-EB1R.
• At power ON: Supply power from the KV-EB1R first.
• At power OFF: Turn the power from the KV-1000 side OFF first.
(When an error occurs, press the " " key on the KV-1000 to clear the
error, and change the mode from Prog to Run to start operations.)

■ External dimensions
KV-EB1S
2.8

27.3

35.9
90

9 29 3.5 80
(130)

KV-EB1R

27.3

35.9
90

3.5 80
29 3 (105)
(130)

Unit: mm

1-40
1-8 Installation Environment
This section describes cautions for the environments in which each of the units are installed, and
mounting positions in the panel.
1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


Installation Environment

Do not install the KV-1000 in the following places.


Locations subject to ambient Locations subject to ambient
Locations subject to direct sunlight
temperature out of 0 to +50°C range humidity out of 35 to +85% range

Locations subject to condensation Locations subject to corrosive and Locations subject to large amounts of dirt
caused by sudden temperature change flammable gases and dust, salt, iron, and oil smoke

Locations directly subject to Locations that may be splashed Locations where strong magnetic
vibration and shock with water, oil or chemical mist and electrical fields are generated

Magnetic
Chemicals Electrical
field

Oil field

Mounting Position

■ Mounting orientation
When mounting the KV-1000 inside a panel, make sure that the KV-1000 CPU Unit is mounted so
that the front panel and I/O connectors are facing the front.

CK
LO
24 V
24
V

5V
5
V

KV- LO
B16 CK
XA
KV-
C32
XA
24
V

5V
LOCK

1-41
1-8 Installation Environment

1 ■ Distance between surrounding area


Be sure to leave at least 30 mm between the wall at the inner side of the device and other
devices.
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

30 mm

30 mm
Respective unit Bottom
Allow 30 mm of space
to allow you to put in your
30 mm finger to remove unit.

Top left
Allow 30 mm of space to allow heat to escape.

Note
If the temperature inside the panel (temperature at the bottom of the unit)
exceeds the operating ambient temperature of the unit, lower the temperature,
for example, by forced air cooling or by providing more space between mounted
units and the surrounding area to improve ventilation.
When the Extension Unit is used, allow 60 mm or more of space between the
upper and lower level units to allow heat to escape.

1-42
1-9 Connecting Units
This section describes how to assemble each unit and how to mount each unit on the DIN rail.
1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


Cautions When Connecting Units

Observe the following points when connecting each of the units:


• Be sure to connect the Start Unit or Power Unit to the left of the CPU Unit.
• Be sure to connect the End Unit to the right of the last connected unit.
Start
Unit

Max. number of units: 16 (max. 48 when extension is used)


KV-1000 End
CPU Unit Unit

or

KV-U7
Power Unit
KV-U7

CC

24 V OUT

24 VDC
1.8 A
0V

N
INPUT
100-240 VAC
50/60 Hz
0.98 A

■ Max. number of connected units


Up to 16 units (excluding the Power Unit and End Unit) can be connected to a single CPU Unit.

When two Extension Units are used, up to 48 units can be connected to the CPU Unit.

With some special units, 48 units cannot be connected to the CPU Unit.
Refer to the manual for each unit.

Note
• Be sure to connect units with the power turned OFF.
• Before the KV-1000 CPU Unit is shipped from the factory, its battery is
removed to prevent power capacity from failing. When using the KV-1000 CPU
Unit for the first time, connect the battery, and be sure to perform an all clear in
the access window.

1-43
1-9 Connecting Units

1 Assembling the Unit


CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

The following describes an example of how to assemble the KV-1000 CPU Unit and KV-B16XA
Expansion Input Unit.

KV
-B1
6X
A

KV-1000 (left) KV-B16XA (right)

Note
Assemble units with the Power Unit disassembled.

1 Unlock the lock levers at the top and bottom of


the unit on the right.
• Hook your finger into the indentation, and slide
towards the front of the unit to unlock.
V V
24 24

2 Insert the lock lever on the unit on the right into


the lock lever slot of the unit on the left to con-
nect.
• The unit can be easily connected by holding both
units so that they parallel to each other and by KV
-B1
6X

aligning the connector positions.


A

3 Lock the lock levers at the top and bottom of the


unit on the right.
• Following the same procedure as in step1, hook KV
-B1
6X
A

your finger into the indentation and slide towards


the rear of the unit. During this operation, make
sure that there is no gap between the units. If
there is a gap, this is a sign that the units are not
connected correctly.

1-44
1-9 Connecting Units

Mounting on a DIN rail 1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


The following describes how to mount the unit to be connected onto the DIN rail and remove the
unit from the DIN rail.

■ Mounting units
1 Hook the groove at the top of the DIN rail
onto the DIN rail mounting claw at the top

LO
CK
of the unit.

Upper claw

DIN track

2 Hook the groove at the bottom of the DIN


rail onto the DIN rail mounting claw at the
bottom of the unit.

LO
C
K
• The black claw at the bottom is designed
to move by means of a spring. Press in
this claw until you hear it click into place.
• In difficult mounting locations, remove all
locks, mount the unit on the DIN rail, and
then lock.

3 Make sure that the lower DIN rail mount-


ing claw is pressed in (locked).

Locked Unlocked

■ Removing units
1 Pull down the lower DIN rail mounting
claw.

Note
Do not pull down the claw for
the backup battery.

Loose
2 Remove the DIN rail from the units fol-
lowing the procedure in reverse to the
mounting procedure.

1-45
1-10 Wiring Units
This section describes how to assemble connectors, wiring of each unit, internal circuits, and how
1 to wire each unit.
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

Precautions When Wiring to Each Unit

The following describes the precautions to follow when wiring I/O devices and I/O units. Be sure
to read these precautions before starting wiring.

■ Precautions when wiring to I/O devices


Pay attention to the following points when wiring to I/O devices.
• Separate input leads from output leads, and wire separately.
• I/O signal leads wired nearby power leads may be influenced by high voltage or large current
causing the KV-1000 Series to malfunction. Wire power leads at least 100 mm away from I/O
signal leads.
• Wire 24 VDC I/O leads away from 100 VAC or 200 VAC leads.
• When wiring using ducts, make sure that the ducts are properly grounded.

When I/O leads cannot be separated from power leads


Use a single shielded cable, and ground the shielded cable at the PLC side.
(In some environments, the shielded cable may have to be grounded at the side opposite the
PLC.)

PLC Shielded cable


Sensor, etc.

Input

RL

Output

24 VDC Class D earthing

Be sure to separate connecting leads for the Extension Unit away from power leads.

■ Grounding precautions
• Provide a class D earth (maximum resistance of 100 Ω) individually for each of the devices.
• If a separate ground is not possible, ground using a shared grounding point. Note, however,
that in this case the leads must be of the same length.

PLC Other device PLC Other device PLC Other device

B
A B A

Class D earthing A=B A>B


A<B

1-46
1-10 Wiring Units

■ About protection of contacts 1


When using clutches, motors, solenoids or other inductive loads, rush current flows when the load
power is turned ON, or counter electromotive force may occur when the load power is cut. Rush

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


current or counter electromotive force is a major cause of shorter contact life. To suppress these
phenomena, provide a contact protection circuit.
Examples of contact protection circuits

In case of AC load (1) In case of DC load (1)


Contact

L Contact L

Load CR circuit Load Diode


In case of AC load (2) In case of DC load (2)

a b
L L

Zener diode
Varistor
• When the power voltage is 24 to 48 V, install at point b.
When the power voltage is 100 to 200 V,
install at point a.

• Use a load coil rated at the contact capacity or lower.


• Use a diode whose peak inverse voltage is 10X or more than the circuit voltage and whose for-
ward current is the current of the load or higher.
• Install diodes, varistors, and CR circuits directly at the relay coil terminal.

■ Wiring to terminal block units


Use Y-shaped terminals of the following size.
B
d2

Compatible dimensions
B : 6 mm min.
L
Dimensions of Y-shaped terminal
L : 13 mm min.
B : Distance between prong outsides
d1 : Diameter of lead insert section d2 : 3.2 mm max.
d2 : Distance between prong insides
(screw fit section) width
L : Total length d1

1-47
1-10 Wiring Units

1 Assembling and Wiring Connectors


CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

To connect devices to each unit, you must wire the electrical leads from each device to the con-
nectors (female) to connect to on the unit side.

■ Precautions during wiring (OP-22184, OP-51404, OP-23139, OP-42224)


Pay attention to the following points before wiring.
• Be sure to use the following compatible lead:
Lead size: AWG22 to 24 (twisted lead)
Cross-section area: 0.2 to 0.3 mm2
Sheath outer diameter: 1.1 to 1.5 mm
• Cut the end of leads straight so that they are flat.
• After wiring, make sure that the clamp section completely wraps around the lead wire, and that
it is inserted as far as possible.
• Cut sections of the lead wire must be cut so that there are no loose strands. (The sheath need
not be stripped away.)
• Fine lead contacts (OP-30594) for AWG26 to 28 are also available.
(Use in combination with OP-22184, OP-51404, OP-23139, and OP-42224.)
Lead size: AWG26 to 28
Cross-section area: 0.08 to 0.14 mm2
Sheath outer diameter: 1.1 to 1.3 mm

CAUTION The unit is made of synthetic resin, and may melt if it comes in contact
with acetone, trichlene, benzene, and other solvents with strong dissolv-
ing power. Also, note that the unit may be damaged if excessive force is
applied during fastening.

Note
Use the OP-42224 connector (34-pin) for the 64-input units.
The OP-23139 cannot be used.

■ About the Exclusive Pressure-contact Tool


Units can be wired more easily if you use the Exclusive Pressure-contact Tool to pressure-fasten
the leads.
Prepare the following Exclusive Pressure-contact Tool beforehand.

Note
The lead must be soldered if you do not have the Exclusive Pressure-contact
Tool.

Names of parts
Exclusive Press-contact Tool: Model No. OP-21734

Handle
Press-fastener punch
Body

Contract extractor pin


Guide Contact holder Cover

1-48
1-10 Wiring Units

■ About the connector 1


The connector is provided with an Hood cover
upper and a lower cover. When wiring Unscrew these

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


two screws.
the connector, remove both of these
covers.

Housing
Hood cover vertical cover Hood cover slanted cover
OP-23139 (34-pin) OP-42224 (34-pin)
OP-22184 (40-pin) OP-51404 (40-pin)

Connector terminal Nos.


There are two types of connectors, 34-pin and 40-pin, depending on the type of unit. The figure
below shows the pin Nos. for each of the terminals. When wiring, also check with "Unit wiring/
internal circuit diagrams."

34-pin connector: Model No.: OP-23139, OP-42224


Side with claw is up side.
Mark Up

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Down
40-pin connector: Model No.: OP-22184, OP-51404
Mark Up

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Down

1-49
1-10 Wiring Units

1 ■ Wiring to the connector


The following describes how to wire to the connector using the Exclusive Pressure-contact Tool.
Prepare "contacts," "housing" and "lead wire" beforehand.
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

1 Cut the contact from below the cutoff posi-


tion on the carrier in the cutaway direction
shown by the arrow.

Carrier

Contact cutoff position

2 Insert the contact straight into the contact holder of the Exclusive Pressure-contact Tool.
(Figure A)

3 Insert the lead wire straight in as far as possible along the crimping groove of the contact.
(Figure B)
Press-fastener punch
Fig.A Fig.B

Crimping groove

Cover
Electrical lead
Guide

Contact
View from side

Press-fastener
Handle punch
Press-fastener punch
Cover
Body
Electrical Guide
lead
Contract extractor pin
Guide Contact holder Cover

4 Grip the handle of the Exclusive Pressure-


The clamp
contact Tool until the clamp is completely must be gripping
wrapped around the lead wire. the electrical lead.

Insert electrical lead


as far as possible.

5 Lightly pull on the lead to remove the con-


tact pressure-fastened with the lead wire
from the contact holder of the Exclusive
Pressure-contact Tool.

Electrical lead

1-50
1-10 Wiring Units

6 Insert the contact straight in as far as possi-


1
ble along the groove of the housing in
which the contact is attached.

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


Housing

7 Attach the housing in which contacts are Screw in these two screws.
inserted to the connector, and attach the
covers.

Housing

Align this section.


8 Fasten the electrical leads with the bundling
band as shown in the figure.
Bundling band

To remove contacts
Remove contacts from the connector as follows.

1 Align the terminal that you want to remove Hold down.


with the arrow on the frame of the Exclusive
Pressure-contact Tool.
Pull
2 Pull out the lead wire while holding down
electrical lead.

the contact. Contact extractor pin

1-51
1-10 Wiring Units

1 Removing the Terminal Block


CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

The following describes how to remove the terminal block.


The terminal blocks on the KV-B16TA, KV-B16RA, KV-B16XA, KV-AD40, KV-DA40, and KV-TF40
can be removed.

Note
Be sure to turn the power OFF before you remove the terminal block.

1 Open the terminal block cover attached to


the unit.

A
6X
-B1
KV
V
24

5V

2 Unscrew the fastening screws, and remove the terminal block.


• The black screws are the terminal block fastening
screws.

A
6X
-B1
KV
V
24

5V

3 Remove the terminal block while pulling it out towards you.


• Pull out towards you while exerting a small amount of
force.

A
6X
-B1
KV
V
24

5V

1-52
1-11 Maintenance
This section describes how to inspect and perform daily care on units, and how to replace batter-
ies and relays.
1

CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS


Inspection and Daily Care

■ Inspection
When the KV-1000 or units are used for a long time, the connecting sections of the connectors
become loose or the battery is worn down. Continued use of the KV-1000 in this state may cause
trouble during operation.
For this reason, periodically inspect the body and wired sections of the KV-1000 and each of the
KV-1000 Series units.
The following shows the main inspection items.
• Are the locks on the connections of each unit loose or disconnected?
• Are the connector connections loose or disconnected?
• Are the screws on the terminal block loose?
• Is the battery worn?
• Are the wiring cables between units and other equipment damaged?

■ Daily care
Dirt adheres to the CPU Unit or each of the units when they are used for a long time.
Clean off any dirt from the KV-1000 using a clean, dry cloth.
Dust and dirt on fine components can be removed with a cotton wool bud after first removing the
connector.

Replacing the Battery

■ When battery power has dropped


When the message [CPU Error No83] is displayed, the built-in lithium battery must be replaced
immediately.
When a battery error occurs, CR2306 turns ON.
Data is held in memory for at least one week (at room temperature) after a battery error occurs.

■ When the battery has run out of power


When the battery has run out of power, the SRAM backup error occurs, and data memory (DM/
EM/FM), control memory (CM) and other values disappear. The ladder program itself, however,
will not disappear. If execution of the ladder program will not cause any problems in operation
even without DM, EM, FM, CM and other information, the ladder program can be temporarily exe-
cuted by clearing SRAM in the access window.
Buy the following battery:
Replacement lithium battery Model No.: OP-51604

1-53
1-11 Maintenance

1
CAUTION • The battery life is five years at an ambient temperature of +25°C. Note that
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS

use of the unit in an environment that exceeds this temperature will reduce
the battery's service life.
• When the unit is used under a high-temperature environment (ambient tem-
perature: +40°C or more), replace the battery within the total unit operation
time of two years.
• When the unit is stored under a high-temperature environment (ambient
temperature: +50°C or more) without it being energized, replace the battery
within one year.
• Data is sometimes lost if the battery is not energized for 10 minutes or more
before it is replaced. Limit the battery replacement time to within ten min-
utes.
• Do not throw the battery used in the KV-1000 into fire or disassemble it. This
battery is not rechargeable. Do not recharge it. Doing so might cause an
explosion.
• Use only the specified battery (OP-51604). Use of a different type of battery
may cause fire or an explosion.

■ Battery replacement procedure


1 Before you replace the battery, energize the battery for at least 10 minutes, and then turn
the power OFF.

2 Unscrew the backup battery screw, and remove the old battery.
• Complete the battery replacement within ten min-
utes.

3 Insert the new battery into the battery compartment.

4 Fasten with the screw. (tightening torque: 0.2 N⋅m (2


kgf⋅cm))

5 Turn the unit ON, and make sure that the battery error is
not displayed on the access window.

1-54
2

ACCESS WINDOW
ACCESS WINDOW
This chapter describes the access window that allows the user to change data
and easily perform monitoring.

2-1 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2


2-2 Monitoring Units . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
2-3 Device Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
2-4 Digital Trimmer Mode . . . . . . . . . . . . . . . . . . . . 2-17
2-5 Displaying and Setting the Date/Time. . . . . . . . 2-19
2-6 Memory Card Operations . . . . . . . . . . . . . . . . . 2-22
2-7 CPU Monitor Mode . . . . . . . . . . . . . . . . . . . . . . 2-23
2-8 Alarm Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27
2-9 Access Window Setup Mode . . . . . . . . . . . . . . 2-33
2-10 SRAM Clear Mode . . . . . . . . . . . . . . . . . . . . . . 2-35
2-11 All Clear Mode . . . . . . . . . . . . . . . . . . . . . . . . . 2-36
2-12 User Messages. . . . . . . . . . . . . . . . . . . . . . . . . 2-37
2-13 Setting Inhibited Operation . . . . . . . . . . . . . . . . 2-39
2-14 Key Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-40

2-1
2-1 Outline
This chapter describes an outline of the access window and examples of how to use the access
window.

2
What is the "Access Window?"
ACCESS WINDOW

The KV-1000 is provided with a compact LCD display with 2-color backlight.
The LCD is displayed green in the Run mode and red in the Prog mode.

Memory Card Digital trimmer

Unit monitor User message

Alarm record Device display Clock

2-2
2-1 Outline

Access Window Modes

The KV-1000 body is equipped with the access window for easily changing and monitoring data. 2
The access window also allows the user to check error codes that may occur.

ACCESS WINDOW
The access window is provided with the following ten modes.

Unit Monitor mode


In this mode, the state of the unit can be monitored on the access window by pressing the direct
access switch on the unit connected to the CPU.
"2-2 Monitoring Units" page 2-6

Device mode
In this mode, internal devices can be displayed and their settings changed.
"2-3 Device Mode" page 2-8

Digital Trimmer mode


In this mode, trimmers can be set digitally. The maximum resolution is 4294967296.
"2-4 Digital Trimmer Mode" page 2-17

Access Window Setup mode


In this mode, you can set the contrast of the access window, display language, and other access
window related settings.
"2-9 Access Window Setup Mode" page 2-33

Clock mode
In this mode, the CPU internal clock can be displayed and the time set.
"2-5 Displaying and Setting the Date/Time" page 2-19

Alarm mode
In this mode, the alarm monitor and alarm record can be checked.
"2-8 Alarm Monitor" page 2-27

Memory Card mode


In this mode, operations such as saving/loading files to and from the Memory Card, and display-
ing a list of files can be performed.
"2-6 Memory Card Operations" page 2-22

SRAM Clear mode


In this mode, device values can be cleared.
"2-10 SRAM Clear Mode" page 2-35

All Clear mode


In this mode, all settings can be cleared.
"2-11 All Clear Mode" page 2-36

CPU Monitor mode


In this mode, the state of CPU positioning and frequency counter functions can be monitored.
Also, the project name of the program contained on the unit can be checked.
"2-7 CPU Monitor Mode" page 2-23

2-3
2-1 Outline

Access Window Menu Tree

2 The following shows how the access window is configured.


1. Device Mode
ACCESS WINDOW

DM
EM
FM
CM
TM
T
C
CTH/CTC
TRM
Z
RLY
MR
LR
CR
2. Trimmer Trimmer display
3. Date Date display Date/time setting adjustment
4. CPU Mon Positioning X-axis current value
X-axis relay
Y-axis current value
Y-axis relay
X-/Y-axis current value
Frequency counter
Project name
5. Alarm Monitor
Record
Clear record
6. Memory Card Load
Save
File List Delete file
Free Space
7. AW Setting Contrast (3 to 9)
Language (English/Japanese)
8. S-RAM Clr Execute/cancel clear
9. All Clr Execute/cancel clear

2-4
2-1 Outline

Names of Access Window Parts

ACCESS WINDOW
(1)Display window

(2)Setting/operation

(1) Display window ... This window displays the current values and setting values of each device,
and error messages.
The information of each unit is displayed by pressing the direct access switch on the respec-
tive unit.

(2) Setting/operation keys ... These keys are used for moving between modes and changing the
settings of each mode. Key functions differ according to each mode. For details, refer to the
description of operations for the respective mode.

Menu items
Pressing the "M" key displays the menu.
If all of the menu items do not fit in the screen, press the "T" key to display the rest of the menu.
Press the "S" and "T" keys scrolls the menu up and down.

When screens are displayed in a language other than English, re-select the display language.
The following table shows the CPU menu items.
CPU Menu CPU Menu
1.DeviceMode 6.MemoryCard
2.Trimmer 7.AW Setting
3.Date 8. S-RAM Clr
4. CPU Mon 9. All Clr
5. Alarm

2-5
2-2 Monitoring Units
Units can be monitored and set on the access window by pressing the direct access switch on
special units or Expansion Units such as the I/O Unit connected to the CPU.
To return to the original screen from the Expansion Unit or special unit screen, press the direct
2 access switch of the unit currently displayed on the access window.
ACCESS WINDOW

For details on monitor items and settings for each unit, refer to the User's Manual for the respec-
tive unit.

Names and Functions of Setting/Operation Keys

The following table summarizes key functions when monitoring or setting up units.
Setting/ Display When Changing Numerical
Regular Function
operation Key Values
M Menu display Menu display
Changes the digit whose value is to be
Not used
incremented/decremented.
Switches pages, and changes options when
S Increments the current set value.
changing settings.
Switches pages, and changes options when
T Decrements the current set value.
changing settings.
Holding this key down for at least one Holding this key down for at least one
second applies changes to settings. second applies changes to settings.

Method of Operation (example: on I/O Unit)

■ KV-C32XA (example)
1 Press the direct access switch on the unit.
The direct access switch on the selected unit flashes.

Direct access
switch

2-6
2-2 Monitoring Units

2 The relay No. and relay ON/OFF state assigned to the unit is displayed.
The LED indication changes as follows according to the currently selected unit.

ACCESS WINDOW
0 0
1
2
1
2
On the two 16-LED rows (left row: +0 to 15, right row:
3 3 +100 to +115), for example, the leading No. of relays
4 4
5 5 occupied by C32XA are displayed.
6 6
7 7 In the figure on the left, the top left of the LED indicates
8 8
9 9 relay 30000, and the bottom right indicates relay 30115.
10 10
11 11
12 12
13 13
14 14
15 15

3 Press the "M" key with the direct access switch on the unit flashing (selected).
The menu for the unit is displayed.

4 Select the time constant using the up/down keys, and then press the " " key.
The currently set time constant state can be checked.

5 Hold down the " " key for at least one second in this state.
The setting value flashes, and the unit enters the change mode. (This operation is not possible in
the Run mode. Values can be changed only in the Prog mode.)

6 Change the setting value using the up/down keys, and hold down the " " key for at least
one second.
The setting value stops flashing, and is set. (Holding down the key for less than one second can-
cels the newly set value.)

2-7
2-3 Device Mode
In this mode, PLC device values can be monitored and changed.

2 Devices That Can be Displayed and Whose Settings Can be Changed


ACCESS WINDOW

The following table summarizes devices that can be displayed and whose settings can be
changed.
Display Name Display Name
RLY Relays CM Control memory
MR Internal auxiliary relays TM Temporary data memory
LR Latch relays T Timers
CR Control relays C Counters
DM Data memory CTH High-speed counters
EM Data memory CTC High-speed counter comparators
FM Data memory TRM Digital trimmers
Z Index registers

Note
The states of timers, counters, and high-speed counter comparators cannot be
monitored.

Names and Functions of Setting/Operation Keys

The following table summarizes key operations in the Device mode.


Setting/ Display When Changing Numerical
Regular Function
operation Key Values
M Menu display Menu display
Registers (applies)/cancels new values.
Hold down for at least one second to register
Moves to the setting value change mode.
(apply).
Hold down for at least one second.
Registration is canceled if held down for less
than one second.
Increments/decrements newly set changed
S/T Selection of device No.
numerical values.
Selection of device
Selects the digit whose numerical value is to
Selection of display attribute
be changed.
Selection of device name annotation

2-8
2-3 Device Mode

Method of Operation in the Device Mode

To check the menu configuration of the access window, see "Access Window Menu Tree." 2
"Access Window Menu Tree" page 2-4

ACCESS WINDOW
■ Moving to the Device mode
1 Press the "M" key.
Pressing the "M" key displays the menu screen. (If other units are selected, press the "M" key
twice.)
When the menu screen is displayed, [1. DeviceMode] is displayed flashing.

2 Select [1. DeviceMode].


In this example, [1. DeviceMode] is displayed flashing. This is OK.

3 Determine the mode to select.


Press the " " key to switch to the Device mode.
The monitor screen is displayed in the device mode.

■ Example of monitor screen for each device


Relays Control relay

Data memory Control memory

2-9
2-3 Device Mode

■ Changing the device No. to monitor


1 After moving to the Device mode, press the "T" key.
2 Pressing the "q" key increments the device No., and pressing the "p" key decreases the device
No.
ACCESS WINDOW

■ Changing the device type to monitor


1 In the monitor display state, press the " " key.

2 A list of device types is displayed.


Select the device to display using the "S" and "T" keys.
In this example, select [TM].

The device types are displayed in the following order:


RLYJMRJLRJCRJDMJEMJFMJCMJTMJTJCJCTH/CTCJTRMJZ
When the "T" key is pressed with Z selected, the display returns to RLY.
Likewise, when the "S" key is pressed with RLY selected, the display returns to Z.

3 [•TM] is displayed flashing.


Press the " " key.

The screen for determining the desired device No. is dis-


played. The current device No. is displayed on the 3rd line.
The numerical value displayed on the 4th line is the device
No. change increment. Change the device No. using the
"S" and "T" keys. The device No. change increment
increases tenfold by pressing the " " key. Determine the
device No. to display using the "S", "T" and " " keys.

2-10
2-3 Device Mode

Press the " " key. This displays the TM of the specified
No.

ACCESS WINDOW
■ Changing the monitor value display format
1 In the monitor display state, press the " " key.

2 Press the " " key with the list of device types displayed.

3 This displays the display format selection screen.

4 Select the display format.


Select the display format using the "S" and "T" keys.

5 Press the " " key. This displays the monitor value in the selected display format.
The display format selected here is applied to all devices.

The following table summarizes display formats that can be selected.


Format Description
According to device type (see separate
Default
table)*
ON/OFF ON/OFF display
16Bit-BASE10 Data width 16-bits, decimal number display
16Bit-BASE16 Data width 16-bits, Hex number display
16Bit-BASE2 Data width 16-bits binary number display
32Bit-BASE10 Data width 32-bits, decimal number display
32Bit-BASE16 Data width 32-bits, Hex number display

* "Available formats for each device" page 2-12

2-11
2-3 Device Mode

Example

2
ACCESS WINDOW

ON/OFF 16Bit-BASE10 16Bit-BASE16

16Bit-BASE2 32Bit-BASE10 32Bit-BASE16

Available formats for each device


16Bit- 16Bit- 16Bit- 32Bit- 32Bit-
ON/OFF
BASE10 BASE16 BASE2 BASE10 BASE16
RLY/MR/LR O (default) O O O
CR O (default) O O O
DM/EM/FM O (default) O O O O
CM O (default) O O O O
TM O (default) O O O O
T O (default) O
C O (default) O
CTH/CTC O (default) O
TRM O (default) O
Z O (default) O O

The display format that can be selected varies according to the device type. When a display for-
mat that cannot be applied is selected, the default display format is selected.

■ Device name/comment display


1 In the monitor display state, press the " " key.

2 Press the " " key with the list of device types displayed.

3 This displays the display format selection screen.

2-12
2-3 Device Mode

4 Press the " " key in the display format selection screen.

ACCESS WINDOW
5 The screen for selecting device names/comment displays is displayed.
Select whether to display the device name or comment using the "S" and "T" keys.
Pressing the "S" key displays the comment.

6 Press the " " key. This selects the comment display, and the display returns to the
Device mode.
The following screen shows comment "SensorA" registered to RLY0, and no comment registered
to RLY1.

About comments that can be registered in the access window


• Up to 12 1-byte alphanumeric characters can be displayed. Comments from the 13th character
onwards cannot be displayed.
• Available display characters are ASCII codes 20 to 7e (Hex) and a1 to df (Hex). If characters
other than these are used, the device name is displayed instead of the comment. Comments
entered here are registered to Comment 1 on KV STUDIO.
See the "KV STUDIO User's Manual."

• CTH comments cannot be displayed. CTC comments are displayed.


• Z comments cannot be displayed.

2-13
2-3 Device Mode

■ Changing device values (when device values are ON/OFF display)


1 Hold down the " " key for at least one second with the device to change displayed.
2 If two devices are currently displayed in one screen, the device whose value can be changed is
the device displayed on the top row of the screen. (In this case, the device on the bottom row is
ACCESS WINDOW

no longer displayed.)

2 The value of the device is displayed flashing.


In this state, press the "S" and "T" keys. This toggles the display between "ON" and "OFF".
(At this stage in the procedure, writing of the device value is not executed.)

3 Set the desired device value to write, and hold down the " " key for at least one second.
Flashing stops and writing of the entered device value is executed. If the key is released within
one second, writing is not executed, and the screen returns to the monitor display.

■ Changing device values (when device values are numerical values)


The following example describes how to change the value of DM1000 No. from "100" to "201".

1 Hold down the " " key for at least one second with the device to change displayed.

2 The value of the desired device flashes.


The [change increment] is displayed on the bottommost row of the screen.

2-14
2-3 Device Mode

3 Press the "S" key.


The device value is incremented by the amount set to the "change increment," and the device
value display changes to [101].
(At this stage in the procedure, the device value is not written to the device.) 2

ACCESS WINDOW
4 Press the " " key once.
This changes the "change increment" digit. Each press of the key changes the digit one digit at a
time.
To change the 100's digit, press the key twice.

5 The "change increment" value changes to [100].

6 Press the "S" key once.


The device value is incremented by the value [100] set to the "change increment," and the device
value display changes to [201].
(At this stage in the procedure, the device value is not written to the device.)

7 After you have set the new value to write as the device value, hold down the " " key for at
least one second.
This writes the values, and the screen returns to the monitor display.

To cancel writing midway, release the " " key within one second.
This returns to the monitor display without executing writing of the device value.

2-15
2-3 Device Mode

■ Changing device values (T, C, CTH/CTC, TRM)


The setting value and current value can both be changed in the case of T, C, CTH/CTC, and TRM
devices.
2
• How to change setting values
ACCESS WINDOW

To change device values, hold down the " " key for at least one second. Items change as fol-
lows:
T: Timer setting value
C: Counter setting value
CTH/CTC: CTC (high-speed counter comparator)
TRM: Trimmer

• How to change current values


Items change as follows by holding down the " " key for at least one second with the " " key
pressed.
T: Timer current value
C: Counter current value
CTH/CTC: CTH (high-speed counter current value)
TRM: Trimmer upper limit value (The trimmer upper limit value is assigned to CM.)
"2-4 Digital Trimmer Mode" page 2-17

■ T, C, CTH/CTC, TRM monitor display examples

Timer setting value Counter setting value


Timer setting value Counter setting value

CTC value
(high-speed counter) Trimmer value

Trimmer upper limit value


CTC value
(high-speed counter comparator) Not displayed when
the upper limit value is
When the device is not used not set.
on the ladder program (devices are not registered), KV-1000 Instruction
Reference
the display is as shown on the left. Manual
"MEMSW Instruction"

2-16
2-4 Digital Trimmer Mode
Trimmer values can be changed more easily than in the Device mode.
Trimmer values are loaded by the TMIN instruction.

2
Names and Functions of Setting/Operation Keys

ACCESS WINDOW
The following table summarizes key operations when changing the trimmer values.
Setting/
Function
operation Key
M Menu display
Changes the No. of the trimmer to display.
Each press increments the device No.
S Increments the trimmer value.
T Decrements the trimmer value.
Changes the digit whose value is to be incremented/decremented. Each press of the key
increments the digit one digit at a time. (When the 10th digit is exceeded, the 1st digit is
returned to.)

Changing trimmer values in this mode differs from changing values in the Device mode. In the
Digital Trimmer mode, changes to values are reflected directly as they are without pressing the
" " key.

Changing Digital Trimmers

To check the menu configuration of the access window, see "Access Window Menu Tree."
"Access Window Menu Tree" page 2-4

1 Press the "M" key.


The menu is displayed.

2 Press the "T" key once.


[2. Trimmer] is selected. Press the " " key.

The value of the 3rd row indicates the trimmer upper limit value. When the upper
limit value setting is not used, nothing is displayed. For details on use and selec-
tion of the upper limit value, refer to KV-1000 Instruction Reference Manual,
"MEMSW Instruction."

3 The trimmer No. to be displayed can be changed by the " " key.
Select the trimmer No. to change.

2-17
2-4 Digital Trimmer Mode

4 Change the increment amount by the " " key.

2
ACCESS WINDOW

5 Pressing the "S" key increases the trimmer value by the increment amount, and pressing
the "T" key decreases the trimmer value by the decrement amount.
The Digital Trimmer mode differs from the Device mode in that changes to values are reflected
directly as they are without pressing the " " key.

Tip • The upper limit value can be set on the ladder or in the access window Device mode.
• The upper limit value is stored to CM.
• The current trimmer value is loaded by the TMIN instruction.
• To enable the upper limit value, use the MEMSW instruction.
• Even if use of the upper limit value has been set by the MEMSW instruction, the
upper limit value becomes 4294967295 when "0" is entered for the upper limit setting
value.

Trimmer No. Device


TRM0 upper limit value CM01700, CM01701
TRM1 upper limit value CM01702, CM01703
TRM2 upper limit value CM01704, CM01705
TRM3 upper limit value CM01706, CM01707
TRM4 upper limit value CM01708, CM01709
TRM5 upper limit value CM01710, CM01711
TRM6 upper limit value CM01712, CM01713
TRM7 upper limit value CM01714, CM01715

2-18
2-5 Displaying and Setting the Date/Time
The date/time can be displayed and set.

About the Date/Time Display 2

ACCESS WINDOW
The time display conforms to the 24-hour clock.
The day of the week is displayed as follows:
: Sunday : Thursday
: Monday : Friday
: Tuesday : Saturday
: Wednesday

Names and Functions of Setting/Operation Keys

The following table summarizes key operations when setting the date/time.
Setting/
Function
operation Key
M Menu display
Switches the setting items.
Toggles between adjustment ON/OFF of setting items.
S Increments settings items when setting the date/time.
T Decrements setting items when setting the date/time.
Holding this key down for at least one second in the date/time display sets the date/time.
Holding this key down for at least one second when setting the date/time applies this
setting.
Holding this down for at least one second then releasing the key when adjusting the date/
time applies the newly adjusted time.

Method of Operation

To check the menu configuration of the access window, see "Access Window Menu Tree."
"Access Window Menu Tree" page 2-4

■ Date/time setting
1 Press the "M" key.
The menu is displayed.

2 Press the "T" key twice and then the " " key.
[3. Date] is displayed.

2-19
2-5 Displaying and Setting the Date/Time

3 Hold down the " " key for at least one second.
The date/time display screen is displayed, and the "Year" item flashes.

2
ACCESS WINDOW

4 Select the item to set by pressing the " " key.


Each press of the " " key switches the item as follows:
"Year"J"Month"J"Day"J"Hours"J"Minutes"J"Seconds"J"Day of week"J"Year" and so forth.

5 Select the item using the "S" and "T" keys.

6 Repeat steps 4 and 5. When you have finished setting the date/time, hold down the " "
key for at least one second.
[Exec] is displayed at the right of the bottommost row of the display to prompt setting of the date/
time.
(At this stage in the procedure, the date/time has not been set.)
Release the " " key. This executes setting of the date/time, and returns the screen to the date/
time display.

If you release the " " key before [Exec] is displayed, the date/time setting is not executed, and
the screen returns to the date/time display.

Note
Set year, month, day, hour, minutes, seconds, and day of the week accurately.
The day of the week is not checked for the year, month, day, hour, minutes, and
seconds settings.

2-20
2-5 Displaying and Setting the Date/Time

■ Time adjustment
Time adjustment is a function for setting the second value to "0" seconds.

The seconds setting changes to "0" when time adjustment is executed. 2


Current Second Value Operation

ACCESS WINDOW
0 to 29 The seconds value only is set to "0".
The minute value is incremented, and the seconds
30 to 59
value is set to "0".

1 Press the " " key in the date/time display state.

2 [Adjust] is displayed on the bottommost row to indicate that the time can be adjusted.
(To cancel time adjustment, press the " " key again. The [Adjust] display disappears, and the
screen returns to the date/time display.)

3 Hold down the " " key for at least one second.

4 [Exec] is displayed at the right of the bottommost row of the display. (At this stage in the
procedure, time adjustment has not been executed.)
Release the " " key. This executes the time adjustment.

If you release the " " key before [Exec] is displayed, the time adjustment is not executed, and
the screen returns to the date/time display.

2-21
2-6 Memory Card Operations
Saving of data to Memory Card and loading of data from Memory Card can be performed on the
access window.
"MEMORY CARD" page 3-1
2
About Memory Card Operation
ACCESS WINDOW

The following shows the functions that user can operate on the Memory Card.

Item Description
Load Loads the file in the specified directory (project folder) to the CPU Unit.
Saves the CPU data to Memory Card. Programs, DM, EM, FM, CM, R, MR, LR, CR,
Save
device comments, unit setup information, and logging setup information are saved.
Displays a list of directories and files on the Memory Card. Files in the list can also be
File List
deleted.
Free Space Displays free space on the Memory Card.

Accessing of the Memory Card is possible only in the Prog mode. Before you use the Memory
Card, switch to the Prog mode.

Only files in the directories one level down in the root directory can be accessed.
In the following example file configuration, files under directory B cannot be viewed by "File List".

<File Configuration Example>


Root Directory A Directory B

File C File E
File D File F

■ About file names


Directory names (project folder names) are displayed on the access window as "KVSAVE00<D>"
with three characters entered at "<D>".
Periods "." are not allowed in directory names.
Only upper-case characters are allowed in file names.

2-22
2-7 CPU Monitor Mode
Special functions mounted on the KV-1000 CPU can be monitored on the access window when
they are in use.

2
CPU Monitor

ACCESS WINDOW
The following table summarizes special functions that can be monitored.

Item Description
Pos Control Monitors CPU Unit positioning functions.
Freq Count Monitors CPU Unit frequencies.
ProjectName Checks the project name of the program currently stored on the CPU Unit.

Positioning Monitor

To check the menu configuration of the access window, see "Access Window Menu Tree."
"Access Window Menu Tree" page 2-4

Monitors positioning functions.


"MOTOR CONTROL (POSITIONING CONTROL)" page 8-1

1 Press the "M" key.


The menu is displayed.

2 Press the "T" key three times to select [4. CPU Mon], and then the " " key.
The CPU special functions menu is displayed.

3 [Pos Control] is displayed flashing. Press the " " key as it is.

2-23
2-7 CPU Monitor Mode

4 The current state of the positioning control function is displayed.


The positioning monitor is provided with five monitor functions.
Each of these functions can be selected by using the "T" and "S" keys.
2 The following describes each of these monitor functions.
ACCESS WINDOW

• Monitoring X-axis M codes, current values, current speed


"*" is displayed during pulse output.
"*" is displayed during pulse output.
Error No. is displayed
when an error is generated.

P current value
V current speed
• Monitoring X-axis related relays
CR3000
to
CR3000
CR3008 CR3015
CR3015
• Monitoring Y-axis M codes, current values, current speed
"*" is displayed during pulse output.

P current value
V current speed
• Monitoring Y-axis related relays

CR3100
to
CR3100
CR3108 CR3115
CR3115
• Monitoring X-axis current value and current speed, and Y-axis current value and current speed
Upper two digits are X-axis. X-axis current value
X-axis current speed
Lower two digits are Y-axis. Y-axis current value
Y-axis current speed

2-24
2-7 CPU Monitor Mode

Frequency Counter

To check the menu configuration of the access window, see "Access Window Menu Tree." 2
"Access Window Menu Tree" page 2-4

ACCESS WINDOW
Displays the frequency counter.
"FREQUENCY COUNTERS" page 6-1

1 Press the "M" key.


The menu is displayed.

2 Press the "T" key three times to select [4. CPU Mon], and then the " " key.
The CPU special functions menu is displayed.

3 [Pos Control] is displayed flashing. Press the "T" key once to select [Freq Count].

4 Press the " " key.


The frequency counter monitor screen is displayed.
The display unit is either "Hz" or "rpm" depending on the frequency counter setting.
Example of "Hz" display

Example of "rpm" display

The display is as follows when the frequency counter is not in use.

2-25
2-7 CPU Monitor Mode

Project Name

2 To check the menu configuration of the access window, see "Access Window Menu Tree."
"What is the "Access Window?"" page 2-2
ACCESS WINDOW

Displays the project name.

1 Press the "M" key.


The menu is displayed.

2 Press the "T" key three times to select [4. CPU Mon], and then the " " key.
The CPU special functions menu is displayed.

3 [Pos Control] is displayed flashing. Press the "T" key twice to select [ProjectName].

4 Press the " " key.


The project name is displayed.

About project names that can be displayed in the access window


• Up to 12 1-byte alphanumeric characters can be displayed.
• Available display characters are ASCII codes 20 to 7e (Hex) and a1 to df (Hex).

Project names are registered in the project properties of KV STUDIO.


Project names entered as display comments in the access window are stored to CM01757 to CM01763 after data
is transferred. For details on display comments in the access window, refer to the KV STUDIO User's
Manual.

Tip The project name set in KV STUIDO is stored to CM01740 to CM01756 after data is
transferred.

2-26
2-8 Alarm Monitor

About the Alarm Monitor Function


2
Messages can be displayed on the access window when an alarm occurs if the message is set in

ACCESS WINDOW
advance to alarm relays (CR3300 to CR3415). The alarm monitor function also allows you to
check a record of alarms that have occurred.

The following table summarizes the alarm functions in the access window.
Function Description
Monitor Monitors ON alarm relays in real time.
Record Monitors the alarm ON/OFF record.
Clear record Clears the alarm ON/OFF record.

Comments are displays as alarm messages if device comments are registered in advance to
alarm relays. This helps the user distinguish alarm details.
If comments have not been set, the No. (CR No.) of the alarm relay is displayed.
The date and time that alarm relays turn ON are automatically recorded to the alarm record. To
also set the date and time that alarm relays turn OFF, set CR3501 to ON.
The maximum number of characters that can be displayed is twelve.
Available display characters are ASCII codes 20 to 7e (Hex) and a1 to df (Hex).
If characters other than these are used, the device name is displayed instead of the comment.

How to Register Alarms

The table shows devices used for alarms.


Control Relay R/W Description
CR3300 to CR3415 R/W Alarm relays (32)
CR3500 R Current alarm relays
CR3501 R/W ONJOFF record relays

Alarm function specifications


The function allows you to display alarm messages on the access window and KV-D30, and store
a record of alarms that have occurred.

The alarm record can be checked on the access window and KV-D30.

Note
Be sure to manipulate the alarm relays by the SET and RES instructions. Cur-
rently operating alarm relays can be reset and batch-cleared also by the ARES
instruction.

<Setting of alarm relays> 32 CRs (CR3300 to CR3415)


Be sure to execute the SET instruction to set alarm relays.
If alarm relays are set by other methods, a record is not left behind.
Alarm messages are recorded as comment 1 of the alarm relay.

<Resetting of alarm relays> 32 CRs (CR3300 to CR3415)


Be sure to execute the RES instruction to reset alarm relays.
When CR3501 is ON, a record of when alarm relays turn OFF is already recorded.
Set CR3501 to ON to leave behind a record of alarm relay OFF times.
2-27
2-8 Alarm Monitor

<Current alarm relays>


CR3500 turns ON even if one alarm is occurring.
CR3500 automatically turns OFF when all ON alarm relays are turned OFF.
2
(ONJOFF record relays) (CR3501)
ACCESS WINDOW

Up to 64 alarms are stored to the alarm record internally on the CPU.


When the number of alarms in the alarm record exceeds 64, alarms are deleted in order from the
oldest record so that the latest occurring alarm can be recorded.
Each alarm stores the alarm relay No., date/time (year/month/day/hours/minutes/seconds) of
occurrence, and ON/OFF state.
When the ONJOFF record relay (CR3501) is OFF, only a record of when the OFF state of the
alarm relay changes to ON is recorded.

When the ONJOFF record relay (CR3501) is set to ON, a record of when the ON state of the
alarm relay changes to OFF is recorded.

Use the ARES instruction to batch-reset alarm relays, reset alarm actuation relays, and batch-
clear records.

Examples of Alarm Monitor Display

To check the menu configuration of the access window, see "Access Window Menu Tree."
"Access Window Menu Tree" page 2-4

The access window displays changes as follows when an alarm occurs.


• Example of device comment settings
Alarm Relay Comment
CR3300 Press. Alarm
CR3301 Temp. Alarm
CR3302 No mtrl. A
CR3303 No mtrl. B
CR3304 No mtrl. C
CR3305 No mtrl. D
CR3306 No mtrl. E
CR3307 Hopper jam

■ Alarm monitor (real time display)


Monitor mode of current occurring alarm

The smallest relay No. of the two currently


occurring alarms is displayed.
Currently occurring alarms (comment of alarm relay).

Press the "S" and "T" keys on the access window switches the alarm display.
Monitor mode of current occurring alarm
The second smallest relay No. of the two currently
occurring alarms is displayed.
Currently occurring alarms (comment of alarm relay).

2-28
2-8 Alarm Monitor

■ Alarm monitor (record display)


This indicates that the 1st alarm in the record
(31 alarms) on the record display is displayed. 2
 indicates the time

ACCESS WINDOW
(hours/minutes/seconds)
that the alarm occurred.

Press the "S" and "T" keys on the access window switches the alarm display.

This indicates that the 1st alarm in the record


(31 alarms) on the record display is displayed.
 indicates the time
(hours/minutes/seconds)
that the alarm was canceled.

The entire record and all alarm relays can be reset by the ARES instruction or access window
operations.

How to Monitor Alarms

To check the menu configuration of the access window, see "Access Window Menu Tree."

"Access Window Menu Tree" page 2-4

The following describes the procedure for monitoring alarms in the access window.

1 Press the "M" key.


The menu is displayed.

2 Select [5. Alarm] using the "S" and "T" keys.

3 Press the " " key.


The alarm menu is displayed.

2-29
2-8 Alarm Monitor

4 Select [Monitor] using the "S" and "T" keys, and press the " " key.
The alarm relay monitor is displayed.
In the following screen example, CR3302 is ON, and two of the other alarm relays are ON while
2 the other is OFF.
ACCESS WINDOW

(1)

(2)

(1) [01/03]
[01] indicates that the No. of the alarm relay having the highest priority (smallest No.) among
currently ON alarm relays is displayed.
[03] is the total number of currently ON alarm relays.
(2) [CR3302]
This indicates the currently displayed alarm relay. If a comment is registered to the alarm relay,
the comment is displayed instead of the device name. Only 1-byte alphanumerics can be dis-
played in comments.
(Same as the comment display in the Device mode.)

Pressing the "T" key displays the next alarm relay in order of priority.

When the display changes to the highest priority alarm relay No., the screen flashes, and the
highest priority alarm relay No. is displayed.
(Note, however, that the screen does not change even if the display changes to the highest prior-
ity alarm relay No. in the alarm relay record display or clear alarm relay record display.)
In the above screen example, CR3301 is displayed and the entire screen flashes when CR3301
turns ON.

To stop flashing, press any one of the " ", "S", "T" or " " keys.
Pressing the "M" key returns the screen to the alarm menu display.
When the currently displayed alarm relay turns OFF, the relay having the next highest priority is
displayed.

• When alarm relay is OFF


The display changes as follows when all alarm relays are OFF.

2-30
2-8 Alarm Monitor

Displaying the Alarm Relay Record

Displays the alarm relay ON/OFF record. 2


1 Press the "S" and "T" keys with the alarm menu displayed to select [Record].

ACCESS WINDOW
2 Press the " " key.
The alarm relay ON/OFF record is displayed.
In this screen example, CR3302, CR3303 and CR3400 turned ON in that order, and then CR3400
turned OFF.

(1)
(2)
(4)
(3)

(1) [01/04]
[01] indicates the newest items in the currently displayed record.
[04] indicates the total number of items in the record.
(2) [CR3400]
This is the device currently targeted for recording. If a comment is registered to the alarm
relay, the comment is displayed instead of the device name. Only 1-byte alphanumerics can
be displayed in comments. (Same as the comment display in the Device mode.)
(3)"L" indicates that the record is for a device whose alarm relay state changed from ON to OFF.
Records for a device whose alarm relay state changed from OFF to ON are indicated by "K".
(4) [2004/02/14 15:49:39]
This indicates the date/time that the record was recorded.

Each press of the "T" key displays the next latest record.
In this screen example, the comment "Power On" is registered to CR3300.

Pressing the "M" key returns the screen to the alarm menu.
• When there are no records
The display is as follows when there are no alarm records.

2-31
2-8 Alarm Monitor

Clearing Alarm Relay Records

2 1 Press the "S" and "T" keys with the alarm menu displayed to select [Clr Record].
ACCESS WINDOW

2 Press the " " key.


The clear record confirmation message is displayed.

3 To execute clearing of the record, hold down the " " key again for at least one second.
Pressing the "M" key cancels clearing of the record and returns the screen to the alarm menu dis-
play.

4 The display changes as follows when clearing of the alarm record is completed.

Pressing the "M" key returns the screen to the alarm menu display.

2-32
2-9 Access Window Setup Mode

Setup Functions Available in the Access Window Setup Mode


2
The following two functions are available in the access window setup mode.

ACCESS WINDOW
Contrast Adjusts LCD contrast.
Language Sets the display language. Either Japanese and English can be selected.

Contrast

To check the menu configuration of the access window, refer to "Access Window Menu Tree."
"Access Window Menu Tree" page 2-4

The function is for adjusting the LCD contrast.

1 Press the "M" key.


The menu is displayed.

2 Select [7. AW Setting] using the "S" and "T" keys, and press the " " key.
The AW setup menu is displayed.

3 Select [Contrast] using the "S" and "T" keys, and press the " " key.

4 Increment or decrement the contrast using the "S" or "T" key to adjust the LCD to an
easy-to-view contrast.
You can set the contrast within the range 3 to 9.

2-33
2-9 Access Window Setup Mode

Display Language

2 Select either English or Japanese as the display language.

1 Press the "M" key.


ACCESS WINDOW

The menu is displayed.

2 Select [7. AW Setting] using the "S" and "T" keys, and press the " " key.
The AW setup menu is displayed.

3 Select [Language] using the "S" and "T" keys, and press the " " key.

4 Switch between English or Japanese using the "S" and "T" keys.

5 Hold down the " " key for at least one second.
This sets the display language.

2-34
2-10 SRAM Clear Mode

SRAM Clear Mode


2
This mode allows you to batch clear currently stored device values and the alarm record. It also

ACCESS WINDOW
restores details set by access window setup to their defaults.
SRAM clear can be executed only in the Prog mode.
Executing this function initializes R, MR, LR, CR, T/C (current values), CTH, CM, DM, EM, FM,
and Z. It does not initialize ladder programs, unit setup information, comments, T/C (setting val-
ues), CTC, and logging setup information.

1 Press the "M" key.


The menu is displayed.

2 Select [8. S-RAM Clr] using the "S" and "T" keys.
The clear SRAM confirmation message is displayed.

3 Hold down the " " key for at least one second with the " " key held down.
The confirmation message is displayed again.

4 Holding down the " " key for at least one second with the second confirmation message
displayed executes SRAM clear.
The screen changes as follows while SRAM clear is being executed.

When execution of SRAM clear ends after the above message is displayed, the access window is
automatically rebooted. If the [HI-SPEED VISUAL PLC KV-1000] message is displayed, this indi-
cates that SRAM clear is completed.

Note
If the " " key is not held down for at least one second, the [HI-SPEED VISUAL
PLC KV-1000] message is not displayed, and SRAM clear is canceled.

2-35
2-11 All Clear Mode

All Clear Mode


2
The all clear mode returns all settings on the CPU Unit to their defaults. (This means that the lad-
ACCESS WINDOW

der program and device values are cleared.)


All clear can be executed only in the Prog mode.

1 Press the "M" key.


The menu is displayed.

2 Select [9. All Clr] using the "S" and "T" keys.
The all clear confirmation message is displayed.

3 Hold down the " " key for at least one second with the " " key held down.
The confirmation message is displayed again.

Pressing the "M" or the " " key cancels the all clear and returns the screen to the alarm menu
display.

4 Holding down the " " key for at least one second with the second confirmation message
displayed executes the all clear.
The screen changes as follows while the all clear is being executed. When execution of all clear
ends, the access window is automatically reset and rebooted.

Note
If the " " key is not held down for at least one second, the [HI-SPEED VISUAL
PLC KV-1000] message is not displayed, and the SRAM clear is canceled.

5 Finally, the system initialized message is displayed.

2-36
2-12 User Messages

About the User Message Display


2
"User message" is a function for displaying any numerical value or ASCII code string on the

ACCESS WINDOW
access window from the ladder program.
User messages come in two types, user message 1 and user message 2. User message 1 indi-
cates values currently stored to CM01720. User message 2 indicates an ASCII code of up to 24
1-byte characters or the characters preceding ASCII code "00" stored starting from CM01721.

How to Display User Messages

There are two ways of displaying user messages.

(1) Using the AWNUM instruction (user message 1) and AWMSG instruction (user message 2)
User messages can be displayed easily without worrying out control relays (CR) and control
memory (CM) by using dedicated instructions.
When user messages 1 and 2 turn ON simultaneously, user message 1 is given priority and dis-
played.
For details on instructions, refer to the KV-1000 Instruction Reference Manual, "5-14 Access Window
Instructions."

Ladder program Input method


Execution condition S
AWNUM A W N U M S

Ladder program Input method


Execution condition S
AWMSG A W M S G S

(2)Make a ladder program using the control relay (CR) and control memory (CM).
To display user message 1, store the numerical value to display to CM01720 and turn CR2900
ON.
To display user message 2, store the character string (ASCII code) to display to CM01721 to
CM01732 and turn CR2901 ON.
When CR2900 and CR2901 turn ON simultaneously, CR2900 is given priority.
(The user message stored to CM01720 is displayed.)

2-37
2-12 User Messages

Displaying User Messages

2 ■ User message 1
When CR2900 turns ON, the numerical value currently stored to CM01720 is displayed on
ACCESS WINDOW

screen.
In the screen example, the value of CM01720 is set to "12345", and the entire screen flashes.

The original display is returned to in the following instances.


• When any of the access window keys is pressed (In this case, CR2900 turns OFF.)
• When CR2900 turns OFF

■ User message 2
When CR2901 turns ON, up to 24 1-byte ASCII code characters or the characters preceding
ASCII code "00" stored starting from CM01721 are displayed.

CM No. CM Value (Hex) ASCII Annotation


CM01721 $456d Em
CM01722 $6572 er
CM01723 $6765 ge
CM01724 $6e63 nc
CM01725 $7920 y (space)
CM01726 $2020 (space) (space)
CM01727 $2020 (space) (space)
CM01728 $2020 (space) (space)
CM01729 $5374 St
CM01730 $6f70 op
CM01731 $2021 !
CM01732 $2100 ! (00)

The entire screen flashes when user message 2 is displayed.


The original display is returned to in the following instances.
• When any of the access window keys is pressed (In this case, CR2901 is turned OFF.)
• When CR2901 is turned OFF

2-38
2-13 Setting Inhibited Operation
Operations on the access window can be inhibited. This section describes how to set inhibited
operation.

2
Modes in Which Operation Can be Inhibited

ACCESS WINDOW
Operation can be inhibited in the following modes:
• Setting of Expansion Unit • Memory Card mode
• Device mode • AW Setting mode
• Trimmer mode • All Clear mode
• Alarm mode • SRAM Clear mode
Setting of inhibited operation is assigned to single bits in each mode on CM10738. Set the following numerical
values.

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Reserved for system


Expansion Unit, setting change inhibit
Device mode, device writing inhibit
Trimmer, device write inhibit
Alarm record clear inhibit
Memory Card, file load/save/delete inhibit
AW settings, changes to setting inhibited
All clear, SRAM clear inhibit

The following screen is displayed when an attempt is made to perform an inhibited operation.

Example
When writing in the Digital Trimmer When writing in the Device mode
mode is inhibited
4 2
DW DW
CM01738 CM01738

When reading/writing to When changing of access windo


Memory Card is inhibited is inhibited
10 20
DW DW
CM01738 CM01738

Note
When device write inhibit is set in the Device mode, this setting can no longer be
canceled in the access window in subsequent operations.

2-39
2-14 Key Lock
The key lock function inhibits movement to other screens from the currently displayed screen by
key operation.
Though values can be monitored, they cannot be written.
2
How to Set Key Lock
ACCESS WINDOW

1 Hold down the "M" key for at least three seconds with the " " key held down.
The following screen is displayed to indicate that the key lock function is applied.

This screen is displayed even if an operation other than that intended to cancel key lock is per-
formed while the key lock function is applied.

2 To cancel the key lock, hold down the "M" key for at least three seconds with the " " key
held down.
The following screen is displayed to indicate that the key lock function is canceled.

Note
• Direct access switches are not selected even if they are pressed while the key
lock function is applied.
• The key lock function cannot be applied while the unit is monitoring.

2-40
3

MEMORY CARD
MEMORY CARD
This chapter describes the Memory Card.

3-1 About the Memory Card . . . . . . . . . . . . . . . . . . . 3-2


3-2 To Enable Use of Memory Cards . . . . . . . . . . . . 3-4
3-3 Data Management on Memory Cards. . . . . . . . 3-10
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO. . 3-13
3-5 Memory Card-related Access Window Operations . . 3-21
3-6 Transferring Programs . . . . . . . . . . . . . . . . . . . 3-30
3-7 Transferring Device Value Data . . . . . . . . . . . . 3-31
3-8 Logging Function . . . . . . . . . . . . . . . . . . . . . . . 3-32
3-9 Memory Card Instructions. . . . . . . . . . . . . . . . . 3-49
3-10 List of Devices for Memory Cards. . . . . . . . . . . 3-77

3-1
3-1 About the Memory Card
This section describes the capabilities of the Memory Card.

About the Memory Card

3 On the KV-1000 Series, you can exchange ladder programs, comments, and various unit setup
information with a PLC using the Memory Card. You can also transfer ladder programs or save
MEMORY CARD

and load device values by operation on the KV-1000's access window using only the Memory
Card without the need for KV STUDIO.

• Transferring data from Memory Card to the CPU


Data can be transferred by selecting the sub-directory (project folder) on the Memory Card in
the access window.
Data includes the following: program data such as ladders, comments, unit setup information,
and logging setup information, and device file data such as DM, EM, FM, CM, R, MR, LR, and
CR.

• Auto-loading function
Files stored to the directory (project folder) named "autoload" are automatically transferred to
the CPU when the KV-1000 is turned ON, "autoload" data is made in KV STUDIO.

• Saving data from the CPU to the Memory Card


Program files (ladders, comments, unit setup information, logging setup information) and device
files (DM, EM, FM, CM, R, MR, LR, CR) in all areas can be saved from the CPU to the Memory
Card. Saved files are stored to a newly created sub-directory (project folder). The sub-directory
is automatically assigned, and is displayed on the access window when operation ends suc-
cessfully.

• Logging function
Devices to be logged are registered on KV STUDIO, and the data of these devices is stored on
the Memory Card at a trigger pre-determined by the user. As the data is saved in CSV file, it can
be read for further processing and analysis on Microsoft Excel or other spreadsheet software.

• Ladder program-based Memory Card control


The Memory Card can be accessed from the ladder program when Memory Card instructions
are used.
Data values of devices on KV-1000 can be saved on the Memory Card by ladder programs, or
data values of devices can be loaded to KV-1000 from the Memory Card. Free space on the
Memory Card can also be verified.

3-2
3-1 About the Memory Card

■ Examples of effective use of a Memory Card


• Maintenance can be performed easily on ladder programs. This allows a quick response for
device maintenance and transmission of ladder data resulting from changes to specifications.

MEMORY CARD
Save to Memory Card Reading ladder
programs from
Memory Card
An exclusive terminal is not required.

• Logging of device values is easy. Data is tabulated from logs to create data sheets with greater
ease.

f
er o Production Totals
mb ts
Nuroduc
P

Saving data logs Get log from


Memory Card
For preparing totals and data on a PC

3-3
3-2 To Enable Use of Memory Cards
This section describes the procedure up to enabling use of Memory Cards.

To Use a Memory Card

3 ■ Available Memory Cards


A Memory Card and adapter or card reader for reading the Memory Card are required. Be sure to
MEMORY CARD

use the Memory Card specified by Keyence.


Operation by Memory Cards not specified by Keyence is not assured.

KV-M128 128 Mbyte SD Memory Card

Type SD Memory Card


Storage element Flash ROM
Memory capacity 128 Mbytes
Max. number of
100,000 operations (per block)
rewrites
Operating
-25 to +85°C
temperature
Storage
-40 to +85°C
temperature

OP-42137 16 Mbyte MMC (Multi Media Card)

Type Multi Media Card


Storage element Flash ROM
Memory capacity 16 Mbytes
Max. number of
300,000 operations
rewrites
Operating
-25 to +85°C
temperature
Storage
-40 to +85°C
temperature

Tip To make full use of the capabilities of the KV-1000, we recommend using the KV-M128.

3-4
3-2 To Enable Use of Memory Cards

Hardware requirements
The connection method differs according to whether the PC has a PCMCIA slot or a USB port.

When the PC has a PCMCIA slot (laptop PC, etc.)


Connect the Memory Card to the card adapter, and insert the card adapter into the PCMCIA slot
on the personal computer.
3
When the PC has a USB port

MEMORY CARD
Connect the USB card reader/writer to the USB port on the PC. Next, insert the Memory Card into
the card reader/writer.

Note
Only a PC pre-installed with Windows 7/Vista/XP/2000 can be used.

INSERT

PC with PCMCIA
Card Adapter
slot

Memory Card
KV-M1G, OP-42137

PC with USB
interface Card Reader/Writer

Memory Card adapter


This adapter is used when the Memory Card KV-M1G or OP-42137 is to be inserted into the PC
card slot on the PC or card reader/writer on the PC. When the Memory Card adapter is used, the
Memory Card can be handled as a PCMCIA2.1/JEIDA4.2-compliant PC card (Type II).
For details on the Memory Card adapter, refer to the User's Manual provided with the Memory
Card adapter.
Card reader/writer
This unit is for reading and writing data on Memory Cards KV-M1G and OP-42137 on a PC that
has a USB port. It cannot be used on PCs that do not have a USB port.
For details on the USB card reader/writer for the Memory Card, refer to the User's Manual pro-
vided with the card reader/writer.

3-5
3-2 To Enable Use of Memory Cards

Connecting a Memory Card Using the PCMCIA Card Slot

Before connecting the Memory Card, make sure that the PCMCIA card slot is functioning cor-
rectly.
3 1 Make sure that the PCMCIA card slot is functioning correctly.
MEMORY CARD

2 Insert the Memory Card into the Memory Card adapter.


Memory Card adapter

Side with label attached

Eject button

CAUTION Insert the Memory Card into the Memory Card adapter paying attention to
the direction in which it is inserted. Using unnecessary force to insert the
Memory Card in the wrong direction may damage the Memory Card or
Memory Card adapter.

3 Insert the Memory Card adapter into the PCMCIA slot on the laptop PC or card reader/
writer.
When using the Memory Card adapter for the first time, the message "Found New Hardware" is
displayed when using Windows 2000/XP. These messages are not displayed from the second
time onwards.
For details on how to use the Memory Card, refer to the User's Manual provided with the Memory
Card adapter.
Connecting to a laptop PC

CAUTION • For details on the connection method, refer to the User's Manual provided
with the laptop PC or card reader/writer.
• Insert the Memory Card adapter into the PCMCIA slot paying attention to the
direction in which it is inserted. Using unnecessary force to insert the Mem-
ory Card adapter in the wrong direction may damage the Memory Card
adapter or PCMCIA slot.

3-6
3-2 To Enable Use of Memory Cards

Connecting a Memory Card Using the USB Card Reader/Writer

Before connecting the Memory Card, make sure that the USB card reader/writer is functioning
correctly.
3
Tip For details on how to install the USB card reader/writer, refer to the User's Manual pro-

MEMORY CARD
vided with the USB card/reader writer.

1 Make sure that the USB card reader/writer is functioning correctly.

2 Insert the Memory Card into the card reader/writer.


Memory Card

USB Reader/Writer

CAUTION • Insert the Memory Card into the USB card reader/writer paying attention to
the direction in which it is inserted. Using unnecessary force to insert the
Memory Card in the wrong direction may damage the Memory Card or USB
card reader/writer.
• For details on the connection method, refer to the User's Manual provided
with the USB card reader/writer.

3-7
3-2 To Enable Use of Memory Cards

Loading and Removing a Memory Card from the KV-1000

■ Loading a Memory Card

3 1 Slide the lock on the Memory Card slot cover upwards to


open the Memory Card slot cover.
MEMORY CARD

2 Insert the Memory Card into the Memory Card slot.

3 After inserting the Memory Card, close the Memory Card


slot cover until it clicks into place.

■ Removing the Memory Card


1 Make sure that the Memory Card access LED is out, and slide
the lock on the Memory Card slot cover upwards to open the
Memory Card slot cover.

2 Press the Memory Card in the direction that it was originally


inserted.
Memory Card access LED
Draw out the Memory Card straight.

3 After drawing out the Memory Card, close the Memory Card slot cover until it clicks into
place.

CAUTION Do not use unnecessary force to open the Memory Card slot cover in a
locked state.

3-8
3-2 To Enable Use of Memory Cards

Precautions When Using a Memory Card

The following describes general precautions when using a Memory Card.

CAUTION • Data saved on a Memory Card may be lost in the following instances. Note
3
that Keyence can accept no liability whatsoever if recorded data is lost.

MEMORY CARD
• When the user or a third party has misused the Memory Card
• When the Memory Card has been subjected to static electricity and elec-
trical noise
• When the Memory Card has been removed or other devices have been
turned OFF while the Memory Card is being accessed (e.g. during saving
or deleting of data)
• We recommend backing up important data on MO disks, floppy disks or
other storage media.
• Never remove the Memory Card or turn the KV-1000 OFF while the Memory
Card access LED on the KV-1000 is lit (indicating that data is being loaded
or written to the Memory Card). Doing so might corrupt the data inside the
Memory Card.

Note
• In environments subject to severe noise, it may take time to access the Mem-
ory Card. (In the worst case, this might damage the card or FAT (File Allocation
Table). ) If this happens, attach a ferrite core onto the power cable before use.
Also, install the KV-1000 away from equipment that emits strong electromag-
netic fields.
• Accessing of the Memory Card is not started with the Memory Card slot cover
open. Be sure to use Memory Cards with the Memory Card slot cover closed.
• When the Memory Card slot cover is opened while the Memory Card is being
accessed, the process that was being performed at that time is continued until
it is completed. However, subsequent processing is no longer accepted on the
Memory Card.
• The SD Memory Card (KV-M1G) is formatted for maximum performance before
it is shipped from the factory. SD Memory Cards formatted in Windows can be
used. However, the performance of the SD Memory Card may not be fully dem-
onstrated (e.g. the data write speed to the SD Memory Card drops). If the Mem-
ory Card must be re-formatted in its initial shipped state, contact your nearest
agent.

3-9
3-3 Data Management on Memory Cards
This section describes how to manage data on Memory Cards.

Data Management on Memory Cards

3 ■ Structure of folders
The folder structure is as follows when the project folder "usr1", for example, is made on the
MEMORY CARD

Memory Card in KV STUDIO.


The following shows the structure when data is saved to the Memory Card in the access window
and the folder "KVSAVE00" is created on the Memory Card.

Memory Card drive


(z:\)*1

*1 The drive name differs according to the setting of the Memory Card drive on the PC you are using.

Project folder
(\usr1)
User data is stored to this folder.
usr1.ZLB
usr1.ZCD
usr1.ZCT
usr1.ZLG
DM.ZDV
CM.ZDV
EM.ZDV
FM.ZDV When the folder is created in KV STUDIO
R.ZDV "3-4 Saving/Reading Data to and from
CR.ZDV the Memory Card to KV STUDIO"
MR.ZDV
LR.ZDV
CPUMB.ZSH
PB*.ZSH
MB*.ZSH
MC*.ZSH
MLS*.ZSH
MLC*.ZSH

\KVSAVE00
KVSAVE00.ZLB
KVSAVE00.ZCD
KVSAVE00.ZCT
KVSAVE00.ZLG
When the folder is created in the access window
DM.ZDV
"3-5 Memory Card-related Access
CM.ZDV
Window Operations"
EM.ZDV
FM.ZDV
R.ZDV
CR.ZDV
MR.ZDV
LR.ZDV

3-10
3-3 Data Management on Memory Cards

Tip • When ladder files are saved in the access window on the KV-1000 CPU Unit, the
project folder "KVSAVE**" ("**" stands for any No. within the range 00 to 99) is auto-
matically created each time that a save is executed.
• When the auto-loading function is used on the KV-1000 CPU Unit, name the project
folder "autoload" when saving the data.
For details on the auto-loading function, see "3-6 Transferring Programs." 3

MEMORY CARD
■ File names and project folder names that can be used
The file names and project folder names that can be used on the Memory Card are restricted as
follows for display on the access window.

• Length
8 characters
Tip Files names or project folder names exceeding eight characters are displayed as follows:

Example File name:ABCDEFGHIJJABCDEFGH to I

• Allowable characters
Only 1-byte alphanumerics. "\", "/", ".", "(space)", "*", "?", ",", """, ":", ";", "<", ">", "=", and "+" are
not allowed.

• Maximum number of folders


200

■ Types and sizes of data that can be stored


The following table summarizes the maximum data sizes per project folder.
Data Type KV-1000
Ladder program*1 Approx. 160 k steps
Number of stored Device comments Approx. 27000 (without labels)
comments/labels Labels Approx. 44000 (without device comments)
Unit setup information According to the number of units and unit type (max. 65408 bytes)
Logging setup information Approx. 3 kbytes
DM 65535
EM 65535
FM 32767
CM 11999
Device files*2
R 9600
MR 16000
LR 16000
CR 640
ZSH extension files According to file type (max. 128 kbytes)
*1 One step in a ladder program is roughly five bytes.
*2 One device is roughly six bytes.

3-11
3-3 Data Management on Memory Cards

■ Number of projects that can be saved on a Memory Card


The number of projects that can be saved on a Memory Card is as follows when the amount of
data per project folder is at maximum. Note, however, that the following figures are for the number
of folders created by KV STUDIO.

3 128 MB SD Memory Card (KV-M128) : Approx. 38


16 MB Memory Card (OP-42137) : Approx. 5
MEMORY CARD

■ Maximum number of project folders that can be created


The maximum number of project folders that can be created is 512.

Data to Store on the Memory Card

The data currently stored inside the Memory Card differs from the data that is created when
"Overwrite project(S)" or "Save project as(A)" is selected from the KV STUDIO menu to save
data. The same applies when data is saved in PROTOCOL STUDIO, MOTION BUILDER, and
MV LINK STUDIO.
To save data to Memory Card, be sure to select {Memory Card(M)} J {Write(W)} from the menu.
Data that is not saved by selecting {Memory Card(M)} J {Write(W)} from the menu cannot be
read on the access window of the KV-1000 CPU Unit.

■ Types of files stored on Memory Card


Software Save
Software File Type File Name
Format
Ladder program .ZCD*1
Device comments/labels .ZCT*1
Unit setup information .ZLB*1
Logging setup information .ZLG*1
DM DM.ZDV
EM EM.ZDV
KV STUDIO FM FM.ZDV KV STUDIO
Device CM CM.ZDV
File R R.ZDV
MR MR.ZDV
LR LR.ZDV
CR CR.ZDV
CPU positioning function parameter file CPUMB.ZSH*2
PROTOCOL STUDIO PROTOCOL STUDIO File PB*.ZSH*2(* = 1A to 48B) PROTOCOL STUDIO
Positioning Unit parameter file MB*.ZSH*2(* = 1 to 48)
MOTION BUILDER MOTION BUILDER
Positioning Unit comment file MC*.ZSH*2(* = 1 to 48)
For MV-L40 parameter file MLS*.ZSH*2(* = 1 to 18)
MV LINK STUDIO MV LINK STUDIO
For MV-L40 comment file MLC*.ZSH*2(* = 1 to 18)
*1 " " file names are the same as the project folder name.
*2 These files cannot be saved to Memory Card from the access window on the CPU Unit.
Parameter settings made in the KV STUDIO simple setup window can be saved on KV STUDIO.

3-12
Saving/Reading Data to and from the
3-4 Memory Card to KV STUDIO
Data is saved to or read from the Memory Card using KV STUDIO.
How data is saved or read differs according to the type of data.

Ladder programs, device comments/labels, unit setup information, and logging setup information
3
This data is read and written according to the following procedure.

MEMORY CARD
1 Connect the Memory Card to the personal computer.
“3-2 To Enable Use of Memory Cards”

2 Select {File(F)} J {Memory Card(M)} J {Read(R)} J or {Write(W)} from the menu.


The [Memory Card] dialog box is displayed.

3 Specify the folder to save data to or read from.


When saving a new file on Memory Card using KV STUDIO, be sure to create a new folder on the
[Memory Card] dialog box, and save the file.

Makes a new folder.


1 The "New" button is not displayed when
reading from the Memory Card.
Select the drive to which the
Memory Card is assigned.

2
Select the folder to store
data to.
Displays the types
of files saved in the
selected folder.

CAUTION When saving to an existing folder, the data in the selected folder will be
overwritten and previous data will be lost.

3-13
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO

Tip • When saving data to a new folder, click the "New" but-
ton and enter the name of the folder. A project folder
will be created.
• Data on Memory Cards is managed in project folder
3 units.
• When the auto-loading function is used on the KV-1000 CPU Unit, name the project
MEMORY CARD

folder "autoload" when saving the data.


For details on the auto-loading function, "3-6 Transferring Programs ".
• The [Memory Card] dialog box displays the types of files currently saved to the
selected folder. File types are indicated by the following abbreviations:

UNIT : Unit setup information


PROG : Ladder program
CMT : Device comments/labels
LOG : Logging setup information
CPUM : CPU positioning function parameter file
DM : DM values
EM : EM values
FM : FM values
CM : CM values
R : Relay ON/OFF state
MR : Internal auxiliary relay ON/OFF state
LR : Latch relay ON/OFF state
CR : Control relay ON/OFF state

4 Click the "OK" button.


This writes the data to the Memory Card or loads it from Memory Card.

DM, CM, etc. values, and relay, control relay, etc. ON/OFF states

Save or read data to and from the Memory Card during monitoring or by editing devices offline.
Pay attention to the following points:

• Data on the Memory Card is read from the batch change window.
• Data is saved to Memory Card within the range of devices specified on the batch change win-
dow.
• Only devices displayed on the batch change window are read.
• To read multiple devices, display the batch change window for each device to be loaded.
• Data that can be saved to Memory Card and read from Memory Card are DM, EM, FM, CM, R,
MR, LR, and CR. Also, file names for each of the devices are fixed to DM.ZDV, EM.ZDV, FM.ZDV,
CM.ZDV, R.ZDV, MR.ZDV, LR.ZDV, CR.ZDV, respectively.

3-14
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO

■ Saving/reading device data to and from the Memory Card when online (during
monitoring of) with the KV-1000
During monitoring, save data of devices read from the PLC to Memory Card, or load device data
from the Memory Card and write it to the PLC by the following procedure.

3
1 Connect the Memory Card to the personal computer.

MEMORY CARD
"Connecting the Memory Card"page 3-6, page 3-7

2 Select {Monitor/Simulator(N)} J {PLC Monitor(M)} from the menu.


The mode changes to the Monitor mode.

3 Select {View(V)} J {Batch Change Window(D)} from the menu.


The "Batch Change Window" is displayed.
For details on the batch change window, "KV STUDIO User's Manual"

Different

• Click the button.

Tip Two or more "Batch Change Windows" cannot be displayed at the same time.

Item Explanation
Device range Specifies the range of devices.
Current value Enter the value here.
Change part Changes the entire content of the currently selected range of devices.
Read file Reads files already saved with device values to the batch change window.
Write file Saves device values on the batch change window to a file.
Write PLC Writes devices in the range-specified section to the PLC.
Read PLC Reads the data of the specified device from the PLC.
Read from Memory
Reads the content of devices saved on Memory Card to the batch change window.
Card
Write to Memory Saves to the Memory Card the content of the devices in the range currently selected on
Card the batch change window.
Device This field is for displaying and entering the type and number of device.
Display format Selects the display format of the current value.
Comment Enter the comment here.

3-15
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO

● To read the content of devices from PLC and save them to Memory Card
Follow the procedure below after performing steps 1 to 3 described above.

4 Enter the leading device No. in the device field.


3 The "Batch Change Window" is displayed starting with the device No. that you entered.
MEMORY CARD

5 Enter the range of devices to read from PLC to save to the Memory Card in "Device range" on
the batch change window.

6 Click the "Read PLC" button to read the data from the PLC.

7 Click the "Wr to Mem Card" button on the batch change


window.
The [Memory Card] dialog box is displayed.

8 Specify the folder to save data to.

Makes a new folder. The "New"


button is not displayed when
Select the drive to which the reading from the Memory Card.
Memory Card is assigned.

Select the folder to store


data to.
Displays the types
of files saved in the
selected folder.

3-16
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO

Tip • When saving data to a new folder, click the "New" but-
ton and enter the name of the folder. A project folder
will be created.
• Data on Memory Cards is managed in project folder
units. 3
• The [Memory Card] dialog box displays the types of files currently saved to the

MEMORY CARD
selected folder. File types are indicated by the following abbreviations:

UNIT : Unit setup information


PROG : Ladder program
CMT : Device comments/labels
LOG : Logging setup information
CPUM : CPU positioning function parameter file
DM : DM values
EM : EM values
FM : FM values
CM : CM values
R : Relay ON/OFF state
MR : Auxiliary relay ON/OFF state
LR : Latch relay ON/OFF state
CR : Control relay ON/OFF state

9 Click the "OK" button.


Data is saved to the Memory Card.

● To read data from the Memory Card and write it to a PLC


Follow the procedure below after performing steps 1 to 3 described above.

4 Click the "Rd Mem Card" on the batch change window.


The [Memory Card] dialog box is displayed.

5 Specify the folder to read data from.

6 Click the "OK" button.


Read data is displayed on the batch change window.

7 Click the "Write PLC" button.


Data on the batch change window is written to the PLC.

3-17
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO

■ Saving/reading data to and from the Memory Card when offline (monitoring
OFF) with the KV-1000
Save or read data from the Memory Card offline by the following procedure.

3 1 Connect the Memory Card to the personal computer.


"Connecting the Memory Card"page 3-6, page 3-7
MEMORY CARD

2 Select {Monitor/Simulator(N)} J {Edit offline device(D)} from the menu.


The confirmation dialog box is displayed.

3 Click the "OK" button.


The display changes to the edit offline device screen.

4 Select {View(V)} J {Batch Change window(D)} from the menu.


The "Batch Change Window" is displayed.
For details on the batch change window, "KV STUDIO User's Manual"

Different

• Click the button.

Tip Two or more "Batch Change Windows" cannot be displayed at the same time.

3-18
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO

● To save the content of devices on the batch change window to Memory Card
Follow the procedure below after performing steps 1 to 4 described above.

5 Enter the leading device No. in the device field.


The "Batch Change Window" is displayed starting with the device No. that you entered. 3

MEMORY CARD
6 Write the value to save data to "Current value".

7 Enter the range of devices to save to "Device range" on the batch change window.

8 Click the "Wr Mem Card" button on the batch change window.
The [Memory Card] dialog box is displayed.

9 Specify the folder to save data to.


Makes a new folder.
The "New" button is not displayed
Select the drive to which the when reading from the Memory Card.
Memory Card is assigned.

Select the folder to store


data to.
Displays the types
of files saved in the
selected folder.

3-19
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO

Tip • When saving data to a new folder, click the "New" but-
ton and enter the name of the folder. A project folder
will be created.
• Data on Memory Cards is managed in project folder
3 units.
• The [Memory Card] dialog box displays the types of files currently saved to the
MEMORY CARD

selected folder. File types are indicated by the following abbreviations:

UNIT : Unit setup information


PROG : Ladder program
CMT : Device comments/labels
LOG : Logging setup information
CPUM : CPU positioning function parameter file
DM : DM values
EM : EM values
FM : FM values
CM : CM values
R : Relay ON/OFF state
MR : Internal auxiliary relay ON/OFF state
LR : Latch relay ON/OFF state
CR : Control relay ON/OFF state

10 Click the "OK" button.


Data is saved to the Memory Card.

● To read data to the batch change window from the Memory Card
Follow the procedure below after performing steps 1 to 4 described above.

5 Enter the device to read in the device field.


The device you entered is displayed in the "Batch Change Window".

6 Click the "Rd Mem Card" on the batch change window.


The [Memory Card] dialog box is displayed.

7 Specify the folder to read data from.

8 Click the "OK" button.


Read data is displayed on the batch change window.

Tip To write the read data to the KV-1000, execute the monitor, establish communications with the
KV-1000, and then click the "Write PLC" button.
For details on starting the monitor, "KV STUDIO User's Manual"

3-20
3-5 Memory Card-related Access Window Operations
This section describes access window operations relating to the Memory Card.

Names and Functions of Setting/Operation Keys

Operation Key Function 3


M Menu display

MEMORY CARD
Switches the setting items.
ST Selects the item.
Holding this key down for at least one second applies the setting. The setting is
RET canceled if held down for less than one second, and the screen returns to the previous
menu.

Method of Operation

To check the menu configuration of the access window, see "Access Window Menu Tree."
"Access Window Menu Tree" page 2-4

Note
Memory Card-related operations in the access window can be executed only in the
Prog mode.

■ Load
Before you execute a load, insert the Memory Card into the CPU.

1 Press the "M" key.


The menu is displayed.

2 Press the "T" key five times and then select [Memory Card].
The letters [MemoryCard] are displayed flashing.

3 Press the " " key.


The menu for the Memory Card is displayed.

3-21
3-5 Memory Card-related Access Window Operations

4 With [Load] displayed flashing, press the " " key.


The directory (project folder) under the root directory on the Memory Card is displayed. (Files are
not displayed.)

3
MEMORY CARD

Tip Press the " " key. The file time stamp can be confirmed.
"Checking the time stamp" page 3-23

5 Select the directory (project folder) to load using the "S" and "T" keys.
Press the " " key.
After selecting the directory (project folder), the load confirmation message is displayed.

6 Hold down the " " key for at least one second. This executes the load.
The screen changes as follows while the load is being executed.
To cancel a load, hold down the "M" key or the " " key for less than one second.

7 When the load ends, the display changes as follows.


Pressing the "M" key returns the display to the Memory Card menu.

When the Memory Card is write-protected, the following screen is displayed.


To forcibly execute the load, hold down the " " key for at least one second.
To cancel the load, hold down the "M" key or the " " key for less than one second.

3-22
3-5 Memory Card-related Access Window Operations

■ Checking the time stamp


The time stamp and the size of the file can be verified.
After selecting the file or directory by the "S" and "T" keys, press the " " key. The file time
stamp and size are displayed.

MEMORY CARD
■ Save
Before you execute a save, insert the Memory Card into the CPU.

1 Press the "M" key.


The menu is displayed.

2 Press the "T" key five times and then select [Memory Card].
The letters [MemoryCard] are displayed flashing.

3 Press the " " key.


The menu for the Memory Card is displayed.

4 [Load] is displayed flashing. Press the "T" key once to select [Save].

3-23
3-5 Memory Card-related Access Window Operations

5 Press the " " key.


A message confirming whether it is OK to save the CPU data is displayed.

3
MEMORY CARD

6 Hold down the " " key for at least one second. This executes the save.
The following screen is displayed while the save is executed.
The percentage is displayed while the data is being saved to the file.

To cancel a save, hold down the "M" key or the " " key for less than one second.
This cancels the save, and returns the display to the Memory Card menu.

7 When the save ends, the directory (project folder) in which the data was saved is displayed.
Pressing the "M" key returns the display to the Memory Card menu.

3-24
3-5 Memory Card-related Access Window Operations

■ Files that are saved by operation in the access window


When data is saved on the KV-1000's access window, the following data is created.
The directory named "KVSAVE??" (??: 2-digit, 1-byte number) is searched for, a directory having
the lowest unused 2-digit number is created, and all of the following files are stored to this
directory.
3

MEMORY CARD
File Content File Format
Ladder program KVSAVE**.ZCD (** is the same number as the directory.)
Device comments/labels KVSAVE**.ZCT
Unit setup information KVSAVE**.ZLB
Logging setup information KVSAVE**.ZLG

Device File Format


DM DM.ZDV
EM EM.ZDV
FM FM.ZDV
CM CM.ZDV
R R.ZDV
MR MR.ZDV
LR LR.ZDV
CR CR.ZDV

Files for MOTION BUILDER are not generated. These files are saved together with other CMs as
CM device values.
Data for PROTOCOL STUDIO is saved to file together with other DMs as DM device values.

■ File list
Before you execute file list, insert the Memory Card into the CPU.

1 Press the "M" key.


The menu is displayed.

2 Press the "T" key five times and then select [Memory Card].
The letters [MemoryCard] are displayed flashing.

3-25
3-5 Memory Card-related Access Window Operations

3 Press the " " key.


The menu for the Memory Card is displayed.

3
MEMORY CARD

4 [Load] is displayed flashing. Press the "T" key twice to select [File List].

5 Press the " " key.


The directory (project folder) in the Memory Card's root directory and a list of files is displayed.
If this information does not fit in a single page, press the "T" key four times to display the next
information.

Files in the directory (project folder) are displayed by selecting the directory (project folder) by the
"p" and "q" keys, and pressing the " " key.

3-26
3-5 Memory Card-related Access Window Operations

■ File delete
Delete the directory (project folder) or files selected at [File List].

1 Select the file or directory (project folder) to delete at [File List].


3
2 Hold down the " " key for at least one second with the " " key held down.

MEMORY CARD
The message for confirming whether it is OK to execute the delete is displayed.
To cancel a delete, hold down the "M" key or the " " key for less than one second

<File>

Tip .
<Directory>

3 Hold down the " " key for at least one second. This executes the delete.
The "Delete Wait..." message is displayed.

4 When the delete ends, the display returns to the File List display.
Pressing the "M" key returns the display to the Memory Card menu.

Note
If you delete a directory, all of the files under that directory also will be deleted. Be
sure to check the content of a directory before you execute a delete.

3-27
3-5 Memory Card-related Access Window Operations

■ File space
You can check the free space on the Memory Card.

1 Press the "M" key.


3 The menu is displayed.
MEMORY CARD

2 Press the "T" key five times and then select [MemoryCard].
The letters [MemoryCard] are displayed flashing.

3 Press the " " key.


The menu for the Memory Card is displayed.

4 [Load] is displayed flashing. Press the "T" key three times to select [Free Space].

5 Press the " " key.


The "Free Space Wait..." message is displayed.

6 After the KV-1000 finishes checking free space, the free space on the Memory Card is displayed.
Pressing the "M" key returns the display to the Memory Card menu.

3-28
3-5 Memory Card-related Access Window Operations

■ Memory Card errors


If an error occurs during Memory Card operation, the display changes as follows, and the entire
screen blinks. Press any key to return to the Memory Card menu.

MEMORY CARD

3-29
3-6 Transferring Programs
The Memory Card can be used to save or load program data.
Programs can be transferred on the access window or by KV STUDIO.

Transferring Programs from the Access Window


3
1 Select the Memory Card in the access window.
MEMORY CARD

2 Select the name of the project folder containing the ladder to be transferred.
(To save data, specify the project folder to save the data to.)

For details on access window operations, “3-5 Memory Card-related Access Window Operations“

Auto-loading Function

Files stored to the directory (project folder) named "autoload" are automatically transferred to the
CPU when the KV-1000 is turned ON. "autoload" data is made in KV STUDIO.

1 "autoload" data is made in KV STUDIO.


For details on operation, “3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO“

2 Insert the Memory Card into the KV-1000's Memory Card slot, and close the Memory Card
slot cover until it clicks into place.

3 Turn the KV-1000 ON.


The data is automatically loaded.

Note
When the program on the KV-1000 is write-protected by the MEMSW instruction,
an error is generated, and the program does not run.

3-30
3-7 Transferring Device Value Data
Device value data can be transferred between the Memory Card and CPU.
Device value data can be transferred on the access window or by KV STUDIO.

About Data Format


3
Normally, all of the data inside the project folder (sub-directory) is batch-transferred from the

MEMORY CARD
Memory Card. However, only specific data can be transferred to the CPU from the Memory Card
if specific data such as DM data or program data. This is made possible by storing the data
beforehand to a project folder inside the Memory Card.

For example, the KV STUDIO's offline device editing feature can be used to create a Memory
Card (project folder (sub-directory)) containing only DM data.
Also, there are two ways of copying only DMs from another CPU Unit: (i) Upload the device val-
ues on KV STUDIO and then save only the DM values to the Memory Card, or (ii) Save the DM
data to individual program files to the Memory Card from the CPU, delete unwanted program files,
etc. from the project folder on the PC, and create a project folder containing only DM data.
Files in the following format are created when a save is executed in the access window.
Delete unwanted files from these saved files.
"File delete" page 3-27

File Content File Format


Ladder program KVSAVE**.ZCD (** is the same number as the directory.)
Device comments/labels KVSAVE**.ZCT
Unit setup information KVSAVE**.ZLB
Logging setup information KVSAVE**.ZLG

Device File Format


DM DM.ZDV
EM EM.ZDV
FM FM.ZDV
CM CM.ZDV
R R.ZDV
MR MR.ZDV
LR LR.ZDV
CR CR.ZDV

3-31
3-8 Logging Function
The KV-1000 CPU Unit's logging function enables recording of device states. Records are saved
to the Memory Card.

About Logging
3
"Logging" refers to the recording of what kind of states devices are in at a certain timing.
MEMORY CARD

The information of devices or triggers to be recorded is set on KV STUDIO, and records are
saved to the Memory Card. This logging data is saved in CSV format so it can be imported to
Excel or other spreadsheet software for analysis.

Structure of Memory Card Directory

Logging data files are saved as follows on the Memory Card:

Example Folder File

Root

Logging Function Setup Procedure

The following shows the flow of the logging function setup procedure.
Detailed operations such as setting up the devices or triggers to log are all made in KV STUDIO.
All there is to do after this is to create a simple ladder program for generating triggers using logging
instructions and then transfer the ladder program and logging setup information to the KV-1000.
Set up logging on KV STUDIO.
(1)Set logging in KV STUDIO.
Set up device to log, and set trigger settings, etc.
"Logging Function Setup Procedure" page 3-32

(2)Make the ladder program. Create the ladder program.


Create a simple ladder program using logging instructions.
"Logging Instructions" page 3-39

(3)Transfer the ladder program and Transfer the ladder program and logging setup information to
logging setup information to KV-1000.
KV-1000.
"Transferring Ladder Programs and Logging Setup Information" page 3-44
"KV STUDIO User's Manual"
Insert the Memory Card,
and execute the program. Insert the memory Card into the KV-1000, and start logging.

3-32
3-8 Logging Function

Setting up the Logging Function

The settings for using the logging functions are made in KV STUDIO.
The following settings are required to use the logging function:
• Setting of the file name 3
• Setting of the device to log

MEMORY CARD
• Setting of the triggers
• Optional settings
Follow the procedure below to make these settings.

Individual logging operations are distinguished by a logging ID (0 to 9).


Files, devices and triggers can be set to each logging ID.

1 Select {Tool(T)} ⇒ {Set logging(L)} in that order from the menu.


The "Logging settings list" dialog box is displayed.

Different • Click the button.

Item Explanation
Clicking the "Set" button displays the "Logging settings" dialog box. In this dialog box,
Set
you can set up the currently selected logging ID.
Delete Clicking the "Delete" button deletes the settings of the currently selected logging ID.
Apply Clicking the "Apply" button applies the settings you have made.
Cancel Clicking the "Cancel" button cancels the settings you have made.
Help Pressing the "Help" key displays Help.

2 Select the logging ID to set up and click the "Set" button.


The "Logging settings" dialog box is displayed.
Item Explanation
Displays the directory (file path) where
File path preview
the file will be saved.
Sets the file comment (up to 64 1-byte
File comment
characters).

3-33
3-8 Logging Function

File Name

Set up the file to be saved.

3
MEMORY CARD

Item Explanation
File No. Select from "Auto running No./Fixed/Dev val (lower 3 dgts)".
Auto running number*1 The lowest file No. of unused Nos. within the range 0 to 999 is used.
No. limit Sets the upper limit for the file No. within the range 0 to 999.
Action at start Select action at start of logging from "New file/Add to latest file".
Select processing when there are no free Nos. from "From oldest file/
When no free Nos.
Stop logging".
Fixed Specify a fixed value within the range 0 to 999.
File
No. No. Sets the file No. within the range 0 to 999.
Select processing when the same file exists from "Overwrite oldest file/
When same file exists
Add".
Specify by a word device value within the range 0 to 999 when execution
Dev val (lower 3 dgts)
is enabled.
Device Sets the device to store the file No. to.
Select processing when the same file exists from "Overwrite oldest file/
When same file exists
Add".
Text string*2 Sets the character string to append to the file name.
When this checkbox is marked, the creation date/time information is
included in the file name. The date/time information is fixed to the date/
time information of when the new file name was created. So, the file name
is not changed when data is added to an existing file. When an existing file
Date & time*2
is overwritten, the oldest file is deleted. So, a file is created using the file
name of the new date/time information.
Year (00 to 99) Month (01 to 12) Day (01 to 31) Hour (00 to 23)
Minute (00 to 59)
*1 When the search for a free No. is completed, and the file is ready to be written to, the logging in
operation relay turns ON. If a trigger is generated in the mean time, a buffer overflow is likely to
occur. So, be sure to generate the trigger after the logging in operation relay has turned ON.
The higher the No. limit value is set, the longer it takes to search for a free No. As a guideline, 15
seconds is required to search for a free No. when the No. limit is set to 999.
*2 When logging ID4, file No.2, character string "KEYENCE" and date/time information "Year/Month/
Day/hour/Minute" are selected, and a new file is created on 2004, December 13 at 14:15, the file
"log002_KEYENCE0412131415.csv" is created in folder "log4" on the Memory Card root.
File name: log (file No.) _ (character string) (date/time)

Max. 32 1-byte characters

3-34
3-8 Logging Function

Note
KV-1000 identifies files by a folder name (logging ID) and file No.
(The character string and date/time are ignored.)
On your PC, do not create two or more files having the same file No. in the same folder
(logging ID) on the Memory Card but with a different character string or date/time.
3

MEMORY CARD
■ About processing at start of logging
If the specified file already exists when the KV-1000 is turned ON and logging is enabled (if there
is no free No. when "Auto running No." is set), operation is as follows.

When the file No. specification method is set to "Auto running No."
• When there is no free No. at "New file":
Processing conforms to "Processing at capacity exceeded".
• When the latest file exceeds the capacity by "Add to latest file":
The file having the next free No. is used. When there are no free Nos., processing conforms to
"Processing at capacity exceeded".

When the file No. specification method is set to "Fixed/Dev val"


• When "Overwrite oldest file" is selected for "When same file exists":
The oldest data is deleted, and data is overwritten on the same file name.
• When "Add" is selected for "When same file exists":
Data is added to the specified file. When logging is started with an existing file already exceed-
ing the capacity, the logging error relay turns ON, and logging stops.
"Logging Function Control Relays/Control Memories" page 3-42

■ About processing when the capacity is exceeded


Action when the upper limit value of the file capacity is exceeded differs according to the file No.
specification method.
For details on setting the upper limit value of the file capacity, "Option" page 3-38

When the file No. specification method is set to "Auto running No."
When the capacity of the last file is exceeded with all file Nos. used
• When "From oldest file" is selected for "When no free Nos.":
The oldest data is deleted, and a new file is created using the same file No.
• When "Stop logging" is selected for "When no free Nos.":
The logging error relay turns ON at start of logging, and logging is stopped.

When the file No. specification method is set to "Fixed/Dev val"


Logging is also stopped when either of "Overwrite oldest file" or "Add" to "When the same file
exists".

3-35
3-8 Logging Function

Device

Set up the device to save. A mix of bit devices and word devices can be set.
Up to 128 devices can be set per single logging ID.

3 Example
(1) When bit devices are set for all 128 devices:
MEMORY CARD

The ON/OFF states (0 or 1) of the 128 bit devices are


recorded.
(2) When 1-word devices are set for all 128 devices:
The values of 128 1-word word devices are recorded.
(3) When 2-word devices are set for all 128 devices:
The values of 64 2-word word devices are recorded.

Item Explanation
Clicking the "Add" button displays the "Logging device settings" dialog box. Sets the
Add
device to be logged.
Clicking the "Change" button displays the "Logging device settings" dialog box. Changes
Chng
the device to be logged.
Delete Clicking the "Delete" button deletes the currently selected device.
Up Moves the currently selected device upwards.
Down Moves the currently selected device downwards.

Item Explanation
Sets the device to be logged. When the button is clicked, you can select from the
Target device*1 device comments.

Data format Select from "Unsigned/Signed/Floating point index/ASCII text string".


Sets the number of words.
Unsigned/signed : 1 or 2
Number of words
Floating point exponent : 2 (fixed)
ASCII text string : 1 to 16
Number of Set how many continuous devices are to be logged starting from the device set as the
continues target device.

*1 Target devices
Bit : R/MR/LR/CR/T (contact)/C (contact)/CTC (contact)
Word : DM/EM/FM/CM/TM/TC (timer current value)/CC (counter current value)/CTH/TRM (trimmer)/Z

3-36
3-8 Logging Function

Triggers

Set the triggers for executing logging. All the logging IDs can be set to the same trigger.

MEMORY CARD
Item Explanation
Type*1 Select the type of trigger from "Bit device/Cycle".
Sets a bit device. When button is clicked, you can select
Bit device Device
from the device comments.
Cycle Sets the cycle (1 to 86400000) in ms units.
Cycle Generate trigger
When this checkbox is marked, the trigger is also generated at
also at start of
the start of logging.
logging

*1 When "Bit device" is set


Logging is executed when the specified bit device turns ON.
As the state at END processing is looked up as the state of the bit device, logging is not executed
when the state of the bit device turns ON or OFF within a single scan.
The device value at END processing in which a trigger was detected is saved. The device value
at END processing is saved at each scan while the bit device is ON.

When "Cycle" is set


Logging is executed at time intervals specified by the KV-1000's internal timer.
The device value at END processing in which a trigger was detected is saved.
Logging is executed at each scan when a time shorter than the scan time is specified.
Measurement of the time interval is started when execution of logging is started.
When the mode changes to the Prog mode, measurement of the time interval is reset.

Note
The value of the specified device is captured by END processing immediately after a
trigger is generated. For this reason, a maximum delay of one scan occurs until the
device value is saved after a trigger is generated.

3-37
3-8 Logging Function

Option

Set the options.

3
MEMORY CARD

Item Explanation
Insert file comment to top of When this checkbox is marked, the CSV file is prefixed with a file
CSV file comment.
Append device comment
When this checkbox is marked, a device comment line is inserted.
line*1
Append time stamp to each
When this checkbox is marked, a time stamp is added at each line.
Append line*2
information
When this checkbox is marked, a data No. is added at each line. The data
No. starts from 0 when logging is started. When "Add" is selected for the
file No. setting, the data No. starts from 0 from midway in the file (place
Append data No. to each line
where data starts to be added). If there is a data overflow due to a buffer
overflow, how many data overflowed can be found out by looking at this
data No.
Write to Memory Card at each When this checkbox is marked, data is written to the Memory Card at
trigger*3 each trigger.
Action When this checkbox is marked, the logging data is stored to CPU memory
Auto-restart logging by until the Memory Card is next inserted (if the Memory Card was removed
Memory Card insertion*4 during execution of logging), and logging is automatically restarted when
the Memory Card is inserted.
When this checkbox is marked, the upper limit value of the file size can be
Set file size upper limit
set.
Upper limit value*5 Set the upper limit value in line units or KB units.
*1 A device No. (e.g. DM00000) is entered for devices to which device comments have not been
transferred on the CPU Unit.
*2 The data of the time (Year/Month/Day/Hours/Minutes/Seconds) that logging was performed is
recorded in CSV format to the time stamp.
Example 2004/12/13,14:15:16
*3 With the logging function, files stay open while logging is being executed. When the KV-1000 is
turned OFF with a file open, the logging result is not left on the Memory Card.
When the "Write to Memory Card at each trigger" checkbox is marked, the logging result is left on
the Memory Card also while logging is being executed even if the KV-1000 is turned OFF
provided that writing after generation of the trigger has ended.
Note, however, that there is the danger that the content of the Memory Card will be lost if the KV-
1000 is turned OFF during writing to the Memory Card.
As writing to Memory Card occurs at each trigger, it take time to access the Memory Card. This
makes it more likely for buffer overflows to occur. When a short trigger interval is set, unmark the
"Write to Memory Card at each trigger" checkbox.

3-38
3-8 Logging Function

*4 This function is an "automatic restart" and not an "automatic start." When the Memory Card is not
inserted in the KV-1000 unit when the LOGE instruction is executed, the logging error relay turns
ON, and logging is not started.
"Automatic restart" functions when the Memory Card is inserted and removed while logging is
being executed.
*5 Both file comments and device comments are counted as one line at Number of lines.
The file size includes all file comments and device comments. 3
"Calculating the file size" page 3-48

MEMORY CARD
Logging Instructions

To execute logging, a ladder program that uses logging instructions must be made.

3-39
3-8 Logging Function

LOGE LOGE Enable logging


Enables/disables logging of the

LOGD LOGD Disable logging


specified logging ID.

3 Ladder program
Execution condition n
Input method

LOGE L O G E n
MEMORY CARD

Execution condition n
LOGD L O G D n

Available Devices Index


Operand Bit Devices Word Devices Index Const Ind Local Modify
Reg Spec Device
I O Int
Aux MR LR T C CTC CR DM EM FM TM T C CTH CTC CM Z #/$ #TM ∗ % :#/:Z
n O O O O O – – – O O O O O O O O O O O *1 – O O O

Operand Explanation
n Specify the logging ID (0 to 9) .*1*2
*1 Cannot be specified by "$".
*2 When a bit device has been specified to n , 16 continuous bits are occupied. When a word
device has been specified, one word is occupied.

Description of Operation

LOGE When the execution condition turns ON, execution of logging of the specified logging ID
specified by n is enabled.
After the instruction is executed, the logging execution relay of each logging ID is set, and
logging is executed when the trigger is generated. Enabling of execution continues until
the LOGD instruction is executed regardless of the state of the execution condition for the
LOGE instruction.
Loggings of all the logging IDs can be enabled at the same exection condition.

LOGD When the execution condition turns ON, execution of logging of the specified logging ID
specified by n is disabled.
After the instruction is executed, the logging execution relay of each logging ID is set, and
logging stops.
Logging details up till then are output to the Memory Card.
Logging ID Logging Execution Relay
0 CR0000
1 CR0100
2 CR0200
3 CR0300
4 CR0400
5 CR0500
6 CR0600
7 CR0700
8 CR0800
9 CR0900

3-40
3-8 Logging Function

Logging time chart

Scan

Logging
execution relay 3

MEMORY CARD
Trigger
(bit device)

Execute

Execute
Logging execution Execute Execute

Scan

Logging
execution relay

Trigger (cycle)
Execute

Execute

Execute

Execute

Logging execution

Operation flags

CR2009 No change in state


CR2010 No change in state
CR2011 No change in state
ON when 10 or more are set when specifying a device to n , or when the indirect
CR2012 specification/index modify range is inappropriate. Otherwise OFFDoes not change when indirect
specification or index modify is not specified to the operand.
* The instruction is not executed when CR2012 turns ON.

Sample Program

When input R00000 is ON, execution of logging of logging ID5 is enabled.


R00000 #005
LOGE

When input R00001 is ON, execution of logging of logging ID5 is disabled.


R00001 #005
LOGD

3-41
3-8 Logging Function

Logging Function Control Relays/Control Memories

The control information and error information of logging execution are assigned to control relays
and control memories.
3 There are two types of control relays: individual control relays provided for each logging ID, and
just one control relay provided for the system.
MEMORY CARD

Note
The logging results in the control relays and control memories are reflected by END
processing, so logging results are not reflected until END processing even if an
operation is executed within a ladder program.

Device Nos. for Each Logging ID (0 to 9) Attribute


R: read-only Description
ID0 ID1 ID2 ... ID9 Blank: R/W

CR0000 CR0100 CR0200 ... CR0900 R Logging execution


CR0001 CR0101 CR0201 ... CR0901 R Logging in operation
CR0002 CR0102 CR0202 ... CR0902 R Write of set size end
CR0004 CR0104 CR0204 ... CR0904 R Buffer overflow
CR0005 CR0105 CR0205 ... CR0905 R Write in RUN mode + logging ON
CR0008 CR0108 CR0208 ... CR0908 R Logging error
CR0009 CR0109 CR0209 ... CR0909 R Memory Card error no space error
CR0010 CR0110 CR0210 ... CR0910 R Device/trigger setting error

Attribute
Device No. R: read-only Description
Blank: R/W

Arbitrary logging operation in


CR3210 R
progress
CR3211 R Memory Card in use
CR3212 R Memory Card recognized
CR3213 R Memory Card present
CR3215 R Memory Card write-protected
CM02391 Memory Card power OFF error

■ Logging execution relay


This relay enables/disables execution of logging.
It is set before execution of logging by the logging instruction (LOGE).
When this relay turns ON, it turns OFF all state relays of the same logging ID.
This relay is reset when an error occurs.

■ Logging in operation relay


This relay is ON for the duration that logging is actually being executed.

■ Set size write end relay


This relay turns on when the data of the file size upper limit value specified to each file has
finished being written.
When this relay turns ON, logging ends, and the logging execution relay turns OFF.
Note, however, that this relay is active only when logging stops by processing at capacity
exceeded.
"About processing when the capacity is exceeded" page 3-35

3-42
3-8 Logging Function

■ Buffer overflow relay


This indicates that writing of data to the Memory Card cannot keep up, and the logging buffer has
overflowed.
Data also overflows when this relay turns ON. You can confirm when data overflowed by looking
at the data No.
Writing to the Memory Card continues even if an overflow occurs.
3
Buffer overflows can be alleviated by:

MEMORY CARD
• Reducing the number of accesses on the Memory Card
• Reducing the amount of data or lowering the frequency of triggers
• Increasing the scan time

■ Write in RUN mode + logging relay


This relay turns ON when there is a write in the Run mode while logging is being executed.
Logging is continued during writing in the Run mode. However, buffer overflows are more likely to
occur as writing to Memory Card slows down.

■ Logging error relay


This relay turns ON when some error caused logging to end. Data remaining in buffer at this time
is lost. An error clear is performed when the next LOGE instruction is executed.

■ Memory Card no space error relay


This relay turns ON when there is insufficient free space on the Memory Card.
Logging ends when this relay turns ON. The logging error relay turns ON, and the logging
execution relay turns OFF. Data remaining in buffer at this time is lost. An error clear is performed
when the next LOGE instruction is executed.

■ Device/trigger setting error relay


This relay turns ON when the logging device setting, trigger setting or other settings are
abnormal.
Logging ends when this relay turns ON. The logging error relay turns ON, and the logging
execution relay turns OFF.

■ Arbitrary logging in operation relay


This relay turns ON when one or more of logging by logging ID0 to 9 is in progress.
This relay is used to check whether or not logging is in progress when another function is to be used.

■ Memory Card in use relay


This relay turns ON when the Memory Card is in use. This relay turns ON for the duration that the
Memory Card is being used by some other function in addition to the logging function.

■ Memory Card recognized relay


This relay turns ON when the Memory Card is inserted, the Memory Card slot cover is closed,
initialization is completed and the Memory Card is ready for use.

3-43
3-8 Logging Function

■ Memory Card present relay


This relay turns ON when all of the following conditions are satisfied:
• The Memory Card is inserted.
• The Memory Card slot cover is closed.

3 ■ Memory Card write-protected relay


This relay turns ON when all of the following conditions are satisfied:
MEMORY CARD

• The Memory Card is inserted.


• The Memory Card slot cover is closed.
• The Memory Card is write-protected.

■ Memory Card power OFF error


Turning the KV-1000 OFF during accessing of the Memory Card results in an error, and values
other than 0 are stored.
The error must be reset by the user.

Transferring Ladder Programs and Logging Setup Information

To use the logging function, preset logging setup information and a ladder program made using
logging instructions is transferred to the KV-1000.
For details, KV STUDIO User's Manual

1 Select {Monitor/Simulator(N)} J {Communications settings(T)} from the menu.


Make the communications settings.

2 Select {Monitor/Simulator(N)} J {Convert J Transfer J Monitor (C)} from the menu or select
{Convert J Transfer (W)}.
The "Transfer program" dialog box is displayed.

3 Mark the checkboxes of items to transfer to the KV-1000 such as the logging setup information,
and click the "Execute" button.

Tip Items can also be transferred by using the Memory Card.


For details,
"3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO"
"3-5 Memory Card-related Access Window Operations"

3-44
3-8 Logging Function

Logging Function Precautions

The following describes the precautions in using the logging function.


"Loading and Removing a Memory Card from the KV-1000" page 3-8, "Precautions When Using a Memory
Card" page 3-9 3
■ Save speed

MEMORY CARD
• The scan time during execution of logging increases by a maximum of "3+6 x number of IDs in
use" ms. The scan time increases as the number of devices to log increases.
• When two or more triggers are generated simultaneously, the access volume on the Memory
Card increases. So, the scan time increases, or buffer overflows are more likely to occur.

■ Order of accessing priority on the Memory Card


• During logging, the order of accessing priority on the Memory Card is as follows: Memory Card
instructions > logging instructions > FTP server functions, file operations in the access window
For this reason, the Memory Card sometimes cannot be used by other functions when a large
amount of logging triggers are being generated.

■ Power interruptions, card insertion/removal


Before removing the Memory Card with the KV-1000 still turned ON, make sure that the Memory
Card access LED is out. Data is not saved while logging is being executed if the Memory Card is
not removed by this procedure.

Handling of the Memory Card slot cover


• Logging is not started if the Memory Card slot cover is not closed.

Cautions during power interruptions and card insertion/removal


• Never remove the Memory Card or turn the KV-1000 OFF while the Memory Card access LED
on the KV-1000 is lit (indicating that data is being loaded or written to the Memory Card). Doing
so might corrupt the data inside the Memory Card.
• When the KV-1000 is turned OFF while logging is being executed, data is not saved to the
Memory Card.
• When the Memory Card slot cover is opened while the Memory Card is being accessed, the
process that was being performed at that time is continued until it is completed. However, sub-
sequent processing is no longer accepted on the Memory Card.

Replacing Memory Cards


• Replace Memory Card by the following procedure.
"Loading and Removing a Memory Card from the KV-1000" page 3-8
• When "Auto-restaart logging by Memory Card insertion" is set in the logging settings on KV
STUDIO," and the Memory Card was removed during execution of logging, the logging data is
stored in KV-1000 memory until the Memory Card is next inserted. When the Memory Card is
inserted, data stored in KV-1000 memory is written to the Memory Card. At this time, the log-
ging error relay does not turn ON. When there is a long period until the Memory Card is inserted
or many triggers have been generated, a buffer overflow sometimes occurs and data is missed.
When "Auto-restart logging by Memory Card insertion" is not set, never remove the Memory
Card while logging is being executed. Doing so might corrupt the data inside the Memory Card.

3-45
3-8 Logging Function

■ Access window
• The "character string" and "date" of the file name set on KV STUDIO are not displayed on the
access window.

■ Operating during rewriting in the Run mode


3 • Logging execution slows down very much when rewriting in the Run mode is being performed.
This makes it more likely for buffer overflows to occur. Also, logging settings cannot be written in
MEMORY CARD

the Run mode.

■ Operation when switching between the Run and Prog modes


• The logging function is active only in the Run mode. When the mode is switched from the Run
to the Prog mode, all logging operations stop. In the same as when the LOGD instruction is
executed, the logging details up till then are output to the Memory Card. Also, when the mode is
switched from the Prog to the Run mode, the LOGE instruction must be executed to start log-
ging as all logging operations are in a stopped state.

■ Restrictions on allowable characters


Allowable characters in the following text strings are subject to restrictions when the logging
function is used:
(1) Text strings in CSV files : file comments, device comments
(2) Text strings in file names : text strings in file names
(3) ASCII text strings : when "ASCII text string" is selected as the data format of the device

Item Explanation
Text strings in CSV files • "," cannot be used.
• The following characters cannot be used:
• 12 1-byte characters * / < > ? \ | % , : ; "
• 7 2-byte characters
Text strings in file names
• NEC special characters (8740H to 879CH)
• NEC selected IBM extended characters (ED40H to EEFCH)
• IBM selected IBM extended characters (FA40H to FC4BH)
All ASCII codes are saved as they are. Control characters, '"', etc. are saved
ASCII text string
as they are.

About Logging Data (CSV file)

The following describes the format of CSV files that are saved by the logging function.

■ About CSV file format


The number of characters in a single column of the CSV files is fixed. (See the table below.)
Insufficient characters in CSV file columns are filled with spaces.
In the following table, 1-byte characters are counted as one character, and 2-byte characters are
counted as two characters.
(1) File comment and device comment sections are fixed at all times according to the number of
characters in the longest section.
(2) The number of characters in a single column of the data section is fixed according to the
number of characters determined by the data format.
3-46
3-8 Logging Function

(3) When the data format is ASCII text string, data is filled from the lift. Otherwise, data is filled
from the right.

Fixed number of characters (not including commas)

Item
Number of Characters
in a Column
Example Remarks 3
Length of one line is always 64

MEMORY CARD
characters.
File comment 64 "title"
Number of characters does not
include '"'.
Number of characters does not
Device comments 32 ..., "start relay", ...
include '"'.
Data No. 10 1234567890,
DATE 10 2004/06/11, 2 columns are used for date and
Time stamp
TIME 8 14:20:19, time.

Data format and number of characters in one column (not including commas)
Number of Characters
Data format Example Remarks
in a Column
Bit 1 ...,1,... ON is 1, and OFF is 0.
Not prefixed with "+" when a plus
1-word signed 6 ..., -1234,...
number
1-word unsigned 5 ..., 1234,...
Not prefixed with "+" when a plus
2-word signed 11 ..., 1234567890,...
number
2-word unsigned 10 ..., 123456789,...
Floating point
13 ..., 2.4123E+12, ... Exponent format fixed
exponent
When the text string contains a null,
(number of words) x
ASCII text string ... , "a123" ... , ... subsequent text strings are not
2+2
recorded.

■ Example of a CSV file


The following shows an example of a CSV file created by the logging function.

Data No. File comment Time stamp Device comments

File comment line


Device comment line

Data line

3-47
3-8 Logging Function

■ Calculating the file size


The following explains how to calculate the file size. Sizes are expressed in byte units.

(size of file comment line)


+ (size of device comment line)
3 + (size of data line) x (number of data lines)
= (size of file)
MEMORY CARD

(size of file comment line) = (number of characters set in KV STUDIO) + 4


1-byte characters are counted as one character, and 2-byte characters are counted as two
characters.

(size of device comment line) = {35 x (number of device comments)} + 1


= {35 x ((number of devices) +A+B)} +1

"Append data No. to each line" : Use (A = 1) Not use (A = 0)


"Append time stamp to each line" : Use (B = 2) Not use (B = 0)

(size of data line) = (total size of devices) +1

Size of devices
Item Size
Bit devices 2
Unsigned 6
1-word
Signed 7
Unsigned 11
Word devices 2-word
Signed 12
Floating real number 14
ASCII text string (n words) (n x 2) +3
Data No. 11
Time stamp (date + time) 20

CAUTION Though approximate values such as the number of files can be calculated
from the file size found by the above calculation and from the size of the
Memory Card, the number of files, etc. that can be actually saved changes
according to how the disk is being used. Allow sufficient margin during use.

3-48
3-9 Memory Card Instructions
The Memory Card can be accessed from the ladder program when Memory Card instructions are
used.

Memory Card Functions


3

MEMORY CARD
When the MMKDIR instruction is executed,
the directory is created on the Memory Card.
Example: Makes the directory "\ABC".

When the MWRIT instruction is executed,


the data value of the specified continuous
devices is written to Memory Card.
Example: The data values of DM00000 to
DM00009 are saved to Memory
Card in CSV format
MMKDIR instruction

MWRIT instruction Read

MREAD instruction Write

MFREE instruction Memory Card


PC
(Microsoft Excel, etc.)
KV-1000
When the MFREE instruction is
Example: When the data values of DM00000 to
executed, the free space on
DM00009 are saved in CSV format to file "XYZ" in
Memory Card is investigated, and
directory "ABC" in Memory Card
the result is written to the specified
device in byte units.
\ABC\XYZ.CSV

When the MREAD instruction is executed, currently 12345,-123,0,678,9876,12,-45,67890,345,86


saved data values are read from the Memory Card and
written to specified continuous devices.  
Example: The data values for DM00000 to DM00009 For DM00000 ...................................For DM00009
currently saved in CSV format are read from
Memory Card and written to PLC

For details on instructions, KV-1000 Instruction Reference Manual "5-13 Memory Card Instructions"

List of Memory Card Instructions

The following four Memory Card instructions are available.


Instruction Mnemonic Brief Description Page
Memory Card write MWRIT Saves device data to the Memory Card. 3-50
Memory Card read MREAD Reads data saved on Memory Card to a device. 3-62
Get Memory Card
MFREE Gets the free space on the Memory Card. 3-70
free space
Memory Card make
MMKDIR Makes a directory on the Memory Card. 3-74
directory

3-49
3-9 Memory Card Instructions

MWRIT
MWRIT Memory Card
write
Writes device data to the
Memory Card.

3 Ladder program
Execution condition MWRIT
Input method
MEMORY CARD

S1 S2 n M W R I T S1 S2 n
D1 D2 D1 D2

Available Devices Index


Operand Bit Devices Word Devices Index Const Ind Local Modify
Reg Spec* Device
I O Int
Aux MR LR T C CTC CR DM EM FM TM T C CTH CTC CM Z #/$ #TM ∗ % :#/:Z
S1 O O O O O – – – O O O O O – – – – O – *1 O O O O
S2 O O O O O – – – O O O O O O O – – O – – – O O O
n O O O O O – – – O O O O O O O O O O O O – O O O
D1 O O O O O – – – O O O O O O O – – O – – – O O O
D2 O O O O O O O – O O O O O – – – – O – – – O O O

Operand Explanation
S1 Specifies the name of the file to save data to within 1 to 249 characters (including END code NUL and directory name).*1,*3
S2 Specifies the leading device to save data to.*2, *3
n Specifies the number of data to save.*4
D1 Specifies the leading device to store save format-related parameters and the save state of the data.*3,*6,*7
D2 Specifies the notification bit device.*5, *6
*1 To specify a text string using constants, enclose with " ". The characters "#" and "$" cannot be used.
1-byte characters: ASCII code
2-byte characters: shift JIS code
*2 When saving index register Z and digital trimmer values set in the access window, copy the data
once to a data memory DM, for example, and then set that data memory DM.
*3 For bit devices, specify the leading device of the channel.
*4 When a bit device has been specified, 16 continuous bits are occupied. When a word device has
been specified, one word is occupied.
*5 When a bit device has been specified, 2 continuous bits are occupied. When a word device has
been specified, the lowermost bit of two continuous words is used as the notification bit device.
Bits other than the lowermost bit do not change.
*6 When a device to which indirect specification or index modify has been specified, data is written
to the specified device at the up edge of the execution condition.
*7 When a bit device has been specified to D1 , 96 continuous bits are occupied. When a word
device has been specified, six continuous words are occupied.

Description of Operation

MWRIT This instruction writes n number of data (16-bit/32-bit/ASCII text string) starting from
S2 to Memory Card according to the content of parameters ( D1 to D1 +4) under
the file name specified by S1 at the up edge of the execution condition. The number of
actually saved data is written to D1 +5, the completion notification is written to D2 ,
and the error notification for an abnormal end is written to D2 +1.

3-50
3-9 Memory Card Instructions

Example
16-bit data
bit bit
15 0

S2 12345 Parameters CSV file S1 .BIN


D1 to D1 +4
S2 +1 23456 3930A05B0787...6EB2D5DD

S2 +2 34567
Memory
Card
3

...
CSV file S1 .CSV
S2 + n -2 45678

MEMORY CARD
12345, 23456, 34567,..., 45678, 56789
S2 + n -1 56789

32-bit data
bit bit bit bit
31 16 15 0

S2 +1 0012345678 S1 Parameters CSV file S1 .BIN


D1 to D1 +4 4EBC610015CD5B07D2029649...
S2 +3 0123456789 S1 +2
...3538D08B146A0ACE
S2 +5 1234567890 S1 +4 Memory
Card
...

...

...

CSV file S1 .CSV


S2 +2 ( n -2)+1 2345678901 S2 +2 ( n -2) 12345678, 123456789, 1234567890,...
S2 +2 ( n -1)+1 3456789012 S2 +2 ( n -1) ..., 2345678901, 3456789012

ASCII text string data


Number of characters Number of characters

S2 1 A(41H) B(42H) 2 Parameters


D1 to D1 +4
S2 +1 2 C(43H) 1(31H) 4
CSV file S1 .CSV
2(32H) 3(33H)
S2 +2 3 6 Memory
Card " ABC123...abcd...z"

n -3 a(611H) b(62H) n -2
n -1 c(63H) d(64H) n

1999 z(7AH) NUL(00H)

Note
When the setting of save format D1 has been specified in binary data, it is
stored as follows:
16-bit data
bit bit
15 0

12345 3039H
3930A05B
23456 5BA0H

32-bit data
bit bit bit bit
31 16 15 0

1234567890 499602D2H
D20296493538D08B
2345678901 8BD03835H

3-51
3-9 Memory Card Instructions

S1 setting

Specify the name of the file to save data to within 1 to 249 characters (including END code NUL
and directory name).
3 S1 "file name" "directory\file name"
MEMORY CARD

Memory Memory Card


Example of Memory Memory Card Card
Card
directory Folder
structure File
File

When a directory is not specified, the


Note Prepare a directory beforehand.
data is saved to the root directory.

File name: DATA Directory name: ABC File name: DATA


DM00000 D(44H) A(41H) DM00000 A(41H) B(42H)
(Example) DM00001 T(54H) A(41H) DM00001 C(43H) \(5CH)
When DM00000
has been DM00002 NUL(00H) DM00002 D(44H) A(41H)
specified
DM00003 T(54H) A(41H)

DM00004 NUL(00H)

n setting range

Set the number of data to save. The setting range changes according to the setting value of
D1 .

D1 0, 2, 4, 6 (16 bits) 1, 3, 5, 7, 9 (32 bits) 8 (ASCII)


setting value
Setting range 0 to 65535 0 to 32767 0 to 1999

D1 : Save format setting

Data is saved in the following format.


D1
0 1 2 3 4 5 6 7 8 9
setting value
16-bit 32-bit 16-bit 32-bit ASCII Floating
Details 16-bit 32-bit 16-bit 32bit
unsigned unsigned signed signed text real
saved binary binary Hex Hex
binary binary binary binary string number
Extension
appended .BIN .CSV
to S1
Save format Binary data Comma-delimited text

3-52
3-9 Memory Card Instructions

D1 +1: Write mode settings

The following four write modes can be selected.


Mode Description
Holds the content of the current file, and adds and saves data to the end of that file. A 3
new file is made if the file does not exist.

MEMORY CARD
0: Add mode Example
File name: ABC (data to save) File name: ABC
+
Holds the content of the current file, and overwrites and saves data to a position in the
file specified by the write position ( D1 +3) from the start of the file. An error occurs if
the file does not exist.
1: Write position
specification mode Example
1(offset from start of file) File name: ABC (data to save) File name: ABC

Write position ([ D1 +3 • D1 +4])


Holds the content of the current file, and overwrites and saves data to a position in the
file specified by the write position ( D1 +4) from the end of the file. An error occurs if
the file does not exist.
2: Write position Example
specification mode File name: ABC (data to save) File name: ABC
2(offset from end of file)

Write position ([ D1 +3 • D1 +4])


Deletes the content of the file and writes data. A new file is made if the file does not exist.
Example
Overwrite
3: New mode
File name: ABC (data to save) File name: ABC

D1 +2: Option settings

Set line feed specification and fixed digit specification of the data to save.
bit
15
D1 +2 bit
0
Add line feed OFF ON OFF ON
Fixed digit
OFF OFF ON ON
output
Setting value 0 1 2 3
Add line feed (Set end of file processing when outputting as a CSV file.)
OFF: Inserts a comma ($2C).
ON : Inserts a line feed CR+LF ($0D$0A).
Fixed digit output (The number of digits in the data is fixed when outputting
as a .CSV file.)
OFF: Variable (Zero suppression is ON.)
* When "2" or "3" is specified to D1 , fixed digits is set at all times.
ON : The number of digits can be fixed by the following number of digits.

Save format
2 3 4 5 6 7 8 9
D1

16-bit 32-bit 16-bit 32-bit ASCII Floating


Details 16-bit 32-bit
unsigned unsigned signed signed text real
saved Hex Hex
binary binary binary binary string number
Number of
4 8 5 10 6 11 – 13
digits

Reserved ("0" is set.)

3-53
3-9 Memory Card Instructions

D1 +3, D1 +4: Write position (file pointer) setting

File pointer . . . . . . . . . . . . . . . . . Position separated in 1-byte units from the start of the stored file
16-bit binary data
01000C007B00D2043930A05B07876EB2D5DDF F F F
3 TEST1.BIN
16-bit data
1 , 1 2 , 1 2 3 , 1 2 3 4 , 1 2 3 4 5 ,
MEMORY CARD

TEST1.CSV (31H) (2CH) (31H) (32H) (2CH) (31H) (32H) (33H) (2CH) (31H) (32H) (33H) (34H) (2CH) (31H) (32H) (33H) (34H) (35H) (2CH)

ASCII data
A B C D 1 2 3 4 a b c d 1 2 3 4 A B C D
TEST1.CSV (41H) (42H) (43H) (44H) (31H) (32H) (33H) (34H) (61H) (62H) (63H) (64H) (31H) (32H) (33H) (34H) (41H) (42H) (43H) (44H)

File pointer position $00 $01 $02 $03 $04 $05 $06 $07 $08 $09 $0A $0B $0C$0D$0E $0F $10 $11 $12 $13 $14

[ D1 +3 • D1 +4] are enabled only when write position specification mode 1 or 2 is set for the
write mode ( D1 +1).
After write processing to the Memory Card ends, counting is performed from the start of the file,
and the position up to the end of the newly saved data is stored to the write position ([ D1 +3 •
D1 +4]).
Also, data can be written from the specified position by setting a value (offset value) to the write
position ([ D1 +3 • D1 +4]) before the instruction is executed.
The position to write to can be specified in 1-byte units.

Ex: 1 When the write mode ( D1 +1) is "1" . . . . Write position specification mode
(offset from start of file)
File pointer position

Setting value Stored value


[ D1 +3• Description [ D1 +3•
D1 +4] D1 +4]
Data is overwritten from the start of the file.
Example File name: ABC (data to save) File name: ABC
$00000000 $00000004

$00 $04

Data is overwritten at a specified position from the start of the file.


Example When $00000001 is set
File name: ABC (data to save) File name: ABC

$05
$00000005
$00000001
$00 $01
or more
When $00000002 is set $00000006
File name: ABC (data to save) File name: ABC

$06
$00 $02

3-54
3-9 Memory Card Instructions

Ex: 2 When the write mode ( D1 +1) is "2" . . . . After the write position specification mode
(offset from start of file) is executed, the
stored value is $00000000 at all times.
File pointer position

Setting value Stored value


3
[ D1 +3• Description [ D1 +3•

MEMORY CARD
D1 +4] D1 +4]
Data is added to the end of the file.
Example
$00000000 File name: ABC (data to save) File name: ABC

$22222222 $22222226
($00000000)
Data is overwritten at a specified position from the end of the file.
Example When $00000001 is set
File name: ABC (data to save) File name: ABC
$00000000

$22222221 $22222225
$00000001 $22222222
or more
When $00000002 is set
File name: ABC (data to save) File name: ABC

$22222220 $22222224
$22222222

Note
Pay attention to the following when specifying the position to write to.
When specifying the pointer in the data
.Binary format ··· Pointer position
01000C007B00 A05B0787 01 A05B0787 0 0 ··· Corrupted data

.CSV format
1 , 1 2 , 1 2 3 , 1 2 3 4 , 1 , 1 2 3 4 , 3 ,
(31H) (2CH) (31H) (32H) (2CH) (31H) (32H) (33H) (2CH) (31H) (32H) (33H) (34H) (2CH) (31H) (2CH) (31H) (32H) (33H) (34H) (2CH) (33H) (2CH)

3-55
3-9 Memory Card Instructions

D1 +5: Number of written data

The number of actually written data is stored after write processing to the Memory Card ends.

Save format Number of


3 D1
Data to
Write n
Description Stored Value
D1 +5

0. 16-bit binary
MEMORY CARD

Example
1. 32-bit binary
2. 16-bit Hex File name: ABC (data to save)
4
3. 32-bit Hex
4. 16-bit File name: ABC
unsigned binary
5. 32-bit
4
unsigned binary
6. 16-bit signed Example File name: ABC (data to save) Size
binary exceeded
2
7. 32-bit signed File name: ABC
binary
9. Floating real
number
Example File name: ABC D1 D1 +39
Free space (for 100 characters) NULL
Text string data of 40 characters + NULL 40
File name: ABC
8. ASCII text 40 characters
40
string
Example File name: ABC D1 D1 +39 Size
Free space (for 30 characters) NULL exceeded
Text string data of 40 characters + NULL 30
File name: ABC
30 characters 10 characters

3-56
3-9 Memory Card Instructions

Notification bit device


( D2 : completion notification, D2 +1: error notification)

Item Description

D2
Completion
This device turns OFF when execution of the instruction starts, and turns ON
when write processing to the Memory Card ends. The device turns ON
3
notification
whichever way execution ends, successfully or in error.

MEMORY CARD
Error This device turns OFF when execution ends successfully, and turns ON when
D2 +1
notification execution ends in error.

Note
• Set the save format, write mode and options to appropriate values before exe-
cuting the instruction.
• When setting the write position, set appropriate values before executing the
instruction.
• The result of END processing after execution of the instruction is completed is
written for the write position, number of written data, completion notification,
and error notification.
• When save format 8 (ASCII text string) is set, the text string preceding the end
code (NUL) from S2 is output enclosed by double quotation marks ("").
• When the text string is longer than the number of data (n) to write, only the
number of data (n) characters to write are from the start of the text string are
stored.
• Double quotation marks (") in text strings are converted to two double quota-
tion marks ("").
Example 1 2 " A B " 3 4 5 (NUL) "12""AB""345"
• Files names are automatically appended with an extension according to the
save format setting.
• Several scans are sometimes required for writing to the device. If the value of
the device to write to is changed during write processing to the Memory Card,
the concurrency of each of the written device values cannot be ensured. Use
the completion notification D2 or CR3214 (Memory Card instruction execut-
ing) control relay to perform exclusive control.
• The MWRIT instruction cannot be executed while the Memory Card instruction
executing control relay CR3214 is ON. For this reason, CR3214 must be used
to perform exclusive control as follows.
Example
RXXXXX CR3214 MWRIT
S1 S2 n

D1 D2

• The MWRIT instruction cannot be used in interrupt programs or in the initial-


ization module.

3-57
3-9 Memory Card Instructions

Operation flags

CR2009 No change in state


CR2010 No change in state

3 CR2011 No change in state

This flag is ON in the following instances. Otherwise, it is OFF.


MEMORY CARD

• When the text string specified by S1 does not contain the end code (NUL)
• When the text string specified by S1 exceeds 249 characters (including NUL)
• When a timer/counter is specified to S1 by indirect specification
CR2012 • When a device other than the leading device of the channel is specified when a bit device is
specified to S1 , S2 , and D1
• When a value outside of the range is specified to a parameter
• When a value is specified for reservation of a parameter
• When the indirect specification and index modify range is inappropriate
* The instruction is not executed when CR2012 turns ON.

Instruction Execution Timing

MWRIT This instruction is executed for one scan at the up edge of the execution condition.
Scan
ON

Execution condition
OFF

MWRIT Executed for 1 scan only Executed for 1 scan only

Write processing

ON
Completion notification ( D2 )
OFF

Write position ( D1 )+3, +4

Number of written data ( D1 +5)


ON
CR3214
(Memory Card executing) OFF

* Write processing is executed regardless of the program. Accordingly, if the instruction is being
executed once at a certain scan, execution of write processing is continued even if the input
condition is OFF at the next scan. The time until actual completion of write processing is depen-
dent on the size of the data and the file access processing time.

3-58
3-9 Memory Card Instructions

Sample Program

Each time that R01000 turns ON, data memories DM01000 to DM01099 are added to the file
"ABC\DATA". 3
The save format is CSV file format. ON is output to R00500 after writing ends.

MEMORY CARD
CR2008 R01004 The completion notification device is reset to its initial state.
RES
ON for 1 scan

R01000 R01004 #00006 DM00500: Save format


DW 16-bit signed binary, CSV file
DM00500
#00000 DM00501: Write mode
DW Add mode
DM00501
DM00502: Option
#00000 Comma is inserted at end of data. Number of data digits is
DW variable.
DM00502
MWRIT Start of save <directory>: ABC <file name>: DATA
"ABC\DATA" DM01000 #00100 <save device>: DM01000 to DM01099 (100 devices)
DM00500 R01004 <completion notification>: R01004 <error notification>: R01005
R01004 R00500 R01004
SET RES Processing completion output is turned ON, and completion
notification device is reset.

The values of data memories DM01000 to DM01099 are written to the Memory Card in CSV file format.
Each time that R01000 turns ON, the file is written to directory "ABC" with the execution date and
execution time taken as the file name. ON is output to R00500 after writing ends.

CR2008 R01004 The completion notification device is reset to its initial state.
RES
ON for 1 scan

R01000 R01004 CM00700 DM00000 Calendar timer (Year) 00 to 99 is converted to ASCII code
LDA TBCD ASC STA and stored to DM00000.
Calendar timer (year)

CM00701 DM00001 Calendar timer (Month) 01 to 12 is converted to ASCII code


LDA TBCD ASC STA and stored to DM00001.
Calendar timer (month)

CM00702 DM00002 Calendar timer (Day) 01 to 31 is converted to ASCII code


LDA TBCD ASC STA and stored to DM00002.
Calendar timer (day)

CM00703 DM00003 Calendar timer (Hour) 00 to 23 is converted to ASCII code


LDA TBCD ASC STA and stored to DM00003.
Calendar timer (hours)

CM00704 DM00004 Calendar timer (Minute) 00 to 59 is converted to ASCII code


LDA TBCD ASC STA and stored to DM00004.
Calendar timer (mins)
NUL (00H) is stored to DM00005 (the ASCII codes of
$0000 DM00005 DM00001 to DM00004 are converted to character strings).
LDA STA
The calendar timers and directory name "ABC" are united
SADD into a single text string, and stored to DM00010 to make
"ABC\" DM00000 DM00010 "ABC\yymmddhhmm". (Directory name and file name are
made.)
#00006 DM00500: Save format
DW 16-bit signed binary, CSV file
DM00500
#00003 DM00501: Write mode
DW New mode
DM00501
DM00502: Option
#00000 Comma is inserted at end of data. Number of data digits is
DW variable.
DM00502
Start of save <directory>: ABC <directory name>: DM00010
MWRIT <save device>: DM01000 to DM01099 (100 devices)
DM00010 DM01000 #00100
<completion notification>: R01004 <error notification>: R01005
DM00500 R01004
R01004 R00500 R01004
SET RES Processing completion output is turned ON, and completion
notification device is reset.

3-59
3-9 Memory Card Instructions

The values of data memories DM01000 to DM01099, and then DM02000 to DM02199 are written
to the Memory Card in CSV file format.
Each time that R01000 turns ON, the file is written to directory "ABC" with the execution date
taken as the file name. ON is output to R00500 after writing ends.

3 CR2008 R01004
RES
R01006
RES The completion notification device is reset to its initial state.
ON for 1 scan
MEMORY CARD

R01000 R01004 CM00700 DM00000 Calendar timer (Year) 00 to 99 is converted to ASCII code
LDA TBCD ASC STA and stored to DM00000.
Calendar timer (year)

CM00701 DM00001 Calendar timer (Month) 01 to 12 is converted to ASCII code


LDA TBCD ASC STA and stored to DM00001.
Calendar timer (month)

CM00702 DM00002 Calendar timer (Day) 01 to 31 is converted to ASCII code


LDA TBCD ASC STA and stored to DM00002.
Calendar timer (day)

$0000 DM00003 NUL (00H) is stored to DM00003 (the ASCII codes of


LDA STA DM00001 and DM00002 are converted to character strings).
The calendar timers and directory name "ABC" are united
SADD into a single text string, and stored to DM00010 to make
"ABC\" DM00000 DM00010 "ABC\yymmdd".
(Directory name and file name are made.)
#00006
DM00500: Save format
DW
16-bit signed binary, CSV file
DM00500
#00003 DM00501: Write mode
DW New mode
DM00501
#00000
DM00502: Option
DW Comma is inserted at end of data. Number of data digits is
DM00502 variable.
MWRIT Start of save <directory>: ABC <file name>: DM00010
DM00010 DM01000 #00100 <save device>: DM01000 to DM01099 (100 devices)
DM00500 R01004 <completion notification>: R01004 <alarm notification>: R01005
R01004 R01006 #00000
DW DM00501: Write mode
DM00501 Add mode
MWRIT Start of save <directory>: ABC <file name>: DM00010
DM00010 DM02000 #00200
<save device>: DM02000 to DM02199 (200 devices)
DM00500 R01006 <completion notification>: R01006 <error notification>: R01007
R01006 R00500 R01004
SET RES Processing completion output is turned ON, and completion
notification device is reset.

3-60
3-9 Memory Card Instructions

MEMO

MEMORY CARD

3-61
3-9 Memory Card Instructions

MREAD
MREAD Memory Card
read
Reads device data from
Memory Card.

3 Ladder program
Execution condition MREAD
Input method
MEMORY CARD

S D1 n M R E A D S D1 n
D2 D3 D2 D3

Available Devices Index


Operand Bit Devices Word Devices Index Const Ind Local Modify
Reg Spec* Device
I O Int
Aux MR LR T C CTC CR DM EM FM TM T C CTH CTC CM Z #/$ #TM ∗ @ :#/:Z
S O O O O O – – – O O O O O – – – – O – *1 O O O O
D1 O O O O O – – – O O O O O O O – – O – – – O O O
n O O O O O – – – O O O O O O O O O O O O – O O O
D2 O O O O O – – – O O O O O O O – – O – – – O O O
D3 O O O O O O O – O O O O O – – – – O – – – O O O
Operand Explanation
Specifies the file name saved on Memory Card or the leading device (including end code NUL and
S
directory name) stored with the file name.*1, *2
D1 Specifies the leading device to store data that is read.*2
n Specifies the number of data to read.*3, *4
Specifies parameters relating to format, etc. of data to read, and the leading device to store the read
D2
state of the data.*2, *6, *7
D3 Specifies the notification bit device.*5, *6
*1 To specify a text string using constants, enclose with " ". The characters "#" and "$" cannot be
used. 1-byte characters: ASCII code 2-byte characters: shift JIS code
*2 For bit devices, specify the leading device of the channel.
*3 When a bit device has been specified, 16 continuous bits are occupied. When a word device has
been specified, one word is occupied.
*4 When reading ASCII text string data, specify the maximum number of characters (number of
bytes) in the text string.
*5 When a bit device has been specified, 2 continuous bits are occupied. When a word device has
been specified, each of the lowermost bits of two continuous words is used as the notification bit
device. Bits other than the lowermost bit do not change.
*6 When a device to which indirect specification or index modify has been specified, data is written
to the specified device at the up edge of the execution condition.
*7 When a bit device has been specified to D2 , 96 continuous bits are occupied. When a word
device has been specified, six continuous words are occupied.

3-62
3-9 Memory Card Instructions

Description of Operation

MREAD n items of data (16-bit/32-bit/ASCII text string) of the content of the parameters
([ D2 to D2 +4]) are saved at the up edge of the execution condition to devices
starting from D1 from the file specified by S . The number of actually read data is
written to D2 +5, the completion notification is written to D3 , and the error
3
notification for an abnormal end is written to D3 +1.

MEMORY CARD
Example
16-bit data
bit bit
15 0

CSV file‫ޓ‬S .BIN Parameters D1 12345


D2 to D2 +4
3930A05B0787...6EB2D5DD D1 +1 23456

D1 +2 34567
Memory
Card

...
CSV file‫ޓ‬S .CSV
D1 + n -2 45678
12345, 23456, 34567,..., 45678, 56789
D1 + n -1 56789

32-bit data
bit bit bit bit
31 16 15 0

CSV file S .BIN Parameters D1 +1 0012345678 D1


4EBC610015CD5B07D2029649... D2 to D2 +4
D1 +3 0123456789 D1 +2
...3538D08B146A0ACE
D1 +5 1234567890 D1 +4
Memory
Card
...

...

...
CSV file S .CSV
12345678, 123456789, 1234567890,... ..., 2345678901, D1 +2 ( n -2)+1 2345678901 D1 +2 ( n -2)
3456789012 D1 +2 ( n -1)+1 3456789012 D1 +2 ( n -1)

ASCII text string data


Number of characters Number of characters

Parameters D1 1 A(41H) B(42H) 2


D2 to D2 +4
CSV file S .CSV D1 +1 3 C(43H) 1(31H) 4
2(32H) 3(33H)
Memory D1 +2 5 6
" ABC123...abcd...z"
Card
n -3 a(61H) b(62H) n -2
n -1 c(63H) d(64H) n

1999 z(7AH) NUL(00H)

Note
When the setting of read format D2 has been specified in binary data, it is
stored as follows:
16-bit data
bit bit
15 0

12345 3039H
3930A05B
23456 5BA0H

32-bit data
bit bit bit bit
31 16 15 0

1234567890 499602D2H
D20296493538D08B
2345678901 8BD03835H

3-63
3-9 Memory Card Instructions

S setting

Specify the name of the file to read from Memory Card to within 1 to 249 characters (including
END code NUL and directory name).
3 S "file name" "directory name\file name"
MEMORY CARD

Memory Memory Card


Example of Memory Memory Card Card
Card
directory Directory
structure File
File

File name: DATA Directory name: ABC File name: DATA


DM00000 D(44H) A(41H) DM00000 A(41H) B(42H)
(Example) DM00001 T(54H) A(41H) DM00001 C(43H) \(5CH)
When
DM00000 has DM00002 NUL(00H) DM00002 D(44H) A(41H)
been specified
DM00003 T(54H) A(41H)

DM00004 NUL(00H)

n setting range

Sets the number of data to read. The setting range changes according to the setting value of
D2 .

D2 setting value 0, 2, 4, 6 (16 bits) 1, 3, 5, 7, 9 (32 bits) 8 (ASCII)


n setting range 0 to 65535 0 to 32767 0 to 1999

D2 : Read format setting

Sets the read format of the file. (Set the format of the file saved on Memory Card.)

D2
0 1 2 3 4 5 6 7 8 9
setting value
16-bit 32-bit 16-bit 32-bit ASCII Floating
Details 16-bit 32-bit 16-bit 32bit
unsigned unsigned signed signed text real
saved binary binary Hex Hex
binary binary binary binary string number
Extension
appended .BIN .CSV
to S
Save format Binary data Comma-delimited text

3-64
3-9 Memory Card Instructions

D2 +1: Read mode setting

You can select from the following three read modes.


Mode Description
Data is read from the start of the file at all times. 3
0: Regular mode Example File name: ABC

MEMORY CARD
Read position
Data is read from a position specified by the read position from the start of the file.
1: Read position
specification mode 1 (offset Example File name: ABC
from start of file) Read position ([ D2 +3 • D2 +4])
Data is read from a position specified by the read position from the end of the file.
2: Read position Example File name: ABC
specification mode 2 (offset
from end of file)
Read position ([ D2 +3 • D2 +4])

D2 +2: Reserved for system

Sets "0".

D2 +3, D2 +4: Read position (file pointer) setting

File pointer Position separated in 1-byte units from the start of the stored file
16-bit binary data
01000C007B00D2043930A05B07876EB2D5DDF F F F
TEST1.BIN
16-bit data
1 , 1 2 , 1 2 3 , 1 2 3 4 , 1 2 3 4 5 ,
TEST1.CSV (31H) (2CH) (31H) (32H) (2CH) (31H) (32H) (33H) (2CH) (31H) (32H) (33H) (34H) (2CH) (31H) (32H) (33H) (34H) (35H) (2CH)

ASCII data
A B C D 1 2 3 4 a b c d 1 2 3 4 A B C D
TEST1.CSV (41H) (42H) (43H) (44H) (31H) (32H) (33H) (34H) (61H) (62H) (63H) (64H) (31H) (32H) (33H) (34H) (41H) (42H) (43H) (44H)

File pointer position $00 $01 $02 $03 $04 $05 $06 $07 $08 $09 $0A $0B $0C$0D$0E $0F $10 $11 $12 $13 $14

[ D2 +3 • D2 +4 are enabled only when read position specification mode 1 or 2 is set for the
read mode ( D2 +1).
After read processing from the Memory Card ends, counting is performed from the start of the file,
and the position up to the end of the newly read data is stored to the read position ([ D2 +3 •
D2 +4]).
Also, data can be read from the specified position by setting a value (offset value) to the read
position ([ D2 +3 • D2 +4]) before executing the instruction.
The position to read from can be specified in 8-bit (1-byte) units.

3-65
3-9 Memory Card Instructions

Ex: 1 When the read mode ( D2 +1) is "1" . . . . Read position specification mode
(offset from start of file)
File pointer position

Setting value Stored value


3 [ D2 +3• Description [ D2 +3•
D2 +4] D2 +4]
MEMORY CARD

Data is read from the start of the file.


Example File name: ABC (number of data to read) File name: ABC
$00000000 n $00000004

$00 #00004 $04


Data is read from the specified position counting from the start of the file.
Example When $00000001 is set
File name: ABC (number of data to read) File name: ABC
n $00000005
$00000001 #00004 $05
$00 $01
or more
When $00000001 is set
File name: ABC (number of data to read) File name: ABC $00000006
n
#00004 $06
$00 $02

Ex: 2 When the read mode ( D2 +1) is "2" . . . . Read position specification mode
(offset from end of file)
File pointer position

Setting value Stored value


[ D2 +3• Description [ D2 +3•
D2 +4] D2 +4]
$00000000 error
Data is read from the specified position counting from the end of the file.
Example When $00000006 is set
File name: ABC (number of data to read) File name: ABC
n $00000002
#00004 $22222220
$00000001 $2222221C $22222222
or more
When $00000004 is set
File name: ABC (number of data to read) File name: ABC $00000000
n
#00004 $22222222
$22222220 $22222222

Note
Pay attention to the following when specifying the position to read from.
16-bit binary 01000204 32-bit binary BC004E61 5B0715CD
TEST1.BIN TEST1.BIN
O X O X O O X X X O X X X O
.CSV file 1 , 1 2 , 1 2 3 ,
TEST1.CSV (31H) (2CH) (31H) (32H) (2CH) (31H) (32H) (33H) (2CH)
O: Correctly read position
O X O X X O X X X O X: Incorrectly read position

3-66
3-9 Memory Card Instructions

D2 +5: Number of read data

The number of data actually read from the Memory Card are stored after read processing is com-
pleted.

Save format Number of


Stored Value
3
Data to Description D2 +5
D2 Read n

MEMORY CARD
0. 16-bit binary Example File name: ABC
1. 32-bit binary
D1 D1 +39
2. 16-bit Hex 100 items of data 40
3. 32-bit Hex 40 items of data read
4. 16-bit from file ABC
unsigned binary
5. 32-bit
40
unsigned binary Example File name: ABC D1 D1 +29
6. 16-bit signed
binary 30 items of data 30
7. 32-bit signed 30 items of data read
binary from file ABC
9. Floating real
number
Example File name: ABC D1 D1 +39
100 characters of data NUL 40
40 characters of data +
8. ASCII text NUL read from file ABC
40
string Example File name: ABC D1 D1 +29
30 characters of data NUL 30
30 characters of data +
NUL read from file ABC

Notification bit device


( D3 : completion notification, D3 +1: error notification)

Item Description
This device turns OFF when execution of the instruction starts, and turns ON
Completion
D3 when read processing from the Memory Card ends. The device turns ON
notification
whichever way execution ends, successfully or in error.
Error This device turns OFF when execution ends successfully, and turns ON when
D3 +1
notification execution ends in error.

Note
• When the data to read is data outside of the specified format range, an error
occurs, an error code is output to CM02390 to end read processing.
• During a CSV file read, when there are spaces, commas, or line feeds at the file
pointer positions after the data is read, the file pointer to be output to the result
data becomes the data position following the comma or line feed. (Reading of
the space, comma or line feed at the end of the data is skipped).
• During a CSV file read, reading of empty fields (e.g. sections with continuous
commas ",") is skipped, and device data is not stored. The data to be read next
is stored to the next device (not skipped devices). During this operation,
skipped data is counted as the number of data.

3-67
3-9 Memory Card Instructions

• The result of END processing after execution of the instruction is completed is


written for the read position, number of read data, completion notification, and
error notification.
• When a text string contains two continuous double quotation marks ("), the
double quotation marks are read as a single character.
3 • Individual double quotation marks in a text string (including before and after
the text string) are ignored.
MEMORY CARD

• Example " 1 2 " " A B " " 3 4 5 " 1 2 " A B " 3 4 5 (NUL)
• Files names are automatically appended with an extension according to the
read format setting.

Note
• Several scans are sometimes required for reading the device. During execu-
tion of the MREAD instruction, data values read from the Memory Card are
written in order to the start of the specified device. For this reason, do not read
data in a range of devices that have been processed by the MREAD instruction
before the completion notification bit device turns ON. Some data sometimes
is not reflected. To prevent this, use the completion notification D3 or
CR3214 (Memory Card instruction executing) control relay to perform exclu-
sive control.
• The MREAD instruction cannot be executed while the Memory Card instruction
executing control relay CR3214 is ON. For this reason, CR3214 must be used
to perform exclusive control as follows.
RXXXXX CR3214 MREAD
S D1 n

D2 D3

• The MREAD instruction cannot be used in interrupt programs or in the initial-


ization module.

Operation flags

CR2009 No change in state


CR2010 No change in state
CR2011 No change in state
This flag is ON in the following instances. Otherwise, it is OFF.
When the text string specified by S does not contain the end code (NUL)
When the text string specified by S exceeds 249 characters (including NUL)
When a timer/counter is specified to S by indirect specification
CR2012 When a device other than the leading device of the channel is specified when a bit device is specified
to S , D1 , and D2
When a value outside of the range is specified to a parameter
When a value is specified for reservation of a parameter
When the indirect specification and index modify range is inappropriate
* The instruction is not executed when CR2012 turns ON.

3-68
3-9 Memory Card Instructions

Instruction Execution Timing

MREAD This instruction is executed for one scan at the up edge of the execution condition.
Scan 3
ON

MEMORY CARD
Execution condition
OFF

MREAD Executed for 1 scan only Executed for 1 scan only

Read processing

ON
Completion notification ( D3 )
OFF

Read position ( D2 )+3, +4

Number of read data ( D2 +5)


ON
CR3214
(Memory Card executing) OFF

* Read processing is executed regardless of the program. Accordingly, if the instruction is being
executed once at a certain scan, execution of read processing is continued even if the input
condition is OFF at the next scan. The time until actual completion of read processing is depen-
dent on the size of the data and the file access processing time.

Sample Program

When R01000 turns ON, the data (100 items) in the file "DATA.CSV" in directory "ABC" on the
Memory Card is read, and is stored to data memories DM01000 to DM01099.
ON is output to R00500 after reading ends.
CR2008 R01004 The completion notification device is reset to its initial state.
RES
ON for 1 scan

R01000 R01004 #00006 DM00500: Read format


DW 16-bit signed binary, CSV file
DM00500
#00000 DM00501: Read mode
DW Regular mode
DM00501
#00000 DM00502: Reserved for system
DW Set to "0"
DM00502
Start of read<directory>: ABC <file name>: DATA <number of
MWRIT
"ABC\DATA" DM01000 #00100 read data>: 100 <save device>: DM01000 onwards
<completion notification>: R01004 <error notification>:
DM00500 R01004
R01005
R01004 R00500 R01004
SET RES Processing completion output is turned ON, and completion
notification device is reset.

3-69
3-9 Memory Card Instructions

MFREE MFREE Get Memory Card


free space
Gets the free space in byte units
on the Memory Card.

3 Ladder program Input method


Execution condition MFREE
MEMORY CARD

D1 D2 M F R E E D1 D2

Available Devices Index


Operand Bit Devices Word Devices Index Const Ind Local Modify
Reg Spec* Device
I O Int
Aux MR LR T C CTC CR DM EM FM TM T C CTH CTC CM Z #/$ #TM ∗ @ :#/:Z
D1 O O O O O – – – O O O O O O O – – O – – – O O O
D2 O O O O O O O – O O O O O – – – – O – – – O O O

Operand Explanation
D1 Specifies the leading device to store the Memory Card free space to.*1, *3
D2 Specifies the notification bit device.*2, *3
*1 When a bit device has been specified, 32 continuous bits from the start of the channel are
handled.
*2 When a bit device has been specified, 2 continuous bits are occupied. When a word device has
been specified, each of the lowermost bits of two continuous words is used as the notification bit
device. Bits other than the lowermost bit do not change.
*3 When a device to which indirect specification or index modify has been specified, data is written
to the specified device at the up edge of the execution condition.

Description of Operation

MFREE Free space on the Memory Card is stored in byte units to the device specified by [ D1 •
D1 +1] at the up edge of the execution condition. Also, the completion notification is
written to D2 , and the error notification for an abnormal end is written to D2 +1.

Example
D1 +1 D1
Free space
Memory 32-bit binary data
Card

3-70
3-9 Memory Card Instructions

Notification bit device


( D2 : completion notification, D2 +1: error notification)

Item Description

D2
Completion
This device turns OFF when execution of the instruction starts, and turns ON
when acquisition of free space on the Memory Card ends. The device turns ON
3
notification
whichever way execution ends, successfully or in error.

MEMORY CARD
Error This device turns OFF when execution ends successfully, and turns ON when
D2 +1
notification execution ends in error.

Note
• The result of END processing after execution of the instruction is completed is
written for the completion notification and error notification.
• Several scans are sometimes required for acquiring free space.
• The acquired free space sometimes differs from the actual free space when (i)
file operations were being performed via an FTP server function during acqui-
sition processing or (ii) the logging function was being used.
• The MFREE instruction cannot be executed while the Memory Card instruction
executing control relay CR3214 is ON. For this reason, CR3214 must be used
to perform exclusive control as follows.

RXXXXX CR3214 MFREE


D1 D2

• The MFREE instruction cannot be used in interrupt programs or in the initial-


ization module.

Operation flags

CR2009 No change in state


CR2010 No change in state
CR2011 No change in state
This flag is ON in the following instances. Otherwise, it is OFF.
• When a relay other than the start relay of the channel has been specified to D1
CR2012
• When the indirect specification and index modify range is inappropriate
Does not change when indirect specification or index modify is not specified to the operand.
* The instruction is not executed when CR2012 turns ON.

3-71
3-9 Memory Card Instructions

Instruction Execution Timing

MFREE This instruction is executed for one scan at the up edge of the execution condition.
Scan

3 Execution condition
ON

OFF
MEMORY CARD

MFREE Executed for 1 scan only Executed for 1 scan only

Get processing

ON
Completion notification ( D2 )
OFF

Write free space ( D1 · D1 +1)

ON
CR3214
(Memory Card executing) OFF

* Acquisition processing is executed regardless of program. Accordingly, if the instruction is


being executed once at a certain scan, execution of acquisition processing is continued even if
the input condition is OFF at the next scan. The time until actual completion of free space
acquisition processing is dependent on the size of the free space and the file access process-
ing time.

Sample Program

When R01000 turns ON, the free space on the Memory Card is acquired, and is stored to data
memory [DM01000 • DM01001].
Outputs ON to R00500 after completion of storage.

CR2008 R01004 The completion notification device is reset to its initial state.
RES
Acquisition of free space
ON for 1 scan

R01000 MFREE <save device>: DM01000 • DM01001


DM01000 R01004
<completion notification>: R01004 <error notification>:
R01004 R00500 R01004
R01005
SET RES The completion notification device is reset. Processing
completion output is turned ON.

3-72
3-9 Memory Card Instructions

MEMO

MEMORY CARD

3-73
3-9 Memory Card Instructions

MMKDIR MMKDIR Memory Card


make directory
Makes a directory on the
Memory Card.

3 Ladder program
Execution condition MMKDIR
Input method
MEMORY CARD

S D M M K D I R S D

Available Devices Index


Operand Bit Devices Word Devices Index Const Ind Local Modify
Reg Spec* Device
I O Int
Aux MR LR T C CTC CR DM EM FM TM T C CTH CTC CM Z #/$ #TM ∗ @ :#/:Z
S O O O O O – – – O O O O O – – – – O – *1 O O O O
D O O O O O O O – O O O O O – – – – O – – – O O O

Operand Explanation
Specifies the directory to make (1 to 247 characters, including end code NUL) or the leading device to store
S
the directory.*1,*2
D Specifies the notification bit device.*3
*1 To specify a text string using constants, enclose with " ". The characters "#" and "$" cannot be
used.
1-byte characters: ASCII code
2-byte characters: shift JIS code
*2 When a bit device has been specified, specify the leading device of the channel.
*3 When a bit device has been specified, 2 continuous bits are occupied. When a word device has
been specified, each of the lowermost bits of two continuous words is used as the notification bit
device. Bits other than the lowermost bit do not change.

Description of Operation

MMKDIR The directory specified by S in the Memory Card is made at the up edge of the
execution condition. Also, the completion notification is written to D , and the error
notification for an abnormal end is written to D +1.

Example

S1 "Directory A" "Directory A\Directory B"

Memory Memory Card Memory Memory Card


Card Card
Example of
directory Directory A
Directory A
structure

Directory B

When a directory already exists,


Prepare a new directory (directory A) in
nothing happens, processing ends
Note advance. It cannot be prepared together with
successfully, and the completion
directory B.
notification relay turns ON.

3-74
3-9 Memory Card Instructions

Notification bit device


( D : completion notification, D1 +1: error notification)

Item Description

D
Completion
This device turns OFF when execution of the instruction starts, and turns ON
when the directory has finished being made.
3
notification
The device turns ON whichever way execution ends, successfully or in error.

MEMORY CARD
Error This device turns OFF when execution ends successfully, and turns ON when
D +1
notification execution ends in error.

Note
• Several scans are sometimes required for making the directory.
• The result of END processing after execution of the instruction is completed is
written for the notification bit devices.
• The store destination when indirect specification or index modify is specified
to a notification bit device becomes the store destination at the up edge of the
execution condition.
• The MMKDIR instruction cannot be executed while the Memory Card instruc-
tion executing control relay CR3214 is ON. For this reason, CR3214 must be
used to perform exclusive control as follows.

RXXXXX CR3214 MMKDIR


S D

• The MMKDIR instruction cannot be used in interrupt programs or in the initial-


ization module.

Operation flags

CR2009 No change in state


CR2010 No change in state
CR2011 No change in state
This flag is ON in the following instances. Otherwise, it is OFF.
When the text string specified by S does not contain the end code (NUL)
When the text string specified by S exceeds 247 characters (including NUL)
CR2012 When a timer/counter is specified to S by indirect specification
When a device other than the leading device of the channel is specified when a bit device is specified
to S
When the indirect specification and index modify range is inappropriate
* The instruction is not executed when CR2012 turns ON.

3-75
3-9 Memory Card Instructions

Instruction Execution Timing

MMKDIR This instruction is executed for one scan at the up edge of the execution condition.
3 Scan
ON
MEMORY CARD

Execution condition
OFF

MMKDIR Executed for 1 scan only Executed for 1 scan only

Make processing

ON
Completion notification ( D )
OFF

ON
CR3214
(Memory Card executing) OFF

* Directory creation processing is executed regardless of program. Accordingly, if the instruction


is being executed once at a certain scan, execution of directory creation processing is contin-
ued even if the input condition is OFF at the next scan.

Sample Program

The directory currently stored to data memory DM01000 is made each time that R01000 turns
ON.
If the directory already exists, the directory is not made and processing is completed. The direc-
tory is output to R00500 after processing is completed.
CR2008 R01004
RES Resets the completion notification device to its initial state.
ON for 1 scan

R01000 R01004 MMKDIR


DM01000 R01004 The directory is made.

R01004 R00500 R01004


SET RES Processing completion output is turned ON. The completion
notification device is reset.

3-76
3-10 List of Devices for Memory Cards

List of Control Relays

Device Attribute
No.
R: read-only
Space: R/W
Description ON OFF
3
CR0000 R Logging execution Enabled Disabled

MEMORY CARD
CR0001 R Logging in progress In progress Not in progress
CR0002 R Specified size write end Ended Not ended
CR0004 R Buffer overflow Overflowed Not overflowed
Logging ID0
CR0005 R Write in Run mode during logging execution Yes No
CR0008 R Logging error Yes No
CR0009 R No free space on Memory Card error Yes No
CR0010 R Abnormal device/trigger setting Yes No
CR0100 R Logging execution Enabled Disabled
CR0101 R Logging in progress In progress Not in progress
CR0102 R Specified size write end Ended Not ended
CR0104 R Buffer overflow Overflowed Not overflowed
Logging ID1
CR0105 R Write in Run mode during logging execution Yes No
CR0108 R Logging error Yes No
CR0109 R No free space on Memory Card error Yes No
CR0110 R Abnormal device/trigger setting Yes No
: : : :
(logging ID2 to ID8)
: : : :
CR0900 R Logging execution Enabled Disabled
CR0901 R Logging in progress In progress Not in progress
CR0902 R Specified size write end Ended Not ended
CR0904 R Buffer overflow Overflowed Not overflowed
Logging ID9
CR0905 R Write in Run mode during logging execution Yes No
CR0908 R Logging error Yes No
CR0909 R No free space on Memory Card error Yes No
CR0910 R Abnormal device/trigger setting Yes No
One of ID0 to ID9 in No IDs in
CR3210 R Any logging operation in progress
operation operation
CR3211 R Memory Card in use In use Not in use
CR3212 R Identification of Memory Card completed Completed Not completed
CR3213 R Memory Card inserted Yes No
CR3214 R Memory Card instruction executing Executing Not executing
Not write-
CR3215 R Memory Card write-protected Write-protected
protected

Control memory

Device Attribute
R: read-only Description
No. Space: R/W
CM02390 R Error code for Memory Card instruction
CM02391 Memory Card power OFF error

3-77
3-10 List of Devices for Memory Cards

■ List of error codes for Memory Card instructions


The following list summarizes the error codes that are stored to CM02390 when Memory Card
instructions are used, and how to remedy these error codes.
Error
Description Cause Remedy
Code
3 0 Normal — —
Memory Card not Either the Memory Card is not inserted or the Insert the Memory Card, and completely
MEMORY CARD

1
inserted Memory Card slot cover is open. close the Memory Card slot cover.
The file name contains characters that are not
2 Abnormal file name Specify the file name correctly.
allowed.
3 File does not exist The specified file or directory does not exist. Specify the file name correctly.
4 File already exists The specified file or directory already exists. Rename the file or directory.
Check the file system of the Memory
5 File load error The file system of the Memory Card is in error.
Card.*1
• Remove the write protection from the
• The specified file is write-protected. specified file.
• The Memory Card is write-protected. • Remove the write protection from the
6 File write error
• The file system of the Memory Card is in Memory Card.
error. • Check the file system of the Memory
Card.*1
Abnormal file read/ The specified read/write position indicates
7 Correctly specify the read/write position.
write position outside of the file range.
Not enough space The file could not be saved successfully due
8 Delete unwanted files.
on Memory Card to insufficient space on the Memory Card.
Data not conforming to the specified format or
Either correct the content of the file, or
9 Format error out-of-range data was saved when the file
select the correct format.
was read.
1000 Other fatal errors — Contact your dealer.
*1 When checking the file system on the Memory Card, use the chkdsk command from the Win-
dows command prompt.
Abnormalities in the file system sometimes cannot be detected even if there is an abnormality
in Explorer's error check.

3-78
4

INTERRUPTS
INTERRUPTS
The interrupt processing function executes an interrupt program when there is
a request (an interrupt cause is generated) from an external input or a high-
speed comparator during operation of the KV-1000.
This chapter describes the types of interrupt causes and I/O during interrupt
processing.

4-1 Interrupt Processing . . . . . . . . . . . . . . . . . . . . . . 4-2


4-2 Direct Input/Output . . . . . . . . . . . . . . . . . . . . . . . 4-8
4-3 Input Capture . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
4-4 Sample Interrupt Programs. . . . . . . . . . . . . . . . 4-13

4-1
4-1 Interrupt Processing
This section describes interrupt processing.
For details on instructions, "Instruction Reference Manual"

What Is "Interrupt Processing?"

■ Outline of interrupt processing


Normally, on a PLC, execution of a ladder sequence program proceeds by repeatedly executing
4 input processing, execution of the main routine program, and output processing. Accordingly, sig-
nals shorter than the scan time cannot be input.
MEMORY CARD

If the interrupt processing function is used, processing can be executed at the moment that an
interrupt occurs independently of the scan time.
When an interrupt occurs, program execution is temporarily suspended at that moment in time,
and the interrupt program corresponding to the interrupt cause is executed. When execution of
the interrupt program ends, processing of the suspended program is resumed.
For details on the scan time, "10-1 Fixed Scan Time Operation Functions".

Input processing

Input processing Direct Input Function


Scan time

Generation of interrupt (R00000 to R00015)


cause
Execution of Execution
main routine of interrupt
program program

Return to instruction
following generation
of interrupt Direct Output Function

(R00500 to R00507)
Output processing

■ Types of interrupt causes


There are three interrupt causes as follows:
• "Externally Input Interrupts" page 4-5
• "Interrupts from High-speed Counter Comparators" page 4-6
• "Interrupts from CPU positioning parameter comparator 2" page 4-6

4-2
4-1 Interrupt Processing

■ About the direct input/output function


During interrupt processing (between the INT to RETI instructions), the direct input and direct out-
put functions can be used.
Use of these functions in the interrupt program enable input and output without being affected by
scanning of the main program.
These functions can be used by merely using direct input/output compatible devices in the inter-
rupt program by the SET and RES instructions.
For details on operation, "4-2 Direct Input/Output". 4

MEMORY CARD
Direct input function . . . .An input mode that allows the input stages of input relays R00000 to
R00015 to be captured during execution of the interrupt program
Direct output function . . .An output mode that allows the ON/OFF states of R00500 to R00507 to
be output during execution of the interrupt program

■ About processing of devices

Generation of interrupt cause


(1)

Output Input Output Input


processing processing Main routine Program processing processing

Input Interrupt program


processing (output program)
(2)
(3)

(1) Processing at start and end of the interrupt program


At the start of the interrupt program, internal registers, R00000 to R00015, operation flags,
TM000 to TM003, and index register values are stored internally on the system, and the stored
values are returned to at the end of the interrupt program.
The main routine program is not affected even if these values are changed during an interrupt.
Changed values are enabled only in the interrupt program.
The current value (CTH) of the high-speed counters becomes the value acquired by input pro-
cessing of the interrupt program after the interrupt program ends.
With other devices, values changed in the interrupt program are reflected in the main routine
program after the end of the interrupt program.
(2) Input processing of the interrupt program
Devices values in the interrupt program are as follows:
• Current value (CTH) of input relays R00000 to R00015 and high-speed counters: value
immediately after generation of the interrupt cause
• Other devices: value at the moment that the interrupt was generated by the main routine
program
(3) Output processing of the interrupt program
Output relays R00500 to R00507 output to the outside immediately after execution of the SET
instruction in the interrupt program.
When other output relays or output relays R00500 to R00507 have been executed by an
instruction other than the SET instruction, output is performed by output processing after the
end of the interrupt program.

4-3
4-1 Interrupt Processing

Interrupt Program Execution Conditions

The interrupt program is executed when an interrupt is generated. Interrupts are defined between
the INT and RETI instructions.
At start of program running, interrupts are disabled.
To execute the interrupt program, the enable interrupt instruction "EI" must be executed. Also, to
4 temporarily disable interrupts, the disable interrupt instructions "DI" or "DIC" are executed.
When interrupts are disabled, interrupts are not processed even if an interrupt is generated, and
MEMORY CARD

are held pending until they are next enabled.


When interrupts are enabled, the interrupt program is executed when an interrupt cause is gener-
ated.
Interrupt causes are specified by the operand of the INT instruction.
When an interrupt cause is an input relay, set a small input time constant to obtain the required
response speed.
Example of interrupt program

CR2008
EI

HSP
R00000
Main routine program
The interrupt program cannot be executed unless the EI instruction
is programmed.
END Set by setting the input time constant to the HSP instruction (10 µs)
or the value to CM01620 to set CR2305 ON.
INT
R00000

Interrupt program
Enter the interrupt program between "END" and "ENDH".
RETI

ENDH

Note
• Some instructions cannot be used in the interrupt program.
"Instructions Not Allowed in Interrupt Programs" page 4-7
• To shorten the input time constant, the HSP instruction (10 µs) must be exe-
cuted or the input time constant must be set at data memory CM01620, and
CR2305 set to ON. For details on the input time constant,
KV-1000 Instruction Reference Manual, "HSP Instruction"

CR2008
EI
CR2008 #00000 CR2305
EI DW SET or
CM01620 CR2002 HSP
R00000

4-4
4-1 Interrupt Processing

Externally Input Interrupts

Input relays are used as the interrupt cause. Interrupts are executed by input relays R00000 to
R00009. Set which polarity (up edge or down edge) is to be taken as the interrupt cause by the
control relays.

■ Setting the polarity of externally input interrupts


Set which polarity (up edge or down edge) is to be taken as the interrupt cause by the control
4

MEMORY CARD
relays.
The polarity of the interrupts can be changed as follows.
Operation Condition
Interrupt Cause Input Control
INT Instruction Down Both Up/
Relay Relays Up Edge
Edge Down Edge
CR2600 OFF ON OFF ON
INT R00000 R00000
CR2601 OFF OFF ON ON
CR2602 OFF ON OFF ON
INT R00001 R00001
CR2603 OFF OFF ON ON
CR2604 OFF ON OFF ON
INT R00002 R00002
CR2605 OFF OFF ON ON
CR2606 OFF ON OFF ON
INT R00003 R00003
CR2607 OFF OFF ON ON
CR2608 OFF ON OFF ON
INT R00004 R00004
CR2609 OFF OFF ON ON
CR2610 OFF ON OFF ON
INT R00005 R00005
CR2611 OFF OFF ON ON
CR2612 OFF ON OFF ON
INT R00006 R00006
CR2613 OFF OFF ON ON
CR2614 OFF ON OFF ON
INT R00007 R00007
CR2615 OFF OFF ON ON
CR2700 OFF ON OFF ON
INT R00008 R00008
CR2701 OFF OFF ON ON
CR2702 OFF ON OFF ON
INT R00009 R00009
CR2703 OFF OFF ON ON

Note
Set the special auxiliary relays ON/OFF by the SET/RES instructions.

■ Input capture
Of the externally input interrupts, INT R00000 to INT R00003 are provided with an input capture
function. This function is for acquiring to the control memory the current value of a high-speed
counter when an interrupt is generated. The current value of high-speed counters is automatically
transferred to CM01610 to CM01617 when an interrupt is generated even if this function is not
set.
For details, "4-3 Input Capture".

4-5
4-1 Interrupt Processing

Interrupts from High-speed Counter Comparators

High-speed counter comparators are used as the interrupt cause. Interrupt processing is exe-
cuted when the current value of a high-speed counter CTH and the setting value of a high-speed
counter comparator CTC are the same value.
Interrupt Cause
4 INT
Instruction
High-speed Counter Operation Condition
Comparator
MEMORY CARD

When the setting value of high-speed counter comparator CTC0


INT CTC0 CTC0
matches the current value
When the setting value of high-speed counter comparator CTC1
INT CTC1 CTC1
matches the current value
When the setting value of high-speed counter comparator CTC2
INT CTC2 CTC2
matches the current value
When the setting value of high-speed counter comparator CTC3
INT CTC3 CTC3
matches the current value

INT
*When CTCn exists, the contact of CTCn does not turn ON. (n: 0 to 3)

Interrupts from CPU positioning parameter comparator 2

CPU positioning parameter comparator 2 is used as the interrupt cause. Interrupt processing is
executed when the number of pulses (current value) output during positioning/speed control and
the setting value of comparator 2 are the same value.
For details, "8-2 Setting Up Parameters and Executing Instructions".

INT Interrupt cause


Operation Condition
Instruction comparator 2
INT CR3013 (CR3013) When the setting value of X-axis comparator 2 matches the current value
INT CR3113 (CR3113) When the setting value of Y-axis comparator 2 matches the current value

Precautions in Interrupts

• During execution of an interrupt, execution of new interrupt programs is disabled.


• When a new interrupt cause is generated during execution of an interrupt, interrupt processing
is executed after execution of the currently executing interrupt program ends.
• A new interrupt program can be executed immediately during execution of an interrupt by pro-
gramming the EI instruction in the interrupt program. (The EI instruction can be nested down to
a nesting level of 16.) Note, however, that interrupts by the same interrupt cause cannot be pro-
grammed.
• When two or more interrupt causes are generated, interrupt processing is executed according
to the following order of priority:
R00000 > ... > R00003 > CTC2 > CTC3 > CTC0 > CTC1 > CR3013 > CR3113 >
R00004 > ... > R00009
• When interrupts are made by comparator 2, CR3013 and CR3113 do not actually turn ON and
OFF; they are used as symbols for when the ladder program is made in KV STUDIO.

4-6
4-1 Interrupt Processing

Instructions Not Allowed in Interrupt Programs

Type of Instruction Instruction


Common @XXXX instruction Derivative execution type
LDP/LDF Load pulse/load pulse free
Contact instructions ANP/ANF AND pulse/AND pulse free
ORP/ORF OR pulse/OR pulse free
DIFU/DIFD Differential up/down 4
ONDL/OFDL ON delay/OFF delay

MEMORY CARD
Output instructions SHOT One shot
Basic
FLIK Flicker
instruc-
ALT Alternate
tions
TMR/TMH/TMS Timers/high-speed timers/high-speed 1 ms timers
C Counters
Timer/counter OUTC Out counter
instructions ITVL Interval timer
UDC Up/down counter
UDT Up/down timer
Shift instruction SFT Shift
Applied
STG/JMP/ENDS Stage/jump/end stage
instruc- Stage processing
W-ON/W-OFF Wait ON/wait OFF
tions instruction
W-UE/W-DE Wait up edge/wait down edge
Data processing
HKEY Hex key input
instruction
Cam switch instructions ABSENC/INCENC Absolute encoder/incremental encoder
Extend Frequency counter
FCNT/RCNT Frequency measurement/speed of rotation measurement
ed instructions
instruc- PID instruction PID PID
tions Memory Card MWRIT/MREAD/ Memory Card write/Memory Card read/get Memory Card
instructions MFREE/MMKDIR free space/make Memory Card directory
Access window
AWNUM/AWMSG User message 1/user message 2
instructions

4-7
4-2 Direct Input/Output
This section describes the direct input and direct output functions.

Direct Input Function

"Direct input function" captures the states of input relays R00000 to R00015 at the start of the
interrupt program. The states of other input relays are also captured by input processing of that

4 scan when the interrupt program is executed.


States captured by direct input are enabled only in the interrupt program. They are disabled in the
main routine program. In the main routine program, the state of input processing of that scan is
MEMORY CARD

enabled.

Example
Generation of interrupt cause

ON

R00000
OFF
ON

R00001
OFF
ON

R30000
OFF

R00001:OFF R00001:ON
R30000:OFF R30000:ON

Output Input Main routine Program Output Input


processing processing processing processing

Input Interrupt program


processing

R00001:ON
R30000:OFF

R00001 R00001 R00001 R00001

OFF ON OFF ON

R30000 R30000 R30000 R30000

OFF OFF OFF ON

When an interrupt program such as that shown above is executed,


(1) Input processing of the main routine program J R00001: OFF R30000: OFF
(2) Input processing of the interrupt program J R00001: ON R30000: OFF
As input relay R00001 is a direct input, the state at execution of the interrupt program is not cap-
tured.
Input relay R30000 is handled by the state of input processing of the main routine program even
in the interrupt program.
Direct input is enabled only in the interrupt program.
In the main routine program, R00001 is in an OFF stage regardless of whether program execution
is before or after execution of the interrupt program.
R00001 is in an ON stage only in the interrupt program.

4-8
4-2 Direct Input/Output

Example of ladder program

CR2002
EI Interrupt is enabled at power ON.
CR2002 HSP
R00000 The input time constant of input relays R00000
and R00005 is set to 10 µs.
HSP
R00005

R01000 R00500

END
Output relay R00500 is turned ON by internal
auxiliary relay R01000 from interrupt processing. 4

MEMORY CARD
INT
R00000 The interrupt program is executed when
R00005 R01000 input relay R00000 is turned ON.
SET When R00005 turns ON during interrupt
RETI processing, relay R01000 is turned ON.

ENDH * Input information obtained by direct input


is valid only during the interrupt program,
and must be made to via the internal auxiliary relays.

4-9
4-2 Direct Input/Output

Direct Output Function

The "direct output function" outputs the state of output relays R00500 to R00507 during execution
of the interrupt program. Interrupt programs do not have output processing. When a program is
executed, the program outputs to the outside immediately without waiting for output processing.
Output relays other than direct outputs output to the outside by output processing of the main rou-
4 tine program after the end of the interrupt program.
Program direct output by the SET and RES instructions. When direct output has been pro-
MEMORY CARD

grammed by an instruction other than the SET and RES instructions, the program outputs to the
outside by output processing of the main routine program.

Example R00501: Output


R30500: Output

Output Input Output Input


Main routine Program
processing processing processing processing

Input
processing (1) (2) (3) (4)

R00500: Output R00502: Output

CR2002 R00500
(1) SET

CR2002 R00501
(2)

CR2002 R00502
(3) SET

CR2002 R30500
(4) SET

When an interrupt program such as that shown above is executed,


• At rung (1), output relay R00500 outputs to the outside immediately as it is a direct output relay.
• At rung (2), output relay R00501 outputs to the outside by output processing of the main routine
program as it is programmed by the OUT instruction even though it is a direct output relay.
• At rung (3), output relay R00502 outputs to the outside immediately as it is a direct output relay.
• At rung (4), output relay R30500 turns ON by internal processing. However, it outputs to the
outside by output processing of the main routine program as it is not a direct output relay.

4-10
4-2 Direct Input/Output

Note
• Direct output is performed only when the SET/RES instructions are used in the
interrupt program. Note, however, that the output destination device must be
specified directly by the SET/RES instructions.
• Direct output is not performed in the following instances even if it is specified
in the interrupt program. Output is performed to output processing by that
scan after the end of the interrupt.
• (1) When the output destination was specified by an instruction other than the 4
SET/RES instructions

MEMORY CARD
• (2) When direct output was specified to SET/RES instruction devices using
relays other than R00500 to R00507, or by indirect specification or index mod-
ify
• (3) When a macro called up from within the interrupt program or the SET/RES
instructions are executed in the sub-routine

Example of ladder program


CR2002
EI Interrupt is enabled at power ON.
CR2002 HSP
R00000 The input time constant of input relays R00000
HSP and R00001 is set to 10 µs.
R00001

END

INT
R00000 The interrupt program is executed when
CR2002 R00500
input relay R00000 is turned ON.
SET Direct output relay R00500 is turned ON.
RETI

INT
R00001 The interrupt program is executed when
CR2002 R00501
input relay R00001 is turned ON.
SET Direct output relay R00501 is turned ON.
RETI

ENDH

4-11
4-3 Input Capture
This section describes the input capture function.

Input Capture Function

The "input capture function" is for acquiring to the data memory the current value of a high-speed
counter when an interrupt cause is generated. Input capture functions when the interrupt cause is
an external input (only R00000 to R00003 can be used ). No special settings are required for
4 using this function.
Acquired values are stored to control memories CM01610 to CM01617.
MEMORY CARD

High-speed Counter for Storage Destination


Interrupt Cause (external input)
Acquiring Current Value Upper Lower
When INT R00000 is generated CTH0 CM01611 CM01610
When INT R00001 is generated CTH0 CM01613 CM01612
When INT R00002 is generated CTH1 CM01615 CM01614
When INT R00003 is generated CTH1 CM01617 CM01616

Note
The timing that input capture is executed is dependent on the polarity setting of
the interrupt set in control relays CR2600 to CR2607.

■ About the difference between the input capture function and the current value of the high-speed
counter in and during execution of the interrupt program
• Input capture function
... This is the value captured momentarily when an interrupt cause is generated.
• Current value of high-speed counter during execution of the interrupt program
... This is the value obtained by acquiring the current value of the high-speed counter by input
processing of the interrupt program using the LDA or MOV instruction during execution of the
interrupt program.
An error occurs in the acquired value in the following instances:

Generation of interrupt cause


(external input) Execution of EI instruction
Time difference

Scan Interrupt disabled Interrupt enabled

High-speed counter
CTH0 current value .... 10 11 12 .... 99 100 101 ............................. 999 1000 1001

Input capture function Interrupt program


Input CTH0
processing LDA STA

(1) (2)
100 1000

(1) As the input capture function acquires the value at the moment that an interrupt cause is gen-
erated, the current value of high-speed CTH0 becomes #00100.
(2) As the value to be acquired by the interrupt program is the value acquired by input processing
of the interrupt program, the current value of high-speed counter CTH0 to be acquired
becomes #01000.
As shown above, an error occurs in the current value of the high-speed counter to be acquired when a
time lag occurs after generation of the interrupt cause up to execution of the interrupt program.

Tip The current value (CTH) of the high-speed counter also becomes the value acquired by
input processing of the interrupt program after the interrupt program ends.
4-12
4-4 Sample Interrupt Programs

Sample Program

■ Example of application of an interrupt using a signal converter


In this example, a minute pulse is converted to a pulse of a fixed width using the interrupt function
and is then output.
• The minute pulse that is input by input relay R00000 is converted to a pulse having an ON width
of one second from output relay R00500.
4
• Output relay R00500 turns ON for one second from the up edge of input relay R00000.

MEMORY CARD
Scan
ON

Input relay R00000


OFF

ON

Output relay R00500 ON ON ON


OFF
1 second 1 second 1 second

CR2008 Interrupt is enabled at power ON.


EI

CR2002 HSP
R00000 The input time constant of input relay
R00000 is set to 10 µs.

R00500 #00010 T0000 R00500


T0000 RES Output relay R00500 is turned ON for one
second only.

END

INT
Output R00500 is turned ON when input
R00000
relay R00000 is turned ON.

CR2002 R00500
SET

RETI

ENDH

4-13
4-4 Sample Interrupt Programs

■ Example of application of an interrupt using a high-speed counter


In this example, ON/OFF of output relay R00500 is controlled by
the input value of the high-speed counter and by ON/OFF of the
input relay.

• When the input value of the high-speed counter from input


relay R00010 becomes #10000, output relay R00500 turns
4 ON.
• When input relay R00000 turns ON, output relay R00500 turns
MEMORY CARD

OFF.

Scan
ON

Input relay R00010


OFF

ON

Input relay R00000


OFF

ON

Output relay R00500 ON


OFF

Interrupt enable at power ON and automatic


CR2008 CR2103 CTH0
EI SET RES reset of high-speed counter CTH0 is set and
reset.
CR2002 HSP The input time constant of input relay
R00010
R00010 is set to 10 µs.
CR2002 CTH0 The high-speed counter of input relay
R00010
R00010 is set to CTH0.
#10000
CTC0 The setting value is set to #10000.

R00000 R00500
When input relay R00000 turns ON, output
RES
relay R00500 is turned OFF.
END

INT When the value of high-speed counter


CTC0
comparator CTC0 becomes #10000, the

R00500 interrupt program is executed, and output


CR2002
SET relay R00500 is turned ON.

RETI

ENDH

4-14
4-4 Sample Interrupt Programs

■ Example of application for measuring the high-speed pulse ON width


In this example, the width of the input pulse to input to the
input relay is measured.
ON

Input relay R00000


OFF

Pulse width

• The pulse width is measured in 1µs units using control


relay CR2100.
4

MEMORY CARD
• The input capture value ([CM01610 • CM01611]) when input relay R00000 is ON is stored to
data memory [DM00010 • DM00011].
The value of [DM00010 • DM00011] is subtracted from the input capture value when R00000 is
OFF. This value becomes the pulse width.
• The measured value is stored to [DM00000 • DM00001] in µs units.

CR2008
EI Interrupt is enabled at power ON.

CR2002 HSP The input time constant of input relay R00000 is


R00000
set to 10 µs.

CR2002 CTH0 The 1 µs internal clock is counted by high-speed


CR2100
counter CTH0.

END

INT
R00000 Interrupts are executed by input relay R00000.
First of all, the interrupt polarity is changed to the
CR2601 CM01610 DM00010 KEEP down edge by executing the interrupt at the up
LDA.D STA.D SET
edge of R00000, storing the current value
CR2601
([CM01610 · CM01611]) of CTH0 at that time to
CR2601 CM01610 DM00010 DM00000
LDA.D SUB.D STA.D RES [DM00010 · DM00011], and turning CR2601 ON.

Next, the pulse width of R00000 is calculated by


RETI
executing the interrupt at the down edge of
R00000, and decrementing [DM00010 · DM00011]
ENDH
at the up edge from the current value ([CM01610 ·
CM01611]) of CTH0 at that time. The result is
stored to [DM00000 · DM00001].
Finally, CR2601 is turned OFF to change the
interrupt polarity to the up edge.

4-15
4-4 Sample Interrupt Programs

■ Example of application for measuring the time taken to pass between two
points
In this example, the time is takes to pass between two
input relays is measured.
Sensor 1 ON
Sensor 1
Input relay R00002
OFF

Sensor 2
4 Sensor 2
Input relay R00003
ON

OFF
Pass time (µs)
MEMORY CARD

• The time it takes to pass from input relay R00002 to input relay R00003 is measured.
• The measured value is stored to data memory [DM00000 • DM00001] in 1 µs units.

Interrupt enable at power ON and the interrupt


CR2008 CR2604 CR2605 CR2606 CR2607
polarity of input relays R00002 and R00003 are
EI RES RES RES RES
set to the up edge.
CR2002 HSP
R00002 The input time constant of R00002 is set to 10 µs.

HSP
R00003 The input time constant of R00003 is set to 10 µs.

CR2002 CTH1 The 1 µs internal clock is counted by high-speed


CR2200
counter CTH1.
END

When INT00002 is executed, the current value


INT
R00002 of CTH1 is automatically stored (by input
capture) to [CM01614 · CM01615].
RETI

INT When INT00003 is executed, the current value


R00003
of CTH1 is automatically stored (by input

CR2002 CM01616 CM01614 DM00000 capture) to [CM01616 · CM01617].


LDA.D SUB.D STA.D The pass time between two points is calculated
by subtracting the input capture value of
RETI
INT00002 from the input capture of INT00003.
The result is stored to [DM00000 · DM00001].
ENDH

4-16
5
HIGH-SPEED COUNTERS

HIGH-SPEED COUNTERS
This chapter describes high-speed counters and high-speed counter
comparators that enable high-speed pulse measurement and pulse
output independent of scan time.

5-1 High-speed Counters . . . . . . . . . . . . . . . . . . . . . 5-2


5-2 List of Devices for High-speed Counters . . . . . 5-26
5-3 Direct Clock Pulse Output. . . . . . . . . . . . . . . . . 5-30

5-1
5-1 High-speed Counters
This section briefly describes and presents the specifications of the high-speed counters and
high-speed counter comparators provided on the KV-1000.

Outline of High-speed Counters

■ High-speed counters, high-speed counter comparators


High-speed counters are counters for measuring high-speed input signals that cannot be
calculated by counter instructions (C, OUTC, UDC).
5 High-speed counter comparators are devices for specifying the setting values of high-speed
counters, and turn ON when the setting value matches the current value. High-speed counters
HIGH-SPEED COUNTERS

can operate at high speed independent of the scan as they are processed in the hardware.

■ Confirmation of high-speed counters, high-speed counter comparators


The KV-1000 Series is provided with two high-speed counters, and high-speed comparators and
exclusive internal clocks for each of these high-speed counters.

High-speed counter block diagram


Enable input R00008
preset (Z-phase) input R00014

Count input 32-bit high-speed counter 0 CTH0 input capture function *1


A phase R00010 CM01610, CM01611(INT R00000)
External input
(B phase R00012) R00010 CTH0 CM01612, CM01613(INT R00001)
(R00012)

Internal clock Control circuit


MEMSW 2(bit0)
CR2100 (1.0 µs) OFF R00500
CR2101 (10.0 µs) ON R00504
(comparator match output)*2
CR2102 (100.0 µs) CTH0 setting value
High-speed counter comparator Interrupt function
Direct clock pulse input CTC0
R00501 INT CTC0
CTC1 INT CTC1

(internal wiring)
(internal wiring)

Count input 32-bit high-speed counter 1 CTH1 input capture function *1


Direct clock pulse input CM01614, CM01615(INT R00002)
R00500 CTH1 CM01616, CM01617(INT R00003)

MEMSW 2(bit1)
Internal clock OFF R00501
CR2200 (1.0 µs) Control circuit ON R00505
(comparator match output)*2
CR2201 (10.0 µs)
CR2202 (100.0 µs)
CTH1 setting value
External input High-speed counter comparator Interrupt function
A phase R00011
R00011 CTC2
(B phase R00013) (R00013) INT CTC2
CTC3 INT CTC3

Enable input R00009


preset (Z-phase) input R00015

*1 "Input Capture Function" page 4-12


*2 "Comparator Match Output" page 5-23

5-2
5-1 High-speed Counters

■ Main functions of high-speed counters


Count method
You can select from linear counter and ring counter. The ring counter counts the range of 32-bit
count values, while the ring counters sets the upper limit value and lower limit value of the count
and performs the count.
32-bit unsigned and 32-bit signed can be selected for the 32-bit count value range.

Various inputs can be selected


• With external inputs, single-phase (w/ or w/out direction), phase difference (1X/2X/4X) and 2- 5
pulse pulse inputs can be counted. Also, both transistor output and line driver output can be

HIGH-SPEED COUNTERS
connected.
• High-precision time measurement, up till now not possible with C (counter) and other instruc-
tions, is now made possible by inputting 1 µs, 10 µs and 100 µs cycle internal clock signals.
• High-speed counters are provided on two channels. This means that one of the high-speed
counters can capture comparator match output, that uses the other high-speed counter, as the
high-speed counter input.

Preset function
Current values can be changed to preset setting values at any timing when an external preset
function is used.

Enable function
Count operation enable/disable can be controlled, or the current values of the counters reset at
any timing by using the external enable input and internal enable relay.

Comparator match functions


The following operations are possible when the current value of the counter matches the
comparator setting value:
• Interrupt programs can be executed.
• ON/OFF of KV-1000 output relays can be controlled by the comparator match output function.
• The current value of the counter can be automatically reset.

■ Precautions when using high-speed counters


Pay attention to the following point when using high-speed counters:
• Be sure to set the enable function.
When the enable function is not to be used, set to "Enable at all times".
Settings cannot be reset by changing the mode from RUN to PROG.
"Counter Enable Function" page 5-21

5-3
5-1 High-speed Counters

High-speed Counter Specifications

■ Specifications
Count method Linear counter Ring counter
Input Line driver input Single phase: 100 kHz Phase different: 50 kHz
response Open collector
Single phase: 60 kHz Phase difference: 30 kHz
frequency input
• Single-phase (w/out direction, w/ direction)
External input • Phase difference (1X/2X/4X)
5 Pulse input
method
• 2-pulse
• Internal clock input
Internal input
HIGH-SPEED COUNTERS

• Direct clock pulse input


Number of channels 2ch (CTH0, CTH1)
Count range Unsigned 0 to 4294967295
32 bits Signed -2147483648 to +2147483647
• Reset by RES instruction
• Reset by CTH instruction (execution condition OFF)
Reset method • Automatic reset by comparator match
• Reset by external preset input
• Reset by counter enable function
• Preset function
• Comparator match output function
Main functions
• Counter enable function (external enable input/internal enable relay)
• Overflow detection (linear counter)
• Frequency measurement function
• Speed of rotation measurement function
Extended functions
• Specified frequency pulse output function
• Cam switch function (incremental)

5-4
5-1 High-speed Counters

■ Count input types


High-speed counters have the following three count inputs.

(1) External input


Aphase B phase
CTH0 R00010 R00012
CTH1 R00011 R00013

Short externally input signals are counted. Single-phase, phase difference and 2-pulse can be
input.
The count method is set by control relays. 5
For details on preset (reset) inputs, "Preset Function" page 5-19

HIGH-SPEED COUNTERS
(2) Internal clock input
1.0 µs 10.0 µs 100.0 µs
CTH0 CR2100 CR2101 CR2102
CTH1 CR2200 CR2201 CR2202

The internal clock is counted. This input can be used as a high-precision timer as the time can be
measured from the count value.

(3) Direct clock pulse input


Comparator match output relay
CTH0 R00501
CTH1 R00500

Pulses output by the direct clock pulse function can be counted from the other high-speed counter
without being wired externally.
"Direct Clock Pulse Output" page 5-30
KV-1000 Instruction Reference Manual "MEMSW Instruction"

■ External control input types


The following two inputs are provided for external control inputs.

(1)Preset (reset) input


Preset (reset) input
CTH0 R00014
CTH1 R00015

The current value (CTH) of high-speed counters can be changed to a preset value by turning the
preset inputs ON.
When "0" is set as the preset value, the high-speed counter is reset.
"Preset Function" page 5-19

(2)Enable input
Enable input
CTH0 R00008
CTH1 R00009

Counter inputs can be enabled/disabled, and current values reset as desired by turning the
enable inputs ON.
"Counter Enable Function" page 5-21

5-5
5-1 High-speed Counters

Linear Counters and Ring Counters

You can select between linear counter and ring counter as the count method for high-speed
counters. Linear counters count at a resolution (fixed range) of 32 bits, and ring counters count at
any resolution (with the upper limit value and lower limit value set).

■ Linear counters
A "linear counter" is a counter for counting the range of 32-bit count values.
5 32-bit unsigned
Countup and countdown are performed within the range 0 to 4294967295.
HIGH-SPEED COUNTERS

When countup is performed from 4294967295, the count returns to 0. When countdown is
performed from 0, the count returns to 4294967295.
When this happens, the overflow detection relay (CR2403/CR2407) turns ON.

32-bit signed
Countup and countdown are performed within the range -2147483648 to +2147483647.
When countup is performed from +2147483647, the count returns to -2147483648. When
countdown is performed from -2147483648, the count returns to +2147483647.
When this happens, the overflow detection relay (CR2403/CR2407) turns ON.

Range of count values and overflow detection relays


Selection of
Sign Range of Count Values Overflow Detection
Count Method
CR2402 OFF CM01608 OFF 0 to 4294967295
CTH0 CR2403
(linear counter) bit7 ON -2147483648 to +2147483647
CR2406 OFF CM01609 OFF 0 to 4294967295
CTH1 CR2407
(linear counter) bit7 ON -2147483648 to +2147483647

The overflow detection relays hold the ON state until it is turned ON by the RES instruction, for example.
Count input Add

Subtract

Upper limit value


Unsigned Signed
Overflow
4294967295 +2147483647
($FFFFFFFF) ($7FFFFFFF)

Count value
Lower limit value
0 -2147483648
($00000000) ($80000000) Overflow

RES CR2403/CR2407 RES CR2403/CR2407

Overflow detection
CTH0: CR2403/CTH1: CR2407

Note
Counting is not stopped even if an overflow is detected. Counting stops only when
the count input has stopped.

5-6
5-1 High-speed Counters

■ Ring counters
A "ring counter" is a function for setting the upper limit value and lower limit value of a high-speed
counter to any value.

The range between the lower limit value and the upper limit value is counted up or counted down.
When countup is performed from the upper limit value, the count reaches the lower limit value,
and vice versa.
When this happens, the overflow detection relay (CR2403/CR2407) does not ON.

Range of count value setting values, and upper limit value/lower limit value store destinations 5
Setting value

HIGH-SPEED COUNTERS
Selection of
Count Method Upper Limit Lower Limit
Sign Range Value Value
CR2402 ON CM01608 OFF 0 to 4294967295 CM01601 CM01597
CTH0
(ring counter) bit7 ON -2147483648 to +2147483647 CM01600 CM01596
CR2406 ON CM01609 OFF 0 to 4294967295 CM01603 CM01599
CTH1
(ring counter) bit7 ON -2147483648 to +2147483647 CM01602 CM01598

Example
High-speed counter comparator
CR2008 #10000 CM01600
CTC0 upper limit value 10000, LDA.D STA.D
lower limit value 100 ring ON for 1 scan #00100 CM01596
LDA.D STA.D
counter settings CR2402
SET

Note
• Overflow is not detected even if the count exceeds the upper limit value or lower
limit value.

Count input Add

Subtract

Upper limit value


CTH0: [CM01601 · CM01600]
CTH1: [CM01603 · CM01602]

Count value

Lower limit value


CTH0: [CM01597 · CM01596]
CTH1: [CM01599 · CM01598]

• By changing the current value of high-speed counters or the upper limit value/
lower limit value of the ring counter, the current value of the counter is adjusted at
END instruction processing if it falls outside the lower limit value to upper limit
value range.
• The current value is adjusted to the upper limit value if it exceeds the upper limit
value.
• The current value is adjusted to the lower limit value if it falls below the lower
limit value.
• Do not set as follows: upper limit value ≤ lower limit value The count will not be
performed normally.

5-7
5-1 High-speed Counters

Count Input Settings

■ External input setting


When counting an external input by a high-speed counter, specify the following relays to the
operand.

External input
Aphase
5 CTH0
CTH1
R00010
R00011
HIGH-SPEED COUNTERS

Example
External input R00010 is
CTH0
counted by high-speed R00010

counter CTH0.

Note
When using an external input, be sure to set the input time constant.
For details, "10-3 Input Time Constant Selection Function" page 10-5

The following count methods (single phase, phase difference and 2-pulse) are available for
counting external inputs by a high-speed counter.
The count input method is set by a combination of control relays CR2113 to CR2115 (CR2213 to
CR2215).

CTH0 count input method


Single-phase Phase Difference
2-pulse
W/out direction W/direction 1X 2X 4X
CR2113 OFF ON OFF ON OFF ON
CR2114 OFF OFF ON ON OFF OFF
CR2115 OFF OFF OFF OFF ON ON

CTH1 count input method


Single-phase Phase Difference
2-pulse
W/out direction W/direction 1X 2X 4X
CR2213 OFF ON OFF ON OFF ON
CR2214 OFF OFF ON ON OFF OFF
CR2215 OFF OFF OFF OFF ON ON

Important
Do not set to combinations other than those described in the above tables.

5-8
5-1 High-speed Counters

(1) Single-phase
Set this when counting single-phase pulses.
W/out direction . . . .The up edge of the A phase is counted.
The B phase does not influence counter operation. (The B phase can be used
as regular input.)
W/ direction . . . . . . The count is incremented at the up edge of the A phase when the B phase is OFF.
The count is decremented at the up edge of the A phase when the B phase is ON.

W/out direction W/ direction


(A phase) R00010
ON
(A phase) R00010
ON
5
OFF OFF

HIGH-SPEED COUNTERS
ON ON
(B phase) R00012 (B phase) R00012
OFF OFF

(counter value) CTH0 (counter value) CTH0


0 1 2 3 4 5 6 0 1 2 3 2 1 0

(2) Phase difference


Set this when counting the phase difference.
1X. . . . . . . . . . . . . . The count is incremented at the up edge of the A phase when the B phase is OFF.
The count is decremented at the down edge of the A phase when the B
phase is OFF.
ON
(A phase)
R00010 OFF
ON
(B phase)
R00012 OFF

(counter value)
CTH0
0 1 2 3 4 3 2 1 0

2X. . . . . . . . . . . . . . The count is incremented at the up edge of the A phase when the B phase is OFF.
The count is decremented at the down edge of the A phase when the B phase is OFF.
The count is decremented at the up edge of the A phase when the B phase is ON.
The count is incremented at the down edge of the A phase when the B phase is ON.
ON
(A phase)
R00010 OFF
ON
(B phase)
R00012 OFF

(counter value)
CTH0
0 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 0

5-9
5-1 High-speed Counters

4X. . . . . . . . . . . . . . The count is incremented at the up edge of the A phase when the B phase is OFF.
The count is decremented at the down edge of the A phase when the B phase is OFF.
The count is decremented at the up edge of the A phase when the B phase is ON.
The count is incremented at the down edge of the A phase when the B phase is ON.
The count is decremented at the up edge of the B phase when the A phase is OFF.
The count is incremented at the down edge of the B phase when the A phase is OFF.
The count is incremented at the up edge of the B phase when the A phase is ON.
The count is decremented at the down edge of the B phase when the A phase is ON.

5 (A phase)
R00010
ON

OFF
HIGH-SPEED COUNTERS

ON
(B phase)
R00012 OFF

(counter value)
CTH0

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 15 14 13 12 1110 9 8 7 6 5 4 3 2 1 0

(3) 2-pulse
The pulse that is input by the 2-pulse method is counted.
The pulse is incremented at the up edge of the A phase, and decremented at the up edge of the B
phase.
ON
(A phase)
R00010 OFF
ON
(B phase)
R00012 OFF

(counter value)
CTH0
0 1 2 3 4 3 2 1 0

■ Setting internal clock input


When counting the internal clock, specify the following control relays to the operand.
1.0 µs 10.0 µs 100.0 µs
CTH0 CR2100 CR2101 CR2102
CTH1 CR2200 CR2201 CR2202

The A and B phases can be used as regular input. (Counter operation is not influenced.)

Example
The internal clock (1.0 µs) CTH0
is counted by high-speed CR2100

counter CTH0.

5-10
5-1 High-speed Counters

■ Setting direct clock pulse input


When counting the direct clock pulse, specify the following control relays to the operand.
Comparator Match Output
CTH0 R00501
CTH1 R00500

KV-1000 Instruction Reference Manual "MEMSW Instruction"

Example
The direct clock pulse
output from R00501 is CTH0

counted by high-speed
R00501
5
counter CTH0.

HIGH-SPEED COUNTERS
The direct clock pulse output
CTH1
from R00500 is counted by R00500
high-speed counter CTH1.

Note
• Also enter to the operand of the CTH instruction on R00501 when comparator
match output of CTH1 is set to R00505 by MEMSW2.
• Also enter to the operand of the CTH instruction on R00500 when comparator
match output of CTH0 is set to R00504 by MEMSW2.

Tip The specified frequency pulse output from R00501 (R00505) can be counted by high-speed
counter CTH0.
"6-2 Frequency Counter Instructions 'PLSOUT Instruction'" page 6-10

5-11
5-1 High-speed Counters

About Current Value and Setting Value of High-speed Counters

■ Current value (CTH) of high-speed counters


The current values of the high-speed counters are stored to CTH0 and CTH1, respectively.
Values are held when there is a power interruption or the mode is switched from the Run to the
Prog mode.
To reset the value when turning the power ON, or when switching the mode from the Prog to the
Run mode, set by the MEMSW instruction.
5 To reset the value while the programming is running,
For details on the MEMSW instruction,
"Reset Method" page 5-16
KV-1000 Instruction Reference Manual, "MEMSW Instruction"
HIGH-SPEED COUNTERS

■ Setting value (CTC) of high-speed counters


Set the setting value of the high-speed counters on high-speed counter comparators CTC0 to
CTC3.
Judgment of matches with CTH0 is performed by CTC0 and CTC1.
Judgment of matches with CTH1 is performed by CTC2 and CTC3.
If a CTC matches a CTH when there is no CTC-driven interrupt program, the CTC contact turns
ON.
Turn the CTC contact OFF by the RES instruction, for example. The CTC contact does not turn
ON if there is a CTC-driven interrupt program.
Sign Setting Range High-speed Counter Comparator
OFF 0 to 4294967295
CTH0 CM01608 bit7 CTC0 CTC1
ON -2147483648 to +2147483647
OFF 0 to 4294967295
CTH1 CM01609 bit7 CTC2 CTC3
ON -2147483648 to +2147483647

Example
The values of CTC0 and CTC1 CTH0
R00010
are set to 100 and 100000,
respectively. #00100
CTC 0

#100000
CTC 1
CTC 0

CTC 1

Note
The CTC contact does not turn ON when the current value is rewritten with the same
value as the CTC. The CTC contact turns ON when it becomes equal to the CTC after
a countup or countdown.

5-12
5-1 High-speed Counters

■ Reading/changing current values, changing setting values


(1) Reading current values
The current value is read by the LDA instruction or MOV instruction.
KV-1000 Instruction Reference Manual "LDA Instruction" and "MOV Instruction"

When the current value is unsigned 0 to 4294967295 (unsigned value indicated by ".D" suffix)

Example
The current value of CTH0 is
CTH0 DM00000
stored to data memories
[DM00000 • DM00001].
LDA.D STA.D
5

HIGH-SPEED COUNTERS
MOV.D
CTH0 DM00000

When the current value is signed -2147483648 to +2147483647 (signed value indicated by ".L" suffix)

Example
The current value of CTH0 is
CTH0 DM00000
stored to data memories LDA.L STA.L
[DM00000 • DM00001].
MOV.L
CTH0 DM00000

(2) Changing the current value (CTH)


The current value is changed by the MOV instruction or DW instruction.
KV-1000 Instruction Reference Manual "MOV Instruction" and "DW Instruction"

When the current value is unsigned 0 to 4294967295 (unsigned value indicated by ".D" suffix)

Example
The current value of CTH0
MOV.D
is changed to 100000. #100000 CTH0

#100000
DW.D
CTH0

When the current value is signed -2147483648 to +2147483647 (signed value indicated by ".L" suffix)

Example
The current value of CTH0 is
MOV.L
stored to -100000. -100000 CTH0

-100000
DW.L
CTH0

5-13
5-1 High-speed Counters

Note
When "ON" is specified in the "Automatic reset by comparator match" setting, do not
change the current value (CTH) to the value of the setting value (CTC) or greater. The
current value (CTH) becomes "the value of CTC -1".
"Automatic reset by comparator match" page 5-17

(3) Changing the setting value (CTC)


The setting value is changed by the STA, MOV or DW instructions.
5 KV-1000 Instruction Reference Manual "STA Instruction, "MOV Instruction" and "DW Instruction"

When the current value is unsigned 0 to 4294967295 (unsigned value indicated by ".D" suffix)
HIGH-SPEED COUNTERS

Example
The value of CTC0 #100000 CTC0
LDA.D STA.D
is changed to 100000.

MOV.D
#100000 CTC0

#100000
DW.D
CTC0

When the setting value is signed -2147483648 to +2147483647 (signed value indicated by ".L" suffix)

Example -100000 CTC0


The current value of CTC0 is
LDA.L STA.L
changed to -100000.

MOV.L
-100000 CTC0

-100000
DW.L
CTC0

Note
When "ON" is specified in the "Automatic reset by comparator match" setting, do not
change the setting value (CTC) to the value of the current value (CTH) or greater. The
current value (CTH) becomes "the value of CTC -1".

5-14
5-1 High-speed Counters

■ Reading the current value direction of change, setting the direction of


change detection time constant
(1) Reading the current value (CTH) direction of change
Indicate the current value (CTH) direction of change.
Description Decrease Side Increase Side
CR2412 (CTH0) Indicates the direction of change of CTH0. ON OFF
CR2413 (CTH1) Indicates the direction of change of CTH1. ON OFF

Note
• The direction of change (CR2412, CR2413) is updated every scan. The direction of 5
change before completion is held also after completion of operation.

HIGH-SPEED COUNTERS
• It takes at most "direction of change detection time constant +1 scan" to update the
direction of change.

(2) Setting the current value (CTH) direction of change detection time constant
The direction of change detection time constant is set by the MOV instruction or DW instruction.
KV-1000 Instruction Reference Manual "MOV Instruction"

Setting value Direction of Change Detection Time Constant


0 (default) Filter OFF
1 100 µs
2 500 µs
CM01594 (CTH0) 3 1 ms
CM01595 (CTH1) 4 2.5 ms
5 5 ms
6 10 ms
7 50 ms
It takes at most "direction of change detection time constant +1 scan" to update the direction of
change (CR2412, CR2413).

When 100 µs is set

Example
The direction of change
MOV
detection time constant #00001 CM01594
of CTH0 is set to 100 µs.
#00001
DW
CM01594

5-15
5-1 High-speed Counters

Reset Method

Clearing the current value of a high-speed counter is called a "reset."


There are five reset methods:
Reset by RES instruction
Reset by CTH instruction (execution condition OFF)
Automatic reset by comparator match
Reset by external preset input
5 Reset by counter enable function

Note
HIGH-SPEED COUNTERS

The table below summarizes the reset timing by each reset method.
Reset Method Reset Timing
Reset by RES instruction When the RES instruction is executed
Reset by CTH instruction (execution condition OFF) When the CTH instruction is executed
Automatic reset by comparator match When the comparator makes a match
Reset by external preset input When the external preset input turns ON
Use of internal enable relay
Use of combination of internal When the state of the enable signal
Reset by counter
enable relay changes from disabled to enabled, and
enable function
and external enable input vice versa
Use of external enable input

■ Reset by RES instruction


The counter is reset by "RES CTH." The counter is reset at the moment that the RES instruction is
executed.
Scan

CTH current value

Execution of "RES CTH"

Example
Reset by RES instruction CTH0
RES

5-16
5-1 High-speed Counters

■ Reset by CTH instruction (execution condition OFF)


The counter is reset by turning the CTH instruction execution condition OFF.
Scan

Execution condition

CTH current value

HIGH-SPEED COUNTERS
Execution of CTH instruction

Example
Reset by CTH instruction
Execution condition CTH0
(execution condition OFF) R00010

The current value is


reset when turned OFF.

■ Automatic reset by comparator match


The current value is automatically reset when the setting value of the comparator (CTC) matches
the current value (CTH) during a countup or countdown.
This reset is set in control relays.
High-speed High-speed Counter Device
Operation ON OFF
Counter Comparator No.
CTC0 CR2103 Automatic reset when CTH0 = CTC0 ON OFF
CTH0
CTC1 CR2112 Automatic reset when CTH0 = CTC1 ON OFF
CTC2 CR2203 Automatic reset when CTH1 = CTC2 ON OFF
CTH1
CTC3 CR2212 Automatic reset when CTH1 = CTC3 ON OFF

Scan

CTH

CTH = CTC
* Counter is reset when CTH = CTC.

Example Automatic reset by


CR2008 CR2103 CR2203
comparator match SET SET

Note
The current value is changed to "the value of CTC -1" even if automatic reset is
specified to "ON" and the current value is changed to the value of CTC or greater.
When "automatic reset" is specified, the current value does not becomes the value of
CTC or greater.

5-17
5-1 High-speed Counters

■ Reset by external preset input


The counter is reset using the preset function.
The preset value is set to "0" and executes a preset.
"Preset Function" page 5-19

External preset
input

CTH

5 * The counter is reset when the external preset input turns ON.
HIGH-SPEED COUNTERS

■ Reset by counter enable function


The counter is reset when the counter enable signal changes state from disabled to enabled and
vice versa.
Enable/disable of the counter enable signal is set by a combination of the external enable input
and internal enable relay.
"Counter Enable Function" page 5-21

State changed from disabled to enabled

Count input
Enabled
Enable
Disabled

CTH

State changed from enabled to disabled

Count input
Enabled
Enable
Disabled

CTH

Example
Set to reset
CR2008 CM01608 CM01608
(enabled to disabled) BSET BSET
counter enable function #004 #005

5-18
5-1 High-speed Counters

Preset Function

This function changes the current value of a high-speed counter to a preset value. The current
value is changed according to an external input.

Count input Add


Subtract

Preset signal
5

HIGH-SPEED COUNTERS
A
Count value

Preset value

Linear Counters Ring Counters


Unsigned Signed Unsigned Signed
Upper limit value Upper limit value
A 4294967295 +2147483647
(0 to 4294967295) (-2147483648 to + 2147483647)
Lower limit value Lower limit value
B 0 -2147483648
(0 to 4294967295) (-2147483648 to +2147483647)

The following describes the basic concept of the preset function and how to set the preset signal.

Conceptual overview of the preset function

Preset enable/inhibit
CR2408 (CR2409)
Execution of preset

External preset input bit8 of CM01608 CR2400,CR2401


R00014 (R00015) (bit8 of CM01609) (CR2404,CR2405)

■ Setting the external preset input and preset value store destination
Preset Value Store Destination
External Preset Input
Upper Lower
CTH0 R00014 CM01605 CM01604
CTH1 R00015 CM01607 CM01606

■ Setting external preset input enable


Device No. Enabled Disabled
CTH0 CR2408 OFF ON
CTH1 CR2409 OFF ON

5-19
5-1 High-speed Counters

■ Setting external preset input


R00014
CM01608
Input CR2400 CR2401 Preset Timing
bit8
Polarity
OFF OFF Unused
Up edge of R00014
ON OFF
input signal
Normally
open OFF Down edge of R00014
OFF ON
contact input signal
For duration that
ON ON R00014 input signal is
5 CTH0
ON
OFF OFF Unused
HIGH-SPEED COUNTERS

Down edge of R00014


ON OFF
input signal
Normally
closed ON Up edge of R00014
OFF ON
contact input signal
For duration that
ON ON R00014 input signal is
OFF

R00015
CM01609
Input CR2404 CR2405 Preset Timing
bit8
Polarity
OFF OFF Unused
Up edge of R00015
ON OFF
input signal
Normally
open OFF Down edge of R00015
OFF ON
contact input signal
For duration that
ON ON R00015 input signal is
ON
CTH1
OFF OFF Unused
Down edge of R00015
ON OFF
input signal
Normally
closed ON Up edge of R00015
OFF ON
contact input signal
For duration that
ON ON R00015 input signal is
OFF

5-20
5-1 High-speed Counters

Counter Enable Function

Count input enable/disable can be controlled by using the counter enable function.
Count input enable/disable is controlled by a combination of external enable inputs (R00008,
R00009) and internal enable relays (CR2410, CR2411).
The current value can also be reset when the state of the count enable signal changes from
disabled to enabled and vice versa.

Count input Add

Subtract
5

HIGH-SPEED COUNTERS
Enabled
Enable signals
Disabled

When a reset is not applied


A

Count value

Preset value 0

State changed from disabled to enabled


A
Count value

Preset value 0

State changed from enabled to disabled


A

Count value

Preset value 0

Linear Counters Ring Counters


Unsigned Signed Unsigned Signed
Upper limit value Upper limit value
A 4294967295 +2147483647
(0 to 4294967295) (-2147483648 to + 2147483647)
Lower limit value Lower limit value
B 0 -2147483648
(0 to 4294967295) (-2147483648 to +2147483647)

The following describes how to set the enable signal.

5-21
5-1 High-speed Counters

Example
CTH0 is set to preset enabled at the up edge of R01000 after the initial setting. (The
high-speed counter is reset.)
CTH0 is set to preset disabled at the up edge of R01001. (The high-speed counter is
reset.)
CTH0 is reset at the down edge of R00014. (R00014 is normally closed contact input.)

Preset at the up edge of CR2400,


CR2008 CR2400 CR2401 CM01608 #00000 CM01604 CR2401: R00014
SET RES BSET LDA.D STA.D CM01608 8bit ON: R00014 normally
ON for 1 scan
5 R01000
#00008

CR2408
closed contact input
CM01604: Preset value = 0
Preset enabled by R01000 turning


RES
HIGH-SPEED COUNTERS

ON

R01001 CR2408


SET Preset disabled by R01001 turning


ON

■ External enable input


External Enable Input Relay Input Polarity Enabled Disabled
OFF Normally open contact ON OFF
CTH0 R00008 CM01608 bit9
ON Normally closed contact OFF ON
OFF Normally open contact ON OFF
CTH1 R00009 CM01609 bit9
ON Normally closed contact OFF ON

■ Internal enable relay


Internal Enable Relay Enabled Disabled
CTH0 CR2410 ON OFF
CTH1 CR2411 ON OFF

■ Enable signals
Enable signals are set by a combination of external enable inputs and internal enable relays.
Combination Settings
Explanation
bit2 bit1 bit0
OFF OFF OFF
OFF ON OFF Enabled at all times (Count is performed at all times
regardless of external enable input and internal enable relay
ON OFF OFF enable/disable.)
ON ON OFF
CM01608 (CTH0) OFF OFF ON Count is performed when internal enable relay is enabled.
CM01609 (CTH1) OFF ON ON Count is performed when external enable input is enabled.
Count is performed when the internal enable relay and
ON OFF ON
external enable input are enabled.
Count is performed when the internal enable relay or external
ON ON ON
enable input is enabled.

■ Setting reset of the current value at change in state between enabled and disabled
bit5 bit4 Operation
OFF OFF
Reset is not performed.
CM01608 (CTH0) OFF ON
CM01609 (CTH1) ON OFF The current value is reset when the state changes from disabled to enabled.
ON ON The current value is reset when the state changes from enabled to disabled.

5-22
5-1 High-speed Counters

Comparator Match Output

This function is for turning the output relays ON/OFF when the value (setting value) of the
comparator matches the current value. This reset is set in control relays. Comparator match
output is not influenced by the scan time.
Comp Match Details of Control
Selection of Output
Comparator Out Enbl/ Device Control
Relay Device No. Action at CTC ON
Dsbl ON OFF
CR2105 Output is turned OFF. ON OFF
CTC0
CR2104
OFF: enabled
CR2106 Output is turned ON. ON OFF 5
ON: disabled ON/OFF of output is
MEMSW2 bit0 CR2107 ON OFF

HIGH-SPEED COUNTERS
inverted.
CTH0 OFF: R00500
ON: R00504 CR2109 Output is turned OFF. ON OFF
CR2108
CR2110 Output is turned ON. ON OFF
CTC1 OFF: Enabled
ON: disabled ON/OFF of output is
CR2111 ON OFF
inverted.

Comp Match Details of Control


Selection of Output
Comparator Out Enbl/ Device Control
Relay Device No. Action at CTC ON
Dsbl ON OFF
CR2205 Output is turned OFF. ON OFF
CR2204
CR2206 Output is turned ON. ON OFF
CTC2 OFF: enabled
ON: disabled ON/OFF of output is
MEMSW2 bit1 CR2207 ON OFF
inverted.
CTH1 OFF: R00501
ON: R00505 CR2209 Output is turned OFF. ON OFF
CR2208
CR2210 Output is turned ON. ON OFF
CTC3 OFF: Enabled
ON: disabled ON/OFF of output is
CR2211 ON OFF
inverted.

Conceptual Overview
When MEMSW2 bit0 is OFF When MEMSW2 bit0 is ON
CTC0:CR2104
CTC1:CR2108 I/O connector I/O connector
R00500 R00500
Pin No.16 Pin No.16
CTC0:CR2104
CTC1:CR2108

CTH0 CTH0
·Comparator R00504 ·Comparator R00504
match Output Pin No.18 match Output Pin No.18

When MEMSW2 bit1 is OFF When MEMSW2 bit1 is ON


CTC2:CR2204
CTC3:CR2208 I/O connector I/O connector
R00501 R00501
Pin No.36 Pin No.36
CTC2:CR2204
CTC3:CR2208

CTH1 CTH1
·Comparator R00505 ·Comparator R00505
match Output Pin No.38 match Output Pin No.38

5-23
5-1 High-speed Counters

Note
• When comparator match output is enabled (CTC0: CR2104 OFF/CTC1: CR2108
OFF), the outputs of pin No.16 and No.18, or No.36 and No.38 cannot be controlled
by the SET and RES instructions.
• The frequencies that can be output by R00501 and R00505 differ from those that
can be output by R00500 and R00504.
"Output specifications" page 1-14

5 Example
Setting for outputting output relay CR2008 CR2104
RES
CR2106
SET
R00500 without being influenced
HIGH-SPEED COUNTERS

by the scan time when CTC0 CTH0


RES
turns On
CR2002 CTH0
R00010

#100000
CTC 0

Tip Direct clock pulse output can be achieved by using the comparator match output function.
"5-3 Direct Clock Pulse Output" page 5-30

Interrupts from High-speed Counter Comparators

The INT instruction can be used to achieve an interrupt program when the setting value of high-
speed counter comparator CTC matches the current value of high-speed counter CTH.
For details, "Chapter 4 INTERRUPTS"

Acquiring the Current Value by Input Capture

The "input capture function" is for acquiring to the control memory the current value of a high-
speed counter when an interrupt cause is generated. Input capture functions when the interrupt
cause is an external input. No special settings are required for using this function.
Acquired values are stored to control memories CM01610 to CM01617.
"4-3 Input Capture" page 4-12

High-speed Counter for Acquiring Storage Destination


Interrupt Cause (external input)
Current Value Upper Lower
When INT R00000 is generated CTH0 CM01611 CM01610
When INT R00001 is generated CTH0 CM01613 CM01612
When INT R00002 is generated CTH1 CM01615 CM01614
When INT R00003 is generated CTH1 CM01617 CM01616

5-24
5-1 High-speed Counters

Extended functions

High-speed counters have the following four extended functions in addition to the regular high-
speed counter functions. These extended functions make full use of the high-speed counter
functions.

• Frequency measurement function


This function measures the frequency of external pulse inputs.
"Chapter 6 FREQUENCY COUNTERS" 5

HIGH-SPEED COUNTERS
• Speed of rotation measurement function
This function measures the speed of rotation of external pulse inputs.
"Chapter 6 FREQUENCY COUNTERS"

• Specified frequency pulse output function


This function sets any frequency and outputs this as a pulse.
"Chapter 6 FREQUENCY COUNTERS"

• Cam switch (incremental) function


This function performs cam control on a PLC using an incremental type encoder.
"Chapter 7 CAM SWITCHES"

Restrictions Applied to Combined Use of Extended Functions

Though extended functions can be used in combination, some combinations are not possible.
The following table summarizes the restrictions applied to combinations of extended functions.
High-spd Cntr Func Freq Meas Spd of Rot Spec Freq Cam Sw Func (inc)
CTH0 CTH1 Func Meas Func Pls Out Func CTH0 CTH1
High-spd CTH0 O X X O X O
Cntr Func CTH1 O O O X O X
Freq Meas Func X O X O X O
Spd of Rot Meas Func X O X O X O
Spec Freq Pls Out Func O X O O O X
Cam Sw CTH0 X O X X O O
Func (inc) CTH1 O X O O X O

5-25
5-2 List of Devices for High-speed Counters

Control Relays for CTH0

Device Attribute
R: read-only Description ON OFF
No. Space: R/W
CR2100 R Internal clock (1.0 µs) – –
CR2101 R Internal clock (10.0 µs) – –
CR2102 R Internal clock (100.0 µs) – –
CR2103 When CTC0 is ON, CTH0 automatically reset ON OFF
5 CR2104
CR2105
When CTC0 is ON, comparator match output (R00500/R00504) disabled
When CTC0 is ON, comparator match output (R00500/R00504) OFF
ON
ON
OFF
OFF
CR2106 When CTC0 is ON, comparator match output (R00500/R00504) ON ON OFF
HIGH-SPEED COUNTERS

CR2107 When CTC0 is ON, comparator match output (R00500/R00504) ON/OFF inverted ON OFF
CR2108 When CTC1 is ON, comparator match output (R00500/R00504) disabled ON OFF
CR2109 When CTC1 is ON, comparator match output (R00500/R00504) OFF ON OFF
CR2110 When CTC1 is ON, comparator match output (R00500/R00504) ON ON OFF
CR2111 When CTC1 is ON, comparator match output (R00500/R00504) ON/OFF inverted ON OFF
CR2112 When CTC1 is ON, CTH0 automatically reset ON OFF

Device Attribute Single-phase


Single-phase
R: read-only Description w/out 1X 2X 4X 2-pulse
No. Space: R/W direction
w/ direction

CR2113 OFF ON OFF ON OFF ON


Setting of external
CR2114 OFF OFF ON ON OFF OFF
input method
CR2115 OFF OFF OFF OFF ON ON

Device Attribute Up Down


R: read-only Description Disabled Level
No. Space: R/W Edge Edge
CR2400 OFF ON OFF ON
Setting of external preset input
CR2401 OFF OFF ON ON

Device Attribute
R: read-only Description ON OFF
No. Space: R/W
CR2402 Selection of count method Ring Linear
Not
CR2403 Detection of overflow Detected
detected
CR2408 Disabling of preset processing ON OFF
CR2410 Enabling of internal enable relay and count input ON OFF
Decrease Increase
CR2412 R Change of direction of current value
side side
Tip The defaults for CR2104 and CR2108 are ON. Otherwise, these devices are OFF.

Note
• R00500 and R00504 are switched by MEMSW 2(bit0).
KV-1000 Instruction Reference Manual "MEMSW Instruction"
• Pay attention when switching R00500 (100 kHz) and R00504 (10 kHz) as their output
frequency specifications differ.
"Output specifications" page 1-14
• Turn control relays ON by the SET instruction and OFF by the RES instruction.

5-26
5-2 List of Devices for High-speed Counters

Control Memories for CTH0

Attribute
Device No. R: read-only Description
Space: R/W
Setting of direction of change detection time constant

CM01594 Setting value #00000 #00001 #00002 #00003 #00004 #00005 #00006 #00007
Direction of change Filter
100 µs 500 µs 1 ms 2.5 ms 5 ms 10 ms 50 ms
detection time constant OFF
CM01596 Ring counter lower limit value (lower)
CM01597
CM01600
Ring counter lower limit value (upper)
Ring counter upper limit value (lower)
5
CM01601 Ring counter upper limit value (upper)

HIGH-SPEED COUNTERS
CM01604 Preset value (lower)
CM01605 Preset value (upper)

Attribute
Device No. R: read-only Description
Space: R/W

Set by a combination of external enable inputs and internal enable relays

bit0 bit2 bit1 bit0 Explanation


OFF OFF OFF
OFF ON OFF Enabled at all times (Count is performed at all times
regardless of external enable input and internal enable relay
ON OFF OFF enable/disable.)
ON ON OFF
bit1 OFF OFF ON Count is performed when internal enable relay is enabled.
OFF ON ON Count is performed when external enable input is enabled.
Count is performed when the internal enable relay and
ON OFF ON
external enable input are enabled.
Count is performed when the internal enable relay or
bit2 ON ON ON
external enable input is enabled.

bit3 Reserved for system


Setting of current value reset method by counter enable function
CM01608
bit4 bit5 bit4 Explanation
OFF OFF
Reset is not performed.
OFF ON
The current value is reset when the state changes from
ON OFF
disabled to enabled.
bit5
The current value is reset when the state changes from
ON ON
enabled to disabled.

bit6 Reserved for system


bit7 Setting of count input signed/unsigned ON: Signed OFF: Unsigned
ON: Normally closed contact
bit8 Setting of external preset input polarity
OFF: Normally open contact
ON: Normally closed contact
bit9 Setting of external enable input polarity
OFF: Normally open contact
bit10
to Reserved for system
bit15

5-27
5-2 List of Devices for High-speed Counters

Control Relays for CTH1

Device Attribute
R: read-only Description ON OFF
No. Space: R/W
CR2200 R Internal clock (1.0 µs) – –
CR2201 R Internal clock (10.0 µs) – –
CR2202 R Internal clock (100.0 µs) – –
CR2203 When CTC2 is ON, CTH1 automatically reset ON OFF
CR2204 When CTC2 is ON, comparator match output (R00501/R00505) disabled ON OFF
5 CR2205
CR2206
When CTC2 is ON, comparator match output (R00501/R00505) OFF
When CTC2 is ON, comparator match output (R00501/R00505) ON
ON
ON
OFF
OFF
CR2207 When CTC2 is ON, comparator match output (R00501/R00505) ON/OFF inverted ON OFF
HIGH-SPEED COUNTERS

CR2208 When CTC3 is ON, comparator match output (R00501/R00505) disabled ON OFF
CR2209 When CTC3 is ON, comparator match output (R00501/R00505) OFF ON OFF
CR2210 When CTC3 is ON, comparator match output (R00501/R00505) ON ON OFF
CR2211 When CTC3 is ON, comparator match output (R00501/R00505) ON/OFF inverted ON OFF
CR2212 When CTC3 is ON, CTH1 automatically reset ON OFF

Device Attribute Single-phase


Single-phase
R: read-only Description w/out 1X 2X 4X 2-pulse
No. Space: R/W direction
w/ direction

CR2213 OFF ON OFF ON OFF ON


Setting of external
CR2214 OFF OFF ON ON OFF OFF
input method
CR2215 OFF OFF OFF OFF ON ON

Device Attribute Up Down


R: read-only Description Disabled Level
No. Space: R/W Edge Edge
CR2404 OFF ON OFF ON
Setting of external preset input
CR2405 OFF OFF ON ON

Device Attribute
R: read-only Description ON OFF
No. Space: R/W
CR2406 Selection of count method Ring Linear
Not
CR2407 Detection of overflow Detected
detected
CR2409 Disabling of preset processing ON OFF
CR2411 Enabling of internal enable relay and count input ON OFF
Decrease Increase
CR2413 R Change of direction of current value
side side
Tip The defaults for CR2204 and CR2208 are ON. Otherwise, these devices are OFF.

Note
• R00501 and R00505 are switched by MEMSW 2(bit1).
KV-1000 Instruction Reference Manual "MEMSW Instruction"
• Pay attention when switching R00501 (100 kHz) and R00505 (10 kHz) as their output
frequency specifications differ.
"Output specifications" page 1-14
• Turn control relays ON by the SET instruction and OFF by the RES instruction.

5-28
5-2 List of Devices for High-speed Counters

Control Memories for CTH1

Attribute
Device No. R: read-only Description
Space: R/W
Setting of direction of change detection time constant
Setting value #00000 #00001 #00002 #00003 #00004 #00005 #00006 #00007
CM01595
Direction of change Filter
100 µs 500 µs 1 ms 2.5 ms 5 ms 10 ms 50 ms
detection time constant OFF

CM01598 Ring counter lower limit value (lower)


CM01599
CM01602
Ring counter lower limit value (upper)
Ring counter upper limit value (lower)
5
CM01603 Ring counter upper limit value (upper)

HIGH-SPEED COUNTERS
CM01606 Preset value (lower)
CM01607 Preset value (upper)

Attribute
Device No. R: read-only Description
Space: R/W

Set by a combination of external enable inputs and internal enable relays

bit0 bit2 bit1 bit0 Explanation


OFF OFF OFF
OFF ON OFF Enabled at all times (Count is performed at all times
regardless of external enable input and internal enable relay
ON OFF OFF enable/disable.)
ON ON OFF
bit1 OFF OFF ON Count is performed when internal enable relay is enabled.
OFF ON ON Count is performed when external enable input is enabled.
Count is performed when the internal enable relay and
ON OFF ON
external enable input are enabled.
Count is performed when the internal enable relay or
bit2 ON ON ON
external enable input is enabled.

bit3 Reserved for system


Setting of current value reset method by counter enable function
CM01609
bit4 bit5 bit4 Explanation
OFF OFF
Reset is not performed.
OFF ON
The current value is reset when the state changes from
ON OFF
disabled to enabled.
bit5 The current value is reset when the state changes from
ON ON
enabled to disabled.

bit6 Reserved for system


bit7 Setting of count input signed/unsigned ON: Signed OFF: Unsigned
ON: Normally closed contact
bit8 Setting of external preset input polarity
OFF: Normally open contact
ON: Normally closed contact
bit9 Setting of external enable input polarity
OFF: Normally open contact
bit10
to Reserved for system
bit15

5-29
5-3 Direct Clock Pulse Output
This section describes an outline of direct clock pulse output and how to set direct clock pulse
output.

Outline of Direct Clock Pulse Output

High-speed counters (CTH) and high-speed counter comparators (CTC) can be used to output a
clock pulse not affected directly to output relays R00500 (R00504) or R00501 (R00505) without
being affected by the scan time.
5 The pulse cycle (frequency) and pulse width is set by the high-speed counter comparator (CTC)
and the cycle of the internal clock for the high-speed counter (CTH).
HIGH-SPEED COUNTERS

The cycle (frequency) of the lock pulse that can be set can be changed as desired within the
following ranges by the program.
Output* Internal Clock Pulse Cycle (frequency) Range
CR2100 (1.0 µs) 10 µs (100 kHz) to 4294967.295 ms
R00500
CR2101 (10.0 µs) 20 µs (50 kHz) to 42949672.95 ms
(R00504)
CR2102 (100.0 µs) 200 µs (5 kHz) to 429496729.5 ms
CR2200 (1.0 µs) 10 µs (100 kHz) to 4294967.295 ms
R00501
CR2201 (10.0 µs) 20 µs (50 kHz) to 42949672.95 ms
(R00505)
CR2202 (100.0 µs) 200 µs (5 kHz) to 429496729.5 ms

* Set the output destination by the MEMSW instruction.


KV-1000 Instruction Reference Manual "MEMSW Instruction"

For the pulse output, the internal clock pulse is counted by the high-speed counter (CTH). Each
time that the current value becomes equal to the setting value of the high-speed counter
comparator (CTC), the ON/OFF state of output relays R00500 (R00504) and R00501 (R00505) is
changed to generate a pulse.
Count value
CTC

ON ON

Note
• The ON/OFF state of output relay R00500 (R00504) and R00501 (R00505) is
determined by the setting of the control relays.
• For details on control relay settings, see "Outline of High-speed Counters" page 5-2.
• Output at start of direct clock pulse output always starts from an OFF state.
• During direct clock pulse output, output relays R00500 (R00504) and R00501
(R00505) cannot be used by the regular program.
• The frequencies that can be output by R00501 and R00505 differ from those that
can be output by R00500 and R00504. Set the output destination to match the
frequency.
"Output specifications" page 1-14

5-30
5-3 Direct Clock Pulse Output

Setting Pulse Output by High-speed Counter Comparator

Changing the pulse cycle/pulse width

By using two high-speed comparators, you can change just the pulse width with the pulse cycle
fixed, or vice versa.
The following shows how the pulse cycle and the pulse width change by the high-speed
comparator.
5
■ Pulse with 1:1 ON/OFF ratio

HIGH-SPEED COUNTERS
Pulse ON/OFF is set by special
auxiliary relays.
ON

OFF
Pulse width

Pulse cycle

Pulse width (µs) = Setting value of CTC0 x internal clock cycle (µs)
Pulse cycle (µs) = Setting value of CTC0 x 2 x internal clock cycle (µs)

The calculation is as follows to find the pulse cycle from the frequency:
Pulse cycle (µs) = 1000000/frequency (Hz)

(Example)To output a pulse of 10 kHz


Pulse cycle = 1000000/10000 = 100 µs
CTC0 setting value = 100/2/1 = 50

■ Variable width pulse


When the setting values of CTC0 and CTC1 are made variable, the pulse cycle and pulse width
can be varied.
Pulse ON/OFF is set by special
auxiliary relays.
ON

OFF
Pulse width

Pulse cycle

Pulse width (µs) = Setting value of CTC1 x internal clock cycle (µs)
Pulse cycle (µs) = Setting value of CTC0 x internal clock cycle (µs)

• When the setting value of CTC1 is made variable, the pulse width can be varied.
• When the setting value of CTC0 is made variable, the pulse cycle can be varied.

Note
The pulse width determined by the above calculation becomes the pulse width that is
output internally on the KV-1000.
In actual fact, the pulse width fluctuates due to the response delay and influence of
the connected load as it passes through the output circuit to be output. Be sure to set
the pulse width in advance after observing the actual output waveform on an
oscilloscope, for example. (A pulse of variable width is used.)

5-31
5-3 Direct Clock Pulse Output

How to calculate the pulse cycle and comparator setting values

The maximum frequency of the clock pulse that can be output by the KV-1000 is roughly 100 kHz.
Calculate the pulse cycle when the clock pulse is output and the setting values of the high-speed
counter comparator by the following equations.

■ Pulse cycle
Pulse cycle (µs) = 1000000/frequency (Hz)

5 ■ Pulse of ON/OFF ratio 1:1 (when one comparator is used)


HIGH-SPEED COUNTERS

ON

OFF
Pulse width

Pulse cycle

CTC setting value = pulse cycle (µs)/internal clock (µs)/2

■ Variable width pulse


ON

OFF
Pulse width

Pulse cycle

CTC setting value for pulse width = pulse width (µs)/internal clock (µs)
CTC setting value for pulse cycle = pulse cycle (µs)/internal clock (µs)

■ Setting range of CTC according to internal clock


Special Auxiliary Relay (internal clock) Cycle CTC Setting Range
CR2100 CR2200 1.0 µs 5 to 4294967295
CR2101 CR2201 10.0 µs 1 to 4294967295
CR2102 CR2202 100.0 µs 1 to 4294967295

Note
• When CRC2100 and CR2200 have been set to the high-speed counter (CTH)
operand, set the CTC setting value to "5" or more. When the value has been set to a
value smaller than "5", the clock pulse is not output correctly.
• The pulse width changes due to the connected load. Set the pulse width in advance
after observing the actual output waveform on an oscilloscope, for example.
• When CTC0 and CTC1, or CTC2 and CTC3 are used to generate the clock pulse, do
not set the settings of CTC0 and CTC1, or CTC2 and CTC3 to the same values.

5-32
5-3 Direct Clock Pulse Output

Operation by control relays

■ Operation by control relays for high-speed counter (CTH0)


The ON/OFF state of output relay R00500 (R00504) can be changed as follows by setting the
control relays (CR2103 to CR2112) at the start of operation or by changing these control relays
while the clock pulse is being generated.
The pulse cycle, pulse width, and enable/disable of the comparator match output can be set as
desired.
Operation of output relay R00500 (R00504) when the control relay is ON/OFF is as follows.
High-speed Counter Control
5
Operation when CTH0 (current value) = CTC (setting value)
Comparator Relay

HIGH-SPEED COUNTERS
The current value of CTH0 is
CR2103 ON: ON OFF: OFF
automatically reset.
CR2104 Control of R00500 (R00504) ON: Disabled OFF: Enabled
Comparator match output of R00500
CR2105 ON: ON OFF: OFF
CTC0 (R00504) is turned OFF.
Comparator match output of R00500
CR2106 ON: ON OFF: OFF
(R00504) is turned ON.
ON/OFF of R00500 (R00504) output is
CR2107 ON: ON OFF: OFF
inverted.
CR2108 Control of R00500 (R00504) ON: Disabled OFF: Enabled
Comparator match output of R00500
CR2109 ON: ON OFF: OFF
(R00504) is turned OFF.
Comparator match output of R00500
CR2110 ON: ON OFF: OFF
CTC1 (R00504) is turned ON.
ON/OFF of R00500 (R00504) output is
CR2111 ON: ON OFF: OFF
inverted.
The current value of CTH0 is
CR2112 ON: ON OFF: OFF
automatically reset.

● Setting of control relays


To generate a clock pulse, the control relays must be set.
Set control relays by the following method.
• Only one relay can be turned ON within each of the control relay ranges CR2104 to CR2107,
and CR2108 to CR2111.
• To set CR2103 to CR2112 ON/OFF, use the SET, RES or STA instruction.
• Enable control of R00500 (R00504) by turning CR2104 and CR2108 OFF.
• When setting the pulse cycle to variable, be sure to turn CR2103 or CR2112 ON, and set the
current value of CTH0 to automatic reset. The pulse cycle can be changed only when CR2103
or CR2112 is turned ON.
• The clock pulse can be stopped and output when CR2105 and CR2109 are turned ON/OFF.

Note
When multiple relays have been turned "ON" within each of the CR2104 or CR2107
and CR2108 to CR2111 ranges, the relay having the smallest No. is given priority.

5-33
5-3 Direct Clock Pulse Output

● Operation of output R00500 (R00504) according to the control relay setting


Pulse with 1:1 ON/OFF ratio Variable width pulse

Relay No. Setting Relay No. Setting Relay No. Setting Relay No. Setting
CR2103 ON CR2112 OFF CR2103 ON CR2112 OFF
CR2104 OFF CR2108 ON CR2104 OFF CR2108 OFF
CR2105 OFF CR2109 OFF CR2105 OFF CR2109 ON
CR2106 OFF CR2110 OFF CR2106 ON CR2110 OFF
CR2107 ON CR2111 OFF CR2107 OFF CR2111 OFF

5 Count value

CTC0
Count value

CTC0
CTC1
HIGH-SPEED COUNTERS

ON ON ON ON ON ON

■ Operation by control relays for high-speed counter (CTH1)


The ON/OFF state of output relays R00501 (R00505) can be changed as follows by setting the
control relays (CR2203 to CR2212) at the start of operation or by changing these control relays
while the clock pulse is being generated.
The pulse cycle, pulse width, and enable/disable of the comparator match output can be set as
desired.
Operation of output relay R00501 (R00505) when the control relay is ON/OFF is as follows.
High-speed Counter Control
Operation when CTH0 (current value) = CTC (setting value)
Comparator Relay
The current value of CTH1 is
CR2203 ON: ON OFF: OFF
automatically reset.
CR2204 Control of R00501 (R00505) ON: Disabled OFF: Enabled
Comparator match output of R00501
CR2205 ON: ON OFF: OFF
CTC2 (R00505) is turned OFF.
Comparator match output of R00501
CR2206 ON: ON OFF: OFF
(R00505) is turned ON.
ON/OFF of R00501 (R00505) output is
CR2207 ON: ON OFF: OFF
inverted.
CR2208 Control of R00501 (R00505) ON: Disabled OFF: Enabled
Comparator match output of R00501
CR2209 ON: ON OFF: OFF
(R00505) is turned OFF.
Comparator match output of R00501
CR2210 ON: ON OFF: OFF
CTC3 (R00505) is turned ON.
ON/OFF of R00501 (R00505) output is
CR2211 ON: ON OFF: OFF
inverted.
The current value of CTH1 is
CR2212 ON: ON OFF: OFF
automatically reset.

5-34
5-3 Direct Clock Pulse Output

● Setting of control relays


To generate a clock pulse, the control relays must be set.
Set control relays by the following method.
• Only one relay can be turned ON within each of the control relay ranges CR2204 to CR2207,
and CR2208 to CR2211.
• To set CR2203 to CR2212 ON/OFF, use the SET, RES or STA instruction.
• Enable control of R00501 (R00505) by turning CR2204 and CR2208 OFF.
• When setting the pulse cycle to variable, be sure to turn CR2203 or CR2212 ON, and set the
current value of CTH1 to automatic reset. The pulse cycle can be changed only when CR2203
or CR2212 is turned ON. 5
• The clock pulse can be stopped and output when CR2205 and CR2209 are turned ON/OFF.

HIGH-SPEED COUNTERS
Note
When multiple relays have been turned "ON" within each of the control relay CR2204
to CR2207 and CR2208 to CR2211 ranges, the relay having the smallest No. is given
priority.

● Operation of output R00501 (R00505) according to the control relay setting


Pulse with 1:1 ON/OFF ratio Variable width pulse

Relay No. Setting Relay No. Setting Relay No. Setting Relay No. Setting
CR2203 ON CR2212 OFF CR2203 ON CR2212 OFF
CR2204 OFF CR2208 ON CR2204 OFF CR2208 OFF
CR2205 OFF CR2209 OFF CR2205 OFF CR2209 ON
CR2206 OFF CR2210 OFF CR2206 ON CR2210 OFF
CR2207 ON CR2211 OFF CR2207 OFF CR2211 OFF

Count value Count value


CTC2 CTC2
CTC3

ON ON ON ON ON ON

5-35
5-3 Direct Clock Pulse Output

Example of Direct Clock Pulse Output (ON/OFF ratio 1:1)

When outputting a clock pulse of cycle 1 ms (1 kHz) from output R00500

The following describes an example of a program for outputting a clock pulse of pulse ON/OFF
ratio 1:1 from output R00500. This description uses a high-speed counter (CTH0) and a high-
speed counter comparator (CTC0).

5 ■ Setting of control relays


Set CR2103 to CR2107 as shown in the table on the right.
Relay No. Setting
HIGH-SPEED COUNTERS

For the pulse of ON/OFF ratio 1:1, the program can be simplified by CR2103 ON
using inverted input (toggle). CR2104 OFF
CR2105 OFF
CR2106 OFF
CR2107 ON

■ Internal clock and setting value of CTC0


Determine the internal clock, and find the setting value of CTC0 at that time by the following
calculation:

CTC0 setting value = pulse cycle (µs)/internal clock (µs)/2

In the above equation, substitute pulse cycle = 1


Control Relay Internal Clock CTC0 Value
ms, internal clock = 10 µs CR2100 1.0 µs 500
(CR2101) to find the setting value of CTC0. CR2101 10.0 µs 50
The setting value of CTC0 becomes "50". CR2102 100.0 µs 5

The table on the right shows the values


calculated by other internal clocks. Use this table
for reference.

■ Program example
• Set the pulse output to output R00500 accord-
00001
CR2008 CR2103 CR2104 CR2105 CR2106 CR2107 CTH0
SET RES RES RES SET RES
ing to CR2104 to 2107.
In this example, enable (CR2104: OFF) com-
CR2002 CTH0
00002 CR2101
parator match output of R00500, and set so
that output of R00500 is inverted (CR2107:
#00050
00003 CTC0 ON) each time that CTH0 = CTC0.
• Set CR2103 to ON, and specify resetting of
CTH0 according to CTC0.
Count value
This repeats the operation of clearing the cur-
CTC0 rent value of CTH0 by the value set at CTC0.
• Reset (RES CTH0 section) the current value of
CTH0 at the start of operation.
ON ON This enables correct output of the pulse width
of the clock pulse from the 1st pulse.
• The enable input relay of CTH0 is used at ON
at all times during output of the clock pulse.

5-36
5-3 Direct Clock Pulse Output

Note
When enable input of the high-speed counter is used for starting/stopping the clock
pulse, response is delayed by one scan at maximum when the clock pulse is started.

■ Hint
When controlling (enabling/disabling) output of the clock pulse by external input, perform control
by turning CR2105 ON/OFF.
To turn CR2105 ON/OFF, execute the SET, RES or KEEP instruction.
Accordingly, be sure to start the clock pulse from "OFF" and end at "OFF".
5
When either of the following programs is added to the example on the previous page, the clock

HIGH-SPEED COUNTERS
pulse is output from R00500 only when R00000 is "ON".

●When the SET/RES instruction is used ●When the KEEP instruction is used

R00000 CR2105 R00000 KEEP


SET SET
CR2105
R00000 CR2105 R00000
RES RES

5-37
5-3 Direct Clock Pulse Output

When outputting a clock pulse of cycle 1 ms (1 kHz) from output R00501

The following describes an example of a program for outputting a clock pulse of pulse ON/OFF
ratio 1:1 from output R00501. This description uses a high-speed counter (CTH1) and a high-
speed counter comparator (CTC2).

■ Setting of control relays


Set CR2203 to CR2207 as shown in the table on the right.
Relay No. Setting
For the pulse of ON/OFF ratio 1:1, the program can be simplified by
5 using inverted input (toggle).
CR2203
CR2204
ON
OFF
CR2205 OFF
HIGH-SPEED COUNTERS

CR2206 OFF
CR2207 ON

■ Internal clock and setting value of CTC2


Determine the internal clock, and find the setting value of CTC2 at that time by the following
calculation:

CTC2 setting value = pulse cycle (µs)/internal clock (µs)/2

In the above equation, substitute pulse cycle = 1


Control Relay Internal Clock CTC0 Value
ms, internal clock = 10 µs
CR2200 1.0 µs 500
(CR2201) to find the setting value of CTC2. CR2201 10.0 µs 50
The setting value of CTC2 becomes "50". CR2202 100.0 µs 5
The table on the right shows the values
calculated by other internal clocks. Use this table for reference.

■ Program example
• Set the pulse output to output R00501 accord-
1
CR2008 CR2203 CR2204 CR2205 CR2206 CR2207 CTH1
SET RES RES RES SET RES
ing to CR2204 to 2207.
In this example, enable (CR2204: OFF) com-
CR2002 CTH1
2 CR2201
parator match output of R00501, and set so
that output of R00501 is inverted (CR2207:
#00050
3 CTC2 ON) each time that CTH1 = CTC2.
• Set CR2203 to ON, and specify resetting of
Count value CTH1 according to CTC2.
This repeats the operation of clearing the cur-
CTC2 rent value of CTH1 by the value set at CTC2.
• Reset (RES CTH1 section) the current value of
CTH1 at the start of operation.
ON ON This enables correct output of the pulse width
of the clock pulse from the 1st pulse.
• The enable input relay of CTH1 is used at ON
at all times during output of the clock pulse.

Note
When enable input of the high-speed counter is used for starting/stopping the clock
pulse, response is delayed by one scan at maximum when the clock pulse is started.

5-38
5-3 Direct Clock Pulse Output

■ Hint
When controlling (enabling/disabling) output of the clock pulse by external input, perform control
by turning CR2205 ON/OFF.
To turn CR2205 ON/OFF, execute the SET, RES or KEEP instruction.
Accordingly, be sure to start the clock pulse from "OFF" and end at "OFF".
When either of the following programs is added to the example on the previous page, the clock
pulse is output from R00501 only when R00000 is "ON".

●When the SET/RES instruction is used ●When the KEEP instruction is used
R00000 CR2205 R00000 KEEP
5
SET SET

HIGH-SPEED COUNTERS
CR2205
R00000 CR2205 R00000
RES RES

5-39
5-3 Direct Clock Pulse Output

Example of Output of Variable Clock Pulse ON/OFF Ratio

When outputting a pulse of cycle 500 µs (2 kHz) and pulse width 200 µs
from output R00500

The following describes an example of a program for outputting a clock pulse of variable pulse
ON/OFF ratio from output R00500. This description uses a high-speed counter (CTH0) and high-
speed counter comparators (CTC0, CTC1).
5
■ Setting of control relays
HIGH-SPEED COUNTERS

Set CR2103 to CR2112 as shown in the Relay No. Setting Relay No. Setting
table on the right. CR2103 ON CR2112 OFF
CR2104 OFF CR2108 OFF
CR2105 OFF CR2109 ON
CR2106 ON CR2110 OFF
CR2107 OFF CR2111 OFF

■ Internal clock and setting value of CTC0 and CTC1


Determine the internal clock, and find the setting value of CTC0 and CTC1 at that time by the
following calculation:

CTC1 setting value = pulse width (µs)/internal clock (µs)

CTC0 setting value = pulse cycle (µs)/internal clock (µs)

In the above equation, substitute pulse width = 200 µs, pulse cycle = 500 µs, and internal clock =
10 µs (CR2101) to find the setting values of CTC0 and CTC1.
The setting value of CTC0 becomes "50" and the setting value of CTC1 becomes "20".
The table below shows the values calculated by other internal clocks. Use to this table for
reference.
Control Relay Internal Clock CTC0 Value CTC1 Value
CR2100 1.0 µs 500 200
CR2101 10.0 µs 50 20
CR2102 100.0 µs 5 2

5-40
5-3 Direct Clock Pulse Output

■ Program example
• Set the pulse output to output R00500 accord-
CR2008 CR2103 CR2104 CR2105 CR2106 CR2107
00001 SET RES RES SET RES ing to CR2104 to 2107 and CR2108 to 2111.
In this example, enable (CR2104: OFF) com-
CR2108 CR2109 CR2110 CR2111 CR2112 CTH0
00002 RES SET RES RES RES RES parator match output of R00500, and set so
CR2002 CTH0 that output of R00500 is turned ON (CR2106:
00003 CR2101 ON) by CTC0 and OFF (CR2109: ON) by
#00050 CTC3.
00004 CTC0 • Set CR2103 to ON, and specify resetting of
#00020 CTH0 according to CTC0.
00005 CTC1 This enables correct output of the pulse width
of the clock pulse from the 1st pulse.
Count value • The enable input relay of CTH0 is used at ON 5
CTC0
at all times during output of the clock pulse.

HIGH-SPEED COUNTERS
CTC1

ON ON ON ON

Note
• When enable input of the high-speed counter is used for starting/stopping the
clock pulse, response is delayed by one scan at maximum when the clock pulse is
started. Response is also delayed by one scan at maximum when the clock pulse is
stopped.
• For details on starting and stopping clock pulse output, see "Hint" below.

■ Hint
When controlling (enabling/disabling) output of the clock pulse by external input, perform control
by turning CR2105 ON/OFF.
To turn CR2105 ON/OFF, execute the SET, RES or KEEP instruction.
Accordingly, be sure to start the clock pulse from "OFF" and end at "OFF".
When either of the following programs is added to the example on the previous page, the clock
pulse is output from R00500 only when R00000 is "ON".

●When the SET/RES instruction is used ●When the KEEP instruction is used

R00000 CR2105 R00000 KEEP


SET SET
CR2105
R00000 CR2105 R00000
RES RES

• The cycle (frequency) of the clock pulse can be made variable by using the STA instruction to
rewrite the setting value of high-speed counter comparator CTC0.
"Count Input Settings" page 5-8

5-41
5-3 Direct Clock Pulse Output

When outputting a pulse of cycle 500 µs (2 kHz) and pulse width 200
µs from output R00501

The following describes an example of a program for outputting a clock pulse of variable pulse
width from output R00501. This description uses a high-speed counter (CTH1) and high-speed
counter comparators (CTC2, CTC3).

■ Setting of control relays


Set CR2203 to CR2212 as shown in the
5 table on the right.
Relay No.
CR2203
Setting
ON
Relay No.
CR2212
Setting
OFF
HIGH-SPEED COUNTERS

CR2204 OFF CR2208 OFF


CR2205 OFF CR2209 ON
CR2206 ON CR2210 OFF
CR2207 OFF CR2211 OFF

■ Internal clock and setting value of CTC2 and CTC3


Determine the internal clock, and find the setting value of CTC2 and CTC3 at that time by the
following calculation:

CTC3 setting value = pulse width (µs)/internal clock (µs)

CTC2 setting value = pulse cycle (µs)/internal clock (µs)

In the above equation, substitute pulse width = 200 µs, pulse cycle = 500 µs, and internal clock =
10 µs (CR2201) to find the setting values of CTC2 and CTC3.
The setting value of CTC2 becomes "50" and the setting value of CTC3 becomes "20".
The table below shows the values calculated by other internal clocks. Use to this table for
reference.
Control Relay Internal Clock CTC2 Value CTC3 Value
CR2200 1.0 µs 500 200
CR2201 10.0 µs 50 20
CR2202 100.0 µs 5 2

5-42
5-3 Direct Clock Pulse Output

■ Program example
CR2008 CR2103 CR2104 CR2105 CR2106 CR2107
• Set the pulse output to output R00501
00001 SET RES RES SET RES according to CR2204 to 2207 and CR2208 to
CR2108 CR2109 CR2110 CR2111 CR2112 CTH0 2211.
00002 RES SET RES RES RES RES In this example, enable (CR2204: OFF) com-
CR2002 CTH0 parator match output of R00501, and set so
00003 CR2101 that output of R00501 is turned ON (CR2206:
#00050 ON) by CTC2 and OFF (CR2209: ON) by
00004 CTC0
CTC3.
#00020 • Set CR2203 to ON, and specify resetting of
00005 CTC1
CTH1 according to CTC2.

Count value
This enables correct output of the pulse width
of the clock pulse from the 1st pulse.
5
• The enable input relay of CTH1 is used at ON

HIGH-SPEED COUNTERS
CTC0
CTC1 at all times during output of the clock pulse.

ON ON ON ON

Note
• When enable input of the high-speed counter is used for starting/stopping the
clock pulse, response is delayed by one scan at maximum when the clock pulse is
started. Response is also delayed by one scan at maximum when the clock pulse is
stopped.
• For details on starting and stopping clock pulse output, see "Hint" below.

■ Hint
When controlling (enabling/disabling) output of the clock pulse by external input, perform control
by turning CR2205 ON/OFF.
To turn CR2205 ON/OFF, execute the SET, RES or KEEP instruction.
Accordingly, be sure to start the clock pulse from "OFF" and end at "OFF".
When either of the following programs is added to the example on the previous page, the clock
pulse is output from R00501 only when R00000 is "ON".

●When the SET/RES instruction is used ●When the KEEP instruction is used

R00000 CR2205 R00000 KEEP


SET SET
CR2205
R00000 CR2205 R00000
RES RES

• The cycle (frequency) of the clock pulse can be made variable by using the STA instruction to
rewrite the setting value of high-speed counter comparator CTC2.

5-43
5-3 Direct Clock Pulse Output

Example of Stopping the Clock Pulse at a Specified Number of Pulses

A clock pulse of cycle 500 µs (2 kHz) and pulse width 200 µs is output for 10000 pulses from
output R00500 and the clock pulse is stopped.

■ Control relays, and settings of internal clock and CTC


The following tables summarize the control relays and settings of CTC0 and CTC1 according to
the internal clock.
Relay No. Setting Relay No. Setting
5 CR2103 ON CR2112 OFF
CR2104 OFF CR2108 OFF
HIGH-SPEED COUNTERS

CR2105 OFF CR2109 ON


CR2106 ON CR2110 OFF
CR2107 OFF CR2111 OFF

The following table summarizes the internal clock and setting values of CTC0 and CTC1.
Control Relay Internal Clock CTC0 Value CTC1 Value
CR2100 1.0 µs 500 200
CR2101 10.0 µs 50 20
CR2102 100.0 µs 5 2

■ Program example
• Set the pulse output to output R00500 according to
00001
CR2008 CR2103 CR2104 CR2105 CR2106 CR2107 CR2104 to 2107 and CR2108 to 2111.
EI SET RES SET SET RES
In this example, enable (CR2104: OFF) compara-
CR2108 CR2109 CR2110 CR2111 CR2112 tor match output of R00500, and set so that output
00002 RES SET RES RES RES
of R00500 is turned ON (CR2106: ON) by CTC0
CR2203 CTH0 CTH1 and OFF (CR2109: ON) by CTC1.
00003 SET RES RES • Set CR2103 to ON, and specify resetting of CTH0
00000 01000 01000 CR2105 according to CTC0.
00004 DIFU RES This enables correct output of the pulse width of
CR2002 CTH0 the clock pulse from the 1st pulse.
00005 CR2101 • Enable interrupts by the EI instruction.
Stop the clock pulse by the interrupt program (INT
#00050
00006 CTC0 CTC2) when the current value of high-speed
counter CTH1 becomes equal to (10000 pulses
#00020
00007 CTC1 are output) to the setting value of high-speed
counter comparator CTC2.
CR2002 CTH1 • Set CR2203 to ON, and specify resetting of CTH1
00008 R00500
according to CTC2.
#10000 This enables repeated operation for the stipulated
00009 CTC2
number of pulses (10000).
END • The enable input relay of CTH0 is used at ON at
00010 all times during output of the clock pulse.
INT • The enable input relay of CTH1 is used at ON at
00011 CTC2 all times during counting of the clock pulse.
CR2002 CR2105
• Specify the internal clock (CR2101) for the clock
00012 SET input of the high-speed counter CTH0, and
R00500 for the clock input of high-speed counter
RETI
00013 CTH1.
This sets use of CTH0 for clock pulse output and
ENDH
00014 CTH1 for clock pulse counting.
• Set the number of clock pulses according to the
setting value of high-speed counter comparator
CTC2.
• Clock pulse output is started by input R00000
turning ON.
Restarting after the clock pulse has stopped turns
input R00000 ON again.

5-44
5-3 Direct Clock Pulse Output

■ Hint
ON/OFF of CR2103 to CCR2111 can also be set by the LDA and STA instructions in addition to
the SET and RES instructions. The following shows the sample program rewritten with the LDA
and STA instructions. The program can be rewritten with fewer rungs and steps.

CR2008 CR2103 CR2104 CR2105 CR2106 CR2107 CR2008 $0268 CR2100 CTH0 CR2203 CR2813 CTH1
EI SET RES SET SET RES EI LDA STA RES SET SET RES

CR2108 CR2109 CR2110 CR2111 CTH0


RES SET RES RES RES

CR2203 CR2813 CTH1


SET SET RES

• About LDA $0268


5
When LDA $0268 is executed, input to the internal registers is as follows:

HIGH-SPEED COUNTERS
[0] [2] [6] [8]

Internal registers 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0

When STA CR2100 is executed, the values of the internal registers are assigned to auxiliary
relays CR2100 to CR2115.
**: 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
Control relay 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0
CR21**

This turns CR2103, CR2105, CR2106, and CR2109 ON.

5-45
5-3 Direct Clock Pulse Output

MEMO

5
HIGH-SPEED COUNTERS

5-46
6
FREQUENCY COUNTERS

FREQUENCY COUNTERS
Three types of output (frequency measurement, speed of rotation
measurement, specified frequency pulse output) can be selected using high-
speed counter functions.

6-1 Frequency Measurement, Speed of Rotation Measurement


and Specified Frequency Pulse Output. . . . . . . . . . . 6-2
6-2 Frequency Counter Instructions . . . . . . . . . . . . . 6-3

6-1
Frequency Measurement, Speed of Rotation
6-1 Measurement and Specified Frequency Pulse Output
This section describes the frequency measurement, speed of rotation and specified frequency
pulse output functions.

Outline of Frequency Measurement, Speed of Rotation Measurement and Specified Frequency Pulse Output

The frequency of input pulses or the input speed of rotation can be measured, or the frequency
specified to output pulses using high-speed counters.

CTH 0 FCNT RCNT


External pulse input instruction instruction
32-bit
6 A phase R00010
B phase R00012
high-
speed Frequency
Speed of
rotation
counter 0 measurement
measurement
FREQUENCY COUNTERS

Measurement result
CM01481 • CM01480

PLSOUT instruction CTH 1


MEMSW 2(bit1)
Specified frequency pulse 32-bit OFF R00501
output high- ON R00505
Frequency setting value speed
CM01491 • CM01490 counter 1
Duty ratio
CM01492

Frequency measurement

The frequency of external pulse input can be easily measured by using high-speed counter CTH0
and the FCNT instruction.
"FCNT Instruction" in "6-2 Frequency Counter Instructions"

Speed of Rotation Measurement

The speed of rotation of external pulse input can be easily measured by using high-speed counter
CTH0 and the RCNT instruction.
"RCNT Instruction" in "6-2 Frequency Counter Instructions"

Specified Frequency Pulse Output

The specified frequency (Hz) can be easily output as a pulse from the output relay by using high-
speed counter CTH1 and the PLSOUT instruction.
"PLSOUT Instruction" in "6-2 Frequency Counter Instructions"

6-2
6-2 Frequency Counter Instructions

List of Frequency Counter Instructions

The following three frequency counter instructions are available.


Instruction Mnemonic Brief Description Page
Frequency
FCNT The frequency of pulse input is measured using the CTH0. 6-4
Measurement
Speed of rotation The speed of rotation of pulse input is measured using the
RCNT 6-6
measurement CTH0.
Specified frequency The pulse of the specified frequency is output using the
PLSOUT 6-10
pulse output CTH1.

Restrictions Applied to Combined Use of Frequency Counter Functions


6

FREQUENCY COUNTERS
Though frequency counter functions can be used in combination, some combinations are not
possible. The following table summarizes the restrictions applied to combinations of frequency
counter functions.
High-spd Cntr Func Spec Freq Cam Sw Func (inc)
Freq Meas Spd of Rot
Pls Out
CTH0 CTH1 Func Meas Func CTH0 CTH1
Func
High-spd CTH0 O X X O X O
Cntr Func CTH1 O O O X O X
Freq Meas Func X O X O X O
Spd of Rot Meas Func X O X O X O
Spec Freq Pls Out Func O X O O O X
Cam Sw CTH0 X O X X O O
Func (inc) CTH1 O X O O X O

6-3
6-2 Frequency Counter Instructions

FCNT FCNT Frequency


Measurement
Measures the frequency of
pulse input using the CTH0.

Ladder program Input method


Execution condition FCNT
S1 S2 D F C N T S1 S2 D

Available Devices Index


Operand Bit Devices Word Devices Index Const Ind Local Modify
Reg Spec Device
I O Int
MR LR T C CTC CR DM EM FM TM T C CTH CTC CM Z #/$ #TM ∗ % :#/:Z
6 S1 – –
Aux
– – – – – – – – – – – – – – – – – *1 – – – –
S2 O O O O O – – – O O O O O O O O O O O O – O O O
FREQUENCY COUNTERS

D O O O O O – – – O O O O O O O – – O – – – O O O

Operand Explanation
Specifies the pulse input method.*1*2
S1
0 = Single-phase, w/out direction 1 = Single-phase, w/ direction 2 = Phase difference 1X 3 = 2-pulse
Specifies the number of scans within the range 0 to 65535. Note, however, that "100" is set when the
S2
number of scans is "0" (zero).*3,*5
D Specifies the leading device to store the measurement result (Hz) to.*4,*5
*1 Append with "#". "$" cannot be used.
*2 For details, see "CTH/CTC Instruction."
*3 When a bit device has been specified, 16 continuous bits are occupied. When a word device has
been specified, one word is occupied.
*4 When a bit device has been specified, 32 continuous bits are occupied. When a word device has
been specified, two words are occupied.
*5 When a bit device has been specified, and a relay other than the start relay of the channel (e.g.
R00106, R01012) has been specified, the relay is handled straddling the next channel.

Description of Operation

When the execution condition is ON, the time between the pulses of external inputs R00010 (A
phase) and R00012 (B phase) is constantly measured, and the frequency is calculated from the
time between pulses by END processing.
Frequency (Hz) = 1/(time between pulses)
The average value for the number of scans specified by S2 is stored to the device specified by
[ D • D +1] as the frequency measurement result.
The update cycle does not become the "scan time x (number of scans specified by S2 )" or lower.
Measurement ends when the execution conditions turns OFF.

Note
• After the execution condition turns ON, measurement is started from the first pulse
input, and the measurement result is updated at the 2nd pulse input onwards.
• When this instruction is used, use the HSP instruction or control relays to set the
input time constant to 10 µs.
"10-3 Input Time Constant Selection Function" page 10-5
Max. Allowable Response Frequency
High-speed Input Method
Single-phase Phase Difference
Line driver input 100 kHz 50 kHz
Open collector input (5 V/24 V) 60 kHz 30 kHz

6-4
6-2 Frequency Counter Instructions

Note
• As high-speed counter CTH0 is used, do not change control relays or control
memories relating to CTH0, CTC0, CTC1, and cam switch functions (incremental
type) directly in ladder programs, for example.
• As high-speed counter CTH0 is used, other functions and instructions that use
CTH0 cannot be used at the same time.
• Measurement is started and ended at the end of a scan (not at execution of the
instruction).
• The frequency is 0 (Hz) when there is no pulse input for one second.
• Before changing S1 and S2 , switch the execution condition from OFF to ON.
• The FCNT instruction cannot be used in interrupt programs or in the initialization
module. 6

FREQUENCY COUNTERS
Operation flags

CR2009 No change in state


CR2010 No change in state
CR2011 No change in state
This flag is ON in the following instances. Otherwise, it is OFF.
• When a value outside the range is specified to S1 and S2
CR2012
• When the indirect specification and index modify range is inappropriate
No change in state when indirect specification and index modify are not used
* The instruction is not executed when CR2012 turns ON.

Instruction Execution Timing

FCNT Execution of this instruction starts at the up edge of the execution condition. This
instruction is executed at every scan for the duration that the execution condition is ON.
The value (measurement result) that is stored to the device specified by [ D •
D +1] is updated at every scan specified by S2 .
Scan

ON
Execution condition
OFF

FCNT
Execution Execution

Sample Program

The frequencies (Hz) of encoder inputs R00010 (A phase) and R00012 (B phase) are measured,
and the result is stored to [DM00000 • DM00001].

CR2002 HSP The input time constant of R00010 is set to 10 µs.


R00010
ON at all times The input time constant of R00012 is set to 10 µs.
HSP
R00012 Start of measurement
<Input setting>: Phase difference 1X
R00000 FCNT <Number of scans>: Every 10 scans
#00002 #00010 DM00000 <Measurement result> DM00001 • DM00000

6-5
6-2 Frequency Counter Instructions

Speed of Measures the speed of


RCNT RCNT
rotation
measurement
rotation of pulse input using
the CTH0.

Ladder program Input method


Execution condition RCNT
S1 S2 D R C N T S1 S2 D

Available Devices Index


Operand Bit Devices Word Devices Index Const Ind Local Modify
Reg Spec Device
I O Int
MR LR T C CTC CR DM EM FM TM T C CTH CTC CM Z #/$ #TM ∗ % :#/:Z
6 S1 – –
Aux
– – – – – – – – – – – – – – – – – *1 – – – –
FREQUENCY COUNTERS

S2 O O O O O – – – O O O O O O O – – O – – – O O O
D O O O O O – – – O O O O O O O – – O – – – O O O

Operand Explanation
*1,*2
S1 Specifies the pulse input method.
0 = Single-phase, w/out direction 1 = Single-phase, w/ direction 2 = Phase difference 1X 3 = 2-pulse
Specifies the leading device to which parameters are stored.*3,*5
S2 +0 . . . . Measurement method (0: Measure from pulse interval, 1: Measure from time of single rotation)
S2 +1 . . . .Number of pulses per rotation
S2
• At measurement from pulse interval (1 to 65535)
• At measurement from time per single rotation (1 to 32767)
S2 +2 . . . . Number of scans (0 to 65535) Note, however, that the average of 100 scans is set when "0" is set.
D Specifies the leading device to store the measurement result (rpm) to.*4,*5
*1 Append with "#". "$" cannot be used.
*2 For details, see "CTH/CTC Instruction."
*3 When a bit device has been specified, 48 continuous bits are occupied. When a word device has
been specified, three words are occupied.
*4 When a bit device has been specified, 32 continuous bits are occupied. When a word device has
been specified, two words are occupied.
*5 When a bit device has been specified, and a relay other than the start relay of the channel (e.g.
R00106, R01012) has been specified, the relay is handled straddling the next channel.

6-6
6-2 Frequency Counter Instructions

Description of Operation

Measuring the speed of rotation from the pulse interval ( S2 +0 is "0")


When the execution condition is ON, the time between the external input R00010 (A phase) and
R00012 (B phase) pulses is constantly measured, and the speed of rotation is calculated from the
time between pulses and the number of pulses per single rotation specified by S2 +1 by END
processing.
Speed of rotation (rpm) = 60/(time between pulses x number of pulses per rotation)
The average value of the number of scans specified by S2 +2 is stored to the device specified
by [ D • D +1] as the speed of rotation measurement result. The update cycle does not 6
become the "scan time x (number of scans specified by S2 +2)" or lower. Measurement ends

FREQUENCY COUNTERS
when the execution conditions turns OFF.

Measuring the speed of rotation from the time taken to perform a single rotation (when
S2 +0 is "1")
When the execution condition is ON, the number of pulses of external inputs R00010 (A phase)
and R00012 (B phase) are counted, the time (time taken to perform a single rotation) when the
number of pulses becomes equal to the number of pulses per single rotation specified by S2

+1 is constantly measured, and the speed of rotation is calculated from the time between a
specified number of pulses by END processing.
Speed of rotation (rpm) = 60/(time taken to perform a single rotation)
The average value of the number of scans specified by S2 +2 is stored to the device specified
by [ D • D +1] as the speed of rotation measurement result. The update cycle does not
become the "scan time x (number of scans specified by S2 +2)" or lower. Measurement ends
when the execution conditions turns OFF.

Note
• After the execution conditions turns ON, the measurement result is updated by
pulse input of one rotation or more.
• When this instruction is used, use the HSP instruction or control relays to set the
input time constant to 10 µs.
"10-3 Input Time Constant Selection Function" page 10-5

Max. Allowable Response Frequency


High-speed Input Method
Single-phase Phase Difference
Line driver input 100 kHz 50 kHz
Open collector input (5 V/24 V) 60 kHz 30 kHz

• As high-speed counter CTH0 is used, do not change control relays or control


memories relating to CTH0, CTC0, CTC1, and cam switch functions (incremental
type) directly in ladder programs, for example.
• As high-speed counter CTH0 is used, other functions and instructions that use
CTH0 cannot be used at the same time.
• Measurement is started and ended at the end of a scan (not at execution of the
instruction).
• When performing measurement from the pulse interval, the speed of rotation
becomes 0 (rpm) when the pulse interval is one second or more. When performing

6-7
6-2 Frequency Counter Instructions

measurement from the time of a single rotation, the speed of rotation becomes 0
(rpm) when a single rotation takes 1.5 seconds or more.
• Before changing S1 and S2 , switch the execution condition from OFF to ON.
• The FCNT instruction cannot be used in interrupt programs or in the initialization
module.

Operation flags

CR2009 No change in state


CR2010 No change in state
6 CR2011 No change in state
This flag is ON in the following instances. Otherwise, it is OFF.
• When a value outside the range is specified to S1 and S2
FREQUENCY COUNTERS

CR2012
• When the indirect specification and index modify range is inappropriate
No change in state when indirect specification and index modify are not used
* The instruction is not executed when CR2012 turns ON.

Instruction Execution Timing

RCNT Execution of this instruction starts at the up edge of the execution condition. This
instruction is executed at every scan for the duration that the execution condition is ON.
The value (measurement result) that is stored to the device specified by [ D • D

+1] is updated at every scan specified by S2 +2.

Scan

ON
Execution condition
OFF

RCNT
Execution Execution

Sample Program

The speed of rotation (rpm) of encoder inputs R00010 (A phase) and R00012 (B phase) are
measured, and the result is stored to [DM00000 • DM00001].
CR2002 HSP The input time constant of R00010 is set to 10 µs.
R00010
ON at all times
HSP The input time constant of R00012 is set to 10 µs.
R00012
Parameter settings
R00000 #00001 #02500 #00010 <Measurement method>: Measurement from pulse width
DW DW DW
<Number of pulses per single rotation>: 2500 PLS
DM00100 DM00101 DM00102
<Number of scans>:10 scans
RCNT
#00002 DM00100 DM00000
Start of measurement
<Input setting>: Phase difference 1X
END
<Parameters>:DM00100 to DM00102
<Measurement result>: DM00001 • DM00000
ENDH

6-8
6-2 Frequency Counter Instructions

MEMO

FREQUENCY COUNTERS

6-9
6-2 Frequency Counter Instructions

PLSOUT PLSOUT
Specified frequency
pulse output
The pulse of the specified frequency is
output using the CTH1.

Ladder program Input method


Execution condition S
PLSOUT P L S O U T S n
n

Available Devices Index


Operand Bit Devices Word Devices Index Const Ind Local Modify
Reg Spec Device
I O Int
MR LR T C CTC CR DM EM FM TM T C CTH CTC CM Z #/$ #TM ∗ % :#/:Z
6 S O O
Aux
O O O – – – O O O O O O O O O O O O – O O O
n O O O O O – – – O O O O O O O O O O O O – O O O
FREQUENCY COUNTERS

Operand Explanation

S
Specifies the specified frequency (0 to 100000) (Hz) or the leading device currently storing that
frequency.*1,*3
Specifies the duty ratio (-499 to 499) of the output pulse or the leading device currently storing that duty
ratio.*2,*3

Setting value
-499 ... 0 ... 499
(duty ratio -50) x 10
n Duty ratio
0.1% ... 50.0% ... 99.9%
TON / (TON + TOFF)
ON ON ON

Output pulse OFF OFF OFF

TON
TOFF

*1 When a bit device has been specified, 32 continuous bits are occupied. When a word device has
been specified, two words are occupied.
*2 When a bit device has been specified, 16 continuous bits are occupied. When a word device has
been specified, one word is occupied.
*3 When a bit device has been specified, and a relay other than the start relay of the channel (e.g.
R00106, R01012) has been specified, the relay is handled straddling the next channel.

Description of Operation

The pulses of frequency specified by S are output from output relay R00501 (R00505) for the
duration that the execution condition is ON.
Specify the duty ratio of the pulse to output by n .
Pulse output stops when the execution condition turns OFF.

Note
• Two or more PLSOUT instructions cannot be used.
• Do not change control relays or control memories related to CTH1 directly in ladder
programs, for example.
• As high-speed counter CTH1 is used, other functions and instructions that use
CTH1 cannot be used at the same time.
• Pulse output, stop and changes to the frequency and duty ratio are performed at
the end of each scan (not at execution of the instruction).

6-10
6-2 Frequency Counter Instructions

• Output destinations R00501 and R00505 are switched by MEMSW 2(bit1). Note,
however, that 10000 (Hz) or more cannot be output normally in the case of R00505.
• Attention must be paid when performing writing in the Run mode.
KV-1000 Programming Manual "About Writing in the Run Mode"

Operation flags

CR2009 No change in state


CR2010 No change in state
CR2011 No change in state

CR2012
This flag is ON in the following instances. Otherwise, it is OFF.
• When a value outside of the range is specified to an operand 6
• When the indirect specification and index modify range is inappropriate

FREQUENCY COUNTERS
No change when a constant is specified for both S and n

* The instruction is not executed when CR2012 turns ON.

Instruction Execution Timing

PLSOUT This instruction is executed at every scan for the duration that the execution condition is ON.

Scan

ON
Execution condition
OFF

PLSOUT
Execution Execution

Sample Program

The pulse is output from R00501 at the frequency (duty ratio 50%) set at [DM00001• DM00000]
for the duration that R00000 is ON.
(specified frequency pulse output)

R00000 DM0000
PLSOUT
#00000

Tuned control is performed by a combination of the frequency counter function and specified
frequency pulse output function during encoder input A phase R00010 and B phase R00012.
(tuned control)
CR2002 HSP The input time constant of R00010 is set to 10 µs.
R00010
ON at all times
HSP
The input time constant of R00012 is set to 10 µs.
R00012

R00000 FCNT Start of measurement


#00002 #00010 DM00000 <Input setting>: Phase difference 1X
<Number of scans>: Every 10 scans
DM0000 <Measurement result>: DM00001 • DM00000
PLSOUT
#00000

6-11
6-2 Frequency Counter Instructions

MEMO

6
FREQUENCY COUNTERS

6-12
7
CAM SWITCHES
Values input from an encoder can be converted to angle to enable virtual
execution of cam operation.

CAM SWITCHES
7-1 Cam Switch Functions . . . . . . . . . . . . . . . . . . . . 7-2
7-2 Cam Switch Instructions . . . . . . . . . . . . . . . . . . . 7-3

7-1
7-1 Cam Switch Functions
This chapter describes the cam switch functions.

Cam Switch Functions

The current value entered from an encoder or similar device is compared with present multiple
setting ranges.
This function detects which setting range the current value is in, and turns the output destination
devices corresponding to the setting range in question ON.
⋅Encoder Range setting Output destination
⋅CPU internal device device
OFF setting value ON setting value ON range
(1)OFF setting value (1)ON setting value (1) (1)ON≤(current value)<(1)OFF
Compare
(2)OFF setting value (2)ON setting value (2) (2)ON≤(current value)<(2)OFF
7 Current
...

...

...

...

...
value
(31)OFF setting value (31)ON setting value (31) (31)ON≤(current value)<(31)OFF
CAM SWITCHES

(32)OFF setting value (32)ON setting value (32) (32)ON≤(current value)<(32)OFF

Cam switch instructions


External input
External input
5 to 15 bit
General- ABSENC
purpose instruction
Absolute type input
External pulse input
encoder
(CTH0) A phase R00010 B phase R00012 Z phase R00014
(CTH1) A phase R00011 B phase R00013 Z phase R00015 High-speed INCENC
counter input Output
instruction
Incremental type
encoder

CPU MCMP
internal instruction
device

Multi-stage Comparator

The values of the CPU internal devices are used so that cam operation can be executed virtually.
"MCMP Instruction" in "7-2 Cam Switch Instructions" page 7-4

Absolute Encoder

An absolute type encoder is connected, and the gray code values are converted to angle so that
cam operation can be executed virtually.
"ABSENC Instruction" in "7-2 Cam Switch Instructions" page 7-8

Incremental encoder

An incremental type encoder is connected, and the high-speed counter (CTH) values are
converted to angle so that cam operation can be executed virtually.
"INCENC Instruction" in "7-2 Cam Switch Instructions" page 7-12

7-2
7-2 Cam Switch Instructions

List of Cam Switch Instructions

The following three cam switch instructions are available.


Instruction Mnemonic Principle of Operation Page
Multi-stage comparator MCMP Operation of a multi-stage comparator is performed. 7-4
Cam operation is performed using an absolute type
Absolute encoder ABSENC 7-8
encoder.
Cam operation is performed using an incremental type
Incremental encoder INCENC 7-12
encoder.

Restrictions Applied to Combined Use of Cam Switch Functions

Though cam switch functions can be used in combination, some combinations are not possible. 7
The following table summarizes the restrictions applied to combinations of cam switch functions.

CAM SWITCHES
High-spd Cntr Func Spec Freq Cam Sw Func (inc)
Freq Meas Spd of Rot
Pls Out
CTH0 CTH1 Func Meas Func CTH0 CTH1
Func
High-spd CTH0 O X X O X O
Cntr Func CTH1 O O O X O X
Freq Meas Func X O X O X O
Spd of Rot Meas Func X O X O X O
Spec Freq Pls Out Func O X O O O X
Cam Sw CTH0 X O X X O O
Func (inc) CTH1 O X O O X O

7-3
7-2 Cam Switch Instructions

MCMP
MCMP
Multi-stage Operation of a multi-stage
Comparator comparator is performed.

Ladder program Input method


Execution condition MCMP
S1 S2 D M C M P S1 S2 D n

Available Devices Index


Operand Bit Devices Word Devices Index Const Ind Local Modify
Reg Spec Device
I O Int
Aux MR LR T C CTC CR DM EM FM TM T C CTH CTC CM Z #/$ #TM ∗ @ :#/:Z
7 S1 O O O O O – – – O O O O O – – – – O – – – O O O
S2 O O O O O – – – O O O O O O O O O O O O – O O O
CAM SWITCHES

D O O O O O – – – O O O O O – – – – O – – – O O O
n O O O O O – – – O O O O O O O O O O O O – O O O

Operand Explanation
S1 Specifies the leading device of the data block to compare.*1
S2 Specifies the device to compare.*2
D Specifies the leading device to which the compare result is stored.*3
n Specifies the number of data to compare or the device currently storing that data.(1 to 32)*4,*5
*1 When a bit device has been specified, n x 32 continuous bits from the start of the channel
are handled. When a word device has been specified, n x 2 words are handled.
*2 When a bit device has been specified, 16 continuous bits are handled. When a relay other than
the start relay (e.g. R00002, R00106, or R01012) of the channel has been specified, the relay is
handled in 16 bits straddling the next channel.
*3 When a bit device has been specified, n bits are occupied. When a word device has been
specified, the lowermost bit of each word device becomes the store destination of the result. Bits
other than the lowermost bit do not change.
*4 "$" cannot be used.
*5 When a bit device has been specified, 16 continuous bits are occupied. When a word device has
been specified, one word is occupied.

7-4
7-2 Cam Switch Instructions

Description of Operation

When the execution condition is ON, 16-bit unsigned binary data currently stored to the device
specified by S2 is compared with n number of 32-bit data (two 16-bit unsigned binary
data: OFF setting value and ON setting value) starting from S1 , and the result is stored to the
bit device starting from D .
OFF setting value ON setting value Compare Result
bit bit bit bit
31 16 15 0
S1 +1 30 12 S1 D OFF
n items S1 +3 40 30 S1 +2 bit bit D +1 ON
15 0
S1 +5 30 80 S1 +4 D +2 OFF
S2 30
( n x
2 words) S1 +2 ( n -2)+1 10 30 S1 +2 ( n -2) D + n -2 ON
S1 +2 ( n -1)+1 30 30 S1 +2 ( n -1) D + n -1 OFF

OFF setting value > ON setting value 7


When OFF setting value > S2 ≥ ON setting value range, D turns ON.

CAM SWITCHES
OFF setting value < ON setting value
When OFF setting value > S2 or S2 ≥ ON setting value range, D turns ON.
OFF setting value = ON setting value
D is OFF at all times.
Note
The output state does not change even if the execution condition turns OFF.

Operation flags

CR2009 No change in state


CR2010 No change in state
CR2011 No change in state
This flag is ON in the following instances. Otherwise, it is OFF.
• When a value outside of the range is specified to n
CR2012 • When other than the start of the channel is set when a bit device is specified by S1
• When the indirect specification and index modify range is inappropriate
• When a timer/counter is specified to D by indirect specification
* The instruction is not executed when CR2012 turns ON.

Instruction Execution Timing

MCMP This instruction is executed at every scan for the duration that the execution condition is ON.
Scan
ON

Execution condition
OFF

MCMP Execution Execution

7-5
7-2 Cam Switch Instructions

Sample Program

The value of data memory DM00000 is compared with the setting value to turn the output relay
ON/OFF at the following conditions:
R30000 is turned ON when DM00000 is #100 or more and less than #200
R30001 is turned ON when DM00000 is #300 or more and less than #400
R30002 is turned ON when DM00000 is #500 or more and less than #600
R30003 is turned ON when DM00000 is #700 or more and less than #800
R30004 is turned ON when DM00000 is #900 or more and less than #1000
R30005 is turned ON when DM00000 is #1100 or more and less than #1200

CR2008 #00100 #00200


DW DW
ON for 1 scan DM00010 DM00011
7 #00300
DW
#00400
DW
DM00012 DM00013
CAM SWITCHES

#00500 #00600
DW DW
DM00014 DM00015
#00700 #00800
DW DW
DM00016 DM00017
#00900 #01000
DW DW
DM00018 DM00019
#01100 #01200
DW DW
DM00020 DM00021
R00000 MCMP
DM00010 DM00000 R30000

#006

END

7-6
7-2 Cam Switch Instructions

MEMO

CAM SWITCHES

7-7
7-2 Cam Switch Instructions

An absolute encoder is
ABSENC
ABSENC
Absolute
used to execute cam
Encoder
switch operation.

Ladder program Input method


Execution condition ABSENC
S1 S2 D1 A B S E N C S1 S2

D2 D1 D2

Available Devices Index


Operand Bit Devices Word Devices Index Const Ind Local Modify
Reg Spec Device
I O Int
Aux MR LR T C CTC CR DM EM FM TM T C CTH CTC CM Z #/$ #TM ∗ @ :#/:Z
7 S1 O O O O O – – – O O O O O – – – – O – – – O O O
S2 O O O O O – – – O O O O O O O O O O O – – O O O
CAM SWITCHES

D1 O O O O O – – – O O O O O – – – – O – – – O O O
D2 O O O O O – – – O O O O O – – – – O – – – O O O

Operand Explanation
Specifies the leading device of the data block to which the angle setting value (0.1°unit) to compare is
S1
currently stored. (0 to 3599)*1
S2 Specifies the device to which the value of the absolute encoder is currently stored.*2
D1 Specifies the leading device to which the compare result is stored.*3
D2 Specifies the leading device to which parameters are stored.*4
*1 When a bit device has been specified, [ D2 +0] x 32 continuous bits from the start of the
channel are handled. When a word device has been specified [ D2 +0] x 2 words are handled.
*2 When a bit device has been specified, 16 continuous bits are handled. When a relay other than
the start relay (e.g. R00002, R00106, or R01012) of the channel has been specified, the relay is
handled in 16 bits straddling the next channel.
*3 When a bit device has been specified, [ D2 +0] bits are occupied. When a word device has
been specified, the lowermost bit of each word device becomes the store destination of the
result. Bits other than the lowermost bit do not change.
*4 When a bit device has been specified, 128 continuous bits from the start of the channel are
occupied. When a word device has been specified, 8 words are occupied.

Description of Operation

Parameters
Device Description
Number of
D2 +0 Sets the number of data to compare. (1 to 32)
compare data
D2 +1 Resolution Sets the resolution of the encoder (within the range 32 to 32768).
Sets the remainder gray code (within the range 0 to 16384).
Remainder (Example) 32,64,128,256,512,1024,
D2 +2 Resolution 36 360 720
2048,4096,8192,16384,32768
gray code
Remainder
0 14 76 152
gray code
Zero degree
D2 +3 Sets the value to specify to the zero degree (within the range 0 to -1 resolution).
setting value

7-8
7-2 Cam Switch Instructions

Device Description
• The current angle after compensation is stored.(0 to 3599)
Current • When S2 -[ D2 +2]≥[ D2 +3]
angle (0.1
D2 +4 (3600/[ D2 +1])x( S2 -[ D2 +2]-[ D2 +3])
degree
units) • When S2 -[ D2 +2]<[ D2 +3]
(3600/[ D2 +1])x([ D2 +1]+ S2 -[ D2 +2]-[ D2 +3])

D2 +5 D1 D2 +4
bit0: Output response error
<Conditions>
An error occurs when the OFF setting value differs
from the ON setting value at two or more output
destinations that have changed in a single scan, or
when same ON setting values or OFF setting values
are different. Does not
Change.
An error does not occur in the following instances: change.
• When the OFF setting value is the same as the ON
D2 +5
Operation
error setting value of outputs that have changed at the same 7
time

CAM SWITCHES
• When both OFF setting values or ON setting values of
outputs that have changed at the same time are the
same
bit1: Input value out of range error
Turns ON when the input value of the encoder is out of Does not Does not
change. change.
the setting range.

Reset this device in the ladder program.

D2 +6
Clear work (cannot be used by the user)
D2 +7

When the execution condition is ON, the current angle value currently stored to the device
specified by [ D2 +4] is compared with [ D2 +0] number of 32-bit data (two 16-bit unsigned
binary data: OFF setting value and ON setting value) starting from S1 , and the result is stored
to the bit device starting from D1 .
OFF setting value ON setting value Compare Result
bit bit bit bit
31 16 15 0
S1 +1 30 12 S1 D2 +4 D1 OFF
[ D2 +0] items S1 +3 40 30 S1 +2 bit bit D1 +1 ON
15 0
S1 +5 30 80 S1 +4 D1 +2 OFF
30
([ D2 +0] x
2 words) S1 +2 ([ D2 +0]-2)+1 10 30 S1 +2 ([ D2 +0]-2) D1 + n -2 ON
S1 +2 ([ D2 +0]-1)+1 30 30 S1 +2 ([ D2 +0]-1) D1 + n -1 OFF

OFF setting value > ON setting value


When OFF setting value > [ D2 +4] ≥ ON setting value range, D1 turns ON.
OFF setting value < ON setting value
When OFF setting value > [ D2 +4] or [ D2 +4] ≥ ON setting value range, D1 turns ON.
OFF setting value = ON setting value
D1 is OFF at all times.

7-9
7-2 Cam Switch Instructions

■ About output response error ( D2 +5 bit0)


<Instances where an error does not occur>
D2 +5 bit0 OFF OFF OFF OFF ON (error) A .... When there is one output destination that changed in a
1 scan single scan
B .... When the ON setting value and OFF setting value of two or
ON OFF more output destinations that changed in a single scan are
Output destination (1) the same
A C • OFF setting value of output destination (1) = ON setting
value of output destination (2)
Output destination (2)
C .... When both ON setting values and both OFF setting values
B
of two or more output destinations that changed in a single
Output destination (3) scan are the same
D
• OFF setting value of output destination (2) = OFF setting
Output destination (4) value of output destination (3)
C A • ON setting value of output destination (3) = ON setting
Output destination (5) value of output destination (4)
<Instances where an errort occurs>
When the ON setting value and OFF setting value of two or more
output destinations that changed in a single scan are different. Or,
when both ON setting values or both OFF setting values are

7 different
(Example) D .....When the ON setting value and OFF setting value
of two or more output destinations that changed
in a single scan are different
CAM SWITCHES

• OFF setting value of output destination (4) ≠ ON


setting value of output destination (5)

Note
• When the setting value is changed during operation, the change is immediately
reflected in the output. To disable reflection of output, set the execution condition
to OFF.
• Do not use the CR2002 (always ON) control relay for the execution condition.
• The output state does not change even if the execution condition turns OFF.
• The ABSENC instruction cannot be used in interrupt programs or in the
initialization module.

Operation flags

CR2009 No change in state


CR2010 No change in state
CR2011 No change in state
This flag is ON in the following instances. Otherwise, it is OFF.
• When values outside the range are specified to encoder values, parameter values, and angle
setting values
CR2012 • When other than the start of the channel is set when a bit device is specified by S1 and
D2
• When the indirect specification and index modify range is inappropriate
• When a timer/counter is specified to D1 and D2 by indirect specification
* The instruction is not executed when CR2012 turns ON.

Instruction Execution Timing

ABSENC This instruction is executed at every scan for the duration that the execution condition is ON.
Scan
ON

Execution condition
OFF

ABSENC Execution Execution

7-10
7-2 Cam Switch Instructions

Sample Program

R00000 to R00007 input values from the absolute encoder are stored to DM00000, and are
compared with the setting values to turn the output relays ON/OFF by the following specification:
Resolution: 256/1 turn Remainder gray code: 0 Zero degree teaching value: 12

R00000
Absolute type to
encoder R00007
KV-1000

R30000 is turned ON when DM00000 is 10.0° or more and less than 20.0°
R30001 is turned ON when DM00000 is 30.0° or more and less than 40.0°
R30002 is turned ON when DM00000 is 50.0° or more and less than 60.0°
R30003 is turned ON when DM00000 is 70.0° or more and less than 80.0°
7
R30004 is turned ON when DM00000 is 90.0° or more and less than 100.0°

CAM SWITCHES
R30005 is turned ON when DM00000 is 110.0° or more and less than 120.0°

CR2008 #00006 #00256 #00000 #00012


DW DW DW DW
ON for 1 scan DM00100 DM00101 DM00102 DM00103
CR2002 R00000 $00FF DM00000
LDA ANDA STA
ON at all times
CR2002 #00100 #00200
DW DW
ON at all times DM00010 DM00011
#00300 #00400
DW DW
DM00012 DM00013
#00500 #00600
DW DW
DM00014 DM00015
#00700 #00800
DW DW
DM00016 DM00017
#00900 #01000
DW DW
DM00018 DM00019
#01100 #01200
DW DW
DM00020 DM00021
MR00000 ABSENC
DM00010 DM00000 R30000

DM00100

END

7-11
7-2 Cam Switch Instructions

An incremental encoder is
INCENC
INCENC
Incremental
used to execute cam
encoder
switch operation.

Ladder program Input method


Execution condition INCENC
S1 S2 S3 I N C E N C S1 S2 S3

D1 D2 D1 D2

Available Devices Index


Operand Bit Devices Word Devices Index Const Ind Local Modify
Reg Spec Device
I O Int
Aux MR LR T C CTC CR DM EM FM TM T C CTH CTC CM Z #/$ #TM ∗ @ :#/:Z
7 S1 O O O O O – – – O O O O O – – – – O – – – O O O
S2 – – – – – – – – – – – – – – – – – – – O – – – –
CAM SWITCHES

S3 – – – – – – – – – – – – – – – – – – – O – – – –
D1 O O O O O – – – O O O O O – – – – O – – – O O O
D2 O O O O O – – – O O O O O – – – – O – – – O O O

Operand Explanation
Specifies the leading device of the data block to which the angle setting value (0.1° unit) to compare is
S1
currently stored. (0 to 3599)*1
S2 Specifies the No. of the high-speed counter (CTH) to be used.(0,1)
Sets the count input method of the encoder.(0 to 5)*2
S3 0–1-phase, w/out direction 1–1-phase, w/ direction 2–Phase difference 1X
3–Phase difference 2X 4–Phase difference 4X 5–2-pulse
D1 Specifies the leading device to which the compare result is stored.*3,*4
D2 Specifies the leading device to which parameters are stored.*5
*1 When a bit device has been specified, [ D2 +0] x 32 continuous bits from the start of the
channel are handled. When a word device has been specified, [ D2 +0] x 2 words are handled.
*2 For details, "Chapter 5 HIGH-SPEED COUNTERS"
*3 When a bit device has been specified, [ D2 +0] bits are occupied. When a word device has
been specified, the lowermost bit of each word device becomes the store destination of the
result. Bits other than the lowermost bit do not change.
*4 "$" cannot be used.
*5 When a bit device has been specified, 80 continuous bits from the start of the channel are
occupied. When a word device has been specified, five words are occupied.

7-12
7-2 Cam Switch Instructions

Description of Operation

Parameters
Device Description
Number of
D2 +0 Sets the number of data to compare. (1 to 32)
compare data
D2 +1 Resolution Sets the resolution of the encoder (within the range 32 to 32768).
Zero degree
D2 +2 Sets the value to specify to the zero degree (within the range 0 to -1 resolution).
setting value
The current angle after compensation is stored.(0 to 3599)
Current angle • When [ S2 ]≥[ D2 +2]
D2 +3 (0.1 degree (3600/[ D2 +1])x( S2 -[ D2 +2])
units) • When [ S2 ]<[ D2 +2]
(3600/[ D2 +1])x([ D2 +1]+ S2 -[ D2 +2])

bit0: Output response error


D2 +4 D1 D2 +3
7
<Conditions>

CAM SWITCHES
An error occurs when the OFF setting value differs
from the ON setting value at two or more output
destinations that have changed in a single scan, or
when same ON setting values or OFF setting values
are different. Does not
Change.
An error does not occur in the following instances: change.
D2 +4 Operation error • When the OFF setting value is the same as the ON
setting value of outputs that have changed at the same
time
• When both OFF setting values or ON setting values of
outputs that have changed at the same time are the
same
bit1: Input value out of range error Does not Does not
When the input value of the encoder is out of the setting range. change. change.

Reset this device in the ladder program

When the execution condition is ON, the current angle value currently stored to the device
specified by [ D2 +3] is compared with [ D2 +0] number of 32-bit data (two 16-bit unsigned
binary data: OFF setting value and ON setting value) starting from S1 , and the result is stored
to the bit device starting from D1 .

OFF setting value ON setting value Compare Result


bit bit bit bit
31 16 15 0
S1 +1 30 12 S1 D2 +3 D1 OFF
[ D2 +0] S1 +3 40 30 S1 +2 bit bit D1 +1 ON
15 0
S1 +5 30 80 S1 +4 D1 +2 OFF
30
([ D2 +0] x
2 words) S1 +2 ([ D2 +0]-2)+1 10 30 S1 +2 ([ D2 +0]-2) D1 + n -2 ON
S1 +2 ([ D2 +0]-1)+1 30 30 S1 +2 ([ D2 +0]-1) D1 + n -1 OFF

OFF setting value > ON setting value


When OFF setting value > [ D2 +3] ≥ ON setting value range, D1 turns ON.
OFF setting value < ON setting value
When OFF setting value > [ D2 +3] or [ D2 +3] ≥ ON setting value range, D1 turns ON.
OFF setting value = ON setting value
D1 is OFF at all times.

7-13
7-2 Cam Switch Instructions

■ About output response error ( D2 +4 bit0)


<Instances where an error does not occur>
D2 +4 bit0 OFF OFF OFF OFF ON (error) A .....When there is one output destination that changed in a
1 scan single scan
B .....When the ON setting value and OFF setting value of two or
ON OFF more output destinations that changed in a single scan are
Output destination (1) the same
A C • OFF setting value of output destination (1) = ON setting
value of output destination (2)
Output destination (2)
C .....When both ON setting values and both OFF setting values
B
of two or more output destinations that changed in a single
Output destination (3) scan are the same
D • OFF setting value of output destination (2) = OFF setting
Output destination (4) value of output destination (3)
C A • ON setting value of output destination (3) = ON setting
Output destination (5) value of output destination (4)
<Instances where an error occurs>
When the ON setting value and OFF setting value of two or more
output destinations that changed in a single scan are different. Or,
when both ON setting values or both OFF setting values are
different
7 (Example) D .... When the ON setting value and OFF setting value
of two or more output destinations that changed
in a single scan are different
•OFF setting value of output destination (4) ≠ ON
CAM SWITCHES

setting value of output destination (5)

Note
• When the setting value is changed during operation, the setting value is
immediately reflected in the output. To disable reflection of output, set the
execution condition to OFF.
• When the high-speed counter has been reset (by "RES instruction" or "external
input (Z phase)") during operation, an error sometimes occurs according to the
condition of the output response error ([ D2 +4] bit0).
• Do not use the CR2002 (always ON) control relay for the execution condition.
• The output state does not change even if the execution condition turns OFF. The
count value is held.
• Functions and instructions that use the high-speed counter specified by S2

cannot be used simultaneously.


• INCENC instructions of the same S2 cannot be used.
• When using the INCENC instruction, use the HSP instruction or control relay to set
the input time constant to 10 µs.
"10-3 Input Time Constant Selection Function" page 10-5
• Do not directly change control relays, control memories, CTHs, and CTCs relating
to high-speed counters in ladder programs as they use the high-speed counter
function.
• The value of high-speed counters is held when the KV-1000 is turned OFF. To clear
the value of high-speed counters, use the RES or CTH instruction.
• The INCENC instruction cannot be used in interrupt programs or in the initialization
module.
• Attention must be paid when performing writing in the Run mode.
KV-1000 Programming Manual "About Writing in the Run Mode"

7-14
7-2 Cam Switch Instructions

Operation flags

CR2009 No change in state


CR2010 No change in state
CR2011 No change in state
This flag is ON in the following instances. Otherwise, it is OFF.
• When values outside the range are specified to encoder values, parameter values, and angle
setting values
CR2012 • When other than the start of the channel is set when a bit device is specified by S1 and
D2
• When the indirect specification and index modify range is inappropriate
• When a timer/counter is specified to D1 and D2 by indirect specification
* The instruction is not executed when CR2012 turns ON.

Instruction Execution Timing


7
INCENC

CAM SWITCHES
This instruction is executed at every scan for the duration that the execution condition is ON.
Scan
ON

Execution condition
OFF

INCENC Execution Execution

7-15
7-2 Cam Switch Instructions

Sample Program

High-speed counter CTH1 is used to measure the input value from the incremental encoder, and
that value is compared with the setting value to turn the output relays ON/OFF by the following
specification. The value of high-speed counter CTH1 is cleared by input relay R00001 turning ON.

High-speed counter: CTH1 Count method: 2-pulse method Resolution: 256/1 turn
Zero degree teaching value: 12

R30000 is turned ON when the value of CTH1 is 10.0° or more and less than 20.0°
R30001 is turned ON when the value of CTH1 is 30.0° or more and less than 40.0°
R30002 is turned ON when the value of CTH1 is 50.0° or more and less than 60.0°
R30003 is turned ON when the value of CTH1 is 70.0° or more and less than 80.0°
R30004 is turned ON when the value of CTH1 is 90.0° or more and less than 100.0°
R30005 is turned ON when the value of CTH1 is 110.0° or more and less than 120.0°
7
CR2008 #00006 #00256 #00012
CAM SWITCHES

DW DW DW
ON for 1 scan DM00110 DM00111 DM00112
CR2002 #00100 #00200
DW DW
ON at all times DM00010 DM00011
#00300 #00400
DW DW
DM00012 DM00013
#00500 #00600
DW DW
DM00014 DM00015
#00700 #00800
DW DW
DM00016 DM00017
#00900 #01000
DW DW
DM00018 DM00019
#01100 #01200
DW DW
DM00020 DM00021
R00000 INCENC
DM00010 #001 #005

R30000 DM00110

R00001 CTH1
RES

END

7-16
8
MOTOR CONTROL
(POSITIONING CONTROL)
This chapter describes functions for outputting pulses to a stepping motor or a
servo motor, and for controlling positioning.

MOTOR CONTROL (POSITIONING CONTROL)


8-1 About Positioning Control . . . . . . . . . . . . . . . . . . 8-2
8-2 Setting Up Parameters and Executing Instructions . . . . . . . . 8-5
8-3 Other Positioning Devices . . . . . . . . . . . . . . . . 8-27
8-4 Changing Speed during Operation . . . . . . . . . . 8-31
8-5 Positioning Instructions. . . . . . . . . . . . . . . . . . . 8-33
8-6 Positioning Control Reference Examples . . . . . 8-49
8-7 List Devices for Positioning & List of Error Codes . . . 8-60

8-1
8-1 About Positioning Control
The KV-1000 CPU Unit has a pulse output function for positioning control. This function enables
you to control stepping motors and pulse input type AC servo motors. This section describes how to
use this function.

Outline of Positioning/Speed Control

The KV-1000 CPU Unit can output pulses to output relays without being influenced by the scan
time. These pulses are used to perform positioning/speed control on two axes in a trapezoidal
control system.

■ Trapezoidal control
"Trapezoidal control" is an output function represented by a timing chart comprising the startup
speed, run speed and acceleration/deceleration times that form a trapezoid as shown below.
Trapezoidal control is automatically performed if the pulse frequency, startup speed, run speed and

8 acceleration/deceleration times are set in advance.


Frequency (Hz)
Target value/travel (number of output pulses)
MOTOR CONTROL (POSITIONING CONTROL)

Operating
speed

Startup
speed
(stop speed)

Time (ms)

Acceleration time Deceleration time

■ Parameter setup
Settings such as start up speed, run speed, and acceleration/deceleration times that are set for
trapezoidal control are called "parameters."
Set parameters using KV STUDIO's "Edit CPU positioning parameters" function.

(1) Initial parameter setup Set up parameters on KV STUDIO.

(2) Programming of ladder program Make a ladder program using positioning instructions.

When the ladder program is executed, positioning


(3) Execution of ladder program control is started according to the parameters set
at (1).

The content of parameters can be directly changed


No Change parameter
settings during ladder program by the DW instruction on the ladder program, etc.
execution? without using KV STUDIO.

Yes

Change parameters

8-2
8-1 About Positioning Control

There are two types of parameters: point parameters and system parameters.

Point parameters
These parameters are the basic parameters for trapezoidal control as they set movement
destination points (positions), run/startup speed, and acceleration/deceleration time.
"Point Parameters" page 8-5

System parameters
These parameters are for setting sensor input, pulse output, comparators, zero return, and jog
operation.
"System Parameters [I/O Setup]" page 8-11
"System Parameters [Comparator Setup]" page 8-16
"System Parameters [Zero Return/Jog]" page 8-18
"System Parameters [JOG]" page 8-24

■ Main functions
• Point parameters for 32 points can be set in advance on KV STUDIO. 8
If more than 32 points are set, the ladder program overwrites the contents of control memory

MOTOR CONTROL (POSITIONING CONTROL)


(CM).
"Positioning Control Exceeding 32 Points" page 8-59

• You can choose from two control modes: positioning control and speed control.
Both incremental values and absolute values can be set for target values/travel amounts.
"Operation mode" page 8-6

• Pulses can be output for two axes and each of their frequencies can be set within the range 50
Hz to 100 kHz.

• Both 1-pulse mode and 2-pulse mode are supported as pulse output modes. Select the output
mode best suited to the type of motor driver that is connected.
"Output mode" page 8-15

• Pulse output is started by the PLSX and PLSY instructions.


Pulse output can be performed just be executing the PLSX and PLSY instructions if parameters
are set in advance on KV STUDIO.

• Zero return can be performed by the ORGX and ORGY instructions. (Parameters are set in
advance on KV STUDIO.)
"System Parameters [Zero Return/Jog]" page 8-18

• Jog operation can be performed by the JOGX and JOGY instructions. (Parameters are set in
advance on KV STUDIO.)
"System Parameters [JOG]" page 8-24

• The speed can be changed during operation by the CHGSPX and CHGSPY instructions.
(Parameters are set in advance on KV STUDIO.)
"8-4 Changing Speed during Operation" page 8-31

• Axes can be moved to the home position by the HOMEX and HOMEY instructions. (Parameters
are set in advance on KV STUDIO.)
"System Parameters [Comparator Setup]" page 8-16

8-3
8-1 About Positioning Control

Tip Parameters are stored in control memories CM02000 to CM02379. So, a ladder program for
1000 or more positioning points can be made by rewriting the content of these control
memories.
"Positioning Control Exceeding 32 Points" page 8-59

Note
The above functions are set using KV STUDIO's "Edit CPU positioning parameters"
function.

8
MOTOR CONTROL (POSITIONING CONTROL)

8-4
8-2 Setting Up Parameters and Executing Instructions
This section describes how to set up parameters and execute instructions.

Setting Up Parameters

Set parameters at "Edit CPU positioning parameters" on KV STUDIO.

1 Select {Tool(T)} from the menu.

2 Select {Edit CPU positioning parameters (I)} from the pulldown menu.
The [Edit CPU positioning parameters ] dialog box is displayed.

(The shortcut key is , and the shortcut icon is .)


(The menu displayed by clicking the right mouse button can also be selected from the menu.)

Point Parameters
8

MOTOR CONTROL (POSITIONING CONTROL)


(2) (3) (4) (5) (6) (7) (8)

(1)

Name of Function Setting Range Default See Page


(1) Point No. 0 to 31 8-6
Positioning INC
Positioning ABS
(2) Operation mode Positioning INC 8-6
Speed control CW
Speed control CCW
(3) Target value/travel -2147483648 to 2147483647 0 8-8
(4) Startup speed 50 to 65535 200 8-8
Acceleration/deceleration
(5) 0 to 4000 500 8-8
time
(6) Run speed 50 to 100000 50000 8-9
(7) Stop sensor use ON/OFF OFF 8-10
(8) Stop sensor pulses 0 to 65535 0 8-10

Once parameters are set, they are stored to CM (control memory) on the CPU. Point parameters
are used for both X- and Y-axes.
"8-7 List Devices for Positioning & List of Error Codes" page 8-60

8-5
8-2 Setting Up Parameters and Executing Instructions

Point No. Setting store destination


0 ...... CM02060 to CM02067
1 ...... CM02070 to CM02077
2 ...... CM02080 to CM02087
3 ...... CM02090 to CM02097
...

...
When the checkbox is marked, the display switches to that for the store
destination as shown on the right.

Point No.

0 to 31
8 Point Nos. are used as operands for the PLSX and PLSY instructions. (They can also be set by
devices.)
MOTOR CONTROL (POSITIONING CONTROL)

Execution condition #001


PLSX

When the above ladder rung is executed, pulses are generated according to the point parameter
of point No. 01.

Operation mode

With position control (positioning (incremental and absolute)), objects are made to move from a
certain position by the target value/travel.
With speed control (speed control (CW and CCW)), objects are made to move in the specified
direction until the stop sensor turns ON.

Positioning INC
In this mode, positioning is controlled by incremental values.
Specify the distance from the current position of the object to its travel destination as the travel
amount. For example, to move an object stationary at position A in the figure below to position B,
set the travel amount to "+100". Next, to move the object from position B to position C, set "+200".
Finally, to return the object from position C to position B, set "-200".
When the current position overflows, the warning relay turns ON. Pulse output does not stop.
"8-3 Other Positioning Devices−Warning/clear warning" page 8-27

A B C

+100 +200

-200

Coordinates
Current Position 0 (origin) 100 200 300

8-6
8-2 Setting Up Parameters and Executing Instructions

Positioning ABS
In this mode, positioning is controlled by absolute values.
Specify the distance from the origin to the object travel destination as the target value. For
example, to move an object stationary at position A in the figure below to position B, set the target
value to "+100". Next, to move the object from position B to position C, set "+300". Finally, to
return the object from position C to position B, set "+100".
If absolute positioning is executed when the warning relay is ON, pulse output stops.
"8-3 Other Positioning Devices−Warnings/Clearing warnings" page 8-27

A B C

100 300

100
Coordinates
Current Position 0 (origin) 100 200 300

Speed control CW
Pulses are continuously output in the CW (clockwise) direction at the specified speed regardless
8
of the number of output pulses.

MOTOR CONTROL (POSITIONING CONTROL)


Speed
CW

Time
CCW

Speed control CCW


Pulses are continuously output in the CCW (counterclockwise) direction at the specified speed
regardless of the number of output pulses.
CW
Time

CCW
Speed

Parameter store destination: The parameter is stored as follows to bits 0, 1 of CM02066 + (point
No. x 10).

bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 bit bit0 Description


0 0 Positioning (incremental)
0 1 Positioning (absolute)
1 0 Speed control CW
1 1 Speed control CCW

8-7
8-2 Setting Up Parameters and Executing Instructions

Target value/travel

The position of the travel destination is defined by "target value/travel."


When positioning (absolute) is selected as the operation mode, this setting becomes the "target
value." When positioning (incremental) is selected as the operation mode, this setting becomes
the "travel amount." The target value and travel cannot be set when speed control CW/CCW are
selected as the operation mode.
Frequency (Hz)
Target value/travel (number of output pulses)

Run
speed

Startup
speed
(stop speed)

Time (ms)
8 Acceleration time Deceleration time
MOTOR CONTROL (POSITIONING CONTROL)

Setting range : -2147483648 to 2147483647


Parameter store destination : CM02061 + (point No. x 10) • CM02060 + (point No. x 10)

Upper 16 bits Lower 16 bits

Startup speed

When positioning control is performed, set the output pulse speed at startup. This setting is to
ensure smooth start of motor operation.
Setting range : 50 to 65535 (PPS) (Note that the start speed must be specified lower than
the run speed.)
Parameter store destination : CM02062 + (point No. x 10)

Acceleration/deceleration time

Acceleration time : This is the time it takes for the startup speed to reach the run speed. Setting a
smaller value results in more sudden acceleration and a shorter travel time.
Deceleration time : This is the time it takes for the run speed to reach the stop speed. Setting a smaller
value results in more sudden deceleration and a shorter travel time.
On the KV-1000, the acceleration time and deceleration time are set to the same values.

Speed
Setting range : 0 to 4000 (ms)
When "0" is specified, acceleration
Run
and deceleration change as shown speed
in the figure on the right.
Parameter store destination : CM02063 + (point No. x 10)
An error occurs when the 0 Time
acceleration/deceleration time is
set to "0" and the operation
frequency is a value greater than
65535.
8-8
8-2 Setting Up Parameters and Executing Instructions

Run speed

When positioning control is performed, set the speed at which pulses are output to the motor
during operation.

Setting range : 50 to 100000 (PPS) (Note that the run speed must be specified to the start
speed or greater.)
Parameter store destination : CM02065 + (point No. x 10) • CM02064 + (point No. x 10)

Upper 16 bits Lower 16 bits

Note
(1) Operation when "startup speed = run speed" is as shown in the following figure.
Speed

Run
(startup)
8
speed

MOTOR CONTROL (POSITIONING CONTROL)


0 Time

In this instance, the acceleration/deceleration time is ignored.

(2) Trapezoidal control when a short time (distance) is set is as shown in the following figures:
Speed Speed

Run Run
speed speed Acceleration
Deceleration
Startup Startup
Acceleration Deceleration
speed speed

0 Acceleration time Deceleration time 0 Acceleration time


Time Time

Acceleration/deceleration speed (ramp) = (run speed - startup speed)/ acceleration/deceleration time

In trapezoidal control, the acceleration/deceleration speed (ramp) is controlled at a


fixed speed at all times.
For this reason, the speed is decelerated before the speed reaches the run speed in
trapezoidal control where a short time is set.

8-9
8-2 Setting Up Parameters and Executing Instructions

Stop sensor use

Set use of the stop sensor.


OFF... The stop sensor is not used.
ON ....Pulse output stops after the number of pulses set at Number of step sensor specified
pulses are output.

Parameter store destination: The parameter is stored as follows to bit 4 of CM02066 + (point No. x 10).
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
bit4 Description
0 Do not use stop sensor.
1 Use stop sensor.

Stop sensor pulses

When "Use stop sensor" is set to "ON", pulse output stops after the number of pulses set here are output.
8 Speed Stop sensor input ON
MOTOR CONTROL (POSITIONING CONTROL)

Deceleration

Specified number of pulses

When the number of specified pulses is set to "0", pulse output stops immediately when stop
sensor input turns ON.
The deceleration time is ignored.
Speed Stop sensor input ON

Immediate stop

When the number of specified pulses is set to "65535" (maximum value), the motor decelerates
from the moment that stop sensor input turns ON, and pulse output stops after the deceleration
time has elapsed.
Speed Stop sensor input ON
Deceleration time

Setting range : 0 to 65535


Parameter store destination : CM02067 + (point No. x 10)

8-10
8-2 Setting Up Parameters and Executing Instructions

System Parameters [I/O Setup]

(1)

(2)
(4)
(3)
(6)
(5)
(8)
(7)
(10)
(9)
(11)

(12) 8

MOTOR CONTROL (POSITIONING CONTROL)


Name of Function Setting Range Default
(1) Axis X-axis, Y-axis X-axis
Input setting [CM02000/02001/02018] (X-axis)/[CM02030/02031/02048] (Y-axis)
X-axis CR3002 R00000 to R00003 CR3002
(2) Origin sensor
Y-axis CR3102 R00000 to R00003 CR3102
X-axis
(3) Origin sensor polarity NO contact/NC contact NO contact
Y-axis
X-axis CR3003 R00000 to R00003 CR3003
(4) Stop sensor
Y-axis CR3103 R00000 to R00003 CR3103
X-axis
(5) Stop sensor polarity NO contact/NC contact NO contact
Y-axis
X-axis R00014 (fixed) R00014
(6) Z-phase
Y-axis R00015 (fixed) R00015
X-axis
(7) Z-phase polarity NO contact/NC contact NO contact
Y-axis
X-axis CR3000 R00004 CR3000
(8) CW limit switch
Y-axis CR3100 R00005 CR3100
X-axis
(9) CW limit switch polarity NO contact/NC contact NO contact
Y-axis
X-axis CR3001 R00006 CR3001
(10) CCW limit switch
Y-axis CR3101 R00007 CR3101
X-axis
(11) CCW limit switch polarity NO contact/NC contact NO contact
Y-axis
Output setting [CM02000] (X-axis)/[CM02030] (Y-axis)
(12) Output mode 1 pulse system, 2 pulse system 1 pulse system

8-11
8-2 Setting Up Parameters and Executing Instructions

Origin sensor

"Origin" is the position that is used as the reference for position control. An origin sensor is
installed at the position defined as the origin on an axis.

CR3002 (CR3102) .........Sets CR3002 (X-axis) and CR3102 (Y-axis) as the origin sensor.
R00000 to R00003.........Sets input relays R00000 to R00003 as the origin sensor.
NO contact/NC contact ..Sets the logic of origin sensor input.

When R00000 to R00003 have been set, a zero return is performed taking the preset input as the
origin sensor input.
To use relays other than R00000 to R00003 as the origin sensor input, set these parameters
beforehand to CR3002 (CR3102), and turn CR3002 (CR3102) ON and OFF by the ladder program.

Example
When using input relay R30000 as the
8 origin sensor input of the X-axis
R30000 CR3002
MOTOR CONTROL (POSITIONING CONTROL)

Parameter store destination : The parameter is stored to CM02000 and CM02001.


CM02000 setting: "I/O detailed settings" page 8-61
CM02001 setting: "Sensor enable details" page 8-63

Stop sensor

If a moving object moves to the stop sensor during operation and causes the stop sensor to turn
ON, the object decelerates to a stop immediately from that position, or decelerates to a stop after
moving by a predetermined distance (number of stop sensor specified pulses).
Note, however, that the stop sensor is ignored when Use stop sensor is set to "OFF" in the point
parameters.

CR3003 (CR3103) .........Sets CR3003 (X-axis) and CR3103 (Y-axis) as the stop sensor.
R00000 to R00003.........Sets input relays R00000 to R00003 as the stop sensor.
NO contact/NC contact ..Sets the logic of stop sensor input.

When R00000 to R00003 have been set, movement stops taking the preset input as the stop
sensor input.
To use relays other than R00000 to R00003 as the stop sensor input, set these parameters beforehand
to CR3003 (CR3103), and turn CR3003 (CR3103) ON and OFF by the ladder program.

Example
When using input relay R30001 as the
R30001 CR3003
stop sensor input of the X-axis

Parameter store destination : The parameter is stored to CM02000 and CM02001.


CM02000 setting: "I/O detailed settings" page 8-61
CM02001 setting: "Sensor enable details" page 8-63

8-12
8-2 Setting Up Parameters and Executing Instructions

Z-phase

"Z-phase" is used for increasing the positional accuracy when zero return is completed.
Generally, the zero signal of a pulse encoder is used as the Z-phase.

R00014 (R00015) ..........R00014 (X-axis) and R00015 (Y-axis) are set as fixed.
NO contact/NC contact ..Sets the logic of Z-phase input.

Parameter store destination: The parameter is stored as follows:

bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axi Store Destination bit12 Description
X CM02001 0 NO contact
Y CM02031 1 NC contact

CW limit switch/CCW limit switch

To ensure safety, limit switches are installed at both ends of the axis along which moving objects
8

MOTOR CONTROL (POSITIONING CONTROL)


or the workpiece can move.

CR3000 (CR3100) .........CR3000 (CW) and CR3001 (CCW) are set as the limit switch inputs on
the X-axis, and CR3100 (CW) and CR3101 (CCW) are set as the limit
switch inputs on the Y-axis.
R00004 (R0005) ............Input relays R00004 (CW) and R00006 (CCW) are set as the limit switch
input on the X-axis, and input relays R00005 (CW) and R00007 (CCW)
are set as the limit switch input on the Y-axis.
NO contact/NC contact ..Sets the logic of limit switch input.

The limit switch installed at the end of CW travel is called the "CW limit switch."
Movement in CW direction

CCW direction CW dire

⋅Forward rotation (current coordinate increment direction)


Stop sensor

CW limit switch

The limit switch installed at the end of CCW travel is called the "CCW limit switch."
Movement in CCW direction

CCW direction CW dire

⋅Reverse rotation (current coordinate decrement direction)


Stop sensor

CCW limit switch

When CR3000 (CW) and CR3001 (CCW) are set for the X-axis and CR3100 (CW) and CR3101
(CCW) are set for the Y-axis, turn CR3000 (CW) and CR3001 (CCW), and CR3100 (CW) and
CR3101 (CCW) ON/OFF by the input relay to which the actual limit switch is connected.
When R00004 (CW) and R00006 (CCW) are set for the X-axis and R00005 (CW) and R00007
(CCW) are set for the Y-axis, the preset input is set as the limit switch.
8-13
8-2 Setting Up Parameters and Executing Instructions

Parameter store destination: The parameter is stored as follows:

CW limit switch polarity CR3000 (X-axis), CR3100 (Y-axis)


bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axi Store Destination bit10 Description
X CM02001 0 NO contact
Y CM02031 1 NC contact

CCW limit switch polarity CR3001 (X-axis), CR3101 (Y-axis)


bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axi Store Destination bit11 Description
X CM02001 0 NO contact
Y CM02031 1 NC contact

CW limit switch use R00004 (X-axis), R00005 (Y-axis)


bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axi Store Destination bit8 Description
X CM02018 0 Disabled

8 Y CM02048 1 Enabled
MOTOR CONTROL (POSITIONING CONTROL)

CCW limit switch use R00006 (X-axis), R00007 (Y-axis)


bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axi Store Destination bit9 Description
X CM02018 0 Disabled
Y CM02048 1 Enabled

Example
To connect the X-axis limit switch CW to
R30002 CR3000
input relay R30002 and limit switch CCW
to input relay R30003 for use
R30003 CR3001

When the limit switch turns ON, the limit error (error code: 31, 32, and 33) is generated, and pulse
output is stopped. Eliminate the cause of the error, and reset error flags CR3007/CR3107 to clear
the error.

CAUTION • For safety's sake, be sure to use NC (normally closed) type limit switches. If
NO (normally open) type limit switches are used, the limit switch may not
operate if a line break occurs, which may cause a hazard.
• When installation of positioning devices is completed, be sure to check that
the limit switches function properly.
• Allow sufficient travel allowance for the limit switch detection dog to
prevent the object from overtraveling the limit switch when the motor makes
an emergency stop.

8-14
8-2 Setting Up Parameters and Executing Instructions

Output mode

Select the output mode. Select from R00500 and R00501 for the X-axis, and R00502 and R00503
for the Y-axis.

1 pulse system ...............Sets the output mode to 1 pulse system.


2 pulse system ...............Sets the output mode to 2 pulse system.

Parameter store destination: The parameter is stored as follows:


bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axi Store Destination bit0 Description
X CM02000 0 1 pulse system
Y CM02030 1 2 pulse system

Connection example
1axis connection 8
1 pulse system 2 pulse system

MOTOR CONTROL (POSITIONING CONTROL)


X-axis Pulse X-axis X-axis Forward rotation pulse X-axis
Motor

Motor
driver

driver
R00500 R00500
Direction of rotation Reverse rotation pulse
R00501 R00501

2 axis connection
1 pulse system 2 pulse system
X-axis Pulse X-axis X-axis Forward rotation pulse X-axis
Motor

Motor
driver

R00500 R00500 driver


Direction of rotation Reverse rotation pulse
R00501 R00501

Y-axis Pulse Y-axis Y-axis Forward rotation pulse Y-axis


Motor

Motor
driver

driver

R00502 R00502
Direction of rotation Reverse rotation pulse
R00503 R00503

8-15
8-2 Setting Up Parameters and Executing Instructions

System Parameters [Comparator Setup]

(1)

(2)
(3)

(4)
(5)

8 (6)
MOTOR CONTROL (POSITIONING CONTROL)

Name of Function Setting Range Default


(1) Axis X-axis, Y-axis X-axis
Comparator 0 setup
Disabled
Stop sensor
(2) Function Disabled
CW limit switch
CCW limit switch
(3) Setting value -2147483648 to 2147483647 0
Comparator 1 setup
Disabled
Stop sensor
(4) Function Disabled
CW limit switch
CCW limit switch
(5) Setting value -2147483648 to 2147483647 0
Comparator 2 setup
(6) Value for interrupts -2147483648 to 2147483647 0

About comparators

During positioning control, the pulse that was output is counted as the "current position (current
value)." This current value can be compared with the setting values of (3) and (5), and the same
operation as that specified at (2) and (4) can be performed when these values match.
Also, an interrupt can be generated when these values match with the setting specified at (6).

8-16
8-2 Setting Up Parameters and Executing Instructions

Function

Disabled ............................No operation is performed according to the comparator number.


Stop sensor .......................The same operation as input by the stop sensor is performed.
CW limit switch..................The same operation as input by the CW limit switch is performed.
CCW limit switch ...............The same operation as input by CCW limit switch is performed.

Parameter store destination: The parameter is stored as follows:


Comparator 0
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axi Store Destination bit5 bit4 Operation at Current Position Comparator 0 Match
X CM02000 0 0 Disabled
Y CM02030 0 1 Used as stop sensor
1 0 Used as CW limit switch
1 1 Used as CCW limit switch

Comparator 1
Axi Store Destination
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
bit7 bit6 Operation at Current Position Comparator 1 Match
8

MOTOR CONTROL (POSITIONING CONTROL)


X CM02000 0 0 Disabled
Y CM02030 0 1 Used as stop sensor
1 0 Used as CW limit switch
0 1 Used as CCW limit switch

* When the same function is set on comparators 0 and 1, comparator 1 becomes invalid.

Setting value/Value for interrupts

Set the value (comparator value) to be used for comparing the number (current position (current
value)) of output pulses.

Setting range : -2147483648 to 2147483647


Parameter store destination Comparator 0 = CM02003 (upper) • CM02002 (lower)
:X-axis Comparator 1 = CM02005 (upper) • CM02004 (lower)
Comparator 2 = CM02029 (upper) • CM02028 (lower)
Comparator 0 = CM02033 (upper) • CM02032 (lower)
Y-axis Comparator 1 = CM02035 (upper) • CM02034 (lower)
Comparator 2 = CM02059 (upper) • CM02058 (lower)

Note
The KV-1000 recognizes the setting values for interrupts (X-axis: CM02029 • CM02028, Y-axis:
CM02059 • CM02058) by comparator 2 when the CHGSPX or CHGSPY instructions are
executed or when pulse output by the PLSX or PLSY instruction is started. Operation will not
be performed correctly merely by written the setting values to the control memory.
To use the interrupt caused by comparator 2, write the setting value to the control
memory, and then execute the CHGSPX, CHGSPY, PLSX, PLSY instructions.
"Reference Example of Changing Speed during Operation (2)" page 8-56

8-17
8-2 Setting Up Parameters and Executing Instructions

System Parameters [Zero Return/Jog]

(1)

(2)
(3)
(4)
(5)
(6)
(7)
(8)

(9)
8
MOTOR CONTROL (POSITIONING CONTROL)

Name of Function Setting Range Default


(1) Axis X-axis, Y-axis X-axis
Zero return
(2) Start speed 50 to 65535 200
Acceleration/deceleration
(3) 0 to 4000 500
time
(4) Operation speed 50 to 100000 50000
(5) Return direction CCW/CW CCW
Org sensor rise
(6) Return detailed position Org sensor mid Org sensor rise
Org sensor & Zphs
Output OFF
(7) Clear deviation counter Output OFF
Output ON
Travel OFF
(8) Auto home position Travel OFF
Travel ON
Home position coordinates
(9) Setting value -2147483648 to 2147483647 0

About zero return

"Zero return" is the operation of physically returning an object to its origin after it has been moved.
If a power interruption occurs during positioning, or an axis is manually moved while the power is
turned OFF, the actual position of the object will no longer match the position of the object stored
internally on the KV-1000.
Performing a zero return matches the internally stored current position (current value) to the
actual origin.

8-18
8-2 Setting Up Parameters and Executing Instructions

Start speed

Set the output pulse speed at startup for zero return operation or home position operation.

Setting range : 50 to 65535 (Note that the start speed must be specified lower than the
operation speed.)
Parameter store destination : X-axis CM02006
Y-axis CM02036

Acceleration/deceleration time

Acceleration time : This is the time it takes for the startup speed to reach the zero return
operation speed. Setting a smaller value results in more sudden
acceleration and a shorter travel time.
Deceleration time : This is the time it takes for the zero return operation speed to reach the start
speed. Setting a smaller value results in more sudden deceleration and a 8
shorter travel time.

MOTOR CONTROL (POSITIONING CONTROL)


On the KV-1000, the acceleration time and deceleration time are set to the same values.

Setting range : 0 to 4000


Parameter store destination : X-axis CM02007
Y-axis CM02037

Operation speed

Set the pulse speed to be output to the motor during zero return operation or home position
operation.

Setting range : 50 to 100000


Parameter store destination :
X-axis CM02009(upper) • CM02008(lower)
Y-axis CM02039(upper) • CM02038(lower)

Note
(1) Operation when "start speed = operation speed" is as shown in the following figure.
Speed

Operation
(start)
speed

0 Time

In this instance, the acceleration/deceleration time is ignored.

8-19
8-2 Setting Up Parameters and Executing Instructions

(2) Trapezoidal control when a short time (distance) is set is as shown in the following figures:
Speed Speed

Operation Operation
speed speed Acceleration
Deceleration
Start Start
Acceleration Deceleration
speed speed

0 Acceleration time Deceleration time 0 Acceleration time


Time Time

Acceleration/deceleration speed (ramp) = (operation speed - start speed)/acceleration/deceleration time


In trapezoidal control, the acceleration/deceleration speed (ramp) is controlled at a
fixed speed at all times.
For this reason, the speed is decelerated before the speed reaches the operation
speed in trapezoidal control where a short time is set.

Return direction
8
Specify the start direction of zero return.
MOTOR CONTROL (POSITIONING CONTROL)

CW ..........Zero return is started in the CW (plus) direction.


CCW .......Zero return is started in the CCW (minus) direction.
"CW limit switch/CCW limit switch" page 8-13

Parameter store destination: The parameter is stored as follows:


bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axi Store Destination bit1 Description
X CM02000 0 CCW
Y CM02030 1 CW

Return detailed position

Sets the method for detecting the origin stop position.

Parameter store destination: The parameter is stored as follows:


bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axi Store Destination bit1 bit0 Description
X CM02018 0 0 Origin sensor rise
Y CM02048 0 1 Origin sensor midpoint
1 0 Origin sensor and Z-phase
1 1 Setting disabled

Tip • Advantages of setting "Org sensor mid"


When "Org sensor mid" is set, the zero return completion position is less likely to change
over time compared with when "Org sensor rise" is set even if the amount of light picked up
by the origin sensor deteriorates.
• Advantages of setting "Org sensor & Zphs"
When "Org sensor & Zphs" is set, it is less likely that the zero return position will deviate
compared with when "Org sensor rise" is set as the Z-phase of the encoder hardly deviates
even if the origin sensor ON position deviates slightly.
8-20
8-2 Setting Up Parameters and Executing Instructions

Clear deviation counter

The clear deviation counter signal R00506 (X-axis) and R00507 (Y-axis) are automatically output
when zero return is completed, when an error is generated during pulse output, or actuation of a
limit switch is detected. (A ladder program is not required.)
About control relays and control memories when an error is generated
"Other Positioning Devices−Control Relays for Positioning Control" page 8-27

Parameter store destination: The parameter is stored as follows:


bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axi Store Destination bit3 Description
X CM02018 0 Output OFF
Y CM02048 1 Output ON

Auto home position

The workpiece can move automatically to the home coordinate position after zero return is 8
completed.

MOTOR CONTROL (POSITIONING CONTROL)


Parameter store destination: The parameter is stored as follows:
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axi Store Destination bit4 Description
X CM02018 0 Travel OFF
Y CM02048 1 Travel ON

Home position coordinates

Set the home position.

Setting range : -2147483648 to 2147483647


Parameter
X-axis CM02027 (upper) • CM02026 (lower)
store destination :
Y-axis CM02057 (upper) • CM02056 (lower)

■ Zero Return Path


The path that a moving object travels along by zero return differs according to the parameters set
in KV STUDIO and the position of the moving object when zero return is started. Zero return is
also possible if the error has been cleared even if one of the CW and CCW limit switches is ON.
When the zero return direction is set to "CW", replace with the figures in parentheses "()".

8-21
8-2 Setting Up Parameters and Executing Instructions

When [Return detailed pos] is set to "Org sensor rise"

[Return direction] CCW(CW)


Start position: CW (CCW) side
(1) The workpiece accelerates to the operating speed, and moves in
the zero return direction.
(2) The workpiece decelerates when the origin sensor turns ON and
comes to a stop at the start speed. The origin sensor ON position
is memorized as the "(A) position."
Acceleration/deceleration Origin sensor Acceleration/deceleration (3) The workpiece moves by trapezoidal control up to the "(A)
position" from the stop position.
[Operation (4) After moving to the "(A) position," the workpiece moves to the
(3)
Speed in CW (CCW) speed] origin sensor OFF position and comes to a stop.
(4)
direction [Start speed] (5) The workpiece moves to the origin side, and comes to a stop
Origin Start position when the origin sensor turns ON. (zero return completed)
CCW(CW) CW(CCW)
* Acceleration/deceleration speed = (operation speed - start
Speed in CCW (CW) [Start speed] speed)/acceleration/deceleration time
direction (2) (5) (1)
[Operation * When the limit switch in the direction of movement during the
speed] operations in (1) and (2) turns ON, movement stops immediately
Acceleration/ for 300 ms. "Clear deviation counter" also turns ON while
Acceleration/deceleration
deceleration movement has stopped. Movement is then resumed in the
(A) opposite direction, and an abnormal stop occurs when the limit
switch on the start position side turns ON.
8 * "Clear deviation counter" turns ON for 50ms when zero return is
completed.
MOTOR CONTROL (POSITIONING CONTROL)

Start position: CCW (CW) side (1) (limit switch turns ON and origin direction stop position is outside origin sensor range)

(1) The workpiece accelerates to the operation speed, and moves in


the zero return direction.
(2) The workpiece stops immediately when the limit switch turns ON,
and accelerates to the operation speed and moves.
(3) The workpiece decelerates when the origin sensor turns ON and
comes to a stop at the start speed.
Acceleration/deceleration Origin sensor Acceleration/deceleration (4) The workpiece accelerates to the origin sensor.
(5) The workpiece decelerates when the origin sensor turns ON and
[Operation speed] comes to a stop at the start speed. The origin sensor ON position
(3)
Speed in CW (CCW) (2) (6) is memorized as the "(A) position."
direction [Start speed] (6) The workpiece moves by trapezoidal control up to the "(A)
(7)
Start position Origin position" from the stop position.
CCW(CW) CW(CCW) (7) After moving to the "(A) position," the workpiece moves to the
(8) origin sensor OFF position and comes to a stop.
Speed in CCW (CW) [Start speed] (8) The workpiece moves to the origin side, and comes to a stop
direction (5) (4) when the origin sensor turns ON. (zero return completed)
(1)
[Operation speed]

Acceleration/deceleration
* When the limit switch in the direction of movement during the
Limit switch operation in (1) turns ON, movement stops immediately for 300
(A) ms. "Clear deviation counter" also turns ON while movement has
stopped. The operation in (2) is then started.
* An abnormal stop occurs when the limit switch on the start
position side turns ON during the operation in (3).
* "Clear deviation counter" turns ON for 50ms when zero return is
completed.

Start position: CCW (CW) side (2) (limit switch turns ON and origin direction stop position is inside origin sensor range)
(1) The workpiece accelerates to the operation speed, and moves in
the zero return direction.
(2) The workpiece stops immediately when the limit switch turns ON,
and accelerates to the operation speed and moves.
Acceleration/deceleration Origin sensor Acceleration/deceleration (3) The workpiece decelerates when the origin sensor turns ON and
comes to a stop at the start speed.
[Operation speed] (4) After moving, the workpiece moves to the origin sensor OFF
Speed in CW (CCW) (2) (3) (4) position and comes to a stop.
direction [Start speed] (5) The workpiece moves to the origin side, and comes to a stop
Start position Origin when the origin sensor turns ON. (zero return completed)
CCW(CW) CW(CCW)
* When the limit switch in the direction of movement during the
Speed in CCW (CW) [Start speed]
direction (5) operation in (1) turns ON, movement stops immediately for 300
(1) ms. "Clear deviation counter" also turns ON while movement has
[Operation speed]
stopped. The operation in (2) is then started.
* An abnormal stop occurs when the limit switch on the start
Limit switch Acceleration/deceleration
position side turns ON during the operation in (3).
* "Clear deviation counter" turns ON for 50ms when zero return is
completed.

8-22
8-2 Setting Up Parameters and Executing Instructions

Start position: Inside origin sensor range

Origin sensor
(1) The workpiece moves in the direction opposite the zero return
[Operation speed] direction to the origin sensor OFF position at the start speed and
Speed in CW (CCW) (1) comes to a stop.
direction [Start speed]
(2) The workpiece moves to the origin side, and comes to a stop
Origin
CCW(CW) CW(CCW) when the origin sensor turns ON. (zero return completed)
Start position
Speed in CCW (CW) [Start speed]
direction (2) * "Clear deviation counter" turns ON for 50ms when zero return is
[Operation speed] completed.

When [Return detailed pos] is set to "Org sensor mid"

[Return direction] CCW(CW)


(1) After operation at origin sensor up edge is completed, the
Acceleration/deceleration Origin sensor Acceleration/deceleration
(3) [Operation speed]
workpiece moves in the direction opposite the zero return
direction to the origin sensor OFF position at the startup speed
and comes to a stop. The position after operation at origin sensor
8
(2)
Speed in CW (CCW) [Start speed] up edge is completed is memorized as the "(B) position."

MOTOR CONTROL (POSITIONING CONTROL)


direction (2) The workpiece moves to the origin sensor ON position at the start
Origin speed. The origin sensor ON position is memorized as the "(C)
CCW(CW) CW(CCW) position."
Origin at "origin (3) The workpiece moves by trapezoidal control from the "(C)
Speed in CCW (CW) sensor up edge"
position" to the "(B) position" and comes to a stop.
direction
[Start speed] (4) The workpiece moves by trapezoidal control to the origin sensor
(1) (4) [Operation speed] midpoint calculated by the "(C) position" to the "(B) position" and
comes to a stop. (zero return completed)

(C) Origin sensor (B) Note At the origin at "origin sensor up edge," "Clear deviation
midpoint
counter" does not turn ON.

When [Return detailed pos] is set to "Org sensor & Zphs"

[Return direction] CCW(CW)

Origin sensor

[Operation speed]
Speed in CW (CCW) [Start speed] (1) Operation up to when the workpiece comes to the stop is the
Operation at origin same as that for "origin sensor up edge."
direction
sensor up edge (1)
(2) After the workpiece moves to the origin side at the startup speed
Origin
CCW(CW) CW(CCW) and the origin sensor turns ON, the Z-phase turns ON and the
workpiece comes to a stop. (zero return completed)
Speed in CCW (CW)
(2)
direction
[Start speed] * "Clear deviation counter" turns ON for 50ms when zero return is
[Operation speed] completed.

Z-phase

Note
"Clear deviation counter" must be set to "Output ON" in the system parameters.
"Clear deviation counter" page 8-21

8-23
8-2 Setting Up Parameters and Executing Instructions

System Parameters [JOG]

(1)

(2)
(3)
(4)

(5)
(6)

8
MOTOR CONTROL (POSITIONING CONTROL)

Name of Function Setting Range Default


(1) Axis X-axis, Y-axis X-axis
JOG
(2) Startup speed 50 to 65535 200
(3) Acceleration/deceleration time 0 to 4000 500
(4) Operating speed 50 to 100000 50000
CM default for changing setting value
(5) Change current value -2147483648 to 2147483647 0
(6) Change operating speed 50 to 100000 0

Startup speed

Set the output pulse speed at startup for jog operation.

Setting range : 50 to 65535 (Note that the start speed must be specified lower than the
operating speed.)
Parameter store destination : X-axis CM02010
Y-axis CM02040

Acceleration/deceleration time

Acceleration time : This is the time it takes for the startup speed to reach the jog speed. Setting a
smaller value results in more sudden acceleration and a shorter travel time.
Deceleration time : This is the time it takes for the jog speed to reach the startup speed. Setting a
smaller value results in more sudden deceleration and a shorter travel time.

On the KV-1000, the acceleration time and deceleration time are set to the same values.

Setting range : 0 to 4000


Parameter store destination :
X-axis CM02011
Y-axis CM02041

8-24
8-2 Setting Up Parameters and Executing Instructions

Operating speed

Set the pulse speed to be output to the motor during jog operation.

Note
(1) Operation when "startup speed = operating speed" is as shown in the following figure.
Speed

Operation
(start)
speed

0 Time

In this instance, the acceleration/deceleration time is ignored.

(2) Jog operation when a short time (distance) is set is as shown in the following figures:
Speed Speed

Operating Operating
Acceleration
8
speed speed
Deceleration

MOTOR CONTROL (POSITIONING CONTROL)


Startup Acceleration Deceleration Startup
speed speed

0 Acceleration time Deceleration time 0 Acceleration time


Time Time
Jog operation Jog operation Jog operation Jog operation
ON OFF ON OFF

Acceleration/deceleration speed (ramp) = (operating speed - startup speed)/acceleration/deceleration time

In jog operation, the acceleration/deceleration speed (ramp) is controlled at a fixed


speed at all times.
For this reason, the speed is decelerated before the speed reaches the operating
speed in jog operation where a short time is set.

Setting range : 50 to 100000


Parameter store destination : X-axis CM02013 (upper) • CM02012 (lower)
Y-axis CM02043 (upper) • CM02042 (lower)

Change current value (default)

During positioning control, the pulse that was output is counted as the "current position (current value)."
When the current value change request relay turns ON (level detection), the current position
(current value) is changed to the value currently stored in control memory. (when pulse output is
stopped only)

With current value change, set the default to be stored to control memory.

Parameter store destination: The parameter is stored as follows:


Axis Corresponding Current Value Change Request Relay No. of Control Memory to Store Setting Value
X CR3011 CM02015 (upper) • CM02014 (lower)
Y CR3111 CM02045 (upper) • CM02044 (lower)

8-25
8-2 Setting Up Parameters and Executing Instructions

Change operating speed (default)

During positioning control, operating is performed at the value (speed) set as the operating speed.
When the operating speed change request relay turns ON (level detection) during positioning
control, the operating speed is changed to the value currently stored in control memory.

With operating speed change, set the default to be stored to control memory.

Parameter store destination: The parameter is stored as follows:

Axis Corresponding Operating speed Change No. of Control Memory to Store Setting Value
Request Relay
X CR3012 CM02017 (upper) • CM02016 (lower)
Y CR3112 CM02047 (upper) • CM02046 (lower)

8
MOTOR CONTROL (POSITIONING CONTROL)

8-26
8-3 Other Positioning Devices
This section describes devices that are useful in positioning control other than control relays that
are used in the parameter setup.

Control Relays for Positioning Control

Zero return in progress [X-axis: CR3004, Y-axis: CR3104]

This control relay turns ON during zero return operation, and turns OFF when zero return
operation ends.
"Operation Timing Chart" page 8-30

Zero return completed [X-axis: CR3005, Y-axis: CR3105]

This control relay is set when zero return is completed, and is reset at the next pulse output.
"Operation Timing Chart" page 8-30
8
Error/clear error [X-axis: CR3007, Y-axis: CR3107]

MOTOR CONTROL (POSITIONING CONTROL)


This control relay turns ON when an error occurs. The error code is stored to CM02024 (X-axis)
and CM02054 (Y-axis).
The error state can be cleared by forcibly resetting this control relay by the ladder program.
When an error is generated during pulse output, operation stops.
When an error is generated, pulse output is stopped.
Clearing of errors is not accepted while the deviation counter is outputting (50 msec) and
inversion is stopped (300 msec) by limit detection during zero return operation. (Turns ON again
at the END line.)
To clear an error, clear by resetting CR3007 and CR3107 until the error (CR3007, CR3107) turns OFF.
Example) Clear error instruction CR3007 MR0000

MR0000

MR0000 CR3007
RES

Warning/clear warning [X-axis: CR3008, Y-axis: CR3108]

This control relay turns ON when an overflow at the current position occurs.
The warning state can be cleared by forcibly resetting this control relay by the ladder program.
Operation is not stopped even if a warning is generated during pulse output.

Overflow at current position


Axis Current Position Range
X CM02021 (upper) • CM02020 (lower) -2147483648 to 2147483647
Y CM02051 (upper) • CM02050 (lower) -2147483648 to 2147483647

8-27
8-3 Other Positioning Devices

Pulse output in progress/emergency stop [X-axis: CR3009, Y-axis: CR3109]

This control relay turns ON during pulse output.


The emergency stop instruction is issued to generate an error state by forcibly resetting this
control relay from the ladder program.
"Operation Timing Chart" page 8-30

Start of driver operation [X-axis: CR3010, Y-axis: CR3110]

Operation at the point No. currently stored to CM02025 (X-axis) and CM02055 (Y-axis) is started
at the up edge of this control relay.
This control relay turns ON during pulse output.
* Driver operation can be started without operating this relay by executing the PLSX and PLSY
instructions.

8 Positioning completed [X-axis: CR3006, Y-axis: CR3106]


MOTOR CONTROL (POSITIONING CONTROL)

This control relay is set when positioning is completed and zero return is completed. It is reset
when the next pulse is output.
"Operation Timing Chart" page 8-30

Current value change request [X-axis: CR3011, Y-axis: CR3111]

The current position (current value) is changed when this relay turns ON (only when pulse output
is stopped).
The value to be changed must be stored in the control memory in advance.
"Change current value (default)" page 8-25

Operation Relay No. Control Memory for Storing Value to Change


X-axis current value
CR3011 CM02015 (upper) • CM02014 (lower)
change request
Y-axis current value
CR3111 CM02045 (upper) • CM02044 (lower)
change request

Run speed change request [X-axis: CR3012, Y-axis: CR3112]

The run speed is changed when this relay turns ON during position control/speed control.
The value to be changed must be stored in the control memory in advance.
"Change operating speed (default)" page 8-26

Operation Relay No. Control Memory for Storing Value to Change


X-axis run speed
CR3012 CM02017 (upper) • CM02016 (lower)
change request
Y-axis run speed
CR3112 CM02047 (upper) • CM02046 (lower)
change request

Comparator 2 [X-axis: CR3013, Y-axis: CR3113]

This control relay does not actually turn ON/OFF; it is used as a symbol when making the ladder
program.
8-28
8-3 Other Positioning Devices

Control Memories for Positioning Control

Operation point No. (M code) [X-axis: CM02019, Y-axis: CM02049]

The point No. at which operation is started when the PLSX/PLSY, JOGX/JOGY, or ORGX/ORGY
instructions have been executed is stored to this control memory. "1001" is stored when the JOG
instruction is executed; "1000" is stored when the ORG instruction is executed; and "1002" is
stored during move to home.

Current position (current value)[X-axis: CM02021•CM02020, Y-axis: CM02051•CM02050]

The current position (PLS) is stored.

Current speed [X-axis: CM02023•CM02022, Y-axis: CM02053•CM02052]


8
The current speed (Hz) is stored.

MOTOR CONTROL (POSITIONING CONTROL)


Error code [X-axis: CM02024, Y-axis: CM02054]

The error code is stored.


"List of Error Codes" page 8-65

Specified point No. [X-axis: CM02025, Y-axis: CM02055]

This control memory is used in combination with TCHX/TCHY or CR3010/CR3110.

Number Attribute
X-axis Y-axis Description R: read-only
of words Blank: R/W
Status
CM02019 CM02049 Operation point No. (M code) 1
CM02020 CM02050
Current position 2
CM02021 CM02051
R
CM02022 CM02052
Current speed 2
CM02023 CM02053
CM02024 CM02054 Error Code 1
Specified point No.
CM02025 CM02055 (for TCHX/TCHY instruction for X-axis: CR3010, 1
Y-axis: CR3110)

8-29
8-3 Other Positioning Devices

Operation Timing Chart

(1) (2) (3) (4)

PLSX0 instruction execution

PLSX1 instruction execution

ORGX instruction execution

Jog instruction execution


Pulse output in progress
Emergency stop CR3009
M code
*
*
*
*
*
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1001
1001
1001
1001
1001
1001
1001
1001
1001
1001
1001
(operation in progress No.) CM02019
Positioning completed CR3006

Zero return in progress CR3004


8
Zero return completed CR3005
MOTOR CONTROL (POSITIONING CONTROL)

(1) Executing the PLSX0 instruction starts pulse output. The pulse output in progress relay
CR3009 turns ON, and the positioning completed relay CR3006 and zero return completed
relay CR3005 turn OFF.
At the same time, the currently operating point No. "0" is written to M code CM02019.
(2) Executing the PLSX1 instruction starts pulse output. The pulse output in progress relay
CR3009 turns ON, and the positioning completed relay CR3006 and zero return completed
relay CR3005 turn OFF.
At the same time, the currently operating point No. "1" is written to M code CM02019.
(3) Executing the ORGX instruction starts zero return. The pulse output in progress relay
CR3009 and zero return in progress relay CR3004 turn ON, and the zero return completed
relay CR3005 and the positioning completed relay CR3006 turn OFF.
At the same time, zero return code "1000" is written to M code CM02019.
(4) Executing the JOG instruction starts jog operation. The pulse output in progress relay
CR3009 turns ON, and the zero return completed relay CR3005 and the positioning
completed relay CR3006 turn OFF.
At the same time, jog operation code "1001" is written to M code CM02019.

8-30
8-4 Changing Speed during Operation
This section describes how to change speed during operation.

Outline of Changing Speed during Operation

There are three ways of changing the speed during operation.


• By using the run speed change request relay CR3012 (X-axis) CR3112 (Y-axis)
• By using the CHGSPX and CHGSPY instructions
• By using comparator 2 interrupt relay CR3013 (X-axis) and CR3113 (Y-axis)

Note
• When operation is performed with the acceleration/deceleration time set to "0", the
speed cannot be changed to a speed less than (run speed + 1) Hz.
• When operation is performed with the startup speed set to the same speed as the
run speed, the speed cannot be changed.
• The speed cannot be changed to less than the startup speed. The speed becomes
the startup speed when it is less than the startup speed.
8

MOTOR CONTROL (POSITIONING CONTROL)


■ By using the run speed change request relay CR3012 (X-axis) CR3112 (Y-axis)
The speed can be changed to the run speed change setting value [CM02017 • CM02016] while
the run speed change request relay is ON during pulse output.
Execution condition Recognition of Operating speed change
ON execution condition request relay ON

Output Input Main routine Output Input Execution condition CR3012


processing processing program processing processing
SET

Speed

CM02017
CM02016

Speed change Time

"Reference Example of Changing Speed during Operation (1)" page 8-54

■ By using the CHGSPX and CHGSPY instructions


The speed can be changed to the run speed specified by S while the execution condition is
ON during pulse output.
The value specified by S is stored to run speed change setting value [CM02017 • CM02016].

Execution condition Recognition of Execution of


ON execution condition CHGSPX processing

Output Input Main routine Output Input Execution condition S


processing processing program processing processing
CHGSPX

Speed

Speed change Time

8-31
8-4 Changing Speed during Operation

■ By using comparator 2 interrupt relay CR3013 (X-axis) and CR3113 (Y-axis)


Comparator 2 compares the setting value of comparator 2 of the "system parameter [comparator
setting]" with the current value, and can generate an interrupt when the values match.
Interrupt Relay Store Destination of Comparator 2 Setting Value
X-axis CR3013 CM02029 (upper) • CM02028 (lower)
Y-axis CR3113 CM02059 (upper) • CM02058 (lower)

Use the "INT instruction" to use comparator 2. Note, however, that this control relay does not
actually turn ON/OFF; it is used a symbol when making ladder programs.

Example
(X-axis) INT (Y-axis) INT
CR3013 CR3113

8 "System Parameters [Comparator Setup]" page 8-16


KV-1000 Instruction Reference Manual "INT Instruction"
MOTOR CONTROL (POSITIONING CONTROL)

After the interrupt cause is generated by comparator 2, the speed is immediately changed to the
run speed specified by S .

Generation of interrupt X-axis current value [CM02021·CM02020]=Comparator 2 setting value [CM02029·CM02028]


by comparator 2 Y-axis current value [CM02051·CM02050]=Comparator 2 setting value [CM02059·CM02058]

Output Input Main routine Output Input


processing processing program processing processing

Input
processing Interrupt program
CR2008
EI

END
Speed
INT
S CR3013

CR2002 S
CHGSPX

RETI

Speed change Time


ENDH

Note
The KV-1000 recognizes the setting values for interrupts (X-axis: CM02029 • CM02028, Y-axis:
CM02059 • CM02058) by comparator 2 when the CHGSPX or CHGSPY instructions are
executed or when pulse output by the PLSX or PLSY instruction is started. Operation will not
be performed correctly merely by written the setting values to the control memory.
To use the interrupt caused by comparator 2, write the setting value to the control
memory, and then execute the CHGSPX, CHGSPY, PLSX, PLSY instructions.
"Reference Example of Changing Speed during Operation (2)" page 8-56

8-32
8-5 Positioning Instructions
Positioning instructions are executed to perform motor control (positioning control).

List of Positioning Instructions

The following 12 positioning instructions are available.


Instruction Mnemonic Brief Description Page
Trapezoidal control
PLSX Starts trapezoidal control on X-axis. 8-36
X-axis
Trapezoidal control
PLSY Starts trapezoidal control on Y-axis. 8-36
Y-axis
Jog operation X-
JOGX Executes jog operation on X-axis. 8-38
axis
Jog operation Y-
JOGY Executes jog operation on Y-axis. 8-38
axis
Zero return X-axis ORGX Starts zero return on X-axis. 8-40
Zero return Y-axis ORGY Starts zero return on Y-axis. 8-40
Teaching X-axis TCHX Captures current value of X-axis. 8-42
Teaching Y-axis TCHY Captures current value of Y-axis. 8-42 8
Move to home

MOTOR CONTROL (POSITIONING CONTROL)


position instruction HOMEX Starts move to home position on X-axis. 8-44
X-axis
Move to home
position instruction HOMEY Starts move to home position on Y-axis. 8-44
Y-axis
Change speed
CHGSPX Changes the run speed on the X-axis. 8-46
instruction X-axis
Speed change
CHGSPY Changes the run speed on the Y-axis. 8-46
instruction Y-axis

Positioning instructions are executed according to parameters preset on KV STUDIO.

(1) Initial parameter setup Set up parameters on KV STUDIO.

(2) Create the ladder program Make a ladder program using positioning
instructions.

When the ladder program is executed, positioning


(3) Execution of ladder program
control is started according to the parameters set at
(1).

No Change parameter
settings during ladder program The content of parameters can also be changed by
execution? directly rewriting the content of control memory on
the ladder program without using KV STUDIO.
Yes

Change parameters

For details on how to operate KV STUDIO, refer to the KV STUDIO User's Manual "Editing Point Parameters."

8-33
8-5 Positioning Instructions

■ List of related parameters


The following lists only parameters relating to programmed positioning instructions.

Control memory
X-axis Y-axis Function
CM02000 CM02030 I/O setting
CM02001 CM02031 Sensor enable
CM02002, CM02003 CM02032, CM02033 Comparator 0
CM02004, CM02005 CM02034, CM02035 Comparator 1
CM02006 CM02036 Zero return: startup speed
CM02007 CM02037 Zero return: acceleration/deceleration time
CM02008, CM02009 CM02038, CM02039 Zero return: run speed
CM02010 CM02040 Jog operation: startup speed
CM02011 CM02041 Jog operation: acceleration/deceleration
time
CM02012, CM02013 CM02042, CM02043 CPU positioning Jog operation: run speed
function
CM02014, CM02015 CM02044, CM02045 Current value change setting value
CM02016, CM02017 CM02046, CM02047 Run speed change setting value
8 CM02018 CM02048 Zero return detailed setting
CM02019 CM02049 Operation point No. (M code)
MOTOR CONTROL (POSITIONING CONTROL)

CM02020, CM02021 CM02050, CM02051 Current position


CM02022, CM02023 CM02052, CM02053 Current speed
CM02024 CM02054 Error Code
CM02025 CM02055 Specified point No.
CM02026, CM02027 CM02056, CM02057 Home position coordinates setting value
CM02028, CM02029 CM02058, CM02059 Comparator 2
CM02060, CM02061 Target value/travel
CM02062 Startup speed
CM02063 CPU positioning Acceleration/deceleration time
function
CM02064, CM02065 Parameters Run speed
CM02066 (specified point No.0) Operation mode
CM02067 Specified number of stop sensor pulses
CM02068, CM02069 Reserved for system
CM02070 to CM02079 (specified point No.1)
to to Same as CM02060 to CM02069
CM02370 to CM02379 (specified point No.31)

Control Relay
X-axis Y-axis Function
CR3000 CR3100 Limit switch CW input
CR3001 CR3101 Limit switch CCW input
CR3002 CR3102 Origin sensor input
CR3003 CR3103 Stop sensor input
CR3004 CR3104 Zero return in progress
CR3005 CR3105 Zero return completed
CR3006 CR3106 CPU positioning Positioning completed relay
CR3007 CR3107 function Error/clear error
CR3008 CR3108 Warning/clear warning
CR3009 CR3109 Pulse output in progress/emergency stop
CR3010 CR3110 Start of driver operation
CR3011 CR3111 Current value change request (level detection)
CR3012 CR3112 Run speed change request (level detection)
CR3013 CR3113 Comparator 2 match relay

8-34
8-5 Positioning Instructions

MEMO

MOTOR CONTROL (POSITIONING CONTROL)

8-35
8-5 Positioning Instructions

PLSX PLSX
Trapezoidal control X-
axis
Starts trapezoidal control on
X-axis.

PLSY PLSY
Trapezoidal control Y-
axis
Starts trapezoidal control on
Y-axis.

Ladder program Input method


Execution condition n
PLSX P L S X n

Execution condition n
PLSY P L S Y n

Available Devices Index


Operand Bit Devices Word Devices Index Const Ind Local Modify
Reg Spec Device
I O Int
Aux MR LR T C CTC CR DM EM FM TM T C CTH CTC CM Z #/$ #TM ∗ @ :#/:Z
n O O O O O – – – O O O O O O O O O O O *1 – O O O
8 Operand Explanation
n Specifies point No. (0 to 31).*1,*2,*3
MOTOR CONTROL (POSITIONING CONTROL)

*1 "$" cannot be used.


*2 When a bit device has been specified, 16 continuous bits are occupied. When a word device
has been specified, one word is occupied.
*3 When a device is specified, only the lower 5 bits are used.

Description of Operation

The pulse is output by the settings of the point No. specified by n at the up edge of the
execution condition.
Frequency (Hz)
Target value/travel (number of output pulses)

Operating speed

Startup speed
(stop speed)

Time (ms)
For details on settings such as positioning acceleration/deceleration time, positioning run speed, and positioning
startup speed, "Point Parameters" page 8-5.

Pulse Output Positioning Operation Point Error Error Clear Deviation Counter
Axis Target Value/Travel
In Prog Flag Complt Relay No. (M code) Code Flag Setting Output Dest
CM02060
X-axis + CR3009 CR3006 CM02019 CM02024 CR3007 CM02018 bit3 R00506
(point No. x 10)

CM02061
Y-axis + CR3109 CR3106 CM02049 CM02054 CR3107 CM02048 bit3 R00507
(point No. x 10)
During trapezoidal control, the "pulse output in progress flag" turns ON, and the point No. is
stored to the "in operation point No. (M code)." When movement is made to the "target value/
travel" position, the "pulse output in progress flag" turns OFF and the "positioning completed
relay" turns ON and movement stops.
The "positioning completed relay" stops when the next pulse output starts.
8-36
8-5 Positioning Instructions

Abnormal stop and emergency stop in trapezoidal control


• When an error is generated during operation, operation is stopped. (abnormal stop)
• To forcibly make an emergency stop, turn the "pulse output in operation flag" OFF by the RES
instruction.
• In an abnormal stop and an emergency stop, the error No. is stored to "error code", and the
"error flag" turns ON. The "pulse output in progress flag" turns OFF. The "positioning completed
relay" does not turn ON. Clear deviation counter is output. System Parameters [Zero Return/Jog]

For descriptions on errors and error codes,


"8-7 List Devices for Positioning & List of Error Codes" page 8-60

Note
• The PLSX and PLSY instructions cannot be executed when the "pulse output in
progress flag" is ON.
• The PLSX and PLSY instructions cannot be executed when the "error flag" is ON.
• The "pulse output in progress flag" turns OFF by initial END processing after end
of pulse output.
• When pulse output has stopped due to an emergency stop, the information of the
current position is not assured. Also, the duty of the final pulse at which pulse
output stops is not assured. 8
• In the case of parameters whose number of output pulses is "0", the "pulse output

MOTOR CONTROL (POSITIONING CONTROL)


in progress flag" does not turn ON, and the "positioning completed relay" turns
ON. At this time, a warning is not generated.

Operation flags
CR2009 No change in state
CR2010 No change in state
CR2011 No change in state
ON when the indirect specification and index modify range is inappropriate. Otherwise, OFF
CR2012
No change in state when indirect specification and index modify are not specified
* The instruction is not executed when CR2012 turns ON.

Instruction Execution Timing

PLSX, PLSY These instructions are executed when their execution condition is ON, and
execution stops when pulse output is completed.
Scan
ON

Execution condition
OFF

PLSX,PLSY Execution Execution


ON
CR3009, CR3109
(pulse output in progress flag) OFF

ON
CR3006, CR3106
(positioning completed) OFF

Sample Program

Pulse is output at the content set to point No.00 at the up edge at which input relay R00000 turns ON.
R00000 #000
 PLSX

8-37
8-5 Positioning Instructions

JOGX
JOGX
Executes jog operation on
CW Jog operation X-axis
CCW X-axis.
HIGH

Executes jog operation on


JOGY
JOGY
CW Jog operation Y-axis
CCW
HIGH Y-axis.

Ladder program Input method


CW signal JOGX
CW J O G X

CCW signal
CCW

HIGH signal
HIGH

CW signal JOGY
CW J O G Y

8 CCW signal
CCW

HIGH signal
MOTOR CONTROL (POSITIONING CONTROL)

HIGH

Description of Operation

Pulse output is started at the startup speed when the CW or CCW signal turns ON.
The pulse is output at the run speed when the HIGH signal turns ON.
Frequency (Hz)
CW/CCW signal HIGH signal HIGH signal CW/CCW signal
ON ON OFF OFF

Operating speed

Startup speed
(stop speed)

Time (ms)

Tip For details on the jog acceleration/deceleration time, jog run speed and jog startup speed
settings, "System Parameters [JOG]" page 8-24.

Pulse Output in Operation Point No.


Axis Progress Flag (M code) Error Code Error Flag
X-axis CR3009 CM02019 CM02024 CR3007
Y-axis CR3109 CM02049 CM02054 CR3107
During jog operation, the "pulse output in progress flag" turns ON, and "1001" is stored to "M code".
When operation ends, the "pulse output in progress flag" turns OFF.

Abnormal stop and emergency stop in jog operation


• When an error is generated during operation, operation is stopped. (abnormal stop)
• To forcibly make an emergency stop, turn the "pulse output in operation flag" OFF by the RES
instruction.
8-38
8-5 Positioning Instructions

• In an abnormal stop and an emergency stop, the error No. is stored to "error code", and the
"error flag" turns ON. The "pulse output in progress flag" turns OFF. Clear deviation counter is
output. "System Parameters [JOG]" page 8-24
For descriptions on errors and error codes, " List of Error Codes" page 8-65.

Note
• The JOGX and JOGY instructions cannot be executed when the "pulse output in
progress flag" is ON.
• The JOGX and JOGY instructions cannot be executed when the "error flag" is ON.
• In the case of a limit error (error code: 31 or 32), the jog instruction can be executed
in the direction opposite that of the travel progress direction that was active when
the limit error occurred by turning the "error flag" OFF even if the limit switch is ON.
• The "pulse output in progress flag" turns OFF by initial END processing after end
of pulse output.
• When pulse output has stopped due to an emergency stop, the information of the
current position is not assured. Also, the duty of the final pulse at which pulse
output stops is not assured.
• The "zero return relay" and "positioning completed relay" turn OFF at the start of
pulse output.
8

MOTOR CONTROL (POSITIONING CONTROL)


Operation flags
CR2009 No change in state
CR2010 No change in state
CR2011 No change in state
CR2012 No change in state

Instruction Execution Timing

JOGX, JOGY These instructions are executed when their execution condition is ON, and
execution stops when pulse output is completed.
Scan
ON
Execution condition CCW
OFF
(signal)
ON
Execution condition CCW
OFF
(signal)

JOGX,JOGY Execution Execution

ON
CR3009, CR3109
(pulse output in progress flag) OFF

Sample Program

Jog operation is CW when input R00000 turns ON and CCW when input R00001 turns ON. Jog
operation is performed at high speed if input R00002 turns ON at the same time.

R00000 JOGX
CW

R00001
CCW

R00002
HIGH

8-39
8-5 Positioning Instructions

ORGX ORGX Zero return X-axis Starts zero return on X-axis.

ORGY ORGY Zero return Y-axis Starts zero return on Y-axis.

Ladder program Input method


Execution condition
ORGX O R G X

Execution condition
ORGY O R G Y

Description of Operation

For details on zero return acceleration/deceleration time, zero return speed, and zero return startup speed settings,

8 " System Parameters [Zero Return/Jog]" page 8-18.

Zero return operation starts when the execution condition turns ON.
MOTOR CONTROL (POSITIONING CONTROL)

Pulse Output In Zero Return in Zero Return Positioning Operation Point


Axis Progress Flag Progress Flag Completed Relay Completed Relay No. (M code) Error Code Error Flag
X-axis CR3009 CR3004 CR3005 CR3006 CM02019 CM02024 CR3007
Y-axis CR3109 CR3104 CR3105 CR3106 CM02049 CM02054 CR3107
During zero return, the "pulse output in progress flag" turns ON, and "1000" is stored to "M code".
When movement is made to origin ("0"), the "pulse output in progress flag" turns OFF, and the "zero return
completed relay" and "positioning completed relay" turn ON and movement stops.
The "zero return completed relay" and "positioning completed relay" turn OFF at the start of the next pulse
output.

Abnormal stop and emergency stop in zero return


• When an error is generated during operation, operation is stopped. (abnormal stop)
• An abnormal stop occurs as a limit sensor error when operation is as follows:
When a limit sensor opposite to the zero return direction is detected
When both the CW and CCW limit sensors are detected in a single zero return operation
(both simultaneously or sequentially)
• To forcibly make an emergency stop, turn the "pulse output in operation flag" OFF by the RES
instruction.
• In an abnormal stop and an emergency stop, the error No. is stored to "error code", and the
"error flag" turns ON.
• The "pulse output in progress flag" turns OFF. The "zero return completed relay" and "positioning
completed relay" do not turn ON.

For descriptions on errors and error codes,


"8-7 List Devices for Positioning & List of Error Codes" page 8-60

Note
• The ORGX and ORGY instructions cannot be executed when the "pulse output in
progress flag" is ON.
• The ORGX and ORGY instructions cannot be executed when the "error flag" is ON.

8-40
8-5 Positioning Instructions

• The "pulse output in progress flag" turns OFF by initial END processing after end
of pulse output.
• When pulse output has stopped due to an emergency stop, the information of the
current position is not assured. Also, the duty of the final pulse at which pulse
output stops is not assured.

Operation flags

CR2009 No change in state


CR2010 No change in state
CR2011 No change in state
CR2012 No change in state

Instruction Execution Timing


8
ORGX, ORGY These instructions are executed when their execution condition is ON, and

MOTOR CONTROL (POSITIONING CONTROL)


execution stops when pulse output is completed.
Scan
ON

Execution condition
OFF

ORGX, ORGY Execution Execution


ON
CR3009, CR3109
(pulse output in progress flag) OFF

ON
CR3005, CR3105
(zero return completed)
OFF

CR3006, CR3106
(positioning completed)

Sample Program

R00000
 ORGX

R00000
 ORGY

Zero Return Path

The path that a moving object travels along by zero return differs according to the parameters set
in KV STUDIO and the position of the moving object when zero return is started. Zero return is
also possible if the error has been cleared even if one of the CW and CCW limit switches is ON.
"System Parameters [Zero Return/Jog]" page 8-18

8-41
8-5 Positioning Instructions

TCHX TCHX Teaching X-axis


Captures the current position of
the X-axis.

TCHY TCHY Teaching Y-axis


Captures the current position of
the Y-axis.

Ladder program Input method


Execution condition
TCHX T C H X

Execution condition
TCHY T C H Y

Description of Operation

When the execution condition turns ON, the value of "current position" is stored to "target value/
travel" of the value (point No.) current stored to the "specified point No."
8
Axis Specified Point No. Target Value/Travel Current Position
MOTOR CONTROL (POSITIONING CONTROL)

X-axis CM02025 CM02060 + (point No. x 10) CM02021, CM02020


Y-axis CM02055 CM02061 + (point No. x 10) CM02051, CM02050

(1) The point No. is stored to "specified point No." by the LDS, STA or DW instructions.
(2) When the execution condition of the TCHX and TCHY instructions turns ON, the value of
"current position" is stored to "target value/travel" of the point No. specified at (1). The store
destination changes according to the point No. (CM02060 • CM02061 when the point No. is
"0", CM02070 • CM02071 when the point No. is "1") "List of Point Parameters" page 8-64

Example
TCHX instruction
To store the current value of the X-axis as the target value of point No.0
Store "0" to CM02025.
Execute the TCHX instruction.
The content of CM02020 and CM02021 (current values of X-axis) is transferred to
CM02060 and CM02061 (target value/travel of point No.0).
R00000 #00000
 DW TCHX
CM02025

TCHY instruction
To store the current value of the Y-axis as the target value of point No.10
Store "10" to CM02055.
Execute the TCHY instruction.
The content of CM02050 and CM02051 (current values of X-axis) is transferred to
CM02160 and CM02161 (target value/travel of point No.10).

R00000 #00010
 DW TCHY
CM02055

8-42
8-5 Positioning Instructions

Note
• When the point Nos. stored to CM02025 (X-axis) and CM02055 (Y-axis) are outside
of the range 0 to 31, they are ignored, and no error code is generated.
• The JOGX and JOGY instructions cannot be executed when the "pulse output in
progress flag" is ON.
• The JOGX and JOGY instructions cannot be executed when the "error flag" is ON.

Operation flags

CR2009 No change in state


CR2010 No change in state
CR2011 No change in state
CR2012 No change in state

Instruction Execution Timing 8

MOTOR CONTROL (POSITIONING CONTROL)


TCHX, TCHY These instruction are executed at every scan for the duration that the
execution condition is ON.

Scan
ON

Execution condition
OFF

TCHX,TCHY Execution Execution

Sample Program

Set the current value moved to by jog operation as the target value of point No.0.

R00000 JOGX
CW

R00001
CCW

R00002
HIGH

R00003 #00000 CM02025


LDA STA TCHX

8-43
8-5 Positioning Instructions

HOMEX HOMEX
Move to X-axis home
position
Starts move to home position on X-
axis.

HOMEY HOMEY
Move to Y-axis home
position
Starts move to home position on Y-
axis.

Ladder program Input method


Execution condition
HOMEX H O M E X

Execution condition
HOMEY H O M E Y

Description of Operation

The move to home operation starts when the execution condition turns ON.

8 Axis
Home
Coordinates
Pulse Output in Positioning
Operation Flag Completed Relay
Operation Point
No. (M code)
Error
Code
Error Flag
X- CM02026
CR3009 CR3006 CM02019 CM02024 CR3007
MOTOR CONTROL (POSITIONING CONTROL)

axis CM02027
Y- CM02056
CR3109 CR3106 CM02049 CM02054 CR3107
axis CM02057

During move to home, the "pulse output in progress flag" turns ON, and "1002" is stored to "M
code".
When movement is made to the "home coordinates" position, the "pulse output in progress flag"
turns OFF and the "positioning completed relay" turns ON and movement stops.
The "positioning completed relay" stops when the next pulse output starts.
The startup speed, acceleration/deceleration time, and operating speed are the same as for zero
return.
" System Parameters [Zero Return/Jog]" page 8-18

Abnormal stop and emergency stop in move to home


• When an error is generated during operation, operation is stopped. (abnormal stop)
• To forcibly make an emergency stop, turn the "pulse output in operation flag" OFF by the RES
instruction.
• In an abnormal stop and an emergency stop, the error No. is stored to "error code", the "error
flag" turns ON, and the clear deviation counter is output. Also, the "pulse output in progress
flag" turns OFF, and the "positioning completed relay" does not turn ON.
For descriptions on errors and error codes, "8-7 List Devices for Positioning & List of Error Codes" page 8-60.

Note
• The HOMEX and HOMEY instructions cannot be executed when the "pulse output
in progress flag" is ON.
• The HOMEX and HOMEY instructions cannot be executed when the "error flag" is
ON.
• The "pulse output in progress flag" turns OFF by initial END processing after end
of pulse output.
• When pulse output has stopped due to an emergency stop, the information of the
current position is not assured. Also, the duty of the final pulse at which pulse
output stops is not assured.

8-44
8-5 Positioning Instructions

Operation flags

CR2009 No change in state


CR2010 No change in state
CR2011 No change in state
CR2012 No change in state

Instruction Execution Timing

HOMEX, HOMEY These instructions are executed when their execution condition is ON, and
execution stops when pulse output is completed.
Scan
ON

Execution condition
OFF

HOMEX, HOMEY Execution Execution

CR3009, CR3109
ON

(pulse output in progress flag) OFF


8

MOTOR CONTROL (POSITIONING CONTROL)


ON
CR3006, CR3106
(positioning completed) OFF

Sample Program

Move to home is executed at the up edge at which input relay R00000 turns ON.

R00000
 HOMEX

8-45
8-5 Positioning Instructions

CHGSPX CHGSPX
Change X-axis
speed
Changes the speed on the X-axis.

CHGSPY CHGSPY
Change Y-axis
speed
Changes the speed on the Y-axis.

Ladder program Input method


Execution condition S
CHGSPX C H G S P X S

Execution condition S
CHGSPY C H G S P Y S

Available Devices Index


Operand Bit Devices Word Devices Index Const Ind Local Modify
Reg Spec Device
I O Int
Aux MR LR T C CTC CR DM EM FM TM T C CTH CTC CM Z #/$ #TM ∗ @ :#/:Z
S O O O O O – – – O O O O O O O O O O O O – O O O
8 Operand Explanation
S Specifies the speed change value (50 to 100000). 32-bit unsigned binary data*1
MOTOR CONTROL (POSITIONING CONTROL)

*1 When a bit device has been specified, 32 continuous bits are occupied. When a word device has
been specified, two continuous words are occupied. When a relay other than the start relay (e.g.
R00002, R00106, or R01012) of the channel has been specified, the relay is handled in 32 bits
straddling the next channel.

Description of Operation

Axis Run Speed Change Setting Value


X-axis CM02017 (upper), CM02016 (lower)
Y-axis CM02047 (upper), CM02046 (lower)
The speed can be changed to the run speed specified by S while the execution condition is
ON during pulse output.
The value specified by S is stored to the "run speed change setting value."
Execution condition Recognition of Execution of
ON execution condition CHGSPX processing

Output Input Main routine Output Input


processing processing program processing processing
Execution condition S
Speed CHGSPX

Speed change Time

Note
The speed cannot be changed to less than the startup speed. The speed becomes the
startup speed when it is less than the startup speed.

8-46
8-5 Positioning Instructions

When this instruction is used together with an interrupt made by comparator 2


After the interrupt cause is generated by comparator 2, the speed is immediately changed to the
run speed specified by S .

Generation of interrupt
by comparator 2

Output Input Main routine Output Input


processing processing processing processing CR2008
program
EI

END

Input
processing Interrupt program INT
CR3013
Speed
CR2002 S
S CHGSPX

RETI

ENDH
8

MOTOR CONTROL (POSITIONING CONTROL)


Speed change Time
For details on comparator 2, " System Parameters [Comparator Setup]" page 8-16.

Tip When the run speed change request relays CR3012 (X-axis) CR3112 (Y-axis) are used

Execution condition Recognition of Operating speed change


ON execution condition request relay ON

Output Input Main routine Output Input


processing processing program processing processing
Execution condition CR3012
Speed SET

CM2017
CM2016

Speed change Time


For details on the run speed change request relay, " Control Relays for Positioning Control" page 8-27.

Operation flags

CR2009 No change in state


CR2010 No change in state
CR2011 No change in state
ON when the indirect specification and index modify range is inappropriate. Otherwise, OFF
CR2012
No change in state when indirect specification and index modify are not specified

8-47
8-5 Positioning Instructions

Instruction Execution Timing

CHGSPX, CHGSPY These instruction are executed at every scan for the duration that the execution
condition is ON.
Scan
ON

Execution condition
OFF

CHGSPX, CHGSPY Execution Execution

Sample Program

The run speed on the X-axis is changed to 3000Hz at the up edge at which input relay R00000
turns ON.
8 R00000 #03000
 CHGSPX
MOTOR CONTROL (POSITIONING CONTROL)

8-48
8-6 Positioning Control Reference Examples

Positioning Control Reference Examples

■ Setting example
CPU input wiring Wiring to Expansion Input Unit
Input common COM
R00000 Origin sensor R30000 Zero return start input
R00001 R30001 Jog instruction CW
R00002 R30002 Jog instruction CCW
R00003 R30003 Jog high-speed instruction
R00004 CW limit switch R30004
R00005 R30005
R00006 CCW limit switch R30006
R00007 R30007
Stepping motor driver
R00008 R30008
R00009
(2-pulse method)

Twisted pair lead


R30009 8
+
R30010 Point 0 travel instruction
CW

MOTOR CONTROL (POSITIONING CONTROL)


-
+ R30011 Point 1 travel instruction
CPU output wiring -
CCW
R30012 Point 2 travel instruction
S+5V
R30013 Point 3 travel instruction
R00500
R30014 Point 4 travel instruction
R00501 FG
Stepping
R30015
R00502
motor
R00503

1 Click the button on the KV STUDIO tool bar, and open the {Edit CPU Positioning
Parameters} window.
Select the button on the tool bar of the {Edit CPU Positioning Parameters} window.

2 On the [I/O Setup] tab, set the stop sensor, limit switch input
connection destinations and polarities. Then, select the
output mode in the output settings.

3 On the [Comparator Setup] tab, set the values to compare with


the current values.

8-49
8-6 Positioning Control Reference Examples

4 On the [Zero Return/Jog] tab, set the zero return speed, start
direction, and output mode. Also, specify the setting value at
the home position settings.

5 On the [JOG] tab, set the jog operation and operation speed
settings.

8
6 Set the point parameter target coordinates,
MOTOR CONTROL (POSITIONING CONTROL)

operating speed, and acceleration/


deceleration time.

8-50
8-6 Positioning Control Reference Examples

■ Program example

· Zero return section

R30000
ORGX

· Jog operation section

R30001 JOGX
CW

R30002
CCW

R30003
HIGH

· Positioning instruction section 8


R30010 #000

MOTOR CONTROL (POSITIONING CONTROL)


PLSX

R30011 #001
PLSX

R30012 #002
PLSX

R30013 #003
PLSX

R30014 #004
PLSX

END

ENDH

8-51
8-6 Positioning Control Reference Examples

Continuous Position Control Reference Example

Start position control at the up edge of the R30000 relay.


Point 1 J 1 second stop J point 2 J 1 second stop J point 3 J 1 second stopJpoint 0
R30000 #001
PLSX Travel to
point1

CR3006 CM02019 #00100 R02000 #002 Travel to


= ONDL PLSX point2
#00001 R02000

CR3006 CM02019 #00100 R02001 #003 Travel to


= ONDL PLSX point3
#00002 R02001

CR3006 CM02019 #00100 R02002 #000 Travel to


= ONDL PLSX point0
8 #00003 R02002

END
MOTOR CONTROL (POSITIONING CONTROL)

ENDH

8-52
8-6 Positioning Control Reference Examples

High-speed Execution Reference Example

Start high-speed pulse output without being influenced by the scan time by executing the PLSX
execution in the interrupt routine.
Start pulse output at the up edge of input R00000

CR2002
EI

HSP
R00000

END

INT
8
R00000

MOTOR CONTROL (POSITIONING CONTROL)


CR2002 #000
PLSX

RETI

ENDH

8-53
8-6 Positioning Control Reference Examples

Reference Example of Changing Speed during Operation (1)

By using the run speed change request relay CR3012 (X-axis) CR3112 (Y-axis)

■ Setting example
Select speed control for point No.0 in the
parameter setup, and set the startup speed,
acceleration/deceleration speed, and operating
speed.
The acceleration speed determined by this
setting is also applied to the acceleration
speed that is applied when the speed change
request is issued.
Set speed control when using the stop sensor.
8 Set the stop sensor number of specified
pulses.
MOTOR CONTROL (POSITIONING CONTROL)

65535 means "stop deceleration."


For details on setting stop sensor number of specified
pulses 65535, "Stop sensor pulses" page 8-10.

Set CR3003 at the stop sensor setting.

8-54
8-6 Positioning Control Reference Examples

■ Program example
Turn the speed change request relay ON at the up edge of relay R30000, write setting value
"3000" to CM02016 and CM02017 (speed change setting value), and start pulse output by the
PLSX0 instruction.
Write "5000" to CM02016 and CM02017 (speed change setting value) at the up edge of R30001.
Write "6000" to CM02016 and CM02017 (speed change setting value) at the up edge of R30002.
Write "7000" to CM02016 and CM02017 (speed change setting value) at the up edge of R30003.
Turn speed change request relay ON at the up edge of R30004, turn stop sensor input CR3003
ON, and decelerate to a stop.

R30000 #3000 CR3012 #000


DW.D SET PLSX
CM02016
X-axis operating speed X-axis operating speed
change setting value change request
R30001 #5000
DW.D
CM02016
X-axis operating speed
change setting value
8
R30002 #6000

MOTOR CONTROL (POSITIONING CONTROL)


DW.D
CM02016
X-axis operating speed
change setting value
R30003 #7000
DW.D
CM02016
X-axis operating speed
change setting value
R30004 CR3012 CR3003
RES
X-axis operating speed X-axis stop sensor
change request input

END

ENDH

R30000 R30001 R30002 R30003 R30004


Speed
7000
6000
5000

3000

Time

Tip For details on the timing of speed change, "8-4 Changing Speed during Operation" page
8-31.

8-55
8-6 Positioning Control Reference Examples

Reference Example of Changing Speed during Operation (2)

By using comparator 2 interrupt relay CR3013 (X-axis) and CR3113 (Y-axis)

■ Program example
Set to enable interrupt processing.
Clear multi-stage control state DM05000 at the up edge of relay R30000, set comparator 2
(interrupt position) to "50000", and start pulse output by the PLSX0 instruction.
When the current position equals comparator 2, start interrupt processing, and increment multi-
stage control DM05000.

<Interrupt Processing>
(1st multi-stage process) When multi-stage DM05000 = 0, the next interrupt position 100000 is

8 (2nd multi-stage process)


written to comparator 2, and the speed is changed to 15000 (Hz).
When multi-stage DM05000 = 1, the next interrupt position 150000 is
MOTOR CONTROL (POSITIONING CONTROL)

written to comparator 2, and the speed is changed to 25000 (Hz).


(3rd multi-stage process) When multi-stage DM05000 = 2, the speed is changed to 20000 (Hz).

Note
• The KV-1000 recognizes setting values (X-axis: CM02029 • CM02028, Y-axis: CM02059 •
CM02058) for interrupts by comparator 2 when the CHGSPX or CHGSPY instruction is
executed, or when pulse output by the PLSX or PLSY instruction is started. Operation will
not be performed correctly merely by written the setting values to the control memory.To
use the interrupt caused by comparator 2, write the setting value to the control
memory, and then execute the CHGSPX, CHGSPY, PLSX, PLSY instructions.
• CR3013 and CR3113 do not actually turn ON/OFF. They are used as symbols during
ladder programming.

8-56
8-6 Positioning Control Reference Examples

CR2008
EI
ON for 1 scan at start of operation

R03000 #00000 #50000 #000


DW DW.D PLSX
Startup of positioning DM05000 CM02028
X-axis comparator 2
END

INT
CR3013

Multi-stage control state


DM05000 #100000 #15000
= DW.D CHGSPX
#00000
Multi-stage control state
CM02028
X-axis comparator 2
8

MOTOR CONTROL (POSITIONING CONTROL)


DM05000 #150000 #25000
= DW.D CHGSPX
#00001 CM02028
Multi-stage control state X-axis comparator 2
DM05000 #20000
= CHGSPX
#00002
Multi-stage control state
CR2002 DM05000
INC
ON at all times

RETI

ENDH

Speed
25000
20000
15000

Startup
speed

50000 100000 150000 Distance

Tip For details on the timing of speed change, "8-4 Changing Speed during Operation" page
8-31.

8-57
8-6 Positioning Control Reference Examples

Compatibility with KV-10/16/24/40

On KV-10/16/24/40, pulse output is performed by writing each of the settings to the DMs below
and turning the output start relay 2310.
0 #00500 #10000 #03000 #00001 #34644 2310
DW DW DW DW DW
DM1480 DM1481 DM1482 DM1485 DM1484
Startup speed Operating Acceleration/ Number of Number of
speed deceleration output pulses output pulses
time

On the KV-1000, pulse output is basically performed by the PLSX and PLSY instructions.
However, CR3010,CR3009, and CM2025 are provided so that ladder programs can be made by
the same programming method as on the KV-10/16/24/40.

CR3010 Output start relay


CR3009 Pulse output in progress/emergency stop relay
8 CM02025 Specified point No. (Specifies the point No.)
MOTOR CONTROL (POSITIONING CONTROL)

When CR3010 is turned ON, pulse output starts based on the control memory that stores the data
of the point No. specified by CM2025.
"Point Parameters" page 8-5

R00000 #00000 #00500 #03000 #10000 #100000 CR3010


DW DW DW DW·D DW·D
CM02025 CM02062 CM02063 CM02064 CM02060
Specified point No. Startup speed Acceleration/ Operating speed Number of output pulses
deceleration
time

8-58
8-6 Positioning Control Reference Examples

Positioning Control Exceeding 32 Points

As the target values/travel amounts of each point are stored to control memories, multiple points
can be positioned by rewriting the contents of control memories in the ladder program.
For example, the target value of point No.0 can be changed by rewriting the content of target
values/travel amounts [CM02060 • CM02061].

Example

R00000 #10000 #000


DW.D PLSX
CM02060

R00001 #200000 #000


DW.D PLSX
CM02060
8

MOTOR CONTROL (POSITIONING CONTROL)


R00002 #600000 #000
DW.D PLSX
CM02060
"Point Parameters" page 8-5

8-59
8-7 List Devices for Positioning & List of Error Codes

List of System Parameters and Statuses

Number Attribute
X-axis Y-axis Description
of Words R:Blank:
read-only
R/W

System parameters
Origin and stop sensor assignments
Sensor detection and action settings at
CM02000 CM02030 I/O setting 1
comparator match
Output mode (1 pulse/2 pulses) setting
Origin/stop sensor/limit switch enable
Sensor selection
CM02001 CM02031 1
enable Origin/stop sensor/limit switch polarity
selection
CM02002 CM02032 Current value
Software limit switches using a 2
CM02003 CM02033 Comparator 0
comparator, and setting values of stop
CM02004 CM02034 Current value sensor function 2
CM02005 CM02035 Comparator 1
8 CM02006 CM02036 Startup speed setting 1
CM02007 CM02037 Acceleration/deceleration time setting 1
Zero return
MOTOR CONTROL (POSITIONING CONTROL)

CM02008 CM02038
Operating speed setting 2
CM02009 CM02039
CM02010 CM02040 Startup speed setting 1
CM02011 CM02041 Acceleration/deceleration time setting 1
Jog operation
CM02012 CM02042
Operating speed setting 2
CM02013 CM02043
CM02014 CM02044 Current value change setting value
2
CM02015 CM02045 X-axis: Change by CR3011, Y-axis: Change by CR3111
CM02016 CM02046 Run speed change setting value
2
CM02017 CM02047 X-axis: Change by CR3012, Y-axis: Change by CR3112
I/O and zero Zero return detailed setting
CM02018 CM02048 return detailed 1
settings I/O detailed settings
CM02026 CM02056
Home coordinates 2
CM02027 CM02057
CM02028 CM02058 Current value Setting value for interrupts that use
2
CM02029 CM02059 Comparator 2 comparators
Status
CM02019 CM02049 Currently operating point No. (M code) 1
CM02020 CM02050 Current Position
2
CM02021 CM02051 * Can be changed by current value change request
R
CM02022 CM02052
Current speed 2
CM02023 CM02053
CM02024 CM02054 Error code 1
Specified point No.
CM02025 CM02055 (for TCHX/TCHY instruction for X-axis: CR3010, for Y- 1
axis: CR3110)

8-60
8-7 List Devices for Positioning & List of Error Codes

■ I/O detailed settings


The relationship between R00000 to R00007, origin sensor, stop sensor, and limit switches is
stored to CM02000, CM02018 (X-axis), CM02030, and CM02048 (Y-axis).
The relationship between pulse output mode, action mode at comparator match, start direction for
zero return and detection method of stop position, clear deviation counter, and automatic move to
home is also stored.
There is no particular need to be conscious of this information on the ladder program when setting
parameters in KV STUDIO.

bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

CM02000 (X-axis) CM02030 (Y-axis)


bit0 Select output mode
0 1 pulse output
1 2 pulse output

bit1
0 CCW
Zero return direction
8
1 CW

MOTOR CONTROL (POSITIONING CONTROL)


bit5 bit4 Operation at current position comparator 0 match
0 0 Disabled
0 1 Use as stop sensor
1 0 Used as CW limit switch
1 1 Use as CCW limit switch

bit7 bit6 Operation at current position comparator 1 match


0 0 Disabled
0 1 Use as stop sensor
1 0 Used as CW limit switch
1 1 Use as CCW limit switch

bit9 bit8 Input setting of R0000


0 0 Do not use as stop/origin sensor
0 1 Use as stop sensor input
1 0 Use as origin sensor input
1 1 Setting disabled

bit11 bit10 Input setting of R0001


0 0 Do not use as stop/origin sensor
0 1 Use as stop sensor input
1 0 Use as origin sensor input
1 1 Setting disabled

bit13 bit12 Input setting of R0002


0 0 Do not use as stop/origin sensor
0 1 Use as stop sensor input
1 0 Use as origin sensor input
1 1 Setting disabled

bit15 bit14 Input setting of R0003


0 0 Do not use as stop/origin sensor
0 1 Use as stop sensor input
1 0 Use as origin sensor input
1 1 Setting disabled

8-61
8-7 List Devices for Positioning & List of Error Codes

bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

CM02018 (X-axis) CM02048 (Y-axis)


bit1 bit0 Origin stop position detection method
0 0 Origin sensor rise
0 1 Origin sensor midpoint
1 0 Origin sensor and Z-phase
1 1 Setting disabled

bit3 Clear deviation counter


0 Output OFF
1 Output ON

bit4 Auto home position


0 Travel OFF
1 Travel ON

bit5 CW limit switch


0 Disabled
8 1 Enabled

bit9 CCW limit switch


MOTOR CONTROL (POSITIONING CONTROL)

0 Disabled
1 Enabled

8-62
8-7 List Devices for Positioning & List of Error Codes

■ Sensor enable details


Origin sensor, stop sensor, limit switch input polarities, and use enable settings are stored to
CM02001.
There is no particular need to be conscious of this information on the ladder program when setting
parameters
bit
in KV STUDIO.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

CM02001 (X-axis) CM02031 (Y-axis)


bit1 Stop sensor enable
0 Disabled
1 Enabled

bit2 CW limit switch enable*1


0 Disabled
1 Enabled

bit3 CCW limit switch enable*1


0 Disabled
1

bit8
Enabled

Origin sensor polarity


8

MOTOR CONTROL (POSITIONING CONTROL)


0 N.O. (normally open contact)
1 N.C. (normally closed contact)

bit9 Stop sensor polarity


0 N.O. (normally open contact)
1 N.C. (normally closed contact)

bit10 CW limit switch polarity


0 N.O. (normally open contact)
1 N.C. (normally closed contact)

bit11 CCW limit switch polarity


0 N.O. (normally open contact)
1 N.C. (normally closed contact)

bit12 Z-phase polarity


0 N.O. (normally open contact)
1 N.C. (normally closed contact)

*1 CW Limit Switch Enable/CCW Limit Switch Enable


Limit switch input is not accepted when this but is set to "1" (enabled).
This bit needs to be set to "1" (enabled) when this setting has a higher priority than other
limit switch-related settings, and the limit switch is assigned by the current position
comparator setting.
These parameters are automatically set to "enabled" when parameters are set on KV
STUDIO.

8-63
8-7 List Devices for Positioning & List of Error Codes

List of Point Parameters

Common to Number Attribute


No. Description
X-/Y-axes of Words R:Blank:
read-only
R/W

CM02060
Target value/travel 2
CM02061
CM02062 Startup speed 1
CM02063 Acceleration/deceleration time 1
0
CM02064
Operating speed 2
CM02065
CM02066 Run mode setting (user of stop sensor ON/OFF) 1
CM02067 Number of stop sensor specified pulses 1
1 CM02070 to 02077
: : Same as point parameter 0
31 CM02370 to 02377

8 List of Control Relays


MOTOR CONTROL (POSITIONING CONTROL)

Attribute
X-axis Y-axis Description R: read-only
Blank: R/W

CR3000 CR3100 CW limit switch Use set by parameters


CR3001 CR3101 CCW limit switch Use set by parameters
CR3002 CR3102 Origin sensor input Use set by parameters
CR3003 CR3103 Stop sensor input Use set by parameters
CR3004 CR3104 Zero return in progress
ON at zero return completion, R
CR3005 CR3105 Zero return completed
OFF at next pulse output
ON at zero return completion and
CR3006 CR3106 Positioning completed relay positioning completion
OFF at next pulse output
CR3007 CR3107 Error/clear error
CR3008 CR3108 Warning/clear warning Overflow at current position
Pulse output in progress/
CR3009 CR3109 Emergency stop by forced reset
emergency stop
Start of pulse output, for
CR3010 CR3110 Start of driver operation
CM02025 and CM02055
For current value change (during
CR3011 CR3111 Current value change request
pulse stop in progress)
For speed change (during speed
CR3012 CR3112 Run speed change request
control)
Does not turn ON/OFF as this is
Interrupt at comparator 2 (for
CR3013 CR3113 used as a symbol during ladder
interrupt) match
programming.

8-64
8-7 List Devices for Positioning & List of Error Codes

List of Error Codes

Error Code Operation Description


(X-axis : CM02024, Y-axis : CM02054)
10 Stop Startup speed value is smaller than the setting range.
11 Stop Operating speed value is smaller than the setting range.
12 Stop Operating speed value is greater than the setting range.
13 Stop Startup speed value is greater than the operating speed.
The acceleration/deceleration time is greater than the setting
14 Stop
range.
The operating speed is 65536 or more when the acceleration/
15 Stop
deceleration time is zero.
An attempt was made to start absolute positioning control with
20 Stop
Error warning relay CR3008 (X-axis) and CR3108 (Y-axis) ON.
The values of the CM02025 (X-axis) and CM02055 (Y-axis)
21 Stop are out of range when an attempt was made to move by driver
operation start relay CR3010 (X-axis) and CR3110 (Y-axis).
30 Emergency stop input caused as stop.
31 Stop Limit error: CW limit switch input caused as stop. 8
32 Stop Limit error: CCW limit switch input caused as stop.

MOTOR CONTROL (POSITIONING CONTROL)


Travel in CW (CCW) direction caused detection of the CCW
33 Stop
(CW) limit switch.
90 Stop System error

8-65
8-7 List Devices for Positioning & List of Error Codes

MEMO

8
MOTOR CONTROL (POSITIONING CONTROL)

8-66
9
SERIAL COMMUNICATIONS
The KV-1000 can be connected to external devices having an RS-232C-
compliant interface to perform communications.

This chapter describes communications specifications, connection methods


and communications methods.

SERIAL COMMUNICATIONS
9-1 Serial Communications Specifications . . . . . . . . 9-2
9-2 Serial Communications. . . . . . . . . . . . . . . . . . . . 9-3
9-3 Commands/Responses List . . . . . . . . . . . . . . . . 9-5
9-4 Explanation of Commands and Responses . . . . 9-8
9-5 Sending/Receiving Text Data . . . . . . . . . . . . . . 9-25
9-6 ASCII Code Table . . . . . . . . . . . . . . . . . . . . . . . 9-29

9-1
9-1 Serial Communications Specifications
This section describes the communications specifications of the RS-232C interface, and how to
connect to external devices.

Communications Specifications

The table on the lists the serial


Item Specifications
communications specifications of the
Communications mode Full-duplex
KV-1000. Transmission mode Start-stop
Set the communications conditions of Transmission port ASCII
serially connected external devices 9600bit/s (default)
Baud rate
9600 to 115200bit/s
matched to the conditions in the table Data length 8bit
on the right. Parity check Even
Stop bit length 1bit
Data delimiter CR

Note
• Set the same communications specifications as those set to connected external

9 devices. Communications cannot be performed correctly if the settings are different.


• For details on the settings of connected external devices, refer to the Instruction
SERIAL COMMUNICATIONS

Manual for the respective device.

How to Connect to the KV-1000

To connect the KV-1000 to an external device having an RS-232C terminal, use the exclusive
connector table (straight: OP-26487, reverse: OP-96607) and D-sub 9-pin connector (OP-26486),
or D-sub 25-pin connector (OP-26485) to connect to the RS-232C connector.

KV-1000 External device having an RS-232C terminal

Wiring diagram
RS-232C cable wiring is as follows. Be sure to connect to the KV-1000 using the exclusive
connector cable.
KV side D-Sub 9-pin on PC side KV side D-Sub 25-pin on PC side
RD 3 3 SD RD 3 2 SD
SD 5 2 RD SD 5 3 RD
+5V 1 4 DR +5V 1 6 DS
+5V 2 6 ER +5V 2 20 ER
SG 6 7 RS SG 6 4 RS
SG 4 8 CS SG 4 5 CS
1 2 3 4 5 6 5 SG 7 SG
Pin Straight cable OP-26487 Straight cable OP-26487
Nos. on + +
D-Sub 9-pin connector OP-26486 D-Sub 25-pin connector OP-26485
KV unit (cross wiring) (cross wiring)
Pin Nos. 1 and 2 on the unit side are 5 V power.
Pin Nos.4 and 6 on the unit side are ground.

Tip When the connected device is defined as a modem, use cross cable OP-96607 instead of OP-26487.
9-2
9-2 Serial Communications

The KV-1000 can be connected to a PC so that the current values or setting values of internal
counters and timers stored on the KV-1000, or the values of data memories can be read or
written.

Command Send Procedure

Follow the procedure below to send commands to the KV-1000 from a PC.

Send Break signal. Initialize the buffer and baud rate settings for KV-1000 communications.

Send communications start command (CR). Start communications with KV-1000.

Send command. Send commands to the KV-1000, and instruct operations.

Receive response. Receive responses to commands, and confirm the response.

Send communications end command (CQ). End communications with KV-1000. 9

SERIAL COMMUNICATIONS
Send Break signal.
The Break signal is the signal that initializes the KV-1000's
+V 100 ms or more
communications buffer and baud rate settings. SD
-V
Before communications is started with the KV-1000,
a Break signal of 100 ms or more is sent only once.
Once communications is established, the Break signal
need not be sent again.
The figure on the right illustrates how the Break signal is sent.

Note
• To establish communications without turning the KV-1000 OFF after
communications is established between the KV-1000 and KV STUDIO, the Break
signal must be sent again.
• When the Break signal cannot be sent to the PC, the communications setup can be
initialized by turning the KV-1000 OFF then back ON again. Try establishing
communications with the PC again.
• Allow at least 10 ms after sending the Break signal before you stop
communications.
• If the duration between individual bytes of the command is one second or more, a
time-out will occur, and an error response will be returned.
• When the KV-1000 receives the Break signal, the baud rate is set to 9600 bit/s.
• When the baud rate has been changed, it returns to 9600 bit/s (default) even if a
communications error occurs.
• After the power is turned ON, the baud rate is set to 9600 bit/s.

9-3
9-2 Serial Communications

■ Sending commands, responses


Commands and responses are defined as follows in communications between the KV-1000 and
the PC.

Command JA message to the KV-1000 is called a "command."


Response JThe response to the command (i.e. a return message from the KV-1000 to the
PC) is called a "response."

When a command is sent to the KV-1000 from the PC, a response is returned to the PC.
When writing a program that is controlled on a PC, program so that the response is confirmed
before the next command is sent.

Format of Commands and Response

The following shows the format of commands and responses.

9
Command format
SERIAL COMMUNICATIONS

Conform to the following format when sending commands to the KV-1000 from a PC.
C C L
R is the delimiter. The KV-1000 ignores R and recognizes F as the next command.

Command CR

or Command CR L F

Response format
The KV-1000 returns responses to commands according to the following format. When writing
programs on a PC, make sure that programs can be processed according to this format.

Response CR L F

9-4
9-3 Commands/Responses List
This section provides a list of commands and responses (during normal operation and errors) that
are used for serial communications in the KV mode (host link), and a list of errors.
in the table indicates a space (20H).

Commands/Responses List

Function Command Device Response See page


Start of communications CR CC 9-8
End of communications CQ CF 9-8
Baud rate setting SP n OK 9-9
Model query ?K dd 9-10
Operation mode confirmation ?M f 9-10
Error No. confirmation ?E ddd 9-11
Change mode Mn OK 9-11
Clear error ER OK 9-12
Date/time setting WRT yy m1 dd hh m2 ss w OK 9-12
Forced set/reset
R (relay) ST/RS nnnnn OK 9-13
CR (control relay)
MR (internal auxiliary relay)
ST/RS
ST/RS
CRnnnn
MRnnnnn
OK
OK
9-13
9-13
9
LR (latch relay) ST/RS LRnnnnn OK 9-13

SERIAL COMMUNICATIONS
T contact (timer) ST/RS Tnnnn OK 9-13
C contact (counter) ST/RS Cnnnn OK 9-13
CTC (high-speed
RS CTCn OK 9-13
counter comparator)
Continuous forced set/reset
R (relay) STS/RSS nnnnn nn OK 9-13
CR (control relay) STS/RSS CRnnnn nn OK 9-13
MR (internal auxiliary relay) STS/RSS MRnnnnn nn OK 9-13
LR (latch relay) STS/RSS LRnnnnn nn OK 9-13
Read
R (relay) RD nnnnn f 9-14
CR (control relay) RD CRnnnn f 9-14
MR (internal auxiliary relay) RD MRnnnnn f 9-14
LR (latch relay) RD LRnnnnn f 9-14
DM (data memory) RD DMnnnnn ddddd 9-14
CM (control memory) RD CMnnnnn ddddd 9-14
TM (temporary data memory) RD TMnnn ddddd 9-14
EM (expanded data
RD EMnnnnn ddddd 9-14
memory)
FM (expanded data memory) RD FMnnnnn ddddd 9-14
Z (index register) RD Znn ddddd 9-14
AT (digital trimmer) RD ATn dddddddddd 9-14
T (timer) RD Tnnnn f,dddddddddd,dddddddddd 9-14
C (counter) RD Cnnnn f,dddddddddd,dddddddddd 9-14
CTH (high-speed counter) RD CTHn 0,dddddddddd,0000000000 9-14
CTC (high-speed counter
RD CTCn f,dddddddddd,dddddddddd 9-14
comparator)
Continuous read
R (relay) RDS nnnnn n f f ... 9-16
CR (control relay) RDS CRnnnn n f f ... 9-16
MR (internal auxiliary relay) RDS MRnnnnn n f f ... 9-16
LR (latch relay) RDS LRnnnnn n f f ... 9-16

9-5
9-3 Commands/Responses List

Function Command Device Response See page


DM (data memory) RDS DMnnnnn n ddddd ddddd ... 9-16
CM (control memory) RDS CMnnnnn n ddddd ddddd ... 9-16
TM (temporary data memory) RDS TMnnn n ddddd ddddd ... 9-16
EM (expanded data memory) RDS EMnnnnn n ddddd ddddd ... 9-16
FM (expanded data memory) RDS FMnnnnn n ddddd ddddd ... 9-16
Z (index register) RDS Znn n ddddd ddddd ... 9-16
AT (digital trimmer) RDS ATn n dddddddddd dddddddddd ... 9-16
f,dddddddddd,dddddddddd
T (timer) RDS Tnnnn n 9-16
f,dddddddddd,dddddddddd ...
f,dddddddddd,dddddddddd
C (counter) RDS Cnnnn n 9-16
f,dddddddddd,dddddddddd ...
0,dddddddddd,0000000000
CTH (high-speed counter) RDS CTHn n 9-16
0,dddddddddd,0000000000 ...
CTC (high-speed counter f,dddddddddd,dddddddddd
RDS CTCn n 9-16
comparator) f,dddddddddd,dddddddddd ...
Write
DM (data memory) WR DMnnnnn ddddd OK 9-18
CM (control memory) WR CMnnnnn ddddd OK 9-18
TM (temporary data memory) WR TMnnn ddddd OK 9-18
EM (expanded data memory) WR EMnnnnn ddddd OK 9-18
9 FM (expanded data memory) WR FMnnnnn ddddd OK 9-18
Z (index register) WR Znn ddddd OK 9-18
SERIAL COMMUNICATIONS

T (timer) current value WR Tnnnn dddddddddd OK 9-18


C (counter) current value WR Cnnnn dddddddddd OK 9-18
CTH (high-speed counter)
WR CTHn dddddddddd OK 9-18
current value
Continuous write
DMnnnnn n ddddd
DM (data memory) WRS OK 9-18
ddddd ...
CMnnnnn n ddddd
CM (control memory) WRS OK 9-18
ddddd ...
TMnnn n ddddd
TM (temporary data memory) WRS OK 9-18
ddddd ...
EMnnnnn n ddddd
EM (expanded data memory) WRS OK 9-18
ddddd ...
FMnnnnn n ddddd
FM (expanded data memory) WRS OK 9-18
ddddd ...
Z (index register) WRS Znn n ddddd ddddd ... OK 9-18
Tnnnn dddddddddd n
T (timer) current value WRS OK 9-18
dddddddddd dddddd...
Cnnnn dddddddddd n
C (counter) current value WRS OK 9-18
dddddddddd ddddd...
CTH (high-speed counter) CTHn dddddddddd n
WRS OK 9-18
Current value dddddddddd ddddd...
Write setting value
T (timer) WS Tnnnn dddddddddd OK 9-19
C (counter) WS Cnnnn dddddddddd OK 9-19
CTC (high-speed counter
WS CTCn dddddddddd OK 9-19
comparator)
Write continuous setting values
Tnnnn n dddddddddd n
T (timer) WSS OK 9-20
dddddddddd ddd...
Cnnnn n dddddddddd n
C (counter) WSS OK 9-20
dddddddddd ddd...
CTC (high-speed counter CTCn n dddddddddd n
WSS OK 9-20
comparator) dddddddddd ddd...

9-6
9-3 Commands/Responses List

Function Command Device Response See page


Register monitor
Dev,Dev ...*
* Target device is
Bit devices MBS nnnnn,CRnnnn, OK 9-20
MRnnnnn,LRnnnnn,Tnnnn,
Cnnnn,CTCn
Dev,Dev ...*
* Target device is
nnnnn,CRnnnn,
MRnnnnn,LRnnnnn,
Word/double-word device MWS DMnnnnn,CMnnnnn, OK 9-20
TMnnn,EMnnnnn,FMnnnnn,
Znn,ATn,TCnnnn,TSnnnn,
CCnnnn,CSnnnn,CTHn,
CTCn
Read monitor
Bit devices MBR f f f ... 9-22
Word/double-word device MWR ddddd ddddd ... 9-22
Read comment
Dev,Dev ...*
* Target device is
nnnnn,CRnnnn,
Comment RDC MRnnnnn,LRnnnnn,
DMnnnnn,CMnnnnn,
Device comment (32 characters) 9-23 9
TMnnn,EMnnnnn,FMnnnnn,

SERIAL COMMUNICATIONS
Tnnnn,Cnnnn,CTHn,CTCn

9-7
9-4 Explanation of Commands and Responses

Start of communications [ CR ]

This command is sent when starting communications with a PLC. Other commands can be sent
when the response to the communications start command is returned normally.

■ Command

C R CR
43H 52H

■ Response

C C CR L F
43H 43H

<Response during an error>


9 If the command is not processed successfully, "E1" is entered.
"Response during an error" page 9-24
SERIAL COMMUNICATIONS

End of communications [CQ]

This command ends serial communications with the PLC.

■ Command

C Q CR
43H 51H

■ Response

C F CR L F
43H 46H

<Response during an error>


If the command is not processed successfully, "E1" is entered.
"Response during an error" page 9-24

9-8
9-4 Explanation of Commands and Responses

Baud rate setting [SP]

This command changes the baud rate in serial communications with the PLC.

■ Command

S P n CR
53H 50H 20H

n: Stands for the baud rate.


"0"···9600 bit/s
"1"···19200 bit/s
"2"···38400 bit/s
"3"···57600 bit/s
"4"···115200 bit/s

■ Response
9
CR L F

SERIAL COMMUNICATIONS
O K
4FH 4BH

<Response during an error>


If the command is not processed successfully, "E1" is entered.
"Response during an error" page 9-24

Note
• When the power is turned ON, the default baud rate is 9600 bit/s.
• When the Break signal is received, the baud rate is returned to 9600 bit/s.
• The baud rate is changed after the response is sent. Check the response before
sending commands at the newly set baud rate.

9-9
9-4 Explanation of Commands and Responses

Model query [?K]

This command displays the model No. of the PLC.

■ Command

? K CR
3FH 4BH

■ Response

d d C L
R F

dd : Stands for the model.


"50"···KV-1000

9 <Response during an error>


If the command is not processed successfully, "E1" is entered.
SERIAL COMMUNICATIONS

"Response during an error" page 9-24

Operation mode confirmation [ ?M ]

This command displays the current operating state of the CPU Unit.

■ Command

? M CR
3FH 4DH

■ Response

f CR L F

f : Stands for the current status of the CPU Unit.


"0"···[PROGRAM] mode or [ladder not registered]
"1"···[RUN] mode

<Response during an error>


If the command is not processed successfully, "E1" is entered.
"Response during an error" page 9-24

9-10
9-4 Explanation of Commands and Responses

Error No. confirmation [ ?E ]

This command displays errors that are currently occurring on the CPU unit.

■ Command

? E CR
3FH 45H

■ Response

d d d C L
R F

ddd : Error Nos. on the CPU Unit are displayed in three digits.
"000"···Normal
Other than "000"···Error
"APPENDICES 2 Error Message Lists" page A-12
9
<Response during an error>

SERIAL COMMUNICATIONS
If the command is not processed successfully, "E1" is entered.
"Response during an error" page 9-24

Change mode [ Mn ]

This command switches the CPU Unit to the [PROGRAM] mode or the [RUN] mode.

■ Command

M Mode No. CR
4DH

Mode No. : "0"···PROGRAM mode


"1"···RUN mode

■ Response

O K CR L F
4FH 4BH

<Response during an error>


If the command is not processed successfully, "E1", "E2" or "E5" is entered.
"Response during an error" page 9-24

9-11
9-4 Explanation of Commands and Responses

Clear error [ ER ]

This command cancels errors that are currently occurring on the CPU unit.

■ Command

E R CR
45H 52H

■ Response

O K C L
R F
4FH 4BH

<Response during an error>


If the command is not processed successfully, "E1" is entered.

9 "Response during an error" page 9-24


SERIAL COMMUNICATIONS

Date/time setting [ WRT ]

This commands sets the date/time of the CPU Unit.

■ Command

W R T y y m 1 d d h h m 2 s s w CR
57H 52H 54H 20H Data 1 20H Data 2 20H Data 3 20H Data 4 20H Data 5 20H Data 6 20H Data 7

Data 1 : The year (00 to 99) 00 becomes the year 2000.


Data 2 : Month (01 to 12)
Data 3 : Day (01 to 31)
Data 4 : Hours (00 to 23)
Data 5 : Minutes (00 to 59)
Data 6 : Seconds (00 to 59)
Data 7 : Day of week (0 to 6) 0 becomes Sunday.

■ Response

O K CR L F
4FH 4BH

<Response during an error>


If the command is not processed successfully, "E1" is entered.
"Response during an error" page 9-24

9-12
9-4 Explanation of Commands and Responses

Forced set/reset [ ST/RS ]

This command forcibly turns the contact of a specified device ON or OFF.

■ Command
<Forced set>

S T Device Device No. CR


53H 54H 20H

<Forced reset>

R S Device Device No. CR


52H 53H 20H

Device Name Device Device No. Response


Relays – 00000 to 59915 OK 9
Control Relays CR 0000 to 3915 OK

SERIAL COMMUNICATIONS
Internal Auxiliary Relays MR 00000 to 99915 OK
Latch Relays LR 00000 to 99915 OK
Timers T 0000 to 3999 OK
Counters C 0000 to 3999 OK
High-speed Counter
CTC 0 to 3 OK
Comparators*1
*1 High-speed counter comparators can be used only in the case of the RS command (forced reset).

■ Response

O K CR L F
4FH 4BH

<Response during an error>


If the command is not processed successfully, "E0" or "E1" is entered.
"Response during an error" page 9-24

Continuous forced set/reset [ STS/RSS ]

This command forcibly turns the contacts of a specified number of devices ON or OFF.

■ Command
<Continuous forced set>

S T S Device Device No. Number of writes CR


53H 54H 53H 20H 20H

9-13
9-4 Explanation of Commands and Responses

<Continuous forced reset>

R S S Device Device No. Number of writes CR


52H 53H 53H 20H 20H

Device No. : Specify the leading No. of the device to be forcibly reset or set.

Device Name Device Device No. Number of Writes Response


Relays – 00000 to 59915 01 to 16 OK
Control Relays CR 0000 to 3915 01 to 16 OK
Internal Auxiliary
MR 00000 to 99915 01 to 16 OK
Relays
Latch Relays LR 00000 to 99915 01 to 16 OK

■ Response

O K CR L F
4FH 4BH

9
<Response during an error>
SERIAL COMMUNICATIONS

If the command is not processed successfully, "E0" or "E1" is entered.


"Response during an error" page 9-24

Read [ RD ]

Reads one data from a specified device.

■ Command

R D Device Device No. CR


52H 44H 20H

Device Name Device Device No. Response


Relays – 00000 to 59915 f
Control Relays CR 0000 to 3915 f
Internal Auxiliary Relays MR 00000 to 99915 f
Latch Relays LR 00000 to 99915 f
Data Memory DM 00000 to 65534 ddddd
Control Memory CM 00000 to 11998 ddddd
Temporary Data Memory TM 000 to 511 ddddd
Expanded Data Memory EM 00000 to 65534 ddddd
Expanded Data Memory FM 00000 to 32766 ddddd
Index Register Z 01 to 12 ddddd
Digital Trimmers AT 0 to 7 dddddddddd
Timers T 0000 to 3999 f,dddddddddd,dddddddddd
Counters C 0000 to 3999 f,dddddddddd,dddddddddd
High-speed Counters CTH 0 to 1 0,dddddddddd,0000000000
High-speed Counter
CTC 0 to 3 f,dddddddddd,dddddddddd
Comparators
9-14
9-4 Explanation of Commands and Responses

■ Response
<R, CR, MR, LR>

f CR L F

f : Stands for the state of the specified device.


"0"···OFF
"1"···OFF

<DM, CM, TM, EM, FM, Z>

d d d d d C L
R F

d···d : Stands for the data of the specified device. The display range is 00000 to 65535 (decimal).

<AT>
9
d d d d d d d d d d CR L F

SERIAL COMMUNICATIONS
d···d : Stands for the data of the specified device. The display range is 0000000000 to
4294967295 (decimal).

<T, C, CTH, CTC>

f , d d d d d d d d d d , d d d d d d d d d d CR L F
Data 1 Data 2

f : Stands for the state of the specified device.


"0"···OFF *"0" is fixed in the case of a high-speed counter (CTH).
"1"···OFF
d···d : Stands for the data of the specified device. The display range is 0000000000 to
4294967295 (decimal).
Data 1···Current value
Data 2···Setting value *"0000000000" is fixed in the case of a high-speed counter (CTH).

<Response during an error>


If the command is not processed successfully, "E0" or "E1" is entered.
"Response during an error" page 9-24

9-15
9-4 Explanation of Commands and Responses

Continuous read [ RDS ]

This command continuously reads the data of a specified number of devices.

■ Command

R D S Device Device No. Number of reads CR


52H 44H 53H 20H 20H

Device No. : Specify the leading No. to read.

Number of
Device Name Device Device No. Reads Response
Relays – 00000 to 59915 1 to 8 f f ...
Control Relays CR 0000 to 3915 1 to 8 f f ...
Internal Auxiliary
MR 00000 to 99915 1 to 8 f f ...
Relays
Latch Relays LR 00000 to 99915 1 to 8 f f ...
9 Data Memory
Control Memory
DM
CM
00000 to 65534
00000 to 11998
1 to 8
1 to 8
ddddd ddddd
ddddd ddddd
...
...
Temporary Data Memory TM 000 to 511 1 to 8 ddddd ddddd ...
SERIAL COMMUNICATIONS

Expanded Data
EM 00000 to 65534 1 to 8 ddddd ddddd ...
Memory
Expanded Data
FM 00000 to 32766 1 to 8 ddddd ddddd ...
Memory
Index Register Z 01 to 12 1 to 8 ddddd ddddd ...
Digital Trimmers AT 0 to 7 1 to 8 dddddddddd dddddddddd ...
f,dddddddddd,dddddddddd
Timers T 0000 to 3999 1 to 8
f,dddddddddd,dddddddddd ...
f,dddddddddd,dddddddddd
Counters C 0000 to 3999 1 to 8
f,dddddddddd,dddddddddd ...
0,dddddddddd,0000000000
High-speed Counters CTH 0 to 1 1 to 2
0,dddddddddd,0000000000 ...
High-speed Counters f,dddddddddd,dddddddddd
CTC 0 to 3 1 to 4
Comparator f,dddddddddd,dddddddddd ...

■ Response
<R, CR, MR, LR>

f f f CR L F
20H 20H

f : Stands for the state of devices in order from the specified device No.
"0"···OFF
"1"···OFF

9-16
9-4 Explanation of Commands and Responses

<DM, CM, TM, EM, FM, Z>

d d d d d d d d d d ... d d d d d CR L F
20H 20H

d···d Stands for the data of devices in order from the specified device No. The display range is
00000 to 65535 (decimal).

<AT>

d d d d d d d d d d d d d d d d d d d d
20H 20H

d d d d d d d d d d CR L F

d···d Stands for the data of devices in order from the specified device No. The display range is
0000000000 to 4294967295 (decimal).

9
<T, C, CTH, CTC>

SERIAL COMMUNICATIONS
f , d d d d d d d d d d , d d d d d d d d d d
Data 1 Data 2 20H

f , d d d d d d d d d d , d d d d d d d d d d
Data 1 Data 2 20H

f , d d d d d d d d d d , d d d d d d d d d d CR L F
Data 1 Data 2

f : Stands for the state of devices in order from the specified device No.
"0"···OFF *"0" is fixed in the case of a high-speed counter (CTH).
"1"···OFF
d···d Stands for the data of devices in order from the specified device No. The display range is
0000000000 to 4294967295 (decimal).
Data 1···Current value
Data 2···Setting value *"0000000000" is fixed in the case of a high-speed counter (CTH).

<Response during an error>


If the command is not processed successfully, "E0" or "E1" is entered.
"Response during an error" page 9-24

9-17
9-4 Explanation of Commands and Responses

Write [ WR ]

This command writes data to the specified device.

■ Command

W R Device Device No. Data CR


57H 52H 20H 20H

Device Name Device Device No. Data Response


Data Memory DM 00000 to 65534 00000 to 65535 OK
Control Memory CM 00000 to 11998 00000 to 65535 OK
Temporary Data Memory TM 000 to 511 00000 to 65535 OK
Expanded Data Memory EM 00000 to 65534 00000 to 65535 OK
Expanded Data Memory FM 00000 to 32766 00000 to 65535 OK
Index Register Z 01 to 12 00000 to 65535 OK
Timers (current value) T 0000 to 3999 0000000000 to 4294967295 OK
Counters (current value) C 0000 to 3999 0000000000 to 4294967295 OK
9 High-speed counters
CTH 0 to 1 0000000000 to 4294967295 OK
(current value)
SERIAL COMMUNICATIONS

■ Response

O K CR L F
4FH 4BH

<Response during an error>


If the command is not processed successfully, "E0" or "E1" is entered.
"Response during an error" page 9-24

Continuous write [ WRS ]

This command writes data to a specified number of devices.

■ Command
W R S Device Device No. Number of writes Data Data Data CR
57H 52H 53H 20H 20H 20H 20H

Device No. : Specify the leading No. to write to.


Number of
Device Name Device Device No. Writes Data Response
Data Memory DM 00000 to 65534 1 to 8 00000 to 65535 OK
Control Memory CM 00000 to 11998 1 to 8 00000 to 65535 OK
Temporary Data Memory TM 000 to 511 1 to 8 00000 to 65535 OK
Expanded Data
EM 00000 to 65534 1 to 8 00000 to 65535 OK
Memory

9-18
9-4 Explanation of Commands and Responses

Number of
Device Name Device Device No. Writes Data Response
Expanded Data
FM 00000 to 32766 1 to 8 00000 to 65535 OK
Memory
Index Register Z 01 to 12 1 to 8 00000 to 65535 OK
Timers (current value) T 0000 to 3999 1 to 8 0000000000 to 4294967295 OK
Counters (current value) C 0000 to 3999 1 to 8 0000000000 to 4294967295 OK
High-speed counters
CTH 0 to 1 1 to 2 0000000000 to 4294967295 OK
(current value)

■ Response

O K CR L F
4FH 4BH

<Response during an error>


If the command is not processed successfully, "E0" or "E1" is entered.
"Response during an error" page 9-24

9
Write setting value [ WS ]

SERIAL COMMUNICATIONS
This command writes the setting value of a specified device.

■ Command

W S Device Device No. Data CR


57H 53H 20H 20H

Device Name Device Device No. Data Response


Timers T 0000 to 3999 0000000000 to 4294967295 OK
Counters C 0000 to 3999 0000000000 to 4294967295 OK
High-speed Counter
CTC 0 to 3 0000000000 to 4294967295 OK
Comparators

■ Response

O K C L
R F
4FH 4BH

<Response during an error>


If the command is not processed successfully, "E0", "E1" or "E4" is entered.
"Response during an error" page 9-24

9-19
9-4 Explanation of Commands and Responses

Write continuous setting values [ WSS ]

This command writes the setting values of a specified number of continuous devices.

■ Command

W S S Device Device No. Number of writes Data Data Data CR


57H 53H 53H 20H 20H 20H 20H 20H

Device No. : Specify the leading No. to write the setting value to.

Number of
Device Name Device Device No. Data Writes Response
Timers T 0000 to 3999 0000000000 to 4294967295 1 to 8 OK
Counters C 0000 to 3999 0000000000 to 4294967295 1 to 8 OK
High-speed Counter
CTC 0 to 3 0000000000 to 4294967295 1 to 4 OK
Comparators

9 ■ Response
SERIAL COMMUNICATIONS

O K CR L F
4FH 4BH

<Response during an error>


If the command is not processed successfully, "E0", "E1" or "E4" is entered.
"Response during an error" page 9-24

Register monitor [ MBS ]/[ MWS ]

This command registers the specified device to the bit device registration table or word device
registration table.

■ Command
<Registration of bit device monitor>
*1
M B S Device Device No. Device Device No. Device Device No. CR
4DH 42H 53H 20H 20H

Device Name Device Device No. Response


Relays – 00000 to 59915 OK
Control Relays CR 0000 to 3915 OK
Internal Auxiliary Relays MR 00000 to 99915 OK
Latch Relays LR 00000 to 99915 OK
Timers T 0000 to 3999 OK
Counters C 0000 to 3999 OK
High-speed Counter Comparators CTC 0 to 3 OK

9-20
9-4 Explanation of Commands and Responses

<Registration of word/double-word device monitor>


*1
M W S Device Device No. Device Device No. Device Device No. CR
4DH 57H 53H 20H 20H

Device Name Device Device No. Response


Relays *2 – 00000 to 59915 OK
Control Relays *2 CR 0000 to 3915 OK
Internal Auxiliary Relays *2 MR 00000 to 99915 OK
Latch Relays *2 LR 00000 to 99915 OK
Data Memory DM 00000 to 65534 OK
Control Memory CM 00000 to 11998 OK
Temporary Data Memory TM 000 to 511 OK
Expanded Data Memory EM 00000 to 65534 OK
Expanded Data Memory FM 00000 to 32766 OK
Index Register Z 01 to 12 OK
Digital Trimmers AT 0 to 7 OK
Timer Current Value TC 0000 to 3999 OK
Timer Setting Values TS 0000 to 3999 OK
Counter Current Values
Counter Setting Values
CC
CS
0000 to 3999
0000 to 3999
OK
OK
9
High-speed Counters CTH 0 to 1 OK

SERIAL COMMUNICATIONS
High-speed Counter
CTC 0 to 3 OK
Comparators
*1 Up to 16 items of data can be registered.
*2 Relays, control relays, internal auxiliary relays, and latch relays are registered in ch units.
When setting these relays, be sure to specify the leading No. on the channel.

■ Response

O K CR L F
4FH 4BH

<Response during an error>


If the command is not processed successfully, "E0" or "E1" is entered.
"Response during an error" page 9-24

9-21
9-4 Explanation of Commands and Responses

Read monitor [ MBR ]/[ MWR ]

These commands display the content of devices in the device registration table.

■ Command
<Reading the bit device registration table>

M B R CR
4DH 42H 52H

<Reading the word device registration table>

M W R CR
4DH 57H 52H

■ Response
9 CR L F
Data Data Data Data
SERIAL COMMUNICATIONS

20H 20H 20H 20H

Data: The monitor results of data currently registered to the bit device registration table or the
word device registration table are entered as the data. The monitor results are in the
same format as the response to the RDS command.

<Response during an error>


If the command is not processed successfully, "E1" is entered.
"Response during an error" page 9-24

9-22
9-4 Explanation of Commands and Responses

Read comment [ RDC ]

This command reads the comment of a specified device.

■ Command

R D C Device Device No. CR


52H 44H 43H 20H

Device Name Device Device No. Response


Relays – 00000 to 59915
Control Relays CR 0000 to 3915
Internal Auxiliary Relays MR 00000 to 99915
Latch Relays LR 00000 to 99915
Data Memory DM 00000 to 65534
Control Memory CM 00000 to 11998
Temporary Data Memory TM 000 to 511
Device comment 32
Expanded Data Memory EM 00000 to 65534
Expanded Data Memory FM 00000 to 32766
characters
9
Index Register Z 01 to 12

SERIAL COMMUNICATIONS
Timers T 0000 to 3999
Counters C 0000 to 3999
High-speed Counters CTH 0 to 1
High-speed Counter
CTC 0 to 3
Comparators

■ Response

Data CR L F

Data: The comment (32 characters) of the device specified by the command is entered as the
data. If the comment is less than 32 characters, the remaining characters are filled with
spaces (20H).

<Response during an error>


If the command is not processed successfully, "E0", "E1" or "E6" is entered.
"Response during an error" page 9-24

Note
During a write in the RUN mode, the response "E6" in the case of an error is entered
even if the comment is registered to the specified device.

9-23
9-4 Explanation of Commands and Responses

Response during an error

If you send the wrong command or an error occurs on the CPU Unit, a response different from a
regular response is returned. The table below summarizes the content, cause and remedy to take
for each of the responses that are returned during an error.

Code Description Cause Remedy


• The specified device No. exceeds
• Specify a No. in the pre-determined
the range.
range.
• Timer, counter, CTH, and CTC Nos.
Device No. • Check the program, and specify the No.
E0 not specified in the program have
error used in the program.
been specified.
• Register the monitor before you instruct
• A monitor read was performed even
reading of a monitor.
though the monitor is not registered.
• A command not supported by the
• Check the command, and send the cor-
KV-1000 was sent.
rect command.
• The method for specifying the com-
Command • "Explanation of Commands and
E1 mand is wrong.
error Responses" page 9-8
• A command other than CR was sent
• Send CR to establish communications
9 before communications was estab-
lished.
before re-sending the command.

• The "M1 (switch to Run Mode)" com-


SERIAL COMMUNICATIONS

mand was sent without the program • Register the program to the CPU Unit
Program registered to the CPU Unit. before sending the command.
E2
not registered • The "M1 (switch to Run Mode)" com- • Set the RUN/PROG switch on the CPU
mand was sent with the RUN/PROG Unit to RUN.
switch on the CPU Unit set to PROG.
• An attempt was made to change the
Write • Cancel the program write protection,
E4 setting values of a timer, counter or
protected and then re-send the command.
CTC in a write-protected program.
• The "M1 (switch to Run Mode)" com- • Cancel the error on the KV-1000, elimi-
E5 Unit error mand was sent without the error on nate the cause of the error, and then re-
the KV-1000 canceled. send the command.
• Comments are not registered to the
• If necessary, register the comment to
E6 No comment device selected by the "Read com-
the device.
ment RDC" command.

9-24
9-5 Sending/Receiving Text Data
You can connect an external device having an RS-232C-compliant interface to the KV-1000, and
batch-write continuous text data (999 bytes or less or 1998 bytes or less), or send text data in
data memories.

Receiving Text Data

■ Receive data format and internal data memory


The KV-1000 writes text data of 999 bytes or less when CR2805 is OFF, and 1998 bytes
or less when CR2805 is ON of text data between STX and ETX one byte at a time in
ASCII code to internal data memories CM03000 to CM03999 (two bytes at a time when
CR2805 is ON)
CM03000 CM03001 CM03002 to CM03998 CM03999
When CR2805 is Number of data 2,
STX Data 1, Data 999 ETX
OFF data bytes Data 3 to data 998
When CR2805 is Number of Data 1, Data 3, data 4 Data 1997,
STX ETX
ON data bytes data 2, data 5 to data 1996 Data 1998

Receive data format


9
As the format of text data that is received on the KV-1000, the 1st byte is STX(02H), the 2nd byte

SERIAL COMMUNICATIONS
onwards is the data, and the final byte is EXT(03H).

1st byte 2nd byte onwards Final byte

STX Text data (999 bytes or less, or 1998 bytes or less) ETX

When CR2805 is OFF

Text data captured on the KV-1000 is stored in ASCII code as follows to internal data memories
CM03000 to CM03999.
"00" is written to the upper eight bits of the data memory, and text data is written in ASCII code to
the lower eight bits.
Data Memory CM03000 CM03001 CM03002 CM03003 to CM03998 CM03999
Number of data
No. Data 1 Data 2 Data 3 to data 998 Data 999
bytes

Number of data bytes

Receive data STX Data 1 Data 2 Data 3 Data 999 ETX

Leading CM03000
Data memory (number of data bytes) Leading CM+1 Leading CM+2 Leading CM+3 Leading CM+999

bit15 bit0
Data memory
bits 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1

Upper 8 bits (00) Lower 8 bits (ASCII code)

9-25
9-5 Sending/Receiving Text Data

When CR2805 is ON

When CR2805 is ON, text data is stored two bytes at a time to a single control memory.
Data Memory CM03000 CM03001 CM03002 CM03003 to CM03998 CM03999
Number of data
No. Data 1, 2 Data 3, 4 Data 5 to data 1996 Data 1997, 1998
bytes

Number of data bytes

Receive data STX Data 1 Data 2 Data 3 Data 1998 ETX

Leading CM03000
Data memory (number of data bytes) Leading CM+1 Leading CM+2 Leading CM+3 Leading CM+999

bit15 bit0
Data memory
bits 0 0 1 1 0 0 1 0 0 0 1 1 0 0 0 1

Upper 8 bits (ASCII code) Lower 8 bits (ASCII code)

9 ■ Operation of special auxiliary relays


With reception of text data, three special auxiliary relays turn ON for one scan only during data
SERIAL COMMUNICATIONS

capture of when an error occurs.


Relay No. Description
CR2801 ON for one scan only when text data is received
ON for one scan only when text data is received while CR2801 is ON
CR2802
or when CR2803 is ON
CR2803 ON for one scan only when a text data receive error has occurred

Note
• To establish communications without turning the KV-1000 OFF after
communications is established between the KV-1000 and KV STUDIO, the Break
signal must be sent again.
• When the Break signal cannot be sent to the PC, the communications program can
be initialized by turning the KV-1000 OFF then back ON again. Try establishing
communications with the PC again.
• Allow at least 10 ms after sending the Break signal before you establish next
communications.
• If an ETX is found in the read data of the text data, the data preceding the ETX is
transferred to data memory. Data following ETX is not captured.
• If a parity error occurs during text data reception, that text data will not be
transferred to data memory, and control relays CR2802 and CR2803 turn ON for one
scan only.
• To return the baud rate to the default (9600 bit/s) when it has been changed by the
command [SP] disclosed to the user, turn the KV-1000 OFF then ON again, set the
baud rate to 9600 bit/s by the command [SP], or send the Break signal.

9-26
9-5 Sending/Receiving Text Data

Sending Text Data

The KV-1000 can send text data written in ASCII code to internal data memories in single bytes at
a time.

■ Send data format and internal data memory


Data to be sent must first be written to control memory in the following format.

When CR2806 is OFF

"00" is written to the upper eight bits of the control memory, and text data is written in ASCII code
to the lower eight bits.
Data Memory CM04000 CM04001 CM04002 CM04003 to CM04998 CM04999
Number of data
No. Data 1 Data 2 Data 3 to data 998 Data 999
bytes

Data memory
bit15 bit0 9
bits 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1

SERIAL COMMUNICATIONS
Upper 8 bits (00) Lower 8 bits (ASCII code)

Leading CM04000
Data memory (number of data bytes) Leading CM+1 Leading CM+2 Leading CM+3 Leading CM+999

Send data Data 1 Data 2 Data 3 Data 999

When CR2806 is ON

Text data is written to the upper eight bits and lower eight bits of the control memory in ASCII
code.
Data Memory CM04000 CM04001 CM04002 CM04003 to CM04998 CM04999
Number of data
No. Data 1, 2 Data 3, 4 Data 5 to data 1996 Data 1997, 1998
bytes

bit15 bit0
Data memory
bits 0 0 1 1 0 0 1 0 0 0 1 1 0 0 0 1

Upper 8 bits (ASCII code) Lower 8 bits (ASCII code)

Leading CM04000
Data memory (number of data bytes) Leading CM+1 Leading CM+2 Leading CM+3 Leading CM+999

Send data Data 1 Data 2 Data 3 Data 1998

9-27
9-5 Sending/Receiving Text Data

■ Operation of special auxiliary relays


The KV-1000 has two special auxiliary relays for transmission of text data. Text data and the
Break signal are sent according to the ON/OFF setting of these relays.
Relay No. Description
CR2804 Text data send data send start/cancel ON: send, OFF: cancel
CR2800 Break signal send start/stop ON: send, OFF: stop

Note
• To establish communications without turning the KV-1000 OFF after
communications is established between the KV-1000 and KV STUDIO, the Break
signal must be sent again.
• When the Break signal cannot be sent to the PC, the communications program can
be initialized by turning the KV-1000 OFF then back ON again. Try establishing
communications with the PC again.
• Allow at least 10 ms after sending the Break signal before you establish next
communications.
• To return the baud rate to the default (9600 bit/s) when it has been changed by the
command [SP] disclosed to the user, turn the KV-1000 OFF then ON again, set the
baud rate to 9600 bit/s by the command [SP], or send the Break signal.
9
• To start sending text data, set CR2804.
SERIAL COMMUNICATIONS

CR2804 stays ON while text data is being sent.


CR2804 automatically turns OFF when transmission ends.
To forcibly cancel transmission of text data midway, reset CR2804 by (RES CR2804).
• The Break signal is sent for the duration that CR2800 is ON.
The SET and RES, or OUT and OUB instructions are used to control the Break signal.
The communications program of the KV-1000 itself is initialized after the Break signal is sent.

0001 ⋅Send BREAK signal 1S

CR2008 T0000 CR2800


0002

CR2800 #10
0003 T0000

0004 ⋅Setting the send byte unit

CR2008 CR2805
0005 RES

0006 ⋅Sending text data "STX KEYENCE ETX"

R00000 #00009 $0002 $004B $0045 $0059 $0045 $004E $0043


0007 DW DW DW DW DW DW DW DW
CM04000 CM04001 CM04002 CM04003 CM04004 CM04005 CM04006 CM04007

0008

$0045 $00003 CR2804


0009 DW DW SET
CM04008 CM04009

0010 ⋅Receiving text data

CR2801 CM03000 CM03001 CM03002 CM03003 CM03004 CM03005 CM03006 CM03007 ⋅11th rung is ladder
0011 LDA LDA LDA LDA LDA LDA LDA LDA
program for receive monitor.
CR2803 T0001 00500
0012

R00500 #30
0013 T0001

0014

END
0015

ENDH
0016

0017

9-28
9-6 ASCII Code Table
This section describes the content of the ASCII code table.

SERIAL COMMUNICATIONS

9-29
9-6 ASCII Code Table

MEMO

9
SERIAL COMMUNICATIONS

9-30
10
VARIOUS FUNCTIONS
This chapter describes the various functions incorporated on the KV-1000
CPU Unit such as functions for setting and checking PLC operation, and
handy functions when debugging programs and performing adjustments with
external devices.

10-1 Fixed Scan Time Operation Functions . . . . . . . 10-2

VARIOUS FUNCTIONS
10-2 I/O Inhibit Function . . . . . . . . . . . . . . . . . . . . . . 10-3
10-3 Input Time Constant Selection Function . . . . . . 10-5
10-4 Latch Function (Power Interruption Hold) . . . . . 10-6
10-5 Clock Function . . . . . . . . . . . . . . . . . . . . . . . . . 10-9
10-6 Other Functions . . . . . . . . . . . . . . . . . . . . . . . 10-10

10-1
10-1 Fixed Scan Time Operation Functions

Fixed Scan Time Operation Functions

Normally, when a program is executed, the scan time changes depending on the content to be
processed.

When this function is used, a wait is caused by END processing to keep the scan time at a fixed
value. When the scan time is longer than the preset time, the scan time changes. Always set the
time after having actually measured the scan time to confirm the time of the program to be
executed.

■ How to set fixed scan time operation


1 Select the unit of scan time of the fixed scan time operation function by the MEMSW instruction.
(500µsunit/1msunit) KV-1000 Instruction Reference Manual "MEMSW Instruction"

2 Set the scan time to CM00721.

Example

Scan Time
10 Stored Value of CM00721
500 µs Unit 1ms Unit
1 500 µs 1 ms
VARIOUS FUNCTIONS

2 1000 µs(1ms) 2 ms

3 Fixed scan time operation is started when CR2303 turns ON.

4 Set to CM00721 in the range 200 (ms) or below.


Setting "0" to CM00721 returns to regular operation. Even if you set a value of 200 ms or more,
the scan time does not become 200 ms or more.
When the scan time exceeds the setting value, CR2304 turns ON, and the scan time is stored to
CM00722. (The scan time unit is the same as the scan time unit of CM00721.)

Note
• Be sure to set a value larger than the measured scan time (stored to CM00720). The
value is stored to CM00720 in 0.1 ms units.
• When the power is turned ON, or the RUN mode is switched to the PROG mode, the
content of CM00721 is cleared, and CR2303 is turned OFF. When fixed scan time
operation is used, set the value of CM00721 in the program.

10-2
10-2 I/O Inhibit Function
I/O processing is executed at each scan during program execution. This section describes how to
inhibit I/O.

Input Refresh Inhibit Function

The "inhibit refresh inhibit function" disables refreshing of the content of the input relay by input signals
from an external device.
If input is disabled, debugging can be performed without the use of an external device by using
the KV STUDIO's monitor function to forcibly turn input relays ON/OFF.

■ Method of use
Inhibit/enable inputs by the content of CR2301.
Control Relay Details of Operation
ON: Inhibits input refresh processing in END processing.
The content of the input relay is not updated.
CR2301 OFF: Enables input refresh processing in END processing.
The content of the input relay is updated according to the state of the input
signal.

Note
The following functions also cannot be used when input refresh inhibit is used: 10
• Interrupts

VARIOUS FUNCTIONS
• High-speed counters (excluding internal clock)
• Positioning (origin sensor, stop sensor, Z-phase, limit switches) R00000 to R00015

Output Inhibit Function

The "output inhibit function" disables output of signals to external devices even if the program is
turning output coils ON/OFF. All outputs are inhibited (turned OFF).

■ Method of use
Enable/inhibit outputs by the content of CR2300.
Control Relay Details of Operation
ON: Inhibits (OFF) output processing in END processing.
CR2300 OFF: Enables output processing in END processing.
The content of the output coils is output for the output.

Note
When CR2300 turns ON, all outputs turn OFF.
For example, when CR2300 turns ON during positioning pulse output, the pulse
output from the output terminals is inhibited (turned OFF). However, as operation is
continued internally, output is restarted when CR2300 turns OFF. (Pulse output for
the duration that CR2300 is ON is treated as having been output.)

10-3
10-2 I/O Inhibit Function

Output Inhibit Function at Break

Enable/inhibit output during a break by the content of CR2302.


Control Relay Details of Operation
ON: Inhibits (turns OFF) output processing during a break.
CR2302
OFF: Enables output processing also during a break.

For details on breaks, KV STUDIO User's Manual "Chapter 10 DEBUGGING".

10
VARIOUS FUNCTIONS

10-4
10-3 Input Time Constant Selection Function

About the Input Time Constant

The input time constant selection function allows you to set as an "input time constant" the pulse
width that can be reliably captured as a signal from an input contact. Setting a small input time
constant enables input of shorter-width pulses, and, alternatively, setting a large input time
constant achieves a simple noise filter.
Setting a small input time constant allows high-speed signals to be handled when connecting a
non-contact signal that does not generate chattering or when capturing high-speed signals from
an encoder or similar device.

■ How to change the input time constant of the CPU Unit


The input time constant of the KV-1000 input relays(R00000 to R00015) can be selected by
setting control relay CR2305 and control memory CM01620.
Normally, the input time constant is 10 ms. However, it can be changed to the value batch-set in
CM01620 when control relay CR2305 is turned ON.
Control Relay Details of Operation
OFFJON: Reflects the setting of CM01620 at the up edge of CR2305.
CR2305
OFF: The input time constant is fixed at 10 ms.

Control memory Setting value Input time constant


10
0 10 µs

VARIOUS FUNCTIONS
1 20 µs
2 500 µs
3 1 ms
CM01620 4 2.5 ms
5 5 ms
6 10 ms
7 110 µs
8or more Do not set.

Note, however, that when the HSP instruction and control relay CR2305 are used simultaneously, the
HSP instruction is given priority, and the specified relay cannot be changed to the value set at CM01620.
Control relay CR2305
OFF: Sets the input time constant to 10 ms.OFFJON: Looks up the value entered at CM01620 to
determine the time constant.

Example
The input time constant is set to 1 ms.
CR2008 #00003 CM01620 CR2305
LDA STA SET

Note
The input time constant is set after one scan has ended. Accordingly, specified
details are enabled from the next scan onwards.

■ How to change the input time constant of the Expansion Input Unit
Change the input time constant of the Expansion Input Unit on Unit Editor.
KV STUDIO User's Manual
"Chapter 2 ACCESS WINDOW" page 2-1
10-5
10-4 Latch Function (Power Interruption Hold)
The latch function holds (hold at power interruption) the content of devices at the state before the
power was turned OFF by battery backup even if the power is turned OFF.

Latch Function

The state of data memories and relays can be held in the event of a power interruption.
Set the latch function by the MEMSW instruction.
KV-1000 Instruction Reference Manual "MEMSW Instruction"

The memory switch has three switches, 0 to 2.


Each switch comprises 16 bits, and switch functions are set by turning these bits ON/OFF.
The latch function is set by two memory switches, 0 and 1.
The content of the memory switches is set when the program is transferred to the KV-1000.
If the program does not contain the MEMSW instruction, "$0000" is set on the switch.

MEMSW0

3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0 MEMSW0
$0103
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
SW1
SW2
SW3
VARIOUS FUNCTIONS

SW4

No. Switch Functions ON OFF


0 Cancel error at power ON, ProgRun ON OFF
1 Write protection of main routine program ON OFF
SW1
2 Reserved for system − −
Contact and current value of counter, and
current value CTH of high-speed counter and
3 contact of current value CTH cleared at ON OFF
power ON, ProgRun

0 Enable digital trimmer upper limit value ON OF


SW2 1 Read protection of main routine program ON OFF
2 Reserved for system − −
3 Reserved for system − −
0 DM00000 to DM09999 at power ON, ProgRun Clear Hold
SW3 1 DM10000 to DM19999 at power ON, ProgRun Clear Hold
2 DM20000 to DM29999 at power ON, ProgRun Clear Hold
3 DM30000 to DM39999 at power ON, ProgRun Clear Hold
0 DM40000 to DM49999 at power ON, ProgRun Clear Hold
SW4 1 DM50000 to DM59999 at power ON, ProgRun Clear Hold
2 DM60000 to DM65534 at power ON, ProgRun Clear Hold
3 Reserved for system − −

10-6
10-4 Latch Function (Power Interruption Hold)

MEMSW1

3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0 MEMSW0
$0216
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
SW1
SW2
SW3
SW4

No. Switch Functions ON OFF


0 Hold relays R01000 to R04915 ON OFF
SW1 1 Hold relays R05000 to R09915 ON OFF
2 Hold relays R10000 to R14915 ON OFF
3 Hold relays R15000 to R19915 ON OFF
0 Hold relays R20000 to R24915 ON OFF
SW2 1 Hold relays R25000 to R29915 ON OFF
2 Hold relays R30000 to R34915 ON OFF
3 Hold relays R35000 to R39915 ON OFF
0 Hold relays R40000 to R44915 ON OFF
SW3 1 Hold relays R45000 to R49915 ON OFF
2 Hold relays R50000 to R54915 ON OFF
3 Hold relays R55000 to R59915 ON OFF
0 Reserved for system − − 10
SW4 1 Reserved for system − −

VARIOUS FUNCTIONS
2 Reserved for system − −
3 Reserved for system − −

Note
Set holding of relays set by MEMSW1 only to internal auxiliary relays.
Do not set this function to relays assigned to I/O Units and special units (units other
than I/O Units). When this function is set to I/O relays, the relays do not hold the
content of devices. When this function is set to relays assigned to special units, the
program may not function normally.

10-7
10-4 Latch Function (Power Interruption Hold)

MEMSW2

3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0 MEMSW2
$0003
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
SW1
SW2
SW3
SW4

No. Switch Functions ON OFF


0 Comparator match output destination switching R00500 or R00504 R00504 R00500
SW1 1 Comparator match output destination switching R00501 or R00505 R00505 R00501
2 Fixed scan time operation (unit selection) 500µs 1 ms
3 Reserved for system − −
0 EM00000 to EM19999 at power ON, ProgRun Clear Hold
SW2 1 EM20000 to EM39999 at power ON, ProgRun Clear Hold
2 EM40000 to EM59999 at power ON, ProgRun Clear Hold
3 EM60000 to EM65534 at power ON, ProgRun Clear Hold
0 FM00000 to FM19999 at power ON, ProgRun Clear Hold
SW3 1 FM20000 to FM32766 at power ON, ProgRun Clear Hold
2 Reserved for system − −
3 Reserved for system − −

10 0 Reserved for system − −


SW4 1 Reserved for system − −
VARIOUS FUNCTIONS

2 Reserved for system − −


3 Reserved for system − −

* Settings made by comparator match output destination selection are enabled by comparator
match output and specified frequency pulse output.
"Comparator Match Output" page 5-23
"Specified Frequency Pulse Output" page 6-2

Note
When comparator match output has been specified to R00504 or R00505 on
MEMSW2, the frequencies that can be output differ.
"Output specifications" page 1-14

Example
⋅Setting of error cancellation when the unit is turned ON (ProgRun) ⋅Setting of program write protection
MEMSW0 MEMSW0
$0001 $0002

⋅Setting to clear DM00000 to DM09999 ⋅Setting to hold relays R01000 to R04915


when the unit is turned ON (ProgRun) when the unit is turned ON (ProgRun)
MEMSW0 MEMSW1
$0100 $0001

⋅Setting to enable the digital trimmer upper limit value


MEMSW0
$0010

10-8
10-5 Clock Function
The KV-1000 CPU Unit counts by the clock IC with "year, month, day, hour, minute, seconds, and
day of the week" backed up by battery even if the unit is turned OFF.
This section describes how to read those values and how to set the clock IC.

Clock Function

The KV-1000 CPU Unit has a built-in clock. The current "year, month, day, hour, minute, seconds,
and day of the week" data can be read from this clock, and used in the program.
The clock's accuracy is ±60 s/month at room temperature (+25°C). The clock continues to
operate even if the CPU Unit is turned OFF.

■ How to read clock data


The calendar timer's time data is stored to control memories CM00700 to CM00706.
The following shows the format of the time data.
bit bit
15 0

CM00700 Year 0 to 99 The year is indicated by the lower two digits of the year.
CM00701 Month 1 to 12
CM00702 Day 1 to 31
CM00703 Hour 0 to 23 All data is annotated in 16-bit binary data format. 10
CM00704 Minute 0 to 59

VARIOUS FUNCTIONS
CM00705 Seconds 0 to 59
Days of week are 0: (Sunday), 1: (Monday), 2: (Tuesday), 3: (Wednesday),
CM00706 Day of week 0 to 6 4: (Thursday), 5: (Friday), and 6: (Saturday).

• This data can be read directly on the ladder. (read only)

■ How to write clock data (time setting)


Write the time data using the WTIME instruction.
KV-1000 Instruction Reference Manual "WTIME Instruction"

The time data can also be set in the access window.


"2-5 Displaying and Setting the Date/Time" page 2-19

It can also be set in KV STUDIO.


For details on how to set the time, KV STUDIO User's Manual "Setting the Calendar Timer".

10-9
10-6 Other Functions
This section describes other functions that come in handy when writing programs on KV STUDIO.
For details on operations, KV STUDIO User's Manual.

Device Comment Store Function, Rung Comment Store Function

The device comment store function transfers device comments to KV-1000 CPU Unit using KV
STUDIO. Rung comments can also be transferred.

The KV-1000 CPU Unit can memorize not only programs but also the content of comments
assigned to each of the contacts in KV STUDIO. Programs that are difficult to understand by
device Nos. along can be debugged more easily and programs made more efficiently by
assigning comments to contacts.

For details on how to assign comments and KV STUDIO operations, KV STUDIO User's Manual.

Password Setting Function

The password setting function is for restricting reading of internal parameters or the program

10 stored on the PLC.


If you set a password on KV STUDIO beforehand, the parameters or program on the PLC cannot
VARIOUS FUNCTIONS

be read unless the correct password is entered. Set a password if reading of the program will
inconvenience you.

For details on how to set, input and change passwords, and KV STUDIO operations, KV STUDIO User's
Manual.

Error Log

A log of up to 20 of the past errors that have occurred can be left on the KV-1000. The log is
recorded in control memory, and new errors are stored to the smallest error log No. When the
number of stored errors exceeds 20, the oldest error is deleted.
Control Memory Explanation
Year, month (decimal, lower 2 digits: month, 100's digit upwards: year
CM01800
Example: "406" means "2004, June")
CM01801 Day
Error log 1 log (new)
CM01802 Hour (0 to 23)
CM01803 Minute
CM01804 Error No.
: :
: :
Year, month (decimal, lower 2 digits: month, 100's digit upwards: year
CM01895
Example: "406" means "2004, June")
CM01896 Day
Error log 20 logs (old)
CM01897 Hour (0 to 23)
CM01898 Minute
CM01899 Error No.

10-10
10-6 Other Functions

Power ON Log

Up to 20 of the last power ONs can be left on the KV-1000. The log is recorded in control memory,
and new logs are stored to the smallest No. When the number of stored logs exceeds 20 logs, the
oldest log is deleted.

Control Memory Explanation


Year, month (decimal, lower 2 digits: month, 100's digit upwards: year
CM01900
Example: "406" means "2004, June")
CM01901 Day
Power ON log 1 log (new)
CM01902 Hour (0 to 23)
CM01903 Minute
CM01904 Seconds
: :
: :
Year, month (decimal, lower 2 digits: month, 100's digit upwards: year
CM01995
Example: "406" means "2004, June")
CM01996 Day
Power ON log 20 log (old)
CM01997 Hour (0 to 23)
CM01998 Minute
CM01999 Seconds
10

VARIOUS FUNCTIONS

10-11
10-6 Other Functions

MEMO

10
VARIOUS FUNCTIONS

10-12
APPENDICES
These appendices present tables for the relays, timers, counters, memory
Nos., control relays and control memories of the KV-1000 Series. Refer to
these appendices when using the KV-1000 CPU.

1 Device No. Lists . . . . . . . . . . . . . . . . . . . . . . . . . A-2


2 Error Message Lists . . . . . . . . . . . . . . . . . . . . . A-12
3 Differences between the KV-1000 Series & KV-700 Series. . . . A-15

A-1
1 Device No. Lists

Relays, Timers, Counters, Memory Nos.

■ KV-1000
Device Device Range
CPU input relay R00000 to R00015
CPU output relay R00500 to R00507
R01000 to R59915
Internal auxiliary relay
MR00000 to MR99915
Latch relay LR00000 to LR99915
Control relay CR0000 to CR3915
Timer/counter T/C0000 to T/C3999
Data memory DM00000 to DM65534
Expanded data memory EM00000 to EM65534
Expanded data memory FM00000 to FM32766
Temporary data memory TM000 to TM511
Control memory CM00000 to CM11998
High-speed counter CTH0 to CTH1
High-speed counter comparator CTC0 to CTC3
Index register Z1 to Z12
KV-1000 Instruction Reference Manual "1-2 Configuration of Devices"
APPENDICES

A-2
1 Device No. Lists

KV-1000 Devices

Control relays CR

With control relays (CR0000 to CR3915), you can check the operation state of the CPU Unit, set
input time constants, set high-speed counters, and make other settings.
Control relays reserved for the system cannot be used.
Attribute
Device No. R: read-only Function
Space: R/W
CR0000 R Logging execution ON: enabled, OFF: disabled
CR0001 R Logging in operation
CR0002 R Write of set size end
CR0003 Reserved for system
CR0004 R Buffer overflow
Logging function
CR0005 R Write in RUN mode + logging ON
(IDO)
CR0006 to CR0007 Reserved for system
CR0008 R Logging error
CR0009 R Memory Card error no space error
CR0010 R Device/trigger setting error
CR0011 to CR0015 Reserved for system
Logging function
CR0100 to CR0915 (same as CR0000 to CR0015)
(ID1 to 9)
CR1000 to CR2001 Reserved for system
CR2002
CR2003
R
R
ON at all times
OFF at all times A
CR2004 R 10 ms clock pulse (duty 50%)

APPENDICES
CR2005 R 100 ms clock pulse (duty 50%)
CR2006 R 1 s clock pulse (duty 50%)
CR2007 R OFF for only 1 scan at start of operation
CR2008 R ON only for 1 scan at start of operation
CR2009 ON when result of arithmetic operation is minus or overflows
CR2010 R ON when result of arithmetic operation is zero
CR2011 R ON when result of arithmetic operation is plus
CR2012 R ON at arithmetic operation error
CR2013 to CR2015 Reserved for system

A-3
1 Device No. Lists

Attribute
Device No. R: read-only Function
Space: R/W
CR2100 R CTH0 dedicated internal clock (1 µs)
CR2101 R CTH0 dedicated internal clock (10 µs)
CR2102 R CTH0 dedicated internal clock (100 µs)
CR2103 Automatic reset of CTH0 ON: Execute, OFF: Do not execute
Disable comparator match output to R00500/R00504
CR2104
ON: Disable output, OFF: Enable output
Operation when
Turn OFF comparator match output to R00500/R00504
CR2105 high-speed counter
ON: Execute, OFF: Do not execute
comparator CTC0
is ON Turn ON comparator match output to R00500/R00504
CR2106
ON: Execute, OFF: Do not execute
Invert ON/OFF comparator match output to R00500/R00504 at each ON
CR2107
ON: Execute, OFF: Do not execute
Disable comparator match output to R00500/R00504
CR2108
ON: Disable output, OFF: Enable output
CR2109 Operation when Turn OFF comparator match output to R00500/R00504 ON: Execute, OFF: Do not execute
high-speed counter
CR2110 Turn ON comparator match output to R00500/R00504 ON: Execute, OFF: Do not execute
comparator CTC1
is ON Invert ON/OFF comparator match output to R00500/R00504 at each ON
CR2111
ON: Execute, OFF: Do not execute
CR2112 Automatic reset of CTH0 ON: Execute, OFF: Do not execute
High-speed
Single-phase
counter CTH0 1X 2X 4X 2-pulse
count input mode W/out direction W/ direction
CR2113 to CR2115 selection CR2113 OFF ON OFF ON OFF ON
CR2114 OFF OFF ON ON OFF OFF
CR2115 OFF OFF OFF OFF ON ON

CR2200 R CTH1 dedicated internal clock (1 µs)


CR2201 R CTH1 dedicated internal clock (10 µs)
CR2202 R CTH1 dedicated internal clock (100 µs)
APPENDICES

CR2203 Automatic reset of CTH1 ON: Execute, OFF: Do not execute


CR2204 Disable comparator match output to R00501/R00505 ON: Disable output, OFF: Enable output
Operation when
Turn OFF comparator match output to R00501/R00505
CR2205 high-speed counter
ON: Execute, OFF: Do not execute
comparator CTC2
CR2206 is ON Turn ON comparator match output to R00501/R00505 ON: Execute, OFF: Do not execute
Invert ON/OFF output to R00501/R00505 at each ON
CR2207
ON: Execute, OFF: Do not execute
CR2208 Disable comparator match output to R00501/R00505 ON: Disable output, OFF: Enable output
CR2209 Operation when Turn OFF comparator match output to R00501/R00505 ON: Execute, OFF: Do not execute
CR2210 high-speed counter Turn ON comparator match output to R00501/R00505 ON: Execute, OFF: Do not execute
comparator CTC3 Invert ON/OFF of comparator match output to R00501/R00505 at each ON
CR2211 is ON ON: Execute, OFF: Do not execute
CR2212 Automatic reset of CTH1 ON: Execute, OFF: Do not execute
High-speed
Single-phase
counter CTH1 1X 2X 4X 2-pulse
count input mode W/out direction W/ direction
CR2213 to CR2215 selection CR2213 OFF ON OFF ON OFF ON
CR2214 OFF OFF ON ON OFF OFF
CR2215 OFF OFF OFF OFF ON ON

CR2300 Disable external outputs ON: Disable output, OFF: Enable output
CR2301 Disable external input refreshing ON: Disable refreshing, OFF: Enable refreshing
CR2302 Disable external outputs at break ON: Disable output, OFF: Enable output
CR2303 Fixed scan time operation ON: Enabled, OFF: Disabled
CR2304 R ON for 1 scan only at fixed scan time setting value exceeded
CR2305 Set input time constant for all CPU Unit Inputs. ON: Set, OFF: Do not set(10ms) (Determine after referring to CM01620.)
CR2306 R ON at backup battery error
CR2307 to CR2315 Reserved for system

A-4
1 Device No. Lists

Attribute
Device No. R: read-only Function
Space: R/W
CTH0 external signalpreset
Unused Up edge Down edge Level
CR2400, CR2401 CR2400 OFF ON OFF ON
CR2401 OFF OFF ON ON

CR2402 CTH0 count method selection ON: Ring, OFF: Linear


CR2403 CTH0 overflow detection ON: Detected, OFF: Not detected
CTH1 external signal preset
Unused Up edge Down edge Level
CR2404, CR2405 CR2404 OFF ON OFF ON
CR2405 OFF OFF ON ON

CR2406 CTH1 count method selection ON: Ring, OFF: Linear


CR2407 CTH1 overflow detection ON: Detected, OFF: Not detected
CR2408 CTH0 preset inhibit ON: Execute, OFF: Do not execute
CR2409 CTH1 preset inhibit ON: Execute, OFF: Do not execute
CR2410 CTH0 internal enable relay ON: Count enabled, OFF: Count disabled
CR2411 CTH1 internal enable relay ON: Count enabled, OFF: Count disabled
CR2412 R CTH0 change direction ON: Decrease side, OFF: Increase side
CR2413 R CTH1 change direction ON: Decrease side, OFF: Increase side
CR2414 Specified frequency pulse output ON: Execute, OFF: Do not execute
CR2415 Specified frequency pulse output error
CR2500 Start of operation ON: Execute, OFF: Do not execute
Input source
1-phase, 1-phase
setting w/out direction w/ direction
2-phase, 1X 2-pulse
CR2501, CR2502 CR2501 OFF ON OFF ON
Frequency counter
CR2502 OFF OFF ON ON

CR2503 Hz/rpm switching ON: rpm, OFF: Hz


A
CR2504 Use function for updating rpm by single rotation ON: Use, OFF: Do not use

APPENDICES
CR2505 to CR2515 Reserved for system
INT R00000 interrupt polarity
Up edge Down Edge Both edges
CR2600, CR2601 CR2600 OFF ON OFF ON
CR2601 OFF OFF ON ON

CR2602, CR2603 INT R00001 interrupt polarity *Same as CR2600, CR2601


CR2604, CR2605 INT R00002 interrupt polarity *Same as CR2600, CR2601
CR2606, CR2607 INT R00003 interrupt polarity *Same as CR2600, CR2601
CR2608, CR2609 INT R00004 interrupt polarity *Same as CR2600, CR2601
CR2610, CR2611 INT R00005 interrupt polarity *Same as CR2600, CR2601
CR2612, CR2613 INT R00006 interrupt polarity *Same as CR2600, CR2601
CR2614, CR2615 INT R00007 interrupt polarity *Same as CR2600, CR2601
CR2700, CR2701 INT R00008 interrupt polarity *Same as CR2600, CR2601
CR2702, CR2703 INT R00009 interrupt polarity *Same as CR2600, CR2601
CR2704 to CR2715 Reserved for system

A-5
1 Device No. Lists

Attribute
Device No. R: read-only Function
Space: R/W
CR2800 Send break signal (sent while relay is ON)
CR2801 R ON for one scan only when text data is received
CR2802 R Text data download error
Serial
CR2803 R ON for one scan only when a text data receive error has occurred
Communications
CR2804 Start sending text data (ON while data is being sent)
CR2805 Receive text data in byte units ON: Perform, OFF: Do not perform
CR2806 Send text data in byte units ON: Perform, OFF: Do not perform
CR2807 to CR2813 Reserved for system
Suppress zero during execution of DASC instruction (all suffixes) and FASC instruction
CR2814
ON: Execute, OFF: Do not execute
Omit + sign during execution of DASC.S, DASC.L, FASC instructions
CR2815
ON: Execute, OFF: Do not execute
CR2900 Access window, display user message 1
CR2901 Access window, display user message 2
CR2902 to CR2915 Reserved for system
CR3000 Limit switch CW direction input
CR3001 Limit switch CCW direction input
CR3002 Origin sensor input
CR3003 Stop sensor input
CR3004 R Zero return in progress
CR3005 R Zero return completed
CR3006 Positioning completed relay
CR3007 CPU positioning Error/clear error
function
CR3008 X-axis Warning/clear warning
CR3009 Pulse output in progress/emergency stop
CR3010 Start of driver operation
CR3011 Current value change request (level detection)
APPENDICES

CR3012 Run speed change request (level detection)


CR3013 Comparator 2 match relay
CR3014
Reserved for system
CR3015
CR3100 Limit switch CW direction input
CR3101 Limit switch CCW direction input
CR3102 Origin sensor input
CR3103 Stop sensor input
CR3104 R Zero return in progress
CR3105 R Zero return completed
CR3106 Positioning completed relay
CR3107 CPU positioning Error/clear error
function
CR3108 Y-axis Warning/clear warning
CR3109 Pulse output in progress/emergency stop
CR3110 Start of driver operation
CR3111 Current value change request (level detection)
CR3112 Run speed change request (level detection)
CR3113 Comparator 2 match relay
CR3114
Reserved for system
CR3115

A-6
1 Device No. Lists

Attribute
Device No. R: read-only Function
Space: R/W
CR3200 to CR3209 Reserved for system
CR3210 R Arbitrary logging operation in progress
CR3211 R Memory Card in use
CR3212 R Memory Card recognized
CR3213 R Memory Card present
CR3214 R Memory Card instruction executing
CR3215 R Memory Card write protection ON: Write protection ON, OFF: Write protection OFF
CR3300 to CR3415 Alarm relay
CR3500 R Alarm relay in operation (ON if one of CR3300 to CR3415 turns ON)
Leave history when alarm relay state changes from ON to OFF
CR3501
ON: Leave history, OFF: Do not leave history
CR3502 to CR3513 Reserved for system
CR3514 Multiple keys disabled
HKEY instruction
CR3515 R End of scan
CR3600 to CR3615 R HKEY instruction information storage area
CR3700 F1 customized switch 1
CR3701 F2 customized switch 2
CR3702 F3 customized switch 3
CR3703 F4 customized switch 4
CR3704 LED1 customized lamp 1
CR3705 LED2 customized lamp 2
CR3706 LED3 customized lamp 3
CR3707 LED4 customized lamp 4
CR3708 Green backlight (lit when ON)
CR3709
CR3710
Operation panel
KV-D30
Red backlight (lit when ON)
System message display (ON: Japanese, OFF: English)
A

APPENDICES
CR3711 Buzzer ON
CR3712 Screen display setting (ON: Positive display, OFF: Negative display)
CR3713 Enable alarm interrupt ON: Enabled, OFF: Disabled
Page switching (Switching to page of value of CM000401 is forcible turned
CR3714
OFF at the up edge.)
Page switching by "S""T" keys disabled
CR3715
ON: Disabled, OFF: Enabled
CR3800 External output 0 ON when relay is ON
CR3801 External output 1 ON when relay is ON
CR3802 to CR3815
Reserved for system
CR3900 to CR3915

A-7
1 Device No. Lists

Control memory CM

With control memory (CM00000 to CM11998), you can set various special CPU Unit functions.
Control memories reserved for the system cannot be used.
Attribute
Device No. R: read-only Function
Space: R/W
CM00000, CM00001 1st line display device setting
CM00002, CM00003 Operation panel 2nd line display device setting
CM00004, CM00005 KV-D30 3rd line display device setting
CM00006, CM00007 0 page 4th line display device setting
CM00008, CM00009 Reserved for system
CM00010 to CM00199 Pages 1 to 19 (same as CM00000 to CM00009)
CM00200, CM00201 1st line display attribute setting
CM00202, CM00203 2nd line display attribute setting
CM00204, CM00205 Operation panel 3rd line display attribute setting
KV-D30
CM00206, CM00207 0 page 4th line display attribute setting
CM00208 Template 1 setting
CM00209 Template 2 setting
CM00210 to CM00399 Pages 1 to 19 (same as CM00200 to CM00209)
CM00400 Move enable/disable setting
CM00401 Page switching setting
CM00402 Operation panel Current display page
CM00403 to CM00409 KV-D30 Reserved for system
CM00410 to CM00415 Direct access function
CM00416 to CM00499 Reserved for system
CM00500 to CM00699 Reserved for system
CM00700 R (year)
APPENDICES

CM00701 R (month)
CM00702 R (day)
Read from calendar
CM00703 R (hour)
timer
CM00704 R (minute)
CM00705 R (seconds)
CM00706 R (day of week)
CM00707 Reserved for system
CM00708,
R Free-run counter(32bits, 1 ms)
CM00709
CM00710 to CM00719 Reserved for system
CM00720 R Scan time measurement value (average value of every ten scans) (in 0.1 ms units)
CM00721 Fixed scan time operation setting value
MEMSW2, SW1No.2
Scan time when the setting value is exceeded during fixed scan ON: 500 µs unit OFF: 1 ms unit
CM00722 R
time operation
CM00723 to CM01479 Reserved for system
CM01480, CM01481 R Frequency measurement result (Hz or rpm)
Frequency counter
CM01482 1Number of pulses per rotation
function
CM01483 Number of scans
CM01484 to CM01489 Reserved for system
CM01490, CM01491 Specified frequency pulse output function, set frequency (Hz)
CM01492 Duty ratio of specified frequency pulse output
CM01493 to CM01593 Reserved for system
CM01594 CTH0 change direction detection time constant
CM01595 CTH1 change direction detection time constant
CM01596, CM01597 CTH0 ring counter lower limit value
CM01598, CM01599 CTH1 ring counter lower limit value

A-8
1 Device No. Lists

Attribute
Device No. R: read-only Function
Space: R/W
CM01600, CM01601 CTH0 ring counter upper limit value
CM01602, CM01603 CTH1 ring counter upper limit value
CM01604, CM01605 CTH0 preset value
CM01606, CM01607 CTH1 preset value
CM01608 CTH0 enable, reset, polarity setting
CM01609 CTH1 enable, reset, polarity setting
CM01610, CM01611 R Input capture at INT R00000 generation (lower, upper)
CM01612, CM01613 R Input capture at INT R00001 generation (lower, upper)
CM01614, CM01615 R Input capture at INT R00002 generation (lower, upper)
CM01616, CM01617 R Input capture at INT R00003 generation (lower, upper)
CM01618, CM01619 Reserved for system
CM01620 Input time constant setting
CM01621 to CM01699 Reserved for system
CM01700 to CM01701 Digital trimmer 0 upper limit value
CM01702 to CM01703 Digital trimmer 1 upper limit value
CM01704 to CM01705 Digital trimmer 2 upper limit value
CM01706 to CM01707 Digital trimmer 3 upper limit value
CM01708 to CM01709 Digital trimmer 4 upper limit value
CM01710 to CM01711 Digital trimmer 5 upper limit value
CM01712 to CM01713 Digital trimmer 6 upper limit value
CM01714 to CM01715 Digital trimmer 7 upper limit value
CM01716 to CM01719 Reserved for system
CM01720 User message 1
CM01721 to CM01737 User message 2 (max. 24 characters + end code (00H))
CM01738
Access
window Setting inhibited operation A
CM01739 Reserved for system

APPENDICES
CM01740 to CM01756 Ladder project name (max. 32 characters + end code (00H))
CM01757 to CM01763 Project name for access window display (max. 12 characters + end code (00H))
CM01764 to CM01799 Reserved for system
Year, month (decimal, lower 2 digits: month, 100's digit upwards: year
CM01800
Example: "406" means "2004, June")
CM01801 Day
Error log (latest)
CM01802 Hour (0 to 23)
CM01803 Minute
CM01804 Error No.
CM01805 to CM01899 Error log (2 to 20 items, same as CM01800 to CM01804)
Year, month (decimal, lower 2 digits: month, 100's digit upwards: year
CM01900
Example: "406" means "2004, June")
CM01901 Power ON Log Day
CM01902 (latest) Hour (0 to 23)
CM01903 Minute
CM01904 Seconds
CM01900 to CM01999 Power ON log (2 to 20 items, same as CM01900 to CM01904)

A-9
1 Device No. Lists

Attribute
Device No. R: read-only Function
Space: R/W
CM02000 I/O setting
CM02001 Enable sensor
CM02002, CM02003 Comparator 0
CM02004, CM02005 Comparator 1
CM02006 Zero return: startup speed
CM02007 Zero return: acceleration/deceleration time
CM02008, CM02009 Zero return: run speed
CM02010 Jog operation: startup speed
CM02011 Jog operation: acceleration/deceleration time
CM02012, CM02013 CPU Jog operation: run speed
positioning function
CM02014, CM02015 X-axis Current value change setting value
CM02016, CM02017 Run speed change setting value
CM02018 Zero return detailed setting
CM02019 Operation Point No. (M code)
CM02020, CM02021 R Current Position
CM02022, CM02023 R Current speed
CM02024 Error Code
CM02025 Specified point No.
CM02026, CM02027 Home position coordinates setting value
CM02028, CM02029 Comparator 2
CM02030 I/O setting
CM02031 Enable sensor
CM02032, CM02033 Comparator 0
CM02034, CM02035 Comparator 1
CM02036 Zero return: startup speed
CM02037 Zero return: acceleration/deceleration time
APPENDICES

CM02038, CM02039 Zero return: run speed


CM02040 Jog operation: startup speed
CM02041 Jog operation: acceleration/deceleration time
CM02042, CM02043 CPU Jog operation: run speed
positioning function
CM02044, CM02045 Y-axis Current value change setting value
CM02046, CM02047 Run speed change setting value
CM02048 Zero return detailed setting
CM02049 Operation Point No. (M code)
CM02050, CM02051 R Current Position
CM02052, CM02053 R Current speed
CM02054 Error Code
CM02055 Specified point No.
CM02056, CM02057 Home position coordinates setting value
CM02058, CM02059 Comparator 2
CM02060, CM02061 Target value/travel
CM02062 Startup speed
CM02063 CPU Acceleration/deceleration time
positioning function
CM02064, CM02065 Operating speed
Point parameters
CM02066 0 Run mode
CM02067 Specified number of stop sensor pulses
CM02068, CM02069 Reserved for system
CM02070 to CM02379 Point parameters 1 to 31 (same as CM02060 to CM02069)
CM02380 to CM02389 Reserved for system

A-10
1 Device No. Lists

Attribute
Device No. R: read-only Function
Space: R/W
CM02390 R Error code for Memory Card instruction
CM02391 Memory Card power OFF error
CM02392 to CM02999 Reserved for system
CM03000 Number of text receives
CM03001 to CM03999 Text receive data (1998 bytes)
CM04000 Number of text sends
CM04001 to CM04999 Text send data (1998 bytes)
CM05000 to CM11998 Reserved for system

APPENDICES

A-11
2 Error Message Lists
The following describes error messages and remedies to take when an error message is dis-
played.
When the following errors occur, change the mode from the Run mode to the Prog mode, and
remedy the error.

PLC Unit Errors

These errors are displayed when an error occurs on the KV-1000 unit.
No. Message Cause Remedy
This error occurs during ladder execution. Review
Sub-routine exceeds the nesting
10 CALL Nest the ladder paying attention to how sub-routines are
level.
used.
This error occurs during ladder execution. Review
FOR to NEXT instructions exceed
11 FOR Nest the ladder paying attention to how the FOR to NEXT
the nesting level.
instructions are used.
A number of interrupts that This error occurs during ladder execution. Review
12 INT Nest exceeds the limit has occurred the ladder paying attention to how the INT instruction
simultaneously. is used.
This error occurs during ladder execution. Review
MPS to MPP instructions exceed the
13 MPS Nest the ladder paying attention to how the MPS to MPP
nesting level.
instructions are used.
This error occurs during conversion. Limit the
The number of BREAK instructions
14 BREAK number of BREAK instructions between FOR to
exceeds the limit.
NEXT to within the specified limit.
Clear the error, and turn the unit ON again.
15 Convert A system error occurred.
If this error occurs frequently, contact your agent.
APPENDICES

The ladder object size has


19 Object Size Reduce the size of the ladder program.
exceeded the maximum size.
The size of the ladder program can be checked on
The ladder code size has KV STUDIO.
20 Code Size
exceeded the maximum size.
This error occurs during ladder execution. Review
The number of macros exceeds
22 MACRO Nest the ladder paying attention to how the macro
the nesting level.
instruction is used.
23 Illegal Int
24 Illegal Macro
Clear the error, and turn the unit ON again.
25 Illegal Pointer A system error occurred.
If this error occurs frequently, contact your agent.
26 Illegal Address
27 Illegal Object
Review the following to check that the scan time has
not been exceeded:
• Make sure that there are not too many repeated
FOR to NEST instructions.
• Make sure that jump instructions such as CJ/NCJ
to LABEL instructions have been programmed cor-
30 Scan Time Over The scan time is 300 ms or more. rectly.
• Make sure that program call instructions such as
CALL, MCALL have been programmed correctly.
• Make sure that long-processing time instructions
such as FMOV, WSR and MAX are programmed
correctly.
• Make sure that interrupt programs are not being
executed at a high frequency.
Clear the error, and turn the unit ON again.
31 Ladder Stack Over A system error occurred.
If this error occurs frequently, contact your agent.
The ladder program is not Register the ladder program before operating the
40 No Ladder
registered. main unit.

A-12
2 Error Message Lists

No. Message Cause Remedy


The Expansion and Special Unit
50 Unit Checksum Use the Ladder Support software or Memory Card to
settings are corrupted.
register unit setup information to the KV-1000 main
The unit setup information is not
51 Configure unit.
set.
Expansion or Special Units
actually are not connected even Turn the KV-1000 OFF, then connect the Expansion
52 No Unit Connection
though they are set as connected or Special Unit set in Unit Editor.
in the unit setup information.
A probable cause is that noise
Remove any sources of noise. If this error occurs
53 S-Unit BSI Timeout has caused bus communications
frequently, contact your agent.
to stop.
The actual number of connected
units differs from the number of
54 Unit Number
Expansion and Special Units set
in Unit Editor. Turn the KV-1000 OFF, then connect the Expansion
or Special Unit set in Unit Editor.
The type of actual units differs
55 Unit Type from the type of Expansion and
Special Units set in Unit Editor.
A probable cause is that noise
Remove any sources of noise. If this error occurs
56 Extend BusComm Error has caused bus communications
frequently, contact your agent.
to stop.
57 No End Unit The End Unit is not connected. Turn the KV-1000 OFF, and connect the End Unit.
80 F-ROM Damaged Flash ROM error
Contact your agent.
81 S-RAM Damaged Hardware malfunction
The backup battery voltage has
83 Low Battery Replace the backup battery.
dropped.
The content (CM, DM, EM,
A
FM, R, CR, LR, T, C, CTH, and Replace the backup battery, and execute a SRAM

APPENDICES
84 S-RAM Backup CTC current values) of RAM is clear. This erases only device values and alarm
corrupted as the voltage of the values, and does not erase the ladder program.
backup battery has dropped.
A probable cause is that the
clock value is corrupted as the Replace the backup battery, check the clock value,
85 RTC Low Voltage
voltage of the backup battery and set the clock again as required.
has dropped.
A probable cause is that the Check the file system of the Memory Card.
Memory Card is damaged, or Check the file system using the chkdsk at the
87 Memory Card Error magnetism or noise has caused Windows command prompt.
the Memory Card to stop (Ex) When Memory Card is the E: drive
functioning. C:\WINDOWS>CHKDSK E:
Remove the Memory Card by the correct procedure.
The Memory Card was removed
88 Memory Card Removed "Loading and Removing a Memory Card from
while it was being accessed.
the KV-1000" page 3-8
Handle the Memory Card by the correct handling
The KV-1000 was turned OFF
Memory Card procedure.
89 while the Memory Card was
PowerOFF "Precautions When Using a Memory Card"
being accessed.
page 3-9
Multiple operations were executed
Wait until the Memory Card has finished being
90 Memory Card Busy before accessing of the Memory
accessed before executing multiple operations.
Card was completed.

A-13
2 Error Message Lists

No. Message Cause Remedy


118 Illegal Data
120 Watch Dog Timer
121 Stack Overflow
A system error occurred.
122 System Error
Clear the error, and turn the unit ON again. If this
123 Device Range error occurs frequently, contact your agent.
124 Resource
The number of system internal
125 Error Buffer Overflow
errors has exceeded the limit.
126 Error Buffer Invalid A system error occurred.
Autoload from the Memory Card
failed for the following reasons:
• Write protect is set by the • Cancel write protection, and transfer the autoload
MEMSW instruction in the pro- files to the KV-1000 main unit from the Memory
127 AutoLoad gram on the KV-1000 main Card.
unit. • Transfer files matched to the KV-1000 main unit's
• There is a problem in the configuration.
details stored to files on the
Memory Card.
Clear the error, and turn the unit ON again. If this
255 No Error Message A system error occurred.
error occurs frequently, contact your agent.
APPENDICES

A-14
3 Differences between the KV-1000 Series & KV-700 Series
Tip • For differences in the instructions used on the KV-1000 Series and KV-700 Series,
KV-1000 Series Instruction Reference Manual "Appendix 5, Differences Between
the KV-1000 Series & the KV-700 Series”
• For details on the devices that can be used on the KV-1000 Series, "Device No.
Lists" page A-2

Differences Relating to CPU Hardware and Special Functions

Item KV-1000 KV-700


Input 16 points (line driver input supported) 10 points
Number of
8 (high-speed: 4, general-purpose: 4) 4
Output points
I/O
w/ resistor No Yes (x 4)
+5 V power output Yes No
Connector 40-pin 20-pin
The following devices have been added:
Data memory : EM, FM
Device mode Index register :Z —
Access Internal auxiliary relay: MR
window Latch relay : LR
Delete: Cam switches
CPU monitor —
Add: Project name
User messages Access window instructions Ladder programs using CR, CM
Battery (lithium) OP-51604 OP-42139
Expanded memory No Yes A
Approx. 16 k steps

APPENDICES
Program size Approx. 160 k steps
Approx. 32k steps when memory is expanded
Input time constant selection 8 stages (110µs added) 7 stages
SD Memory Card,
Hardware Multi Media Card
Multi Media Card
Access from Ladder
Memory Possible (Memory Card instruction) Not possible
program
Card
Logging function Set in KV STUDIO Ladder program
FTP server function can be used also in FTP server function can be used in the
Other
the Run mode when KV-LE20 is used. Prog mode only when KV-LE20 is used.
QL Cannot be used Can be used
Unit KV-L20 Cannot be used Can be used
KV-L20R Can be used Can be used
• 10 interrupts (R00000 to R00009) by
• 4 interrupts (00000 to 00003) by input
input relays
relays
Interrupt causes • Interrupts by high-speed counter com-
• Interrupts by high-speed counter com-
Interrupts parators (CTC0 to CTC3)
parators (CTC0 to CTC3)
• Interrupts by positioning comparator 2
Direct input 16 points (R00000 to R00015) 10 points (00000 to 00009)
Direct output 8 points (R00500 to R00507) 4 points (00500 to 00503)

A-15
3 Differences between the KV-1000 Series & KV-700 Series

Item KV-1000 KV-700


100 kHz/single-phase, 50 kHz/phase difference
Response frequency 40 kHz/single-phase, 30 kHz/phase difference
(line driver)
A phase: R00010/R00011 A phase: 00004/00005
Input
B phase: R00012/R00013 B phase: 00006/00007
Unsigned: 0 to 4294967295
Count value Signed : −2147483648 to Unsigned: 0 to 4294967295
+2147483647
Linear counter
Yes No
overflow detection
Ring counter Upper limit value/lower limit value settable Only upper limit value settable
Change direction
detection of current Possible Not possible
value
High-
• Reset by RES instruction
speed • Reset by RES instruction
• Reset by CTH instruction (execution
counter/ • Reset by CTH instruction (execution
High- condition OFF)
Reset function condition OFF)
• Automatic reset by comparator match
speed • Automatic reset by comparator match
• Reset by external preset input
counter • Reset by external preset input
comparator • Reset by counter enable function
R00014 00008
Preset input
R00015 00009
Preset input
Preset polarity Yes No
function setting
Preset
enable/ Yes No
disable
Counter enable
APPENDICES

Yes No
function
Switch by MEMSW instruction Fixed
Comparator
R00500 (R00504) 00500
match output
R00501 (R00505) 00501
Ladder program by instruction (FCNT,
Frequency Control method Ladder programs using CR, CM
RCNT instruction)
Counter
Input relay R00010/R00012 00004/00006
Ladder program by instruction (PLSOUT
Specified Control method Ladder programs using CR, CM
instruction)
frequency
Switch by MEMSW instruction
pulse Output relay Fixed at 00501
R00501 (R00505)
output
Duty ratio Can be changed Fixed at 50:50
Ladder program by instruction
Common (MCMP, ABSENC, INCENC instruction) Ladder programs using CR, CM
* CR and CM are not used.
Multi-stage comparator Any device can be used for the compare value. Compare value CM1401
• Remaining gray code can be set. (36, • Remaining gray code cannot be set.
Cam Absolute 360 or 720 can be set to the resolu- (Only a value whose resolution is 2n
switch encoder tion.) can be set.)
function • Zero degrees can be set. • Zero degrees cannot be set.
• 2 ch (CTH0/1) can be used simulta-
neously. • Only 1 ch (CTH0) can be used.
Incremental
• CTH0: R00010/R00012 • CTH0: 00004/00006
encoder
• CTH1: R00011/R00013 • Zero degrees cannot be set.
• Zero degrees can be set.

A-16
3 Differences between the KV-1000 Series & KV-700 Series

Item KV-1000 KV-700


• Z-phase available • Z-phase not available
Input setting • CW limit switch (select) • CW limit switch (fixed)
• CCW limit switch (select) • CCW limit switch (fixed)
Comparator setting • Comparator 2 setting —
• Zero return detailed setting (origin sen-
Motor • Zero return (origin sensor rise)
sor rise/origin sensor midpoint/origin
Control • Deviation counter clear output not
Zero return sensor and Z-phase)
(positioning) available
• Deviation counter clear output/auto
• Auto home position not available
home position
Change operating Position/speed can be controlled.
Only speed control can be controlled.
speed during operation (CHGSPX/CHGSPY instructions)
Other Positioning completion relay added —
Baud rate change speed command [SP]
Commands, responses —
added
Receive: CM03000 to CM03999 Receive: CM1000 to CM1099
Serial Device No.
Number Send : CM04000 to CM04999 Send : CM1100 to CM1199
communi-
cations of text Number of CR2805 ON : 1998 bytes or less CR2805 ON : 198 bytes or less
send/ receive bytes CR2805 OFF: 999 bytes or less CR2805 OFF: 99 bytes or less
receives Number of CR2806 ON : 1998 bytes or less CR2806 ON : 198 bytes or less
send bytes CR2806 OFF: 999 bytes or less CR2806 OFF: 99 bytes or less
Breaks During monitoring, simulator Only during simulator
Output inhibit function Enable/inhibit output during a break by

at break the content of CR2302.
Other
Error log Max. 20 logs —
functions
Power ON log Max. 20 logs —
Break function during
Yes No
A
monitoring

APPENDICES
Ladder support
KV STUDIO KV BUILDER
software
Programming Structured (module/macro, local device) —
Indirect specification instruction, index Indirect specification using temporary
Indirect specification
modifier data memory (TM)
Basic
151 122
instructions
Programming
Applied
36 19
instructions
Instruction Arithmetic
operation 185 147
instructions
Extended
106 48
instructions

A-17
3 Differences between the KV-1000 Series & KV-700 Series

Comparison of Device Ranges

Device KV-1000 KV-700 KV-700+M


CPU input relay R00000 to R00015 00000 to 00009
CPU output relay R00500 to R00507 00500 to 00503
R01000 to R59915 01000 to 59915
Internal auxiliary relay
MR00000 to MR99915 —
Latch relay LR00000 to LR99915 —
Control relay CR0000 to CR3915
Timer/counter T/C0000 to T/C3999 T/C000 to T/C511
Data memory DM00000 to DM65534 DM00000 to DM19999 DM00000 to DM39999
EM00000 to EM65534
Expanded data memory —
FM00000 to FM32766
Temporary data memory TM000 to TM511 TM000 to TM511
Control memory CM00000 to CM11998 CM0000 to CM3999
High-speed counter CTH0 to CTH1
High-speed counter
CTC0 to CTC3
comparator
Index register Z1 to Z12 —
APPENDICES

A-18
3 Differences between the KV-1000 Series & KV-700 Series

Differences between Control Relays and Control Memories

Device
KV-1000 KV-700
No.
CR0000 Logging execution ON: enabled, OFF: disabled
CR0001 Logging in operation
CR0002 Write of set size end
CR0003 Reserved for system
CR0004 Logging Buffer overflow
QL input relay (address 0)
CR0005 function Write in RUN mode + logging ON
:
CR0006 to CR0007 (IDO) Reserved for system QL input relay (address 127)
CR0008 Logging error
CR0009 Memory Card error no space error
CR0010 Device/trigger setting error
CR0011 to CR0015 Reserved for system
CR0100 to CR0715 Logging
function (same as CR0000 to CR0015)
CR0800 to CR0915 (ID1 to 9) Reserved for system
CR1000 to CR1615 QL output relay (address 0)
:
CR1700 to CR1715
QL output relay (address 127)
CR1800 Enable QL communications ON:Enable OFF:Disable
QL baud rate

CR1801 to CR1802
CR1801
156kbit/s 625 kbit/s 2.5 Mbit/s
OFF ON OFF
5 Mbit/s
ON
A
Reserved for system CR1802 OFF OFF ON ON

APPENDICES
CR1803 Clear input at QL disconnection ON:Clear OFF:Hold
QL disconnection error ON:Disconnecting
CR1804
OFF:Normal
Cam switch function absolute/incremental selection
CR1814
ON:Absolute OFF:Incremental
CR1815 Stop when state is turned ON/OFF during cam switch operation
CR2302 Output inhibit function at break ON: Execute, OFF: Do not execute
Detection of CTH0 overflow
CR2403
ON: Detected OFF: Not detected
Detection of CTH1 overflow
CR2407
ON: Detected OFF: Not detected
CR2408 CTH0 preset inhibit ON: Execute, OFF: Do not execute
CR2409 CTH1 preset inhibit ON: Execute, OFF: Do not execute Reserved for system
CTH0 internal enable relay
CR2410
ON: Count enabled OFF: Count inhibited
CTH1 internal enable relay
CR2411
ON: Count enabled OFF: Count inhibited
CR2412 CTH0 change direction ON: Decrease side, OFF: Increase side
CR2413 CTH1 change direction ON: Decrease side, OFF: Increase side
CR2508 Reserved for system Cam switch, start operation ON:Execute, OFF:Do not execute
CR2509 Reserved for system Cam switch, output response impossible warning
CR2510 Reserved for system Cam switch, error

A-19
3 Differences between the KV-1000 Series & KV-700 Series

Device
KV-1000 KV-700
No.
INT R00000 interrupt polarity
Up edge Down edge Both edges
CR2600, CR2601
CR2600 OFF ON OFF ON
CR2601 OFF OFF ON ON

INT R00001interrupt polarity


CR2602, CR2603
* Same as CR2600 and CR2601
INT R00002interrupt polarity
CR2604, CR2605
* Same as CR2600 and CR2601
INT R00003interrupt polarity Reserved for system
CR2606, CR2607
* Same as CR2600 and CR2601
INT R00004interrupt polarity
CR2608, CR2609
* Same as CR2600 and CR2601
INT R00005interrupt polarity
CR2610, CR2611
* Same as CR2600 and CR2601
INT R00006interrupt polarity
CR2612, CR2613
* Same as CR2600 and CR2601
INT R00007interrupt polarity
CR2614, CR2615
* Same as CR2600 and CR2601
INT0 interrupt polarity
INT R00008interrupt polarity Up edge Down edge Both edges
CR2700, CR2701
* Same as CR2600 and CR2601 CR2700 OFF ON OFF ON
CR2701 OFF OFF ON ON

INT1 interrupt polarity


INT R00009interrupt polarity Up edge Down edge Both edges
CR2702, CR2703
* Same as CR2600 and CR2601 CR2702 OFF ON OFF ON
APPENDICES

CR2703 OFF OFF ON ON

INT2 interrupt polarity


Up edge Down edge Both edges
CR2704, CR2705
CR2704 OFF ON OFF ON
CR2705 OFF OFF ON ON
Reserved for system
INT3 interrupt polarity
Up edge Down edge Both edges
CR2706, CR2707
CR2706 OFF ON OFF ON
CR2707 OFF OFF ON ON

CR3006 CPU Positioning completed relay CPU


positioning positioning
function function Reserved for system
CR3013 Comparator 2 match relay
X-axis X-axis

CR3106 CPU Positioning completed relay CPU


positioning positioning
Reserved for system
CR3113 function Comparator 2 match relay function
Y-axis Y-axis

A-20
3 Differences between the KV-1000 Series & KV-700 Series

Device
KV-1000 KV-700
No.
CR3200,
Trigger setting
CR3201
CR3202 Time stamp ON
CR3203 Start
CR3204 Write in Run mode error
Reserved for system Logging
CR3205 CPU buffer overflow
function
CR3206 Registered device error
CR3207 Write error
CR3208 MMC data over
CR3209 Not enough free space on MMC
CR3210 Arbitrary logging operation in progress Logging execution in progress
CR3211 Memory Card in use
CR3212 Memory Card recognized
CR3213 Memory Card present
CR3214 Memory Card instruction executing Reserved for system
Memory Card write-protected
CR3215 ON: Write protection ON, OFF: Write protection
OFF

Device
KV-1000 KV-700
No.
CM00708, CM00709 Free-run counter(32bits, 1 ms) Reserved for system
CM01000 Number of text receive data
CM01001 to CM01099 Text receive data 1 to 99 A
CM01100 Number of text send data

APPENDICES
CM01001 to CM01199 Text send data 1 to 99
CM01400 Save leading No. of output relay
Compare value in multi-stage
CM01401
comparator mode
Number of pulses in 1 cycle of
CM01402
device to be input to CTH0
CM01403 Absolute type input address
Reserved for system
CM01404 Current angle
CM01405 Cam switch Error No.
CM01406 to CM01409 function Reserved for system
Angle setting values at which output
CM01410, CM01411
relay turns ON and OFF
Angle setting values at which output
CM01412, CM01413
relay+1 turns ON and OFF
: :
Angle setting values at which output
CM01472, CM01473
relay+31 turns ON and OFF
CM01492 Duty ratio of specified frequency pulse output Reserved for system
CM01500 to CM01531 QL receive data 0 to 31
CM01532 to CM01563 QL send data 0 to 31
Reserved for system
CM01564 Number of QL communication addresses
CM01570 to CM01577 QL connection information

A-21
3 Differences between the KV-1000 Series & KV-700 Series

Device
KV-1000 KV-700
No.
CM01594 CTH0 change direction detection time constant
CM01595 CTH1 change direction detection time constant
CM01596, CM01597 CTH0 ring counter lower limit value
CM01598, CM01599 CTH1 ring counter lower limit value
CM01608 CTH0 enable, reset, polarity setting
CM01609 CTH1 enable, reset, polarity setting
CM01740 to CM01756 Ladder project name (max. 32 characters + end code (00H))
Project name for access window display (max. 12
CM01757 to CM01763
characters + end code (00H))
Year, month (decimal, lower 2 digits:
CM01800 month, 100's digit upwards: year
Example: "406" means "2004, June")
CM01801 Error log Day
(latest) Reserved for system
CM01802 Hour (0 to 23)
CM01803 Minute
CM01804 Error No.
CM01805 to CM01899 Error log (2 to 20 items, same as CM01800 to CM01804)
Year, month (decimal, lower 2 digits:
CM01900 month, 100's digit upwards: year
Example: "406" means "2004, June")
CM01901 Power ON Day
Log (latest)
CM01902 Hour (0 to 23)
CM01903 Minute
CM01904 Seconds
Power ON log
APPENDICES

CM01900 to CM01999
(2 to 20 items, same as CM01900 to CM01904)
CM02018 CPU Zero return detailed setting CPU
positioning Home position coordinates setting positioning
CM02026, CM02027 Reserved for system
function value function
CM02028, CM02029 X-axis Comparator 2 X-axis
CM02048 CPU Zero return detailed setting CPU
positioning Home position coordinates setting positioning
CM02056, CM02057 Reserved for system
function value function
CM02058, CM02059 Y-axis Comparator 2 Y-axis
CM02390 Error code for Memory Card instruction
Reserved for system
CM02391 Memory Card power OFF error
CM02600 to CM02663 Data type 0 to 31
CM02664 to CM02670 Logging Trigger specification content 0 to 6
Reserved for system
CM02671 function Number of registered devices
CM02672 Memory Card storage capacity
CM03000 Number of text receives
Reserved for system
CM03001 to CM03999 Text receive data (1998 bytes)
CM04000 Number of text sends

CM04001 to CM04999 Text send data (1998 bytes)

A-22
4 Index

List of Cam Switch Instructions . . . . . . . . . . . 7-3


A CAM SWITCHES . . . . . . . . . . . . . . . . . . . . . . . 7-1
Cautions When Connecting Units. . . . . . . . . . 1-43
About Current Value and Setting Value of High- Change operating speed . . . . . . . . . . . . . . . . 8-26
speed Counters . . . . . . . . . . . . . . . . . . . . . . 5-12 Changing Speed during Operation . . . . . . . . . 8-31
Current value (CTH) of high-speed counters . . . 5-12 By using comparator 2 interrupt relay
Reading the current value direction of change, CR3013 (X-axis) and CR3113 (Y-axis) . . 8-32
setting the direction of change detection time By using the CHGSPX and CHGSPY instructions . 8-31
constant . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15 By using the run speed change request relay
Reading/changing current values, changing CR3012 (X-axis) CR3112 (Y-axis) . . . . . . 8-31
setting values . . . . . . . . . . . . . . . . . . . . . . 5-13 Checking the Contents of the Package . . . . . . 1-2
Setting value (CTC) of high-speed counters 5-12 CHGSPX instruction . . . . . . . . . . . . . . . . . . . . 8-46
About protection of contacts . . . . . . . . . . . . . . 1-47 CHGSPY instruction . . . . . . . . . . . . . . . . . . . . 8-46
About the connector . . . . . . . . . . . . . . . . . . . . 1-49 Clear deviation counter. . . . . . . . . . . . . . . . . . 8-21
About the Exclusive Pressure-contact Tool . . . 1-48 Clock Function . . . . . . . . . . . . . . . . . . . . . . . . 10-9
About the Memory Card . . . . . . . . . . . . . . . . . . 3-2 Commands/Responses List . . . . . . . . . . . . . . . 9-5
About zero return. . . . . . . . . . . . . . . . . . . . . . . 8-18 Comparator 2 . . . . . . . . . . . . . . . . . . . . . . . . . 8-28
ABSENC Instruction . . . . . . . . . . . . . . . . . . . . . 7-8 Connecting a Memory Card Using the PCMCIA
Absolute Encoder . . . . . . . . . . . . . . . . . . . . . . . 7-2 Card Slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
AC Power Unit . . . . . . . . . . . . . . . . . . . . . . . . . 1-21 Connecting a Memory Card Using the USB Card
External dimensions. . . . . . . . . . . . . . . . . . . 1-22 Reader/Writer . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Names and Functions of Parts. . . . . . . . . . . 1-21 Connecting Units . . . . . . . . . . . . . . . . . . . . . . 1-43
Power Unit Wiring Method . . . . . . . . . . . . . . 1-23 Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-33
Specifications . . . . . . . . . . . . . . . . . . . . . . . . 1-22 Control Memories for Positioning Control . . . . 8-29
Access window . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 Control memory . . . . . . . . . . . . 1-7, 3-77, A-2, A-8
Access Window Menu Tree . . . . . . . . . . . . . . 2-4 Control relay . . . . . . . . . . . . . . . 1-7, 3-77, A-2, A-3
Access Window Modes . . . . . . . . . . . . . . . . . 2-3 Control Relays for Positioning Control . . . . . . 8-27
Names of Access Window Parts . . . . . . . . . . 2-5 Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7, A-2
What is the "Access Window?" . . . . . . . . . . . 2-2 CPU Monitor Mode . . . . . . . . . . . . . . . . . . . . . 2-23
Access Window Setup mode. . . . . . . . . . . . . . 2-33 CPU Unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-33 5V output. . . . . . . . . . . . . . . . . . . . . . . . . . . 1-14
Display Language . . . . . . . . . . . . . . . . . . . . 2-34 Connector wiring diagram . . . . . . . . . . . . . . 1-16

APPENDICES
Setup Functions Available in the Access Window derating . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
Setup Mode . . . . . . . . . . . . . . . . . . . . . . . 2-33 External dimension diagrams (CPU). . . . . . 1-15
Accl/dec time . . . . . . . . . . . . . . . . . . . . . 8-19, 8-24 External dimension diagrams (start unit, end unit) . . . 1-15
Alarm Monitor . . . . . . . . . . . . . . . . . . . . . . . . . 2-27 I/O circuit diagrams . . . . . . . . . . . . . . . . . . . 1-19
About the Alarm Monitor Function . . . . . . . . 2-27 Input Specifications . . . . . . . . . . . . . . . . . . . 1-11
Clearing Alarm Relay Records. . . . . . . . . . . 2-32 Names and Functions of Parts . . . . . . . . . . . 1-9
Displaying the Alarm Relay Record . . . . . . . 2-31 Output specifications. . . . . . . . . . . . . . . . . . 1-14
Examples of Alarm Monitor Display . . . . . . . 2-28 Current position (current value) . . . . . . . . . . . 8-29
How to Monitor Alarms. . . . . . . . . . . . . . . . . 2-29 Current speed . . . . . . . . . . . . . . . . . . . . . . . . . 8-29
How to Register Alarms . . . . . . . . . . . . . . . . 2-27 Current value change request . . . . . . . . . . . . 8-28
real time display . . . . . . . . . . . . . . . . . . . . . . 2-28 CW limit switch/CCW limit switch . . . . . . . . . . 8-13
record display. . . . . . . . . . . . . . . . . . . . . . . . 2-29
All Clear Mode . . . . . . . . . . . . . . . . . . . . . . . . . 2-36
ASCII Code Table . . . . . . . . . . . . . . . . . . . . . . 9-29 D
Assembling and Wiring Connectors . . . . . . . . 1-48
Assembling the Unit. . . . . . . . . . . . . . . . . . . . . 1-44 Daily care . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-53
Auto home position . . . . . . . . . . . . . . . . . . . . . 8-21 Data Management on Memory Cards. . . . . . . 3-10
Auto-loading Function . . . . . . . . . . . . . . . . . . . 3-30 File names and project folder names that can be
AW Settings/Setting Inhibited Operation . . . . . 2-39 used. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Maximum number of project folders that can be
created. . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
B Number of projects that can be saved on a
Memory Card. . . . . . . . . . . . . . . . . . . . . . 3-12
Basic System Configuration . . . . . . . . . . . . . . . 1-4 Structure of folders . . . . . . . . . . . . . . . . . . . 3-10
Before You Turn the Power ON for the First Time. . . 1-3 Types and sizes of data that can be stored. 3-11
Initialization procedure . . . . . . . . . . . . . . . . . . 1-3 Data memory . . . . . . . . . . . . . . . . . . . . . . 1-7, A-2
Data to Store on the Memory Card . . . . . . . . . 3-12
Types of files stored on Memory Card . . . . 3-12
C Device Comment Store Function, Rung Comment
Store Function . . . . . . . . . . . . . . . . . . . . . . 10-10
Device Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Cam Switch Functions. . . . . . . . . . . . . . . . . . . . 7-2
Changing device values (T, C, CTH/CTC, TRM) 2-16
Cam Switch Instructions . . . . . . . . . . . . . . . . . . 7-3
Changing device values (when device values are
A-23
4 Index

numerical values) . . . . . . . . . . . . . . . . . . . 2-14 About installation. . . . . . . . . . . . . . . . . . . . . 1-39


Changing device values (when device values are External dimensions . . . . . . . . . . . . . . . . . . 1-40
ON/OFF display) . . . . . . . . . . . . . . . . . . . 2-14 Names and Functions of Parts . . . . . . . . . . 1-38
Changing the device No. to monitor. . . . . . . 2-10 Precautions when separate power supplies are
Changing the device type to monitor . . . . . . 2-10 used. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-40
Changing the monitor value display format . 2-11 Specifications . . . . . . . . . . . . . . . . . . . . . . . 1-39
Device name/comment display . . . . . . . . . . 2-12 Externally Input Interrupts. . . . . . . . . . . . . . . . . 4-5
Devices That Can be Displayed and Whose
Settings Can be Changed . . . . . . . . . . . . . 2-8
Example of monitor screen for each device. . 2-9 F
Method of Operation in the Device Mode . . . 2-9
Moving to the Device mode . . . . . . . . . . . . . . 2-9 FCNT instruction. . . . . . . . . . . . . . . . . . . . . . . . 6-4
Names and Functions of Setting/Operation Keys . 2-8 Fixed Scan Time Operation Functions . . . . . . 10-2
T, C, CTH/CTC, TRM monitor display examples . 2-16 Frequency Counter . . . . . . . . . . . . . . . . . 2-25, 6-1
Device No. Lists. . . . . . . . . . . . . . . . . . . . . . . . A-2 Frequency Counter Instructions . . . . . . . . . . . . 6-3
Differences between the KV-1000 Series List of Frequency Counter Instructions . . . . . 6-3
& KV-700 Series. . . . . . . . . . . . . . . . . . . . . A-15 Frequency Measurement, Speed of Rotation
Digital Trimmer Mode . . . . . . . . . . . . . . . . . . . 2-17 Measurement and Specified Frequency Pulse Output. . 6-2
Changing Digital Trimmers. . . . . . . . . . . . . . 2-17 Frequency Measurement . . . . . . . . . . . . . . . 6-2
Names and Functions of Setting/Operation Keys 2-17 Outline of Frequency Measurement, Speed of
Direct Clock Pulse Output . . . . . . . . . . . . . . . . 5-30 Rotation Measurement and Specified
Example of Direct Clock Pulse Output Frequency Pulse Output . . . . . . . . . . . . . . 6-2
(ON/OFF ratio 11:1) . . . . . . . . . . . . . . . . . 5-36 Specified Frequency Pulse Output . . . . . . . . 6-2
Example of Output of Variable Clock Pulse Speed of Rotation Measurement. . . . . . . . . . 6-2
ON/OFF Ratio . . . . . . . . . . . . . . . . . . . . . 5-40
Example of Stopping the Clock Pulse at a
Specified Number of Pulses . . . . . . . . . . . 5-44 G
Outline of Direct Clock Pulse Output . . . . . . 5-30
Setting Pulse Output by High-speed Counter
Grounding precautions . . . . . . . . . . . . . . . . . . 1-46
Comparator . . . . . . . . . . . . . . . . . . . . . . . 5-31
Direct Input/Output . . . . . . . . . . . . . . . . . . . . . . 4-8
Direct Input Function . . . . . . . . . . . . . . . . . . . 4-8
Direct Output Function . . . . . . . . . . . . . . . . . 4-10
H
APPENDICES

Display Language . . . . . . . . . . . . . . . . . . . . . . 2-34


Displaying and Setting the Date/Time . . . . . . . 2-19 High-speed Counter . . . . . . . . . . . . . . 1-7, 5-1, A-2
About the Date/Time Display . . . . . . . . . . . . 2-19 Acquiring the Current Value by Input Capture . . 5-24
Date/time setting . . . . . . . . . . . . . . . . . . . . . 2-19 Comparator Match Output. . . . . . . . . . . . . . 5-23
Method of Operation . . . . . . . . . . . . . . . . . . 2-19 Count Input Settings . . . . . . . . . . . . . . . . . . . 5-8
Names and Functions of Setting/Operation Keys 2-19 Counter Enable Function . . . . . . . . . . . . . . 5-21
Time adjustment . . . . . . . . . . . . . . . . . . . . . 2-21 Extended functions . . . . . . . . . . . . . . . . . . . 5-25
Distance between surrounding area . . . . . . . . 1-42 External input setting. . . . . . . . . . . . . . . . . . . 5-8
High-speed Counter Specifications . . . . . . . . 5-4
Internal clock input setting. . . . . . . . . . . . . . 5-10
E Interrupts from High-speed Counter Comparators . . . 5-24
Linear Counters and Ring Counters . . . . . . . 5-6
Outline of High-speed Counters . . . . . . . . . . 5-2
Error Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-29
Preset function . . . . . . . . . . . . . . . . . . . . . . 5-19
Error Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-10
Reset method . . . . . . . . . . . . . . . . . . . . . . . 5-16
Error Message Lists. . . . . . . . . . . . . . . . . . . . A-12
Restrictions Applied to Combined Use of
Error/clear error . . . . . . . . . . . . . . . . . . . . . . . . 8-27
Extended Functions. . . . . . . . . . . . . . . . . 5-25
Expanded data memory . . . . . . . . . . . . . . 1-7, A-2
Setting direct clock pulse input . . . . . . . . . . 5-11
Expansion Input Unit (KV-B16XA/C32XA/C64XA) . . . 1-24
High-speed counter comparator . . . . . . . . 1-7, A-2
derating . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-25
Home coordinates. . . . . . . . . . . . . . . . . . . . . . 8-21
External dimensions. . . . . . . . . . . . . . . . . . . 1-26
HOMEX instruction . . . . . . . . . . . . . . . . . . . . . 8-44
Names and Functions of Parts. . . . . . . . . . . 1-24
HOMEY instruction . . . . . . . . . . . . . . . . . . . . . 8-44
Specifications . . . . . . . . . . . . . . . . . . . . . . . . 1-25
wiring/internal circuit diagram . . . . . . . . . . . 1-27
Expansion Output Unit (KV-B16RA/B16TA/C32TA/
C64TA). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-31
I
derating . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-32
External dimensions. . . . . . . . . . . . . . . . . . . 1-33 I/O Inhibit Function . . . . . . . . . . . . . . . . . . . . . 10-3
Names and Functions of Parts. . . . . . . . . . . 1-31 Input Refresh Inhibit Function . . . . . . . . . . . 10-3
Specifications . . . . . . . . . . . . . . . . . . . . . . . . 1-32 Output Inhibit Function . . . . . . . . . . . . . . . . 10-3
wiring/internal circuit diagram . . . . . . . . . . . 1-34 Output Inhibit Function at Break . . . . . . . . . 10-4
Explanation of Commands and Responses . . . 9-8 INCENC Instruction . . . . . . . . . . . . . . . . . . . . 7-12
Extension Unit . . . . . . . . . . . . . . . . . . . . . . . . . 1-38 Incremental encoder . . . . . . . . . . . . . . . . . . . . . 7-2
About connection . . . . . . . . . . . . . . . . . . . . . 1-39 Index register . . . . . . . . . . . . . 1-7, A-2, A-15, A-18
Input Capture . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
A-24
4 Index

Input relay . . . . . . . . . . . . . . . . . . . . . . . . . 1-7, A-2 Logging Function Precautions. . . . . . . . . . . 3-45


Input Time Constant Selection Function . . . . . 10-5 Logging Function Setup Procedure. . . . . . . 3-32
About the Input Time Constant . . . . . . . . . . 10-5 Logging Instructions . . . . . . . . . . . . . . . . . . 3-39
How to change the input time constant of the CPU Setting up the Logging Function . . . . . . . . . 3-33
Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-5 Structure of Memory Card Directory . . . . . . 3-32
Inspection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-53 Transferring Ladder Programs and Logging
Installation Environment . . . . . . . . . . . . . . . . . 1-41 Setup Information . . . . . . . . . . . . . . . . . . 3-44
Internal auxiliary relay . . . . . . . . . . . . . . . . 1-7, A-2
Interrupt Processing . . . . . . . . . . . . . . . . . . . . . 4-2
Externally Input Interrupts . . . . . . . . . . . . . . . 4-5 M
Input capture . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
Instructions Not Allowed in Interrupt Programs . . . 4-7 Max. number of connected units. . . . . . . . . . . 1-43
Interrupt Program Execution Conditions . . . . 4-4 Max. number of I/O . . . . . . . . . . . . . . . . . . . . . . 1-7
Interrupts from CPU positioning parameter MCMP Instruction . . . . . . . . . . . . . . . . . . . . . . . 7-4
comparator 2 . . . . . . . . . . . . . . . . . . . . . . . 4-6 Memory Card instructions. . . . . . . . . . . . . . . . 3-49
Interrupts from High-speed Counter Comparators. 4-6 Memory Card Operations . . . . . . . . . . . . . . . . 2-22
Precautions in Interrupts . . . . . . . . . . . . . . . . 4-6 Memory Card-related Access Window Operations. 3-21
Setting the polarity of externally input interrupts . . 4-5 Deleting files . . . . . . . . . . . . . . . . . . . . . . . . 3-27
What Is "Interrupt Processing?" . . . . . . . . . . . 4-2 File list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25
INTERRUPTS . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 File space . . . . . . . . . . . . . . . . . . . . . . . . . . 3-28
Interrupts from CPU positioning parameter Files that are saved by operation in the access
comparator 2 . . . . . . . . . . . . . . . . . . . . . . . . . 4-6 window. . . . . . . . . . . . . . . . . . . . . . . . . . . 3-25
Interrupts from High-speed Counter Comparators . . 4-6 Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
Memory Card errors . . . . . . . . . . . . . . . . . . 3-29
Names and Functions of Setting/Operation Keys 3-21
J Save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23
Time stamp . . . . . . . . . . . . . . . . . . . . . . . . . 3-23
JOGX instruction . . . . . . . . . . . . . . . . . . . . . . . 8-38 MFREE instruction . . . . . . . . . . . . . . . . . . . . . 3-70
JOGY instruction . . . . . . . . . . . . . . . . . . . . . . . 8-38 MMKDIR instruction . . . . . . . . . . . . . . . . . . . . 3-74
Monitoring Units . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Method of Operation (example: on I/O Unit) . 2-6
K Names and Functions of Setting/Operation Keys . 2-6
MOTOR CONTROL (POSITIONING CONTROL) . . 8-1

APPENDICES
Key Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-40 Mounting on a DIN rail . . . . . . . . . . . . . . . . . . 1-45
How to Set Key Lock . . . . . . . . . . . . . . . . . . 2-40 Mounting orientation . . . . . . . . . . . . . . . . . . . . 1-41
KV-1000 Series Specifications . . . . . . . . . . . . . 1-6 Mounting Position . . . . . . . . . . . . . . . . . . . . . . 1-41
General specifications . . . . . . . . . . . . . . . . . . 1-6 MREAD instruction . . . . . . . . . . . . . . . . . . . . . 3-62
Performance specifications . . . . . . . . . . . . . . 1-7 Multi-stage Comparator . . . . . . . . . . . . . . . . . . 7-2
KV-B16RA/B16TA/C32TA/C64TA . . . . . . . . . . 1-31 MWRIT instruction . . . . . . . . . . . . . . . . . . . . . 3-50
KV-B16XA/C32XA/C64XA. . . . . . . . . . . . . . . . 1-24
KV-EB1S/KV-EB1R . . . . . . . . . . . . . . . . . . . . . 1-38
KV-U7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21 O
Operating speed . . . . . . . . . . . . . . . . . . . . . . . 8-25
L Operation at a power interruption . . . . . . . . . . . 1-8
Operation point No. (M code) . . . . . . . . . . . . . 8-29
Latch Function (Power Interruption Hold) . . . . 10-6 Operation speed . . . . . . . . . . . . . . . . . . . . . . . 8-19
Latch relay . . . . . . . . . . . . . . . . . . . . . . . . . 1-7, A-2 ORGX instruction . . . . . . . . . . . . . . . . . . . . . . 8-40
Linear counter . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6 ORGY instruction . . . . . . . . . . . . . . . . . . . . . . 8-40
List Devices for Positioning & List of Error Codes. . 8-60 Origin sensor . . . . . . . . . . . . . . . . . . . . . . . . . 8-12
List of Control Relays. . . . . . . . . . . . . . . . . . 8-64 Other Functions . . . . . . . . . . . . . . . . . . . . . . 10-10
List of Error Codes . . . . . . . . . . . . . . . . . . . . 8-65 Outline of Positioning/Speed Control . . . . . . . . 8-2
List of Point Parameters. . . . . . . . . . . . . . . . 8-64 Main functions . . . . . . . . . . . . . . . . . . . . . . . . 8-3
List of System Parameters and Statuses . . . 8-60 Other Positioning Devices. . . . . . . . . . . . . . 8-27
List of Devices for High-speed Counters . . . . . 5-26 Point parameters. . . . . . . . . . . . . . . . . . . . . . 8-5
List of Devices for Memory Cards . . . . . . . . . . 3-77 Setting Up Parameters . . . . . . . . . . . . . 8-2, 8-5
Loading a Memory Card . . . . . . . . . . . . . . . . . . 3-8 System parameters . . . . . 8-11, 8-16, 8-18, 8-24
Loading and Removing a Memory Card from the Trapezoidal control . . . . . . . . . . . . . . . . . . . . 8-2
KV-1000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8 Output relay . . . . . . . . . . . . . . . . . . . . . . . 1-7, A-2
LOGD instruction . . . . . . . . . . . . . . . . . . . . . . . 3-40
LOGE instruction . . . . . . . . . . . . . . . . . . . . . . . 3-40
Logging Function . . . . . . . . . . . . . . . . . . . . . . . 3-32 P
About Logging . . . . . . . . . . . . . . . . . . . . . . . 3-32
About Logging Data (CSV file). . . . . . . . . . . 3-46 Password Setting Function . . . . . . . . . . . . . . 10-10
Logging Function Control Relays/Control PLSOUT instruction . . . . . . . . . . . . . . . . . . . . 6-10
Memories . . . . . . . . . . . . . . . . . . . . . . . . . 3-42 PLSX instruction . . . . . . . . . . . . . . . . . . . . . . . 8-36
A-25
4 Index

PLSY instruction . . . . . . . . . . . . . . . . . . . . . . . 8-36 Communications Specifications . . . . . . . . . . 9-2


Point parameters . . . . . . . . . . . . . . . . . . . . . . . . 8-5 Format of Commands and Response . . . . . . 9-4
Acceleration/deceleration time. . . . . . . . . . . . 8-8 How to Connect to the KV-1000 . . . . . . . . . . 9-2
Number of stop sensor specified pulses . . . 8-10 Setting Inhibited Operation . . . . . . . . . . . . . . . 2-39
Operation mode . . . . . . . . . . . . . . . . . . . . . . . 8-6 Modes in Which Operation Can be Inhibited 2-39
Point No. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6 Setting the polarity of externally input interrupts 4-5
Run speed . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-9 Specified point No. . . . . . . . . . . . . . . . . . . . . . 8-29
Startup speed. . . . . . . . . . . . . . . . . . . . . . . . . 8-8 Speed of Rotation Measurement . . . . . . . . . . . 6-2
Target value/travel . . . . . . . . . . . . . . . . . . . . . 8-8 SRAM Clear mode . . . . . . . . . . . . . . . . . . . . . 2-35
Use stop sensor . . . . . . . . . . . . . . . . . . . . . . 8-10 Start of driver operation . . . . . . . . . . . . . . . . . 8-28
Positioning completed . . . . . . . . . . . . . . . . . . . 8-28 Startup speed . . . . . . . . . . . . . . . . . 8-8, 8-19, 8-24
Positioning Control Reference Examples . . . . 8-49 Stop sensor. . . . . . . . . . . . . . . . . . . . . . . . . . . 8-12
Compatibility with KV-10/16/24/40 . . . . . . . . 8-58 System Configuration . . . . . . . . . . . . . . . . . . . . 1-4
Continuous Position Control Reference Example 8-52 System Parameters Comparator Setup . . . . . 8-16
High-speed Execution Reference Example . 8-53 About comparators . . . . . . . . . . . . . . . . . . . 8-16
Positioning Control Exceeding 32 Points . . . 8-59 Selection function . . . . . . . . . . . . . . . . . . . . 8-17
Positioning Control Reference Examples . . 8-49 Setting value/setting value for interrupts . . . 8-17
Reference Example of Changing Speed during System Parameters I/O Setup . . . . . . . . . . . . 8-11
Operation (1) . . . . . . . . . . . . . . . . . . . . . . 8-54 CW limit switch/CCW limit switch . . . . . . . . 8-13
Reference Example of Changing Speed during Origin sensor. . . . . . . . . . . . . . . . . . . . . . . . 8-12
Operation (2) . . . . . . . . . . . . . . . . . . . . . . 8-56 Select output mode . . . . . . . . . . . . . . . . . . . 8-15
Positioning Instructions . . . . . . . . . . . . . . . . . . 8-33 Stop sensor . . . . . . . . . . . . . . . . . . . . . . . . . 8-12
List of Positioning Instructions . . . . . . . . . . . 8-33 Z-phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13
List of related parameters . . . . . . . . . . . . . . 8-34 System Parameters Jog . . . . . . . . . . . . . . . . . 8-24
Positioning Monitor . . . . . . . . . . . . . . . . . . . . . 2-23 Accl/dec time. . . . . . . . . . . . . . . . . . . . . . . . 8-24
Power ON Log . . . . . . . . . . . . . . . . . . . . . . . . 10-11 Change current value (default) . . . . . . . . . . 8-25
Precautions during wiring (OP-22184, OP-51404, Change operating speed (default). . . . . . . . 8-26
OP-23139, OP-42224) . . . . . . . . . . . . . . . . . 1-48 Operating speed . . . . . . . . . . . . . . . . . . . . . 8-25
Precautions When Using a Memory Card . . . . . 3-9 Startup speed . . . . . . . . . . . . . . . . . . . . . . . 8-24
Precautions when wiring to I/O devices. . . . . . 1-46 System Parameters Zero Return . . . . . . . . . . 8-18
Project Name. . . . . . . . . . . . . . . . . . . . . . . . . . 2-26 About zero return . . . . . . . . . . . . . . . . . . . . 8-18
Pulse output in progress/emergency stop . . . . 8-28 Accl/dec time. . . . . . . . . . . . . . . . . . . . . . . . 8-19
Auto home position . . . . . . . . . . . . . . . . . . . 8-21
APPENDICES

Clear deviation counter . . . . . . . . . . . . . . . . 8-21


R Home coordinates . . . . . . . . . . . . . . . . . . . . 8-21
Operation speed . . . . . . . . . . . . . . . . . . . . . 8-19
RCNT instruction . . . . . . . . . . . . . . . . . . . . . . . . 6-6 Start speed . . . . . . . . . . . . . . . . . . . . . . . . . 8-19
Removing the Memory Card . . . . . . . . . . . . . . . 3-8 Zero return detailed position . . . . . . . . . . . . 8-20
Removing the Terminal Block . . . . . . . . . . . . . 1-52 Zero return direction . . . . . . . . . . . . . . . . . . 8-20
Replacing the Battery . . . . . . . . . . . . . . . . . . . 1-53
Battery replacement procedure . . . . . . . . . . 1-54
When battery power has dropped . . . . . . . . 1-53 T
When the battery has run out of power . . . . 1-53
Response during an Error . . . . . . . . . . . . . . . . 9-24 Target value/travel . . . . . . . . . . . . . . . . . . . . . . 8-8
Restrictions Applied to Combined Use of Cam TCHX instruction. . . . . . . . . . . . . . . . . . . . . . . 8-42
Switch Functions . . . . . . . . . . . . . . . . . . . . . . 7-3 TCHY instruction. . . . . . . . . . . . . . . . . . . . . . . 8-42
Restrictions Applied to Combined Use of Frequency Teaching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-42
Counter Functions . . . . . . . . . . . . . . . . . . . . . 6-3 Temporary data memory. . . . . . . . . . . . . . 1-7, A-2
Ring counters . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6 Timer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-7, A-2
Run speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-9 To Enable Use of Memory Cards . . . . . . . . . . . 3-4
Run speed change request . . . . . . . . . . . . . . . 8-28 To Use a Memory Card. . . . . . . . . . . . . . . . . . . 3-4
RUN-PROG Selector Switch . . . . . . . . . . . . . . 1-16 Available Memory Cards . . . . . . . . . . . . . . . . 3-4
Hardware requirements. . . . . . . . . . . . . . . . . 3-5
Transferring Device Value Data . . . . . . . . . . . 3-31
S Transferring Programs . . . . . . . . . . . . . . . . . . 3-30
Transferring Programs from the Access Window . . 3-30
Sample Interrupt Programs . . . . . . . . . . . . . . . 4-13 Trapezoidal control . . . . . . . . . . . . . . . . . . . . . . 8-2
Saving/Reading Data to and from the Memory Card
to KV STUDIO . . . . . . . . . . . . . . . . . . . . . . . 3-13
Select output mode . . . . . . . . . . . . . . . . . . . . . 8-15 U
Sending/Receiving Text Data . . . . . . . . . . . . . 9-25
Receiving Text Data . . . . . . . . . . . . . . . . . . . 9-25 User Messages. . . . . . . . . . . . . . . . . . . . . . . . 2-37
Sending Text Data . . . . . . . . . . . . . . . . . . . . 9-27 About the User Message Display . . . . . . . . 2-37
Sensor enable details . . . . . . . . . . . . . . . . . . . 8-63 Displaying User Messages . . . . . . . . . . . . . 2-38
Serial Communications . . . . . . . . . . . . . . . . . . . 9-1 How to Display User Messages . . . . . . . . . 2-37
Command Send Procedure . . . . . . . . . . . . . . 9-3 User message 1 . . . . . . . . . . . . . . . . . . . . . 2-38
A-26
4 Index

User message 2. . . . . . . . . . . . . . . . . . . . . . 2-38

V
VARIOUS FUNCTIONS. . . . . . . . . . . . . . . . . . 10-1

W
Warning/clear warning. . . . . . . . . . . . . . . . . . . 8-27
Wiring to terminal block units. . . . . . . . . . . . . . 1-47
Wiring to the connector . . . . . . . . . . . . . . . . . . 1-50
Wiring Units . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-46

Z
Z-phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13
Zero return completed . . . . . . . . . . . . . . . . . . . 8-27
Zero return detailed position . . . . . . . . . . . . . . 8-20
Zero return direction . . . . . . . . . . . . . . . . . . . . 8-20
Zero return in progress . . . . . . . . . . . . . . . . . . 8-27
Zero Return Path . . . . . . . . . . . . . . . . . . . . . . . 8-21

APPENDICES

A-27
Revision History
Printing Date Version Details of Revision

February 2005 Initial version

February 2012 13th version

April 2012 14th version


WARRANTIES AND DISCLAIMERS
(1) KEYENCE warrants the Products to be free of defects in materials and workmanship for a period of one (1)
year from the date of shipment. If any models or samples were shown to Buyer, such models or samples were
used merely to illustrate the general type and quality of the Products and not to represent that the Products
would necessarily conform to said models or samples. Any Products found to be defective must be shipped to
KEYENCE with all shipping costs paid by Buyer or offered to KEYENCE for inspection and examination. Upon
examination by KEYENCE, KEYENCE, at its sole option, will refund the purchase price of, or repair or replace
at no charge any Products found to be defective. This warranty does not apply to any defects resulting from
any action of Buyer, including but not limited to improper installation, improper interfacing, improper repair,
unauthorized modification, misapplication and mishandling, such as exposure to excessive current, heat,
coldness, moisture, vibration or outdoors air. Components which wear are not warranted.
(2) KEYENCE is pleased to offer suggestions on the use of its various Products. They are only suggestions, and it
is Buyer's responsibility to ascertain the fitness of the Products for Buyer’s intended use. KEYENCE will not be
responsible for any damages that may result from the use of the Products.
(3) The Products and any samples ("Products/Samples") supplied to Buyer are not to be used internally in
humans, for human transportation, as safety devices or fail-safe systems, unless their written specifications
state otherwise. Should any Products/Samples be used in such a manner or misused in any way, KEYENCE
assumes no responsibility, and additionally Buyer will indemnify KEYENCE and hold KEYENCE harmless from
any liability or damage whatsoever arising out of any misuse of the Products/Samples.
(4) OTHER THAN AS STATED HEREIN, THE PRODUCTS/SAMPLES ARE PROVIDED WITH NO OTHER
WARRANTIES WHATSOEVER. ALL EXPRESS, IMPLIED, AND STATUTORY WARRANTIES, INCLUDING,
WITHOUT LIMITATION, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, AND NON-INFRINGEMENT OF PROPRIETARY RIGHTS, ARE EXPRESSLY DISCLAIMED. IN
NO EVENT SHALL KEYENCE AND ITS AFFILIATED ENTITIES BE LIABLE TO ANY PERSON OR ENTITY
FOR ANY DIRECT, INDIRECT, INCIDENTAL, PUNITIVE, SPECIAL OR CONSEQUENTIAL DAMAGES
(INCLUDING, WITHOUT LIMITATION, ANY DAMAGES RESULTING FROM LOSS OF USE, BUSINESS
INTERRUPTION, LOSS OF INFORMATION, LOSS OR INACCURACY OF DATA, LOSS OF PROFITS,
LOSS OF SAVINGS, THE COST OF PROCUREMENT OF SUBSTITUTED GOODS, SERVICES OR
TECHNOLOGIES, OR FOR ANY MATTER ARISING OUT OF OR IN CONNECTION WITH THE USE OR
INABILITY TO USE THE PRODUCTS, EVEN IF KEYENCE OR ONE OF ITS AFFILIATED ENTITIES WAS
ADVISED OF A POSSIBLE THIRD PARTY’S CLAIM FOR DAMAGES OR ANY OTHER CLAIM AGAINST
BUYER. In some jurisdictions, some of the foregoing warranty disclaimers or damage limitations may not
apply.

BUYER'S TRANSFER OBLIGATIONS:


If the Products/Samples purchased by Buyer are to be resold or delivered to a third party, Buyer must provide
such third party with a copy of this document, all specifications, manuals, catalogs, leaflets and written
information provided to Buyer pertaining to the Products/Samples.

E 1101-3
Copyright (c) 2005 KEYENCE CORPORATION. All rights reserved. 084110E 1042-14 051GB Printed in Japan

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy