Download as pdf or txt
Download as pdf or txt
You are on page 1of 628

717GB

Chapter
OVERVIEW
1
Chapter SPECIFICATIONS
2 AND WIRING
Chapter UNIT INSTALLATION
Programmable Controller 3 AND MAINTENANCE
Chapter CPU BUILT-IN

KV Nano Series 4
Chapter
FUNCTIONS

LADDER
5 PROGRAMMING

Base unit • List of PLC Unit Errors


• Lists of CR and CM Devices
(terminal block type) • Index

User's Manual

Read this manual before using the product.


Keep this manual in a safe place for later reference.

Supported Base Units

• KV-N14AR
• KV-N14AT
• KV-N14ATP
• KV-N14DR
• KV-N14DT
• KV-N14DTP
• Base unit (terminal block type) • KV-N24AR
• KV-N24AT
• Expansion I/O unit (terminal block type) • KV-N24ATP
• Extension serial communication • KV-N24DR
• KV-N24DT
cassette • KV-N24DTP
• Extension access window cassette • KV-N40AR
• KV-N40AT
• Connecting transformer unit • KV-N40ATP
• KV-N40DR
• KV-N40DT
• KV-N40DTP
• KV-N60AR
• KV-N60AT
• KV-N60ATP
Preface
This manual describes how to connect to and maintain the KV Nano Series. It also describes the CPU
built-in functions and how to create ladder programs. This manual also includes the specifications and
usage methods of the base unit, expansion I/O unit, extension serial communication cassette, and
extension access window cassette. For expansion special units other than those listed above, see the
user's manual of the corresponding unit.
When you are writing programs, read the "Instruction Reference Manual," "Script Programming
Manual," and "KV STUDIO User's Manual" together with this manual.
Store this manual in a safe place so that you can retrieve it whenever necessary.
Provide this manual to the end-users of the device.

 KV Nano Series Manuals


All the following PDF manuals can be found and opened in the help file of KV STUDIO. In addition, the
latest versions of the PDF manuals can be downloaded from the KEYENCE website.
To request printed versions of these manuals, use the appropriate phone number listed on the back of
this manual.

Name Description
This manual, which describes the system configuration and
Base unit (terminal block type) specifications of the KV Nano Series. It also describes the CPU built-
in functions and how to create ladder programs.
This manual describes system configurations and specifications, built-
KV Nano Series Base Unit
in functions in the CPU unit, and how to create ladder programs for
(connector type) User's Manual
the KV Nano Series (connector type).
KV-7000/5000/3000/1000 Series
This manual describes the instructions that are available in ladder
and KV Nano Series
programming.
Instruction Reference Manual
KV-7000/5000/3000/1000 Series
This manual describes how to create script programs and the
and KV Nano Series
available operators, control sentences, and functions.
Script Programming Manual
KV STUDIO User's Manual This manual describes how to operate KV STUDIO.

 KV Nano Series serial communication function manual


You must refer to the following manual when you are using the built-in serial communication function of
the KV Nano Series to read or write PLC device values.

Name Description
KV Nano Series This manual describes the specifications, handling methods, and
Serial Communication Function operating procedures of the serial communication cassette for
User's Manual terminal blocks and of the base unit's built-in serial port.

"5-9 Serial Communication" (page 5-193)


KV Nano Series CPU Function Version

The KV Nano Series functions differ according to the CPU function version.
The CPU function version can be checked using "Tools (T)"→"Check CPU function version (X)"→"PLC
(P)" in the KV STUDIO menu (* KV STUDIO version 7 or later is required).

Reference "System program update" (page 3-23)

Differences in KV Nano Series CPU function versions

Differences according to CPU function version are as follows.

 Differences in CPU function according to CPU function version

CPU Function version Release date Compatible functions


Ver.1.0 2012/17/10 Initial version
Ver.2.0 2013/15/05 Compatible with EtherNet/IP unit KV-NC1EP

717GB 1
Safety Precautions
 Symbols
This document contains notices that you should observe to ensure your own personal safety, as well as
to protect the device and connected equipment. These notices are marked according to the level of
danger as shown below.

It indicates a hazardous situation which, if not avoided, will result in death or


DANGER
serious injury.
It indicates a hazardous situation which, if not avoided, could result in death or
WARNING
serious injury.
It indicates a hazardous situation which, if not avoided, could result in minor or
CAUTION
moderate injury.
It indicates a situation which, if not avoided, could result in product damage as
NOTICE
well as property damage.

Important It indicates cautions and limitations that must be followed during operation.

Point It indicates additional information on proper operation.

Reference It indicates tips for better understanding or useful information.

Indicates a page to be referred to in this manual or other manuals.

 General Precautions
• Before you use this device, verify its functionality and performance at startup and during operation.
• Provide a safety circuit that bypasses the PLC to enable failsafe operation of the entire system in
the event that the PLC fails.
• Output circuit and internal circuit malfunctions sometimes prevent control from being performed
normally. Be sure to provide a safety circuit in control systems where circuit malfunctions may lead
to fire or other serious accidents.
• Proceed with care when modifying the device, 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 device in combination with other devices only after careful consideration, since the device
may fail to satisfy its functionality and performance capabilities as a result of factors such as its
usage conditions and the environment in which it is used.
• Do not use the device with the purpose of protecting human beings.
• This device is not intended for use as an explosion-proof product. Do not use this device in a
hazardous location or in a location that has a potentially explosive atmosphere.
• Before you use KV STUDIO, verify that the KV Nano Series functions correctly.

2 - KV Nano Series(terminal block type) User’s Manual -


Precautions Related to Regulations and Standards

 CE Marking
KEYENCE has confirmed that this product complies with the essential requirements of the applicable
EC directives, based on the following specifications. Be sure to consider the following specifications
when using this product in the member states of the European Union.

 EMC directive (2004/108/EC)


• Applicable standards EMI: EN61131-2, Class A EMS: EN61131-2
• Be sure to install the KV Nano Series in an IP54 or better conductive enclosure (such as an
industrial control panel).
• Ground the enclosure (such as an industrial control panel) to FG (the enclosure cannot be
positively grounded).
• When using the AC power supply input terminal of the KV Nano Series, pass the power cable
through a ferrite core*1 once.
• Ground the FG terminal of the KV Nano Series to the enclosure (such as an industrial control panel).
• Use shielded cables for the signal lines located outside of the enclosure (such as an industrial control
panel). However, do not ground the communication cables connected to extension cassettes, the
serial communication cable connected to the base unit, or the shielded cable of the USB cable.
• Pass the serial communication cable which is connected to the base unit and the USB cable
through a ferrite core*1 twice.
• When using an Ethernet unit (KV-NC1EP) at the same time as an expansion unit connection
extension cable (OP-87581), pass both ends of the expansion unit connection extension cable
(OP-87581) through a ferrite core*2 once.
*1 Ferrite core used by KEYENCE to perform evaluations: TDK ZCAT-3035-1330
*2 Ferrite core used by KEYENCE to perform evaluations: TDK ZCAT-4625-3430D

However, these specifications do not guarantee that the end product in which this product is
incorporated complies with the essential requirements of the EMC directive. The manufacturer of the
end product is solely responsible for ensuring that the end product complies with the EMC directive.

Remarks regarding compliance


<Industrial control panel>
• If the industrial control panel has joints on its top, bottom, or similar locations, remove the coating
present or carry out any other procedures that are necessary to maintain the conductivity.
• Use a thick grounding cable, so that the impedance will be low even at high frequencies, to ground
the industrial control panel.
• Before touching the devices that are inside the industrial control panel, such as when performing
maintenance, be sure to eliminate static electricity so that it does not affect the internal devices.

<Grounding the shielded cables>


• Ground the shielded cables close to the expansion units and the extension cassettes, and ensure
that grounded cables do not receive electromagnetic induction from ungrounded cables.
• Remove a portion of the outer covering of the shielded cables, and then ground the stripped part of
the shielded cables against a wide surface of the industrial control panel. (If you are using clamps
or similar metal fixtures, remove the coating from the parts of the cables that will be in contact with
the metal fixtures.)
• Do not solder the wires to the shielded cables, as grounding the wires will increase the high-
frequency impedance, which will negate the shielding effect.
- KV Nano Series(terminal block type) User’s Manual - 3
 Low-voltage directive (2006/95/EC)
The low-voltage directive only applies to the AC power supply type base units, relay output type base
units, and expansion I/O units. It does not apply to any other models.
• Applicable standard EN61131-2
• Overvoltage category II
• Use the product in an environment that corresponds to pollution degree 2.
• Be sure to install the KV Nano Series in an IP54 or better conductive enclosure (such as an
industrial control panel).
• The rated relay load of the KV-N14AR, KV-N14DR, KV-N24AR, KV-N24DR, KV-N40AR,
KV-N40DR, KV-N60AR, KV-N8ER, KV-N16ER, KV-N8EXR , and KV-NC8ER is 2 A per channel.

4 - KV Nano Series(terminal block type) User’s Manual -


 UL Certificate
This product has received the following UL/C-UL certificates.

UL file number: E207185


Category: NRAQ, NRAQ7

Be sure to consider the following specifications when using this product as a UL/C-UL certified product.
• Install the KV Nano Series in an IP54 or better enclosure (industrial control panel).
• Supply power to the KV Nano Series using a UL Listing certified power supply that provides Class
2 output as defined in NFPA 70 (NEC: National Electrical Code) of The United States of America.
• For wiring to the terminal block of I/O units (excluding KV-NC8ER), use a stranded copper wire
with a gauge of AWG #14 to #20, and a temperature rating of 60°C or higher (105°C or higher
when wiring to the terminal block of relay type output units.) Use a tightening torque of 0.59 to 0.88
N•m (5.2 to 7.8 lb.-In).
• For wiring to KV-NC8ER units, use a stranded copper wire with a gauge of AWG #16 to #28, and a
temperature rating of 105°C or higher. Use a tightening torque of 0.23 N•m.
• For wiring to KV-N3AM terminal blocks, use a stranded copper wire with a gauge of AWG #14 to
#20, and a temperature rating of 60°C or higher. Use a tightening torque of 0.59 to 0.88 N•m (5.2 to
7.8 lb.-In).
• For wiring to KV-NC4AD and KV-NC2DA units, use a stranded copper wire with a gauge of AWG
#16 to #28, and a temperature rating of 60°C or higher. Use a tightening torque of 0.23 N•m.
• For wiring to KV-NC4TP units, use a stranded copper wire with a gauge of AWG #16 to #24, and a
temperature rating of 60°C or higher.
• For wiring to KV-NC20L terminal blocks, use a stranded copper wire with a gauge of AWG #20 to
#22, and a temperature rating of 60 °C or higher. Use a tightening torque of 0.23 N•m.
• Use the product in an environment that corresponds to pollution degree 2.
• Use the product in an environment with an ambient temperature of 55°C or less.

 KC Certificate (South Korea)


The KV Nano Series has received KC certification.

Class A device

This is a class A product. In a domestic environment this product may cause radio interference in
which case the user may be required to take adequate measures.

Ͳ 匏͑匶匶͙͑ 櫋怺殯͑愯暧皻柦匶沖沲͚
決͑匶匶垚͑櫋怺殯 ͙Ͳ 匏 ͚͑洊沖砒洇穯匶匶嵢昢͑砖廪沖͑嬖垚͑斲殯沖垚͑決͑洖汊
渂汞穞柢匶͑愚岂彶 ͑͝儆洛歾汞͑滆櫳櫖昢͑斲殯穞垚͑冉汊͑徯洇求嵢͑穯城埪 ͟

- KV Nano Series(terminal block type) User’s Manual - 5


MEMO

6 - KV Nano Series(terminal block type) User’s Manual -


Manual Organization
1
This chapter describes information such as the system configuration
Chapter

1
OVERVIEW of the KV Nano Series, communication channels with PCs, and the
occupied areas of the units.
2
Chapter SPECIFICATIONS AND
This chapter provides the specifications of and describes how to wire
3
the KV Nano Series base unit, expansion I/O unit, extension cassette
2 WIRING
for the terminal block unit, and LCD extension cassette. 4
Chapter UNIT INSTALLATION This chapter describes how to install the KV Nano Series as well as 5
3 AND MAINTENANCE how to attach units, wiring precautions, and maintenance procedures.

This chapter describes the specifications and setting methods of the A


Chapter CPU BUILT-IN functions that you have to use to create ladder programs. Using

4 FUNCTIONS modules, macros, and local devices increases the efficiency of


programming.

This chapter describes various functions that you can use by using
Chapter LADDER
the positioning, high-speed counters, communication ports, I/O, and
5 PROGRAMMING
other built-in functions of the KV Nano Series base unit.

The appendices include lists of the KV Nano Series control relays


APPENDICES (CR) and control memory entries (CM), an error list, and a list of the
instructions used in this manual.

- KV Nano Series(terminal block type) User’s Manual - 7


Contents
Safety Precautions .................................................................................................................2
Manual Organization ..............................................................................................................6
Contents ..................................................................................................................................8
Conventions Used In This Manual ......................................................................................18
How to Use Mnemonic Lists ················································································ 18
Terminology ····································································································· 19

Chapter 1 OVERVIEW
1-1 System Configuration............................................................................................. 1-2
System Configuration Overview ·········································································· 1-2
(1) Base Unit ··································································································· 1-3
(2) Extension Serial Communication Cassette ························································ 1-3
(3) Extension Access Window Cassette (With Memory Cassette Function) ·················· 1-3
(4) Expansion units (terminal block) ····································································· 1-3
(5) Connecting transformer unit ··········································································· 1-4
(6) Expansion unit (connector) ············································································ 1-4
Connecting to Communication Devices································································· 1-5
Current Consumption Calculation ········································································ 1-7
1-2 Unit I/O Assignments.............................................................................................. 1-8
I/O Relay Assignment Rules ··············································································· 1-8
I/O Relay Assignment ······················································································· 1-9
Unit Reservation ·····························································································1-10

Chapter 2 SPECIFICATIONS
2-1 Series Common Specifications ............................................................................. 2-2
General Specifications ······················································································ 2-2
Performance Specifications ················································································ 2-3
Operation during Power Outages········································································· 2-4
2-2 Base Unit Shared Specifications........................................................................... 2-5
About the Base Unit Model Number ····································································· 2-5
Package Contents ···························································································· 2-5
Names and Functions of Parts ············································································ 2-6
Specifications ·································································································· 2-9
RUN-PROG Selector Switch and Error Clear Switch···············································2-13
Wiring ···········································································································2-14
2-3 Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP) ....... 2-15
Relay Output Type KV-N14AR/N14DR ································································2-15
Transistor Output Type KV-N14AT/N14DT/N14ATP/N14DTP···································2-17
Example of Wiring a Transistor Output to a Servo Amplifier (SV Series) ·····················2-20
Outline Drawings·····························································································2-21

8 - KV Nano Series(terminal block type) User’s Manual -


2-4 Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP).......2-22
Relay Output Type KV-N24AR/N24DR ································································2-22
Transistor Output Type KV-N24AT/N24DT/N24ATP/N24DTP···································2-24
Example of Wiring a Transistor Output to a Servo Amplifier (SV Series)+····················2-27
Outline Drawings·····························································································2-28
2-5 Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP).......2-29
Relay Output Type KV-N40AR/N40DR ································································2-29
Transistor Output Type KV-N40AT/N40DT/N40ATP/N40DTP···································2-32
Example of Wiring a Transistor Output to a Servo Amplifier (SV Series) ·····················2-35
Outline Drawings·····························································································2-36
2-6 Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP) ...2-37
Relay Output Type KV-N60AR ···········································································2-37
Transistor Output Type KV-N60AT/N60ATP ·························································2-41
Example of Wiring a Transistor Output to a Servo Amplifier (SV Series) ·····················2-45
Outline Drawings·····························································································2-46
2-7 Expansion Input Unit (KV-N8EX and KV-N16EX) ............................................... 2-47
Names and Functions of Parts ···········································································2-47
Specifications ·································································································2-48
Wiring and Internal Circuit Diagrams ···································································2-49
Outline Drawings·····························································································2-50
2-8 Expansion Output Unit (KV-N8ER/ET/ETP and KV-N16ER/ET/ETP)................. 2-51
Names and Functions of Parts ···········································································2-51
Specifications ·································································································2-52
Wiring and Internal Circuit Diagrams ···································································2-53
Outline Drawings·····························································································2-55
2-9 Expansion I/O Unit (KV-N8EXR and KV-N8EXT)................................................. 2-56
Names and Functions of Parts ···········································································2-56
Specifications ·································································································2-57
Wiring and Internal Circuit Diagrams ···································································2-58
Outline Drawings·····························································································2-59
2-10 Extension Serial Communication Cassette (KV-N10L and KV-N11L)............... 2-60
Names and Functions of Parts ···········································································2-60
Specifications ·································································································2-61
Wiring and Internal Circuit Diagrams ···································································2-63
Outline Drawings·····························································································2-64
2-11 Extension Access Window Cassette (KV-N1AW)............................................... 2-65
Names and Functions of Parts ···········································································2-65
Specifications ·································································································2-65
Outline Drawings·····························································································2-66
2-12 Connecting transformer unit (KV-N1) ................................................................. 2-67
Names and Functions of Parts ···········································································2-67
Outline Drawings·····························································································2-67

- KV Nano Series(terminal block type) User’s Manual - 9


Chapter 3 UNIT INSTALLATION AND MAINTENANCE
3-1 Connecting Units .................................................................................................... 3-2
Precautions When Connecting Units ···································································· 3-2
Constructing Units ···························································································· 3-3
Disconnecting Units ·························································································· 3-6
Attaching Cassettes·························································································· 3-8
Installing Units on DIN Rails ··············································································3-10
Installing Units Directly in an Industrial Control Panel··············································3-11
3-2 Unit Installation ..................................................................................................... 3-12
Installation Environment ···················································································3-12
Installation Position··························································································3-12
3-3 Wiring Precautions ............................................................................................... 3-14
Unit Wiring Precautions ····················································································3-14
Removing the Terminal Block ············································································3-18
Precautions When Using the USB Port or Serial Communication Port to Communicate with a
PC or Other Peripheral ·····················································································3-19
3-4 Maintenance .......................................................................................................... 3-20
Inspection and Maintenance ··············································································3-20
About Maintenance··························································································3-20
About the Restoration Method············································································3-21
Restoration Method ·························································································3-22
System program update ···················································································3-23

Chapter 4 LADDER PROGRAMMING


4-1 What Is Sequence Control? ................................................................................... 4-2
Types of Sequence Control ················································································ 4-4
4-2 Programming Language......................................................................................... 4-5
Ladder Program······························································································· 4-5
KV Script ········································································································ 4-6
Mnemonics ····································································································· 4-7
Suffixes·········································································································· 4-8
4-3 Projects.................................................................................................................... 4-9
Project Configuration ························································································ 4-9
Program Capacity ···························································································4-11
Project Protection Settings ················································································4-13
4-4 Devices and Constants......................................................................................... 4-17
Lists of Devices ······························································································4-17
Configuring Power Failure Holding Settings (Latching) ············································4-26
Bit Devices ····································································································4-27
Word Devices·································································································4-36
Index Modification ···························································································4-41
Indirect Specification························································································4-43
Processing bit devices in units of words ·······························································4-47

10 - KV Nano Series(terminal block type) User’s Manual -


Bit device processing of word devices ·································································4-48
Constants ······································································································4-49
Internal Registers ····························································································4-52
4-5 How Data Is Processed ........................................................................................ 4-54
Binary Data ····································································································4-54
Value Notation································································································4-55
Correlations between Value Notations ·································································4-57
Character Codes·····························································································4-60
4-6 Program Structure and Operation....................................................................... 4-61
Base Unit Operation ························································································4-61
Scan Time ·····································································································4-68
Program Configuration ·····················································································4-71
4-7 Interrupts ............................................................................................................... 4-76
Overview ·······································································································4-76
How to Execute Interrupt Programs·····································································4-78
External Input Interrupts ···················································································4-79
High-Speed Counter Comparator Interrupts ··························································4-80
CPU Positioning Parameter Comparator 2 Interrupts ··············································4-80
Interrupt Priority ······························································································4-81
Instructions That Cannot Be Used in Interrupt Programs ·········································4-82
I/O Processing during Interrupts ·········································································4-83
Input Capture Function ·····················································································4-86
Sample Program ·····························································································4-87
Interrupt Processing Instructions ········································································4-91
Sample Program ·····························································································4-95
4-8 Modules ............................................................................................................... 4-100
Overview ····································································································· 4-100
Module Type ································································································ 4-102
Module Execution Sequence ··········································································· 4-105
Module Configuration Examples ······································································· 4-106
Module System Devices ················································································· 4-108
Module Passwords ························································································ 4-109
4-9 Macros ..................................................................................................................4-112
Overview ····································································································· 4-112
Usage Procedure ·························································································· 4-114
Macro Type·································································································· 4-115
Setting Arguments························································································· 4-120
Macro System Devices··················································································· 4-122
Bit That Is Turned ON during Macro Execution ···················································· 4-123
Macro Passwords·························································································· 4-125
Differences between Macros and Subroutines····················································· 4-130
4-10 Local Devices ...................................................................................................... 4-134
How to Write Local Devices············································································· 4-134
List of Local Devices ······················································································ 4-135
Local Device Assignment················································································ 4-136
Local Device Input and Errors during Conversion················································· 4-138

- KV Nano Series(terminal block type) User’s Manual - 11


4-11 Programming Skills ............................................................................................ 4-140
From Installation to Operation ·········································································· 4-140
Program Creation Support ·············································································· 4-142
Creating Clear, Legible Programs ····································································· 4-154
Key Points to Program Creation ······································································· 4-159
How to Perform Debugging ············································································· 4-167

Chapter 5 CPU BUILT-IN FUNCTIONS


5-1 Overview of Built-In Functions .............................................................................. 5-2
What You Can Do with the Built-In Functions ························································· 5-2
5-2 Motor (Positioning) Control ................................................................................... 5-4
Overview of Motor (Positioning) Control ································································ 5-4
Positioning Control Specifications ········································································ 5-5
Positioning Control Mechanism ··········································································· 5-5
Positioning Control Procedure············································································· 5-6
Setting Parameters··························································································· 5-6
Origin Returning Path·······················································································5-26
Creating Ladder Programs ················································································5-35
List of Positioning Instructions············································································5-45
PSTRT Starts the positioning operation ···················································5-46
JOG Executes the JOG operation of the X axis ·····································5-50
ORG Starts the origin returning operation ·············································5-54
TCH Reads the current position, and sets the
target coordinate to this value ·····················································5-58
HOME Starts the travel to home position operation ···································5-60
CHGSP Changes the speed ··································································5-62
CHGTGT Changes the target coordinate during positioning operation ··············5-66
RFSPS Updates the current position and current speed to the
most recent values ···································································5-68
List of Positioning Functions ··············································································5-70
Reference Example of Positioning Control····························································5-78
Lists of Devices and Error Codes for Positioning····················································5-88
5-3 Specified Frequency Pulse Output ..................................................................... 5-95
Specified Frequency Pulse Output Function Overview ············································5-95
Specified Frequency Pulse Output Instruction ·······················································5-95
PLSOUT Uses a high-speed counter to generate pulses
at the specified frequency ··························································5-96
5-4 High-Speed Counter ............................................................................................. 5-98
High-Speed Counter Specifications·····································································5-98
High-Speed Counter Configuration ·····································································5-99
High-Speed Counter Device Numbers Categorized by Function······························ 5-100
How to Set the High-Speed Counter·································································· 5-101
List of High-Speed Counter Setup Items ···························································· 5-102
List of High-Speed Counter Functions ······························································· 5-113
Setting the Count Range················································································· 5-114
Count Input Settings ······················································································ 5-116

12 - KV Nano Series(terminal block type) User’s Manual -


High-Speed Counter Set Values (CTC)······························································ 5-120
Reset Mode ································································································· 5-121
Preset Function ···························································································· 5-124
Enabling and Disabling Counting (Counter Enable Function) ·································· 5-126
Comparator Matching Output··········································································· 5-128
Reading the Current Value's Change Direction ···················································· 5-129
Acquiring the Current Value Based on Input Capture ············································ 5-130
Instructions for High-Speed Counters ································································ 5-131
CTH 32-bit, high-speed counter························································ 5-132
CTC High-speed counter comparator ················································ 5-132
Sample Program ··························································································· 5-135
RFSCTH High-speed counter refresh ······················································ 5-136
List of Devices for High-Speed Counters ···························································· 5-137
Direct Clock Pulse Output ··············································································· 5-145
5-5 Frequency Counter ............................................................................................. 5-156
Frequency Counter Function Overview ······························································ 5-156
Frequency Counter Instructions········································································ 5-157
FCNT Frequency measurement ························································· 5-158
RCNT Rotation speed measurement ··················································· 5-160
5-6 Cam Switch.......................................................................................................... 5-163
Cam Switch Function Overview········································································ 5-163
Cam Switch Instructions ················································································· 5-163
MCMP Multi-stage comparator···························································· 5-164
ABSENC Absolute encoder ··································································· 5-168
INCENC Incremental encoder ······························································· 5-172
5-7 Tracing ................................................................................................................. 5-177
Overview ····································································································· 5-177
Usage Procedure ·························································································· 5-178
Settings······································································································· 5-178
Logging Instructions······················································································· 5-184
LOGE Logging and tracing enable ······················································ 5-186
LOGD Logging and tracing disable······················································ 5-186
TRGD Logging data capture ······························································ 5-188
List of Devices for Logging and Tracing ····························································· 5-189
Tracing Function Precautions ·········································································· 5-191
5-8 USB Communication .......................................................................................... 5-192
How to Connect to a PC ················································································· 5-192
Installing the USB Driver················································································· 5-192
5-9 Serial Communication ........................................................................................ 5-193
What You Can Do with Serial Communications ··················································· 5-193
Communication Specifications When Communicating with a PC or Touch Panel ········ 5-194
How to Connect to a PC ················································································· 5-194
How to Connect to the VT3 Series ···································································· 5-195
How to Connect to Other Peripherals ································································ 5-196

- KV Nano Series(terminal block type) User’s Manual - 13


5-10 I/O ......................................................................................................................... 5-197
General I/O ·································································································· 5-197
Input Time Constant Setting ············································································ 5-198
Input Refresh Disabling ·················································································· 5-199
Output Disabling ··························································································· 5-200
Forced Set and Reset Registration ··································································· 5-201
5-11 Access Window................................................................................................... 5-202
What You Can Do with the Access Window ························································ 5-202
Unit Monitor ································································································· 5-206
Device Mode ································································································ 5-206
Error Clear··································································································· 5-214
Language ···································································································· 5-215
I/O Test······································································································· 5-216
Clock ·········································································································· 5-218
CPU Monitor ································································································ 5-221
Alarm·········································································································· 5-227
Load and Save ····························································································· 5-230
Debugging ··································································································· 5-239
Contrast ······································································································ 5-241
RAM Clear··································································································· 5-241
All Clear ······································································································ 5-242
Access Window Initial Screen Display Function ··················································· 5-243
User Messages····························································································· 5-247
Setting Disabled Operations ············································································ 5-248
Key Lock ····································································································· 5-250
5-12 Clock Function .................................................................................................... 5-251

14 - KV Nano Series(terminal block type) User’s Manual -


APPENDICES
1 List of PLC Unit Errors············································································ A-2
2 Lists of CR and CM Devices ···································································· A-8
Control Relays (CR)·························································································· A-8
Control Memory Entries CM ············································································· A-18
3 ASCII Code Table ················································································· A-28
ASCII Code Table ·························································································· A-28
4 List of Instructions ··············································································· A-29
5 List of Unusable Instructions································································· A-32
6 List of Abbreviated Mnemonics······························································ A-33
7 List of Shortcut Keys ············································································ A-35
Shortcut Keys That Are Valid in the Unit Editor ····················································· A-35
Shortcut Keys That Are Valid in KV STUDIO························································ A-36
List of GPPQ and GPPA Format Shortcut Keys ···················································· A-41
List of CX Format Shortcut Keys········································································ A-42
How to Use theKey························································································· A-43
8 List of Characters That Cannot Be Used ················································· A-45
9 Precautions When Changing from One KV Nano Series Model to Another·········A-47
Differences Related to Functions Such as CPU Special Hardware Functions·············· A-47
10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model······A-49
Model Replacement Procedure ········································································· A-49
Differences Related to Functions Such as CPU Special Hardware Functions·············· A-55
Device Range Comparison Table ······································································ A-59
Instructions That Have Differences ···································································· A-60
Differences between Control Relays and Control Memory Entries ···························· A-63
Software Settings That Can Be Imported····························································· A-63
Device Assignment Differences········································································· A-63
11 Precautions When Changing from a KV-10/16/24/40 Model to a KV Nano Series Model····· A-64
Model Replacement Procedure ········································································· A-64
Device Range Comparison Table ······································································ A-64
12 Index ·································································································· A-68

- KV Nano Series(terminal block type) User’s Manual - 15


Conventions Used In This Manual
This section describes terminology used in this manual and how to use mnemonic lists.

How to Use Mnemonic Lists

Mnemonic lists are included on the pages in which sample ladder programs are introduced.
You can use mnemonic lists to easily enter ladder programs.

1 Use Adobe Reader to display the manual.

2 Use the "Select" tool to copy a mnemonic list.

3 In the ladder edit area of KV STUDIO, click the cell in which you want to insert a sample ladder
program, then, on the "Edit" menu, click "Edit list" to display the "List edit" dialog box.
Alternative procedure
• Ctrl + D

Paste the copied mnemonic list into the "List edit"


dialog box.
To paste the list, right-click the "List edit" dialog
box, and then click "Paste."

16 - KV Nano Series(terminal block type) User’s Manual -


4 Click "Insert" to display the sample ladder program.

Terminology

This manual uses the following terminology excluding some instances.

Terminology Description
This refers to electronic equipment that you can use to freely control equipment by
Programmable controller
changing programs. They are also called PLC (Programmable Logic Controller).
KV-7500/7300/5500/5000/
This refers to KEYENCE programmable controllers.
3000/1000
CPU unit This refers to the KV-7500/7300/5500/5000/3000/1000.
This refers to the KV-N14**, KV-N24**, KV-N40**, KV-N60A*, and KV-NC32T
KV Nano Series
KEYENCE programmable controllers.
Base unit This refers to the KV Nano Series.
This refers to expansion I/O units and expansion special units, other than the base
Expansion unit
unit, that can be used with the KV Nano Series.
KV Nano Series
This refers to the KV-N14**, KV-N24**, KV-N40**, KV-N60A*.
(terminal block)
KV Nano Series (connector) This refers to the KV-NC32T.
Expansion units This refers to expansion units which connect to the KV Nano series (terminal block)
(terminal block) with a connection cable.
This refers to expansion units which connect to the KV Nano series (connector)
Expansion unit (connector)
with a connection connector.
KV STUDIO This refers to the software that supports the creation of KV Nano Series programs.
Ladder program This refers to programs that are created with KV STUDIO.
This refers to extension serial communication cassettes (KV-N10L and KV-N11L)
Extension cassette
and extension access window cassettes (KV-N1AW).

- KV Nano Series(terminal block type) User’s Manual - 17


MEMO

18 - KV Nano Series(terminal block type) User’s Manual -


OVERVIEW
1
OVERVIEW
This chapter describes information such as the system configuration of the KV
Nano Series, communication channels with PCs, and the occupied areas of
the units.

1-1 System Configuration............................................... 1-2


1-2 Unit I/O Assignments ............................................... 1-8

- KV Nano Series(terminal block type) User’s Manual - 1-1


1-1 System Configuration
OVERVIEW

System Configuration Overview


1
The system configuration of the KV Nano Series is shown below.
System Configuration

Be sure to turn each unit off before you connect them.

(1)
Base unit
KV Nano Series
KV-N14** (4) (5) (6)
KV-N24** Expansion units Connecting Expansion unit
KV-N40** (terminal block) transformer (connector)
Extension serial
(2) communication
cassette
KV-N60** (I/O and special) unit (I/O, special)

(3) Extension access


window cassette
Expansion unit
connection extension cable
(1m)(OP-87581)

• To start the KV Nano Series, you must turn the power on.
Point
Because the power supplies vary depending on the model, check the power
supply before you turn the product on.
100 VAC to 240 VAC input 24 VDC input
• KV-N14AR/KV-N14AT/KV-N14ATP • KV-N14DR/KV-N14DT/KV-N14DTP
• KV-N24AR/KV-N24AT/KV-N24ATP • KV-N24DR/KV-N24DT/KV-N24DTP
• KV-N40AR/KV-N40AT/KV-N40ATP • KV-N40DR/KV-N40DT/KV-N40DTP
• KV-N60AR/KV-N60AT/KV-N60ATP
• The KV-N24**, KV-N40**, and KV-N60** use backup capacitors to store clock
data.
If you do not turn these products on for a long time, the clock data may be lost.
If you want to use the clock data, set it when you start the products. "5-12
Clock Function"
• You can use up to two expansion unit connection extension cables (but do not
use them connected to each other).
• You can connect connector type expansion units using the connecting
transformer unit KV-N1.
• You can connect only 1 each of the connecting transformer units KV-N1 and
KV-NC1.
• You can connect up to eight expansion units (up to three KV-N14** units).
• You can use up to 256 I/O points, 128 on the KV-N14**. (This does not include
the I/O points of the base unit).
• If you connect two or more extension access window cassettes (KV-N1AW) to a
single base unit, the base unit will not operate.

1-2 - KV Nano Series(terminal block type) User’s Manual -


1-1 System Configuration

OVERVIEW
(1) Base Unit

Supply power to the base unit through the terminal block on the top of the unit. You can connect
1

System Configuration
extension cassettes to the cassette slots on the front of the unit. Connect expansion units on the right
side of the unit. You do not need to connect an end unit on the far-right of the expansion units.

"2-2 Base Unit Shared Specifications" (page 2-5)

When you use the extension access window cassette (KV-N1AW), you can read and write ladder
programs and device data to memory cassettes, perform motor control using built-in I/O, and use
functions such as the high-speed counter.
"Chapter 5 CPU BUILT-IN FUNCTIONS"

With the KV Nano Series, you can improve programming efficiency by using functions such as
modules, macros, local devices, and KV scripts.
"Chapter 4 LADDER PROGRAMMING"
"Instruction Reference Manual"
"Script Programming Manual"

(2) Extension Serial Communication Cassette

If you are using an extension serial communication cassette (KV-N10L or KV-N11L), connect it to the
cassette slot of the KV Nano Series. (You cannot connect a cassette when the KV Nano Series is on.
Be sure to turn the KV Nano Series off before you connect the cassette.)
For the KV-N14** and KV-N24**, you can connect one cassette per base unit. For the KV-N40** and
KV-N60**, you can connect two cassettes per base unit. The KV Nano Series operates even if an
extension serial communication cassette is not installed.

(3) Extension Access Window Cassette (With Memory Cassette Function)

If you are using an extension access window cassette (KV-N1AW), connect it to the cassette slot of the
KV Nano Series. (You cannot connect a cassette when the KV Nano Series is on. Be sure to turn the
KV Nano Series off before you connect the cassette.)
You can connect just one cassette per base unit. The KV Nano Series operates even if an extension
access window cassette is not installed.

(4) Expansion units (terminal block)

Be sure to connect expansion I/O units and expansion special units on the right side of the base unit.
You can connect up to eight expansion units (up to three KV-N14** units) per base unit (excluding some
expansion units).
"2-7 Expansion Input Unit (KV-N8EX and KV-N16EX)" (page 2-47)
"2-8 Expansion Output Unit (KV-N8ER/ET/ETP and KV-N16ER/ET/ETP)" (page 2-51)
"2-9 Expansion I/O Unit (KV-N8EXR and KV-N8EXT)" (page 2-56)
"Expansion Special Unit User's Manuals"

- KV Nano Series(terminal block type) User’s Manual - 1-3


1-1 System Configuration
OVERVIEW

(5) Connecting transformer unit


1 The connecting transformer unit must be installed to the right of the base unit. Up to 1 connecting
System Configuration

transformer unit can be connected to 1 base unit.


"2-12 Connecting transformer unit (KV-N1)" (page 2-67)

(6) Expansion unit (connector)

When installing the connector type expansion I/O unit or special expansion unit on the base unit
(terminal block), be sure to install it to the right of the connecting transformer unit (KV-N1). Up to 8 units
can be connected to the base unit together with a terminal block type expansion unit. (Excluding some
expansion units)
"KV Nano Series (terminal block) User's Manual"
"Each Special Expansion Unit's User's Manual"

1-4 - KV Nano Series(terminal block type) User’s Manual -


1-1 System Configuration

OVERVIEW
Connecting to Communication Devices

This section describes the communication channels that are used to perform communications between
1
the KV Nano Series and a PC or touch panel.

System Configuration
Reference The environmental specifications vary depending on the devices used. Use the devices
after first checking their environmental specifications.

 When communicating with a PC


Direct connection

Base unit
KV Nano Series
KV-N14/N24/N40/N60
USB port (USB communication)

Serial port (RS-232C)

Serial port (RS-232C)

KV-N10L
Port 0 Port 1 Port 2
Serial port (RS-422A/485)

KV-N11L I/F level converter


N-42/N-48

Connecting through the VT Series or DT Series

Base unit
KV Nano Series
KV-N14/N24/N40/N60 Serial port
(RS-232C) USB port
(USB communication)

Serial port Serial port


(RS-232C) VT3 Series (RS-232C)

KV-N10L
Serial port
(RS-422A/485)*
Ethernet port
VT3-E3 (Ethernet)

KV-N10L DT Series
* You cannot use the RS-485 interface to connect through the DT Series.

• To perform communications through the USB interface, you have to install the
Point
USB driver.
• If your operating system is Windows 7, Windows Vista, or Windows XP, the
driver will be automatically installed when you install KV STUDIO. For Windows
2000, you may have to install the USB driver manually.
• For the procedure for installing the USB driver, see "5-8 USB
Communication" (page 5-192).
• For the DC power supply type, the SGs of the base unit's USB and serial ports
are shared with 0 V of the power supply. A potential difference between the
product being connected to and the SGs will lead to damage to the base unit
and to the product being connected to.
- KV Nano Series(terminal block type) User’s Manual - 1-5
1-1 System Configuration
OVERVIEW

 When communicating with a KV-D30

1  When supplying power from the modular connector


System Configuration

Open the connector


cover, and then
connect the modular
connector. Modular cable (2.5 m)

• Insert the modular cable included with the unit into the communication
port on the rear panel of the KV-D30.

When you are supplying power from the modular connector, the KV-D30 cannot
Point
be used in an environment that has an ambient temperature of 40°C or higher.

 When supplying power from an external 24 VDC source

Open the connector


cover, and then
connect the modular
connector. 24 VDC
Modular cable (2.5 m or 5 m)
power supply

• Insert the modular cable included with the unit into


the communication port on the rear panel of the
KV-D30.
• Connect the power cable to the 24V and GND
terminals on the rear panel of the KV-D30.

• The B, MR, LR, W, Z, and C devices cannot be used in operator mode.


Point
• When classifying the devices that can be used with the KV Nano Series, all
device numbers that are within the specified ranges can be used. (However,
CTH2 and CTH3 and CTC4 to CTC7 cannot be used.)
• You cannot use the memory card function.
• You cannot use the unit monitor function.
• In the default settings, the CM devices for KV-D30 settings (CM0000 to CM0499)
are not held when a power outage occurs.
To use functions such as the screen holding function, enable the "Retain
KV-D30 Setting" setting under "Power off holding" in the CPU system settings.
For details on the KV-D30, see the "KV-D30 User's Manual."
• You cannot display the alarm log. "No Record" (indicating that no alarm log is
present) is displayed at all times.
• You cannot clear the alarm log.
• Only the built-in serial (port 0) function operates.
• Set the KV Nano series END processing time to 1.0 ms, or set the scan time to a
value 1 to 1.5 times bigger.
1-6 - KV Nano Series(terminal block type) User’s Manual -
1-1 System Configuration

OVERVIEW
Current Consumption Calculation

With the KV Nano Series, power is supplied to the extension cassettes and expansion units from the
1

System Configuration
base unit. What's more, the AC power supply type base unit (KV-N**A*) has a service power supply
(24 V). Use the KV Nano Series so that the total current consumption from supplying power to the
expansion units and from the service power supply is less than the rated value.

 DC power supply type (KV-N**D*)

Power supplied from the base unit Rated value of the base unit (2 A)

 AC power supply type (KV-N**A*)

Power supplied from the base Power supplied


unit's service power supply Rated value of the base unit (0.6 A)
from the base unit

Temperature controller

• If the current consumption exceeds the rated value, the AC power supply type
Point
KV Nano Series will operate as shown below.
• The power LED will light in orange, and operations will be stopped.
• Power supply to the expansion units and to the service power supply will
be stopped.
• If you are using extension access window cassettes, the access window
displays will be turned off.
• To recover the system to normal operation, turn the power off, remove the
cause of the overcurrent, and then turn the power on.
• If the current consumption exceeds the rated value, the DC power supply type
KV Nano Series will operate as shown below.
• The built-in fuse will blow.
To recover the system to normal operation, repairs are required.
* Even if you connect the maximum number of devices, the current
consumption will not exceed the rated value.

- KV Nano Series(terminal block type) User’s Manual - 1-7


1-2 Unit I/O Assignments
OVERVIEW

I/O Relay Assignment Rules


1
The KV Nano Series I/O relays are assigned according to the following rules when the power is turned on.
Unit I/O Assignments

1.The leading numbers of the I/O relays are R (the expansion unit number) × 1000.
For the first unit from the left, the leading number of the I/O relay is R1000 because 1 × 1000 =
1000.
For the third unit from the left, the leading number of the I/O relay is R3000 because 3 × 1000 =
3000.
2.For input relays, 000 is added to the relay number. For output relays, 500 is added to the
relay number.
The assigned relay number differs depending on whether the relay is an input or output relay.

The connecting transformer units KV-N1 and KV-NC1 are not assigned relay
Point
numbers and are not added to the number of units.

 Base unit I/O relay addresses

Base Unit Input Relays Output Relays


KV-N14** R000 to R007 R500 to R505
KV-N24** R000 to R013 R500 to R509
KV-N40** R000 to R107 R500 to R515
KV-N60** R000 to R203 R500 to R607

 I/O relay addresses when an expansion unit is connected


Input units
Connected unit KV-NC16EX
KV-N8EX KV-NC32EX
number KV-N16EX
1 R1000 to R1007 R1000 to R1015 R1000 to R1115
2 R2000 to R2007 R2000 to R2015 R2000 to R2115
3 R3000 to R3007 R3000 to R3015 R3000 to R3115
4 R4000 to R4007 R4000 to R4015 R4000 to R4115
5 R5000 to R5007 R5000 to R5015 R5000 to R5115
6 R6000 to R6007 R6000 to R6015 R6000 to R6115
7 R7000 to R7007 R7000 to R7015 R7000 to R7115
8 R8000 to R8007 R8000 to R8015 R8000 to R8115

Output units
Connected unit KV-NC8ER KV-NC16ET(P)
KV-NC32ET
number KV-N8** KV-N16**
1 R1500 to R1507 R1500 to R1515 R1500 to R1615
2 R2500 to R2507 R2500 to R2515 R2500 to R2615
3 R3500 to R3507 R3500 to R3515 R3500 to R3615
4 R4500 to R4507 R4500 to R4515 R4500 to R4615
5 R5500 to R5507 R5500 to R5515 R5500 to R5615
6 R6500 to R6507 R6500 to R6515 R6500 to R6615
7 R7500 to R7507 R7500 to R7515 R7500 to R7615
8 R8500 to R8507 R8500 to R8515 R8500 to R8615

1-8 - KV Nano Series(terminal block type) User’s Manual -


1-2 Unit I/O Assignments

OVERVIEW
I/O units
Connected unit KV-N8EXR/KV-N8EXT KV-NC16EXT
number Input Relays Output Relays Input Relays Output Relays 1
1 R1000 to R1007 R1500 to R1507 R1000 to R1015 R1500 to R1515

Unit I/O Assignments


2 R2000 to R2007 R2500 to R2507 R2000 to R2015 R2500 to R2515
3 R3000 to R3007 R3500 to R3507 R3000 to R3015 R3500 to R3515
4 R4000 to R4007 R4500 to R4507 R4000 to R4015 R4500 to R4515
5 R5000 to R5007 R5500 to R5507 R5000 to R5015 R5500 to R5515
6 R6000 to R6007 R6500 to R6507 R6000 to R6015 R6500 to R6515
7 R7000 to R7007 R7500 to R7507 R7000 to R7015 R7500 to R7515
8 R8000 to R8007 R8500 to R8507 R8000 to R8015 R8500 to R8515

Connected unit KV-NC32EXT


number Input Relays Output Relays
1 R1000 to R1115 R1500 to R1615
2 R2000 to R2115 R2500 to R2615
3 R3000 to R3115 R3500 to R3615
4 R4000 to R4115 R4500 to R4615
5 R5000 to R5115 R5500 to R5615
6 R6000 to R6115 R6500 to R6615
7 R7000 to R7115 R7500 to R7615
8 R8000 to R8115 R8500 to R8615

I/O Relay Assignment


When expansion I/O units are connected to the base unit, the KV Nano Series I/O relays are assigned
relay numbers automatically when the power is turned on. Therefore, you do not have to use the Unit
Editor to set the relay numbers to occupy and to change the unit settings (however, you can use the
Unit Editor to configure these settings manually).
• When expansion units other than the expansion I/O units (for example,
Point expansion analog I/O units) are connected, you have to use the Unit Editor to
configure the settings.
• When you are transferring the information that you have used the Unit Editor to
configure to the base unit, if this information differs from the information of the
devices that are actually connected, a number of units error or a unit
classification error will occur, and you will not be able to operate the system.
• The connecting transformer units KV-N1 and KV-NC1 are not assigned relay
numbers.

- KV Nano Series(terminal block type) User’s Manual - 1-9


1-2 Unit I/O Assignments
OVERVIEW

Unit Reservation
1 With the KV Nano Series, you can use the unit reservation function to use the same project to manage
units even if the unit configuration is different. For example, even if you have an installation in which an
Unit I/O Assignments

expansion analog I/O unit is attached as an option, you can use the same project to operate the
system. This makes project management easy.

Project A
0 1 2 3

C2 - -
OUT V2+ I2+ -

KV-N3AM
Unit reservation made
for the KV-N3AM
POWER

ERROR

C0 V1+ I1+
IN V0+ I0+ C1

Configuration A Configuration B

C2 - -
OUT V2+ I2+ -

KV-N3AM
POWER

ERROR

C0 V1+ I1+
IN V0+ I0+ C1

Operation is possible Operation is possible

• When you make a reservation for a unit, if the unit is present in the actual
Point
configuration, a unit configuration error will not occur, and the system will
operate normally.
• Regarding units other than the ones that you are making reservations for, if the
information that you have used the Unit Editor to configure differs from the
information of the devices that are actually connected, a number of units error or a
unit classification error will occur, and you will not be able to operate the system.
• If you use the number of a unit that is not present in the actual configuration (a
reserved unit) as an operand in an instruction (a macro instruction or other
instruction), an error will not occur during conversion, but an operation error (a
minor error) will occur during execution. You can use the following methods to
avoid calculation errors.
• Include the expansion unit presence relay in a logical AND with the execution
conditions.
• Configure the CPU system settings (the operation when an error occurs) so
that the CPU operation is set to continuation (to ignore errors).

• You can use the expansion unit n presence relays (CR2201 to CR2208) to check
Reference
whether the expansion units of each unit number are actually connected.
• You can add expansion units to the right of reserved units.
• If you make consecutive reservations for multiple instances of the same unit to
connect less units in the actual configuration than the total number of units that you
have specified, the connected units operate with unit numbers assigned from the left.
For example, if you make reservations for unit numbers 1, 2, and 3 as KV-N16EXTs,
but only use two KV-N16EXTs, the connected units will be recognized as unit
numbers 1 and 2 when they operate (you cannot have a gap between unit numbers
such as assigning unit numbers 1 and 3).
1-10 - KV Nano Series(terminal block type) User’s Manual -
SPECIFICATIONS
2
SPECIFICATIONS
This chapter provides the specifications of and describes how to wire the KV
Nano Series base unit, expansion I/O unit, extension serial communication
cassette, and extension access window cassette.

2-1 Series Common Specifications ................................ 2-2


2-2 Base Unit Shared Specifications .............................. 2-5
2-3 Wiring and Internal Circuit Diagrams of the 14-Point
Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP) ......... 2-15
2-4 Wiring and Internal Circuit Diagrams of the 24-Point
Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP) ......... 2-22
2-5 Wiring and Internal Circuit Diagrams of the 40-Point
Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP) ......... 2-29
2-6 Wiring and Internal Circuit Diagrams of the 60-Point
Base Unit (KV-N60AR/AT/ATP).............................. 2-37
2-7 Expansion Input Unit (KV-N8EX and KV-N16EX)
............................................................................... 2-47
2-8 Expansion Output Unit
(KV-N8ER/ET/ETP and KV-N16ER/ET/ETP)......... 2-51
2-9 Expansion I/O Unit (KV-N8EXR and KV-N8EXT)
............................................................................... 2-56
2-10 Extension Serial Communication Cassette
(KV-N10L and KV-N11L) ........................................ 2-60
2-11 Extension Access Window Cassette (KV-N1AW)
............................................................................... 2-65
2-12 Connecting transformer unit (KV-N1) ..................... 2-67

- KV Nano Series(terminal block type) User’s Manual - 2-1


2-1 Series Common Specifications
SPECIFICATIONS

This section provides the specifications of the KV Nano Series and describes the operation of the KV
Nano Series when the power is turned off.

General Specifications
2
Item Specification
Series Common Specifications

AC power supply type DC power supply type


Power supply type KV-N14AR/AT/ATP KV-N24AR/AT/ATP KV-N14DR/DT/DTP KV-N24DR/DT/DTP
KV-N40AR/AT/ATP KV-N60AR/AT/ATP KV-N40DR/DT/DTP
Supply voltage 100 to 240 VAC (+10%, -15%) 24 VDC (+10%, -15%)
Output power supply
24 VDC (±10%; output capacity: 0.6 A) -
voltage
KV-N14AR: 76 VA, KV-N14AT(P): 75 VA, KV-N14DR: 160 mA, KV-N14DT(P): 150 mA,
Internal current KV-N24AR: 79 VA, KV-N24AT(P): 76 VA, KV-N24DR: 190 mA, KV-N24DT(P): 160 mA,
consumption KV-N40AR: 86 VA, KV-N40AT(P): 82 VA, KV-N40DR: 280 mA, KV-N40DT(P): 250 mA
KV-N60AR: 91 VA, KV-N60AT(P): 85 VA (*VA is calculated with a power factor of 30%.)
Operating ambient
0 to 55°C (no icing)*1, 2
temperature
Storage temperature -25 to +75°C
Operating ambient
5 to 95%RH (no condensation)*1
humidity
1500 VAC for 1 minute, between power supply terminal and I/O terminals and between
all external terminals and case
Withstand voltage
(1000 VAC for 1 minute, between the power supply and the output terminals for the
transistor output expansion I/O unit)
1500 V peak-to-peak or more, pulse width 1µs, 50 ns (by noise simulator)
Noise immunity
Conforms to IEC standards (IEC61000, 4-2/3/4/6)
Number of
Intermittent vibration
scans
Frequency Acceleration Amplitude
5 to 9 Hz - 3.5 mm
Conforms to
Vibration resistance*3 JIS B 3502 and 9 to 150 Hz 9.8 m/s2 - 10 times (100
IEC61131-2 minutes) in each
Continuous vibration
of the X, Y, and
Frequency Acceleration Amplitude Z directions
5 to 9 Hz - 1.75 mm
9 to 150 Hz 4.9 m/s2 -
Acceleration: 150 m/s2. Application time: 11 ms. Three times in each of the X, Y, and Z
Shock resistance
directions.
50 MΩ or more (500 VDC megger used to perform measurements between power
Insulation resistance
terminal and input terminals, and between all external terminals and case)
Operating environment As little dust and corrosive gases as possible
Operating altitude 2,000 m or less
AC: II
Overvoltage category
DC: I
Pollution degree 2
KV-N14AR: 430 g, KV-N14AT(P): 420 g, KV-N14DR: 350 g, KV-N14DT(P): 330 g,
KV-N24AR: 500 g, KV-N24AT(P): 470 g, KV-N24DR: 420 g, KV-N24DT(P): 390 g,
Weight
KV-N40AR: 660 g, KV-N40AT(P): 620 g, KV-N40DR: 580 g, KV-N40DT(P): 530 g
KV-N60AR: 820 g, KV-N60AT(P): 750 g

*1 The range in which the system is guaranteed (excluding items specially noted for the units and cassettes).
*2 Indicated on the lower, central part (30 mm) of the unit in the industrial control panel.
*3 These specifications correspond to situations in which the unit is mounted on a DIN rail and in which the unit
is mounted on another unit directly.

The KV Nano Series does not have battery backup, it uses backup capacitors to
Point store clock data (the KV-N14** does not have clock data). For the period that clock
data is held, see "How to set clock data (excluding the KV-N14**)" (page 3-21).

2-2 - KV Nano Series(terminal block type) User’s Manual -


2-1 Series Common Specifications

SPECIFICATIONS
Performance Specifications

Specification
Item
KV-N14** KV-N24** KV-N40** KV-N60** 2
Calculation control method Program storage method

Series Common Specifications


I/O control method Refresh method
Program language Expanded ladder, KV script, mnemonic
Base instructions: 81 kinds and 182 instructions
Application instructions: 39 kinds and 56 instructions
Number of instructions Calculation instructions: 123 kinds and 311 instructions
Expansion instructions: 92 kinds and 141 instructions
Total: 335 kinds and 690 instructions
Base instructions 50 ns minimum
Instruction
Application
execution speed 170 ns minimum
instructions
Program capacity 8 k steps 16 k steps
Maximum number of attachable I/O units 3 8
Maximum number of I/O points (excluding
128*5 256*5
the base unit I/O)
Input relay R
Output relay R Total: 9600 points1 bit (R000 to R59915)
Internal auxiliary relay R
Link relay B 8192 points 1 bit (B0 to B1FFF)
Internal auxiliary relay MR 9600 points 1 bit (MR000 to MR59915)
Latch relay LR 3200 points 1 bit (LR000 to LR19915)
Control relay CR 1440 points 1 bit (CR000 to CR8915)
Timer T 512 points 32 bits (T0 to T511)
Counter C 256 points 32 bits (C0 to C255)
Data memory DM 32768 points 16 bits (DM0 to DM32767)
Link register W 16384 points 16 bits (W0 to W3FFF)
Temporary memory TM 512 points 16 bits (TM0 to TM511)
2 points 3 points 4 points
(CTH0 and CTH1) (CTH0 to CTH2) (CTH0 to CTH3)
High-speed counter CTH 32-bit automatic reset counter*1
(Input response: 100 kHz per single phase, 50 kHz per phase
difference)*2
4 points 6 points 8 points
High-speed counter comparator CTC (CTC0 to CTC3) (CTC0 to CTC5) (CTC0 to CTC7)
32 bits, two points per high-speed counter
Index register Z 12 points 32 bits (Z01 to Z12)
Control memory CM 9000 points 16 bits (CM0 to CM8999)
2 axes 3 axes 4 axes
Positioning pulse output*3
Maximum output frequency: 100 kHz (KV-N***T (P) only)
Input: Input: Input: Input:
8 points 14 points 24 points 36 points
Output: Output: Output: Output:
6 points 10 points 16 points 24 points
Base unit I/O Input common: Input common: Input common: Input common:
1 point 1 point 1 point 1 point
Output common: Output common: Output common: Output common:
4 points (R type) 5 points (R type) 6 points (R type) 8 points (R type)
1 point (T/TP type) 1 point (T/TP type) 1 point (T/TP type) 1 point (T/TP type)

- KV Nano Series(terminal block type) User’s Manual - 2-3


2-1 Series Common Specifications
SPECIFICATIONS

Specification
Item
KV-N14** KV-N24** KV-N40** KV-N60**
Number of 10,000 20,000
Device comments
comments and When a maximum-length ladder program is written with no labels.

2 labels that can be


stored in the main Labels
14,000 28,000
When a maximum-length ladder program is written with no device comments.
unit
Series Common Specifications

Power off hold Program memory Flash ROM can be rewritten 10,000 times
function Devices*4 Nonvolatile RAM
Self-diagnosis function CPU error, RAM error, and other problems
*1 You can also configure the settings so that automatic reset is not performed.
*2 Only open collectors are supported. Line drivers are not supported.
*3 The relay output types (KV-N***R) do not have the positioning pulse output function.
*4 You can set the target device by clicking "CPU system setting" and then "Power off holding" in KV STUDIO.]
*5 This may be limited by the maximum number of installable I/O units.

Operation during Power Outages

Low supply voltage


• If the supply voltage decreases, the KV Nano Series stops, and the output is turned off.
Automatic recovery
• When the supply voltage recovers, operation is automatically restarted.
Temporary power outages
• For AC power supplies, if an outage of less than 10 ms occurs, operation continues. For DC power
supplies, if an outage of less than 5 ms occurs, operation continues.

2-4 - KV Nano Series(terminal block type) User’s Manual -


2-2 Base Unit Shared Specifications

SPECIFICATIONS
About the Base Unit Model Number

 Base unit model number notation


The notation of the KV Nano Series base unit model number is shown below.
2

Base Unit Shared Specifications


K V - N 2 4 A R Output format R: Relay output. T: Transistor output (sink)
TP: Transistor output (source).
Power supply format A: AC power supply type. D: DC
power supply type.
Number of I/O points 14: 14 points. 24: 24 points.
40: 40 points. 60: 60 points.

 Unit type
There are the following seven types of the KV Nano Series base unit.
Terminal block AC power supply relay output type . . . . . . . . . . . . KV-N14AR, KV-N24AR, KV-N40AR, and KV-N60AR
Terminal block AC power supply transistor output (sink) type . . . . KV-N14AT, KV-N24AT, KV-N40AT, and KV-N60AT
Terminal block AC power supply transistor (source) output type . . . KV-N14ATP, KV-N24ATP, KV-N40ATP, and KV-N60ATP
Terminal block DC power supply relay output type . . . . . . . . . . . . KV-N14DR, KV-N24DR, and KV-N40DR
Terminal block DC power supply transistor output (sink) type. . . . KV-N14DT, KV-N24DT, and KV-N40DT
Terminal block DC power supply transistor (source) output type . . .KV-N14DTP, KV-N24DTP, and KV-N40DTP
Connector DC power supply transistor output (sink) type. . . . . . . KV-NC32T
* This manual describes the terminal block type unit.
For details on other units, see the "KV Nano Series (connector type) User's Manual".

Package Contents

The package contains the following items. Before you use the product, make sure that the package
contains everything that it is supposed to contain.

Base unit User's manual


KV-N14, KV-N24, KV-N40, or KV-N60

KEYENCE

KV Nano Series
User's Manual

The utmost care has been exercised in packing the items, however, in the event that items malfunction
or are damaged, contact your KEYENCE representative.

- KV Nano Series(terminal block type) User’s Manual - 2-5


2-2 Base Unit Shared Specifications
SPECIFICATIONS

Names and Functions of Parts

 KV-N14** and KV-N24**


2 During standard usage
Base Unit Shared Specifications

Base unit front panel


(5) Input indicators
(1) Terminal block
cover
(6) Expansion unit connection
connector cover
(2) Main unit operations (7) POWER LED
area cover
(8) RUN LED

(3) Modular connector (9) ERROR LED


cover
(10) USB access LED
(4) Extension cassette
socket cover (11) SD/RD LED

(12) Output indicators

When the covers are open

Base unit front panel

(13) Power supply input (20) Input terminals


terminals
(14) RUN-PROG selector and
error clear switch
(15) Analog volume knobs (21) Expansion unit
(16) USB port connection
connector
(17) Modular connector
(18) Extension cassette
(19) Power supply output (22) Output terminals
terminals

Do not connect a USB cable to the modular connector (doing so may damage the
NOTICE
product).

2-6 - KV Nano Series(terminal block type) User’s Manual -


2-2 Base Unit Shared Specifications

SPECIFICATIONS
 KV-N40** and KV-N60**
During standard usage

Base unit front panel

(1) Terminal block


cover
(5) Input indicators
2
(6) Expansion unit
connection connector

Base Unit Shared Specifications


cover
(2) Main unit operations
area cover
(7) POWER LED
(8) RUN LED
(3) Modular connector (9) ERROR LED
cover
(10) USB access LED
(4) Extension cassette (11) SD/RD LED
socket cover
(12) Output indicators

When the covers are open

(13) Power supply Base unit front panel


input terminals
(20) Input
(14) RUN-PROG terminals
selector and error
clear switch
(15) Analog volume
knobs (21) Expansion
(16) USB port unit
(17) Modular connector connection
connector
(18) Extension
cassette connector
(22) Output
(19) Power supply output terminals
terminals

Do not connect a USB cable to the modular connector (doing so may damage the
NOTICE
product).

Number Name Function


(1) Terminal block cover This is the terminal block protective cover.
(2) USB port cover This is the USB port protective cover.
(3) Modular connector cover This is the modular connector protective cover.
(4) Extension cassette socket This is the extension cassette socket protective cover.
cover Remove this when you want to use an extension cassette.
(5) Input indicators These indicate the conduction status of the input terminals.
Lit in red : Conducting.
Off : Not conducting.
(6) Expansion unit connection This cover protects the connector that is used to connect an
connector cover expansion unit.
(7) POWER LED This indicates the power status.
Lit in green : Power is on.
Lit in orange : Operation has been stopped because of an
excessive current consumption error.
Off : Power is off.

- KV Nano Series(terminal block type) User’s Manual - 2-7


2-2 Base Unit Shared Specifications
SPECIFICATIONS

Number Name Function


(8) RUN LED When the power is on, this indicates the unit operation status.
Lit in green : RUN mode.
Off : PROG mode.
Blinking in green : Forced set or reset registration is in progress,
2 (9) ERROR LED
input refresh is disabled, or output is disabled.
When the power is on, this indicates the unit error status.
Lit in red: A serious error has occurred (operation has been
Base Unit Shared Specifications

stopped).
Blinking in red (blinking at 2-second intervals): A minor error or an
alarm has occurred.
Off: No errors have occurred.
(10) USB access LED This lights to indicate that data is being transferred over USB.
(11) SD/RD LED This lights to indicate that serial communications are being
performed.
RD: Lights in red when data is being received.
SD: Lights in green when data is being transmitted.
(During data transmission and reception, this may appear to light in
orange.)
(12) Output indicators These indicate the output status of the output terminals.
Lit in red : Output is being generated.
Off : Output is not being generated.
(13) Power supply input These are the connectors for the power supply input (100 to 240
terminals VAC for the AC power supply type and 24 VDC for the DC power
supply type).
(14) RUN-PROG selector
This switch changes the mode between RUN mode and PROG
switch and error clear
mode.
switch
Also, use this switch when you want to clear errors.

(15) Analog volume knobs These set the analog volume values.
Vol.0: CM1630 (two words; 0 to 255)
Vol.1: CM1632 (two words; 0 to 255)
(*You can easily scale the analog volume values by using the APR
instruction. For details, see the ARP instruction in the KV-
7000/5000/3000/1000 Series and KV Nano Series "Instruction
Reference Manuals.")
(16) USB port This is the port for connecting to the USB interface.
(17) Modular connector This is the connector for connecting a modular plug. Use this
connector to connect a PC, touch panel, or similar device.
(18) Extension cassette This is the connector for connecting to an extension cassette. Use
connector this when you want to extend the number of access windows or
serial communication ports that are available.
(19) Service power supply These are the 24 VDC output terminals for the service power supply.
terminals Use these to supply power to a sensor or similar device.
(*Do not supply 24 V to the service power supply terminal.)
(20) Input terminals These terminals are used to receive input.
Expansion unit connection
(21) This connector is used to connect an expansion unit.
connector
(22) Output terminals These terminals are used to generate output.

• Communication may be interrupted if the USB communication status is


Point
unstable due to noise or other factors.
In this situation, disconnect the USB cable, and then reinsert it.
• If the communication status is extremely unstable (in environments with severe
noise), pass the cable through a ferrite core. This also serves to protect the PC.

Do not connect a USB cable to the modular connector (doing so may damage the
NOTICE product).

2-8 - KV Nano Series(terminal block type) User’s Manual -


2-2 Base Unit Shared Specifications

SPECIFICATIONS
Specifications

 Input specifications
 General input 2
KV-N14**: R000 to R003 (4 points)

Base Unit Shared Specifications


KV-N24**: R000 to R003 and R008 to R013 (10 points)
KV-N40**: R000 to R007 and R014 to R107 (18 points)
KV-N60**: R000 to R007 and R100 to R203 (28 points)*1
Item 24 VDC Input (Open Collector)
Maximum input voltage 26.4 VDC
Rated input voltage 24 VDC (5.3 mA*2)
Minimum ON voltage 19 VDC
Maximum OFF current 1.5 mA
Maximum OFF voltage −
Common method All points/1 common (1 terminal)
OFF to ON: Max. 30 µs (Typ. 3.5 µs)
ON to OFF: Max. 50 µs (Typ. 15 µs)
Circuit delay time*3 *The values are as shown below for R108 to R203 of the KV-N60**.
OFF to ON: Max. 50 µs (Typ. 7 µs)
ON to OFF: Max. 150 µs (Typ. 70 µs)
Normal: 10 ms
When using the HSP instruction: 10 µs
When CR2305 is turned ON: 10 µs to 10 ms, eight-level switching is possible
(set with CM1620)
You can also use the Unit Editor to configure this setting.
Delay according to the input time constant

Input Time Constant Setting Digital Filter


Input time constant*3 10 µs 1.6 to 2 µs
20 µs 9 to 12 µs
110 µs 90 to 93 µs
500 µs 300 to 400 µs
1 ms 800 to 900 µs
2.5 ms 2.3 to 2.4 ms
5 ms 4.0 to 4.5 ms
10 ms 9 to 9.5 ms

"Input Time Constant Setting" (page 5-198)


"Input circuit diagram" (page 2-15)
*1 For R108 to R203, the response time increases.
*2 This is a reference value for the input current.
*3 The input response time corresponding to the input time constant can be calculated as shown below.
(Response time) = (circuit delay of the input circuit) + (delay according to the digital filter)
Example) Maximum response time when the input time constant is set to 500 µs
OFF to ON 30 µs (circuit delay) + 400 µs (digital filter) = 430 µs
ON to OFF 50 µs (circuit delay) + 400 µs (digital filter) = 450 µs

- KV Nano Series(terminal block type) User’s Manual - 2-9


2-2 Base Unit Shared Specifications
SPECIFICATIONS

 High-speed A-phase and B-phase input


KV-N14**: R004 to R007 (2 channels for a total of 4 points)
KV-N24**: R004 to R007 (2 channels for a total of 4 points)
KV-N40**: R008 to R013 (3 channels for a total of 6 points)
KV-N60**: R008 to R015 (4 channels for a total of 8 points)
2 Item 24 VDC Input (Open Collector)
Maximum input voltage 26.4 VDC
Base Unit Shared Specifications

Rated input voltage 24 VDC (6.5 mA*1)


Minimum ON voltage 19 VDC
Maximum OFF current 1.5 mA
Maximum OFF voltage -
Common method Shared common for all points (shared with general input)
OFF to ON: Max. 2 µs (Typ. 1.1 µs)
Circuit delay time*2
ON to OFF: Max. 2 µs (Typ. 0.3 µs)
Normal: 10 ms
When using the HSP instruction: 10 µs
When CR2305 is turned ON: 10 µs to 10 ms, eight-level switching is possible
(set with CM1620)
You can also use the Unit Editor to configure this setting.

Input Time Constant Setting Digital Filter


10 µs 1.6 to 2 µs
Input time constant*2 20 µs 9 to 12 µs
110 µs 90 to 93 µs
500 µs 300 to 400 µs
1 ms 800 to 900 µs
2.5 ms 2.3 to 2.4 ms
5 ms 4.0 to 4.5 ms
10 ms 9 to 9.5 ms
"Input Time Constant Setting" (page 5-198)
Single-phase: 100 kHz
Response frequency Phase difference: 50 kHz
24 V ± 10%, duty cycle 50%
"Input circuit diagram" (page 2-17)
*1 This is a reference value for the input current.
*2 The input response time corresponding to the input time constant can be calculated as shown below.
(Response time) = (circuit delay of the input circuit) + (delay according to the digital filter)
Example) Maximum response time when the input time constant is set to 10 µs
OFF to ON 2 µs (circuit delay) + 2 µs (digital filter) = 4 µs
ON to OFF 2 µs (circuit delay) + 2 µs (digital filter) = 4 µs
Input wave diagrams (high-speed A-phase and B-phase input)
Single phase, 100 kHz, duty cycle 50% Phase difference, 50 kHz, duty cycle 50%
* The rising and falling width is 1.8 µs or less. * There are 2.5 µs or more between the change start points
(and end points) of phases A and B.
20μs or more

10 μs or more ON

A-phase, 50%
5 μs or more 5μs or more
OFF
ON ON

50% A-phase, 50%

OFF OFF
1.8μs or less 1.8μs or less T1 T2 T3 T4
T1, T2, T3, T4: 2.5μs or more
* If the impedance of the connecting wire is large, note that the input waveform may not meet the description given
above after the wave passes through the connecting wire.

2-10 - KV Nano Series(terminal block type) User’s Manual -


2-2 Base Unit Shared Specifications

SPECIFICATIONS
 Output specifications

 High-speed output (transistor output type only)


KV-N14*T(P): R500 to R503 (4 points)
KV-N24*T(P): R500 to R503 (4 points) 2
KV-N40*T(P): R500 to R505 (6 points)

Base Unit Shared Specifications


KV-N60*T(P): R500 to R507 (8 points)
Specification
Item Transistor Output (Sink/Source) Type
(KV-N***T(P))
Output mode MOSFET output*1
Rated load 30 VDC, 0.5 A
Maximum OFF voltage 30 VDC
Leakage OFF current 100 µA or less
0.8 VDC or less (with 0.5 A output)
Residual ON voltage
0.6 VDC or less (with 0.3 A output)
ON resistance −
Minimum applicable load −
Common method 8 to 10 points/1 common
OFF to ON: 2 µs (load of 7 mA or more)
ON/OFF response time
ON to OFF: 5 µs (load of 7 mA or more)
Overcurrent protection Protection provided for each common*2
Output frequency 100 kHz (7 to 100 mA load)
"Output circuit diagram" (page 2-16)
*1 Sink output types use MOSFET (N-ch) output. Source output types use MOSFET (P-ch) output.
*2 If an overcurrent occurs, until the cause of the problem is removed, the protection operation (output
turning OFF) and automatic recovery occur repeatedly for all outputs within the shared common.

Output waveform (high-speed output; transistor output type)


Output frequency: 100 kHz (duty cycle 50%; load current: 7 to 100 mA)
2.5 μs or more 2.5 μs or more

OFF90%

10%
ON

* The load of the above waveform is a resistive load. The influence of the connecting wire is not considered.
If the impedance of the connecting wire is large, note that the ON/OFF width might be smaller than the values written
above.

- KV Nano Series(terminal block type) User’s Manual - 2-11


2-2 Base Unit Shared Specifications
SPECIFICATIONS

 General output
Relay output type Transistor output type
KV-N14*R: R500 to R505 (6 points) KV-N14*T(P): R504 and R505 (2 points)
KV-N24*R: R500 to R509 (10 points) KV-N24*T(P): R504 to R509 (6 points)
KV-N40*R: R500 to R515 (16 points) KV-N40*T(P): R506 to R515 (10 points)
2 KV-N60*R: R500 to R607 (24 points) KV-N60*T(P): R508 to R607 (16 points)
Specification
Base Unit Shared Specifications

Item Relay Output Type Transistor Output (Sink/Source) Type


(KV-N***R) (KV-N***T(P))
Output mode Relay MOSFET output*1
Rated load 250 VAC/30 VDC, 2 A 30 VDC, 0.5 A
Maximum OFF voltage - 30 VDC
Leakage OFF current - 100 µA or less
0.8 VDC or less (with 0.5 A output)
Residual ON voltage -
0.6 VDC or less (with 0.3 A output)
ON resistance 50 mΩ or less -
100 µA/100 mVDC
Minimum applicable load -
(reference value)
Common method 2 to 4 points/1 common 8 to 10 points/1 common
OFF to ON: 100 µs (load of 1 mA
or more)
ON/OFF response time 10 ms or less
ON to OFF: 200 µs (load of 1 mA
or more)
Protection provided for each
Overcurrent protection -
common*2
Output frequency - -
Electrical: 100,000 times or more
Relay life (20 times/min) -
Mechanical: 20,000,000 times or more
Relay replacement Impossible -
"Output circuit diagram" (page 2-18)
* The relay output types have the same specifications for high-speed output and general output.
*1 Sink output types use MOSFET (N-ch) output. Source output types use MOSFET (P-ch) output.
*2 If an overcurrent occurs, until the cause of the problem is removed, the protection operation (output
turning OFF) and automatic recovery occur repeatedly for all outputs within the shared common.
 Serial communication specifications

Built-In Serial Port


Communication standard RS-232C
Interface
Connection Modular connector
1200, 2400, 4800, 9600, 19200, 38400,
Baud rate
57600, 115200 bps
Transmission method Full duplex
Start bit 1 bit
Transmission
RS-232C Data format Data bits 7 bits, 8 bits
specifications
Stop bits 1 bit, 2 bits
Error detection Parity Even, odd, none
Transmission distance 15 m
Number of transmission units 1
Shared SD/RD
SD: (Green)
Display RD: (Red)
During transmission and reception, this
may appear to light in orange.

2-12 - KV Nano Series(terminal block type) User’s Manual -


2-2 Base Unit Shared Specifications

SPECIFICATIONS
RUN-PROG Selector Switch and Error Clear Switch

 Switching between RUN mode and PROG mode


The KV Nano Series base unit has two modes: RUN mode and PROG
mode
2

Base Unit Shared Specifications


Use the RUN-PROG selector switch and error clear switch on the top
left of the main unit (as shown in the figure to the right) to switch
between modes.

RUN mode: Programs are executed.


PROG mode: Program execution is stopped, and all output is turned
OFF.

If a serious error occurs, even if the selector switch is


Point
in the "RUN" position, the product will be switched to
PROG mode.

Reference When the selector switch is in the "RUN" position, you can use KV STUDIO to switch
between PROG mode and RUN mode.

 Error clear
You can use the RUN-PROG selector switch and error clear switch to
clear errors.
Set the RUN-PROG selector switch and error clear switch to the Err.Clr
side (down) for 1 second or more to clear all errors that are currently
occurring.
When you release the RUN-PROG selector switch and error clear
switch, it will automatically return to the PROG mode position.

Reference • To clear errors, you have to first change the mode to


PROG mode.
• Even if you hold the switch in the error clear position for a long period of time, only a
single error clear operation will be executed.
To perform another error clear operation, release the switch, and then clear the errors
again.

- KV Nano Series(terminal block type) User’s Manual - 2-13


2-2 Base Unit Shared Specifications
SPECIFICATIONS

Wiring

 Modular connector
2 You can use the modular connector to perform serial (RS-232C) communications with peripheral
devices such as PCs and touch panels.
Base Unit Shared Specifications

Modular connector
6
5
4
3
2
1

"How to Connect to Other Peripherals" (page 5-196)

Terminal Number Direction Signal Name


1 − +5 V power supply output
2 − +5 V power supply output
3 Input RD
4 − SG
5 Output SD
6 − GND
* For the DC power supply types, SG and GND are connected internally. SG and GND are not isolated from
0 V of the power supply input terminals.

• The +5 V power supply output terminal is the power supply dedicated for
Point
supplying power to the KV-D30. It cannot be used for any other purpose.
• For the DC power supply type, the SGs of the base unit's USB and serial ports
are shared with 0 V of the power supply. A potential difference between the
product being connected to and the SGs will lead to damage to the base unit
and to the product being connected to.

2-14 - KV Nano Series(terminal block type) User’s Manual -


2-3 Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)

SPECIFICATIONS
Relay Output Type KV-N14AR/N14DR

 Terminal arrangement diagram


2
FG C0 001 003 005 007

Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)
Power supply
AC_L AC_N 000 002 004 006
circuit terminals

Service power supply (24 V)


circuit terminals
C1 C2 C3 C4

(AC power supply type only;


0V 500 501 502 503 505
NC for the DC power supply
24V C1 C2 C3 C4 504
type)

 Power supply circuit wiring

AC power supply type DC power supply type

FG FG

FG 24 V 0V FG
AC_L AC_N

Input voltage: 100 to 240 VAC Input voltage: 24 VDC

 Input circuit diagram

Circuit configuration of inputs 000 to 003


Internal circuit
4.3kΩ Photo-coupler isolation
Internal circuit

000 to 003
510Ω

+
+ C0

006 004 002 000

007 005 003 001 C0


Circuit configuration of inputs 004 to 007

Photo-coupler isolation
Internal circuit

004 to 007 3.3kΩ

+
Blue Blue Blue Blue Blue Blue Blue Blue + C0 560Ω
Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown
Black

Black

Black

Black

Black

Black

Black

Black
3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

Sensors

With the KV-N14AR, the service power supply can also be used for the 24 V power
Reference
supply that is used to supply power to sensors and other similar devices.

- KV Nano Series(terminal block type) User’s Manual - 2-15


2-3 Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)
SPECIFICATIONS

 Input terminal details

Terminal Signal Name When the Following Functions Are Used


Relay
Number Interrupt High-Speed Counter Positioning

2 C0
000 R000
-
Yes
Input common (for R000 to R007)
High-speed counter 0, enable input -
001 R001 Yes High-speed counter 1, enable input -
Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)

002 R002 Yes High-speed counter 0, Z-phase (preset) -


003 R003 Yes High-speed counter 1, Z-phase (preset) -
004 R004 No High-speed counter 0, A-phase -
005 R005 No High-speed counter 0, B-phase -
006 R006 No High-speed counter 1, A-phase -
007 R007 No High-speed counter 1, B-phase -

Note that if you leave long-distance wiring to an input terminal open, the wiring
Point
will become an antenna for picking up noise, which may lead to incorrect input.

Reference You must use a converter to apply line driver output to the inputs.

 Output circuit diagram


Internal circuit
500
501
502
Internal circuit

503 to 505

0V 500 501 502 503 505


C1
C2
24V C1 C2 C3 C4 504 C3
C4
• C1 to C4 are independent.
L L L L L L

With the KV-N14AR, the service power supply can also be used for the 24 V power
Reference
supplies of external loads.

 Output terminal details


Terminal Signal Name When the Following Functions Are Used
Type Relay
Number High-Speed Counter Positioning
C1 - - Output common (for R500)
High-speed counter 0,
500 General R500 -
comparator matching output
C2 - - Output common (for R501)
High-speed counter 1,
501 General R501 -
comparator matching output
C3 - - Output common (for R502)
502 General R502 - -
C4 - - Output common (for R503 to R505)
503 General R503 - -
504 General R504 - -
505 General R505 - -
* C1 to C4 are independent.

2-16 - KV Nano Series(terminal block type) User’s Manual -


2-3 Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)

SPECIFICATIONS
Transistor Output Type KV-N14AT/N14DT/N14ATP/N14DTP

 Terminal arrangement diagram

FG C0 001 003 005 007


2
Power supply circuit terminals AC_L AC_N 000 002 004 006

Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)
KV-N14AT

Service power supply (24 V) circuit C1 C1 C1 C1

terminals (AC power supply type only; 0V 500 501 502 503 505
NC for the DC power supply type) 24V C1 C1 C1 C1 504

 Power supply circuit wiring

AC power supply type DC power supply type

FG FG

FG 24 V 0V FG
AC_L AC_N

Input voltage: 100 to 240 VAC Input voltage: 24 VDC

 Input circuit diagram


Circuit configuration of inputs 000 to 003
Internal circuit

4.3kΩ Photo-coupler isolation


Internal circuit

000 to 003
510Ω

+
+ C0

006 004 002 000

007 005 003 001 C0

Circuit configuration of inputs 004 to 007

Photo-coupler isolation
Internal circuit

004 to 007 3.3kΩ

Blue Blue Blue Blue Blue Blue Blue Blue


+
+ C0 560Ω
Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown
Black

Black

Black

Black

Black

Black

Black

Black
3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

Sensors

With the KV-N14AT(P), the service power supply can also be used for the 24 V power
Reference
supply.

- KV Nano Series(terminal block type) User’s Manual - 2-17


2-3 Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)
SPECIFICATIONS

 Input terminal details

Terminal Signal Name When the Following Functions Are Used


Relay
Number Interrupt High-Speed Counter Positioning

2
C0 - Input common (for R000 to R007)
000 R000 Yes High-speed counter 0, enable input Axis 1/axis 2, stop sensor input
001 R001 Yes High-speed counter 1, enable input Axis 1/axis 2, origin sensor input
Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)

High-speed counter 0,
002 R002 Yes Axis 1, Z-phase
Z-phase (preset)
High-speed counter 1,
003 R003 Yes Axis 2, Z-phase
Z-phase (preset)
004 R004 No High-speed counter 0, A-phase -
005 R005 No High-speed counter 0, B-phase -
006 R006 No High-speed counter 1, A-phase -
007 R007 No High-speed counter 1, B-phase -

Note that if you leave long-distance wiring to an input terminal open, the wiring
Point
will become an antenna for picking up noise, which may lead to incorrect input.

Reference You must use a converter to apply line driver output to the inputs.

 Output circuit diagram


Circuit configuration for sink types

Internal circuit Isolated power


supply

Isolated protection
power supply
500 to 505
Internal circuit

L
0V 500 501 502 503 505
Protection
circuit
24V C1 C1 C1 C1 504

C1
*1
L L L L L L • C1 is shorted internally.

*1 For KV-N14*TP Circuit configuration for source types


C1
Isolated power
supply
Protection
circuit
Internal circuit

Output circuit

L
500 to 505

• With the KV-N14AT(P), the service power supply can also be used for the 24 V power
Reference supplies of external loads.
• The isolated protection power supply is shared between each common. If even a
single overcurrent is detected, until the cause of the problem is removed, the
protection operation (output turning OFF) and automatic recovery occur repeatedly
for all outputs within the shared common.

2-18 - KV Nano Series(terminal block type) User’s Manual -


2-3 Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)

SPECIFICATIONS
 Output terminal details

Terminal Signal Name When the Following Functions Are Used


Type Relay
Number High-Speed Counter Positioning
C1* - - Output common (for R500 to R505)

500 High speed R500


High-speed counter 0,
comparator matching output
Axis 1, CW 2
C1* - - Output common (for R500 to R505)

Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)
High-speed counter 1,
501 High speed R501 Axis 1, CCW
comparator matching output
C1* - - Output common (for R500 to R505)
502 High speed R502 - Axis 2, CW
C1* - - Output common (for R500 to R505)
503 High speed R503 - Axis 2, CCW
504 General R504 - Axis 1, deviation counter clear
505 General R505 - Axis 2, deviation counter clear
* All C1 terminals are shorted internally.

- KV Nano Series(terminal block type) User’s Manual - 2-19


2-3 Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)
SPECIFICATIONS

Example of Wiring a Transistor Output to a Servo Amplifier (SV Series)

24 V (+)

2 Power supply
GND

KV-N14*T (Sink types) SV Series


Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)

Terminal Pin
Relay Signal Name
Number Number
COM Input common (for R000 to R007) C0 7 NP+ (reverse pulse input, positive)
R000 Axis 1, origin sensor input*1 000 34 PL1 (power supply for open collector instructions)
R001 Axis 1, stop sensor input*1 001 10 PP+ (forward pulse input, positive)
35 PL2 (power supply for open collector instructions)
R003 Axis 1, driver alarm*2 003 14 ALARM
R002 Axis 1, Z-phase 002 32 Z-phase (open collector)
R006 Axis 1, limit switch CW*3 006
R007 Axis 1, limit switch, CCW*3 007

R500 Axis 1, CW 500 11 PP- (forward pulse input, negative)


R501 Axis 1, CCW 501 8 NP- (reverse pulse input, negative)
R504 Axis 1, servo ON*4 504 24 SVON (servo ON)
R505 Axis 1, driver alarm clear*4 505 44 RESET (alarm reset)
17 COM1 (output common)
COM1 Output common (for R500 to R505) C1 9 SG
12 SG
25 COM0 (input common)

24 V (+)
Power supply
GND

KV-N14*TP (Source types) SV Series


Terminal Pin
Relay Signal Name
Number Number
COM0 Input common (for R000 to R007) C0 7 NP+ (reverse pulse input, positive)
R000 Axis 1, origin sensor input*1 000
R001 Axis 1, stop sensor input*1 001 10 PP+ (forward pulse input, positive)

R003 Axis 1, driver alarm*2 003 14 ALARM


R002 Axis 1, Z-phase 002 32 Z-phase (open collector)
R006 Axis 1, limit switch CW*3 006
R007 Axis 1, limit switch, CCW*3 007

R500 Axis 1, CW 500 11 PP- (forward pulse input, negative)


R501 Axis 1, CCW 501 8 NP- (reverse pulse input, negative)
R504 Axis 1, servo ON*4 504 24 SVON (servo ON)
R505 Axis 1, driver alarm clear*4 505 44 RESET (alarm reset)
17 COM1 (output common)
COM1 Output common (for R500 to R505) C1 9 SG
12 SG
25 COM0 (input common)

* Wire the EMG (forced stop), LSP (limit switch in forward direction), and LSN (limit switch in reverse direction) of the SV
Series separately. Alternatively, if you will not wire them, change the corresponding SV Series parameter settings to A
contact.
* We recommend that you use shielded, twisted-pair cables for the I/O cables. Ensure that the I/O connector cables are 3
m or less in length.
* If noise is present in the I/O signals of the sink type, you may be able to improve the problem by twisting the signal cable
in question together with a 0 V or +24 V cable, and then performing the wiring with this twisted-pair.
*1 You can use the parameter settings to change the assignments.
*2 General input is being used. You can freely change this assignment for ladder processing.
*3 General input is being used. Confirm the input status, and then use ladder programs to control CR8012 and CR8013.
*4 General output is being used. You can freely change this assignment for ladder processing.

2-20 - KV Nano Series(terminal block type) User’s Manual -


2-3 Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)

SPECIFICATIONS
Outline Drawings

82
2-ø4.5
2

27.3

Wiring and Internal Circuit Diagrams of the 14-Point Base Unit (KV-N14AR/AT/ATP/DR/DT/DTP)
35.9
90

82
3.8

90 17.2 83.7
11

17

- KV Nano Series(terminal block type) User’s Manual - 2-21


2-4 Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)
SPECIFICATIONS

Relay Output Type KV-N24AR/N24DR

 Terminal arrangement diagram


2
FG C0 001 003 005 007 009 011 013
Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)

Power supply circuit terminals


AC_L AC_N 000 002 004 006 008 010 012
FG
_
AC L _
AC N

KV-N24AR

Service power supply (24 V) circuit


0V
24V C2 C3 C4 C5 C5

terminals (AC power supply type only; 0V 500 501 502 503 505 506 508 509
NC for the DC power supply type) 24V C1 C2 C3 C4 504 C5 507 C5

 Power supply circuit wiring


AC power supply type DC power supply type

FG FG

AC_L AC_N FG FG
24 V 0V

Input voltage: 100 to 240 VAC Input voltage: 24 VDC

 Input circuit diagram

Circuit configuration of inputs 000 to 003 and


Internal circuit
008 to 013

4.3kΩ Photo-coupler isolation


Internal circuit

000 to 003
008 to 013 510Ω

+
012 010 008 006 004 002 000 + C0

013 011 009 007 005 003 001 C0

Circuit configuration of inputs 004 to 007

Photo-coupler isolation
Internal circuit

Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue
004 to 007 3.3kΩ
Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown
Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

+
+ C0 560Ω
3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

Sensors

With the KV-N24AR, the service power supply can also be used for the 24 V power
Reference
supply that is used to supply power to sensors and other similar devices.

2-22 - KV Nano Series(terminal block type) User’s Manual -


2-4 Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)

SPECIFICATIONS
 Input terminal details

Terminal Signal Name When the Following Functions Are Used


Relay
Number Interrupt High-Speed Counter Positioning
C0
000 R000
-
Yes
Input common (for R000 to R013)
- - 2
001 R001 Yes - -

Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)
002 R002 Yes - -
003 R003 Yes - -
004 R004 No High-speed counter 0, A-phase -
005 R005 No High-speed counter 0, B-phase -
006 R006 No High-speed counter 1, A-phase -
007 R007 No High-speed counter 1, B-phase -
008 R008 No High-speed counter 0, enable input -
009 R009 No High-speed counter 1, enable input -
010 R010 No High-speed counter 0, Z-phase (preset) -
011 R011 No High-speed counter 1, Z-phase (preset) -
012 R012 No - -
013 R013 No - -

Note that if you leave long-distance wiring to an input terminal open, the wiring
Point
will become an antenna for picking up noise, which may lead to incorrect input.

Reference You must use a converter to apply line driver output to the inputs.

 Output circuit diagram

Internal circuit

0V 500 501 502 503 505 506 508 509 500


501
502
Internal circuit

24V C1 C2 C3 C4 504 C5 507 C5


503 to 505
506 to 509

L L L L L L L L L L
C1
C2
C3
C4
C5
• C1 to C5 are independent.
The two C5 terminals are shorted internally.

With the KV-N24AR, the service power supply can also be used for the 24 V power
Reference
supplies of external loads.

- KV Nano Series(terminal block type) User’s Manual - 2-23


2-4 Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)
SPECIFICATIONS

 Output terminal details

Terminal Signal Name When the Following Functions Are Used


Type Relay
Number High-Speed Counter Positioning

2 C1

500
-

General
-

R500
High-speed counter 0,
Output common (for R500)

-
comparator matching output
Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)

C2 - - Output common (for R501)


High-speed counter 1,
501 General R501 -
comparator matching output
C3 - - Output common (for R502)
502 General R502 - -
C4 - - Output common (for R503 to R505)
503 General R503 - -
504 General R504 - -
505 General R505 - -
C5 - - Output common (for R506 to R509)
506 General R506 - -
507 General R507 - -
508 General R508 - -
C5 - - Output common (for R506 to R509)
509 General R509 - -

Transistor Output Type KV-N24AT/N24DT/N24ATP/N24DTP

 Terminal arrangement diagram

FG C0 001 003 005 007 009 011 013


Power supply circuit terminals
AC_L AC_N 000 002 004 006 008 010 012

KV-N24AT

Service power supply (24 V) circuit


terminals (AC power supply type only; 0V 500 501 502 503 505 506 508 509
NC for the DC power supply type) 24V C1 C1 C1 C1 504 C1 507 C1

 Power supply circuit wiring


AC power supply type DC power supply type

FG FG

FG FG
AC_L AC_N 24 V 0V

Input voltage: 100 to 240 VAC Input voltage: 24 VDC

2-24 - KV Nano Series(terminal block type) User’s Manual -


2-4 Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)

SPECIFICATIONS
 Input circuit diagram
Circuit configuration of inputs 000 to 003 and
Internal circuit
008 to 013

2
4.3kΩ Photo-coupler isolation

Internal circuit
000 to 003
008 to 013 510Ω

Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)
012 010 008 006 004 002 000
+ C0
013 011 009 007 005 003 001 C0

Circuit configuration of inputs 004 to 007

Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Photo-coupler isolation

Internal circuit
004 to 007 3.3kΩ
Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown
Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black
+
+ C0 560Ω
3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire
Sensors

With the KV-N24AT(P), the service power supply can also be used for the 24 V power
Reference
supply that is used to supply power to sensors and other similar devices.

 Input terminal details

Terminal Signal Name When the Following Functions Are Used


Relay
Number Interrupt High-Speed Counter Positioning
C0 - Input common (for R000 to R013)
000 R000 Yes -
001 R001 Yes - Axis 1/axis 2, stop sensor input
002 R002 Yes - Axis 1/axis 2, origin sensor input
003 R003 Yes -
004 R004 No High-speed counter 0, A-phase -
005 R005 No High-speed counter 0, B-phase -
006 R006 No High-speed counter 1, A-phase -
007 R007 No High-speed counter 1, B-phase -
008 R008 No High-speed counter 0, enable input -
009 R009 No High-speed counter 1, enable input -
High-speed counter 0,
010 R010 No Axis 1, Z-phase
Z-phase (preset)
High-speed counter 1,
011 R011 No Axis 2, Z-phase
Z-phase (preset)
012 R012 No -
013 R013 No -

Note that if you leave long-distance wiring to an input terminal open, the wiring
Point
will become an antenna for picking up noise, which may lead to incorrect input.

Reference You must use a converter to apply line driver output to the inputs.

- KV Nano Series(terminal block type) User’s Manual - 2-25


2-4 Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)
SPECIFICATIONS

 Output circuit diagram

Internal circuit Circuit configuration for sink types

Isolated power

2
supply

Isolated protection
power supply
500 to 509

Internal circuit
L
Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)

0V 500 501 502 503 505 506 508 509 Protection


circuit

24V C1 C1 C1 C1 504 C1 507 C1 C1


• The C1 terminals are shorted internally.
*1
L L L L L L L L L L Circuit configuration for source types

*1 For KV-N24*TP C1
Isolated power
supply
Protection
circuit

Internal circuit
Output circuit

L
500 to 509

• With the KV-N24AT(P), the service power supply can also be used for the 24 V power
Reference
supplies of external loads.
• The isolated protection power supply is shared between each common. If even a
single overcurrent is detected, until the cause of the problem is removed, the
protection operation (output turning OFF) and automatic recovery occur repeatedly
for all outputs within the shared common.

 Output terminal details

Terminal Signal Name When the Following Functions Are Used


Type Relay
Number High-Speed Counter Positioning
C1 - - Output common (for R500 to R509)
High High-speed counter 0,
500 R500 Axis 1, CW
speed comparator matching output
C1 - - Output common (for R500 to R509)
High High-speed counter 1,
501 R501 Axis 1, CCW
speed comparator matching output
C1 - - Output common (for R500 to R509)
High
502 R502 - Axis 2, CW
speed
C1 - - Output common (for 500 to R509)
High
503 R503 - Axis 2, CCW
speed
504 General R504 - Axis 1, deviation counter clear
505 General R505 - Axis 2, deviation counter clear
C1 - - Output common (for R500 to R509)
506 General R506 - -
507 General R507 - -
508 General R508 - -
C1 - - Output common (for R500 to R509)
509 General R509 - -

2-26 - KV Nano Series(terminal block type) User’s Manual -


2-4 Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)

SPECIFICATIONS
Example of Wiring a Transistor Output to a Servo Amplifier (SV Series)

24 V (+)
Power supply
GND
2
KV-N24*T (Sink types) SV Series

Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)
Terminal Pin
Relay Signal Name
Number Number
COM Input common (for R000 to R013) C0 7 NP+ (reverse pulse input, positive)
R000 Axis 1, origin sensor input*1 000 34 PL1 (power supply for open collector instructions)
R001 Axis 1, stop sensor input*1 001 10 PP+ (forward pulse input, positive)
35 PL2 (power supply for open collector instructions)
R002 Axis 1, driver alarm*2 002 14 ALARM
R010 Axis 1, Z-phase 010 32 Z-phase (open collector)
R008 Axis 1, limit switch, CW*3 008
R009 Axis 1, limit switch, CCW*3 009

R500 Axis 1, CW 500 11 PP- (forward pulse input, negative)


R501 Axis 1, CCW 501 8 NP- (reverse pulse input, negative)
R506 Axis 1, servo ON*4 506 24 SVON (servo ON)
R507 Axis 1, driver alarm clear*4 507 44 RESET (alarm reset)
17 COM1 (output common)
COM1 Output common (for R500 to R509) C1 9 SG
12 SG
25 COM0 (input common)

24 V (+)
Power supply
GND

KV-N24*TP (Source types) SV Series


Terminal Pin
Relay Signal Name
Number Number
COM Input common (for R000 to R013) C0 7 NP+ (reverse pulse input, positive)
R000 Axis 1, origin sensor input*1 000
R001 Axis 1, stop sensor input*1 001 10 PP+ (forward pulse input, positive)

R002 Axis 1, driver alarm*2 002 14 ALARM


R010 Axis 1, Z-phase 010 32 Z-phase (open collector)
R008 Axis 1, limit switch, CW*3 008
R009 Axis 1, limit switch, CCW*3 009

R500 Axis 1, CW 500 11 PP- (forward pulse input, negative)


R501 Axis 1, CCW 501 8 NP- (reverse pulse input, negative)
R506 Axis 1, servo ON*4 506 24 SVON (servo ON)
R507 Axis 1, driver alarm clear*4 507 44 RESET (alarm reset)
17 COM1 (output common)
COM1 Output common (for R500 to R509) C1 9 SG
12 SG
25 COM0 (input common)

* Wire the EMG (forced stop), LSP (limit switch in forward direction), and LSN (limit switch in reverse direction) of the SV
Series separately. Alternatively, if you will not wire them, change the corresponding SV Series parameter settings to A
contact.
* We recommend that you use shielded, twisted-pair cables for the I/O cables. Ensure that the I/O connector cables are 3
m or less in length.
* If noise is present in the I/O signals of the sink type, you may be able to improve the problem by twisting the signal cable
in question together with a 0 V or +24 V cable, and then performing the wiring with this twisted-pair.
*1 You can use the parameter settings to change the assignments.
*2 General input is being used. You can freely change this assignment for ladder processing.
*3 General input is being used. Confirm the input status, and then use ladder programs to control CR8012 and CR8013.
*4 General output is being used. You can freely change this assignment for ladder processing.

- KV Nano Series(terminal block type) User’s Manual - 2-27


2-4 Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)
SPECIFICATIONS

Outline Drawings

82

2 2-ø4.5

27.3
Wiring and Internal Circuit Diagrams of the 24-Point Base Unit (KV-N24AR/AT/ATP/DR/DT/DTP)

35.9
90

82
3.8

90 17.2 83.7
11

17

2-28 - KV Nano Series(terminal block type) User’s Manual -


2-5 Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)

SPECIFICATIONS
Relay Output Type KV-N40AR/N40DR

 Terminal arrangement diagram


2
Power supply circuit terminals FG C0 001 003 005 007 009 011 013 015 101 103 105 107

Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)
AC_L AC_N 000 002 004 006 008 010 012 014 100 102 104 106
FG C0

KV-N40DA

Service power supply (24 V) circuit


terminals (AC power supply type only; C1 C2 C3 C4 C4 C5 C5 C6 C6

0V 500 501 502 504 505 507 508 509 511 512 513 515 •
NC for the DC power supply type)
24V C1 C2 C3 503 C4 506 C4 C5 510 C5 C6 514 C6

 Power supply circuit wiring


AC power supply type DC power supply type

FG FG

FG 24 V 0V FG
AC_L AC_N

Input voltage: 100 to 240 VAC Input voltage: 24 VDC

 Input circuit diagram

Internal circuit

106 104 102 100 014 012 010 008 006 004 002 000

107 105 103 101 015 013 011 009 007 005 003 001 C0

Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue
Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown
Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black
3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

Sensors

With the KV-N40AR, the service power supply can also be used for the 24 V power
Reference
supply that is used to supply power to sensors and other similar devices.

Circuit configuration of inputs 000 to 007 and Circuit configuration of inputs 008 to 013
014 to 107
4.3kΩ Photo-coupler isolation Photo-coupler isolation
Internal circuit

008 to 013 3.3kΩ


Internal circuit

000 to 007
014 to 107 510Ω +
+ C0 560Ω
+
+ C0

- KV Nano Series(terminal block type) User’s Manual - 2-29


2-5 Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)
SPECIFICATIONS

 Input terminal details

Terminal Signal Name When the Following Functions Are Used


Relay
Number Interrupt High-Speed Counter Positioning

2
C0 - Input common (for R000 to R107)
000 R000 Yes - -
001 R001 Yes - -
Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)

002 R002 Yes - -


003 R003 Yes - -
004 R004 No - -
005 R005 No - -
006 R006 No - -
007 R007 No - -
008 R008 No High-speed counter 0, A-phase -
009 R009 No High-speed counter 0, B-phase -
010 R010 No High-speed counter 1, A-phase -
011 R011 No High-speed counter 1, B-phase -
012 R012 No High-speed counter 2, A-phase -
013 R013 No High-speed counter 2, B-phase -
014 R014 No - -
015 R015 No - -
100 R100 No High-speed counter 0, enable input -
101 R101 No High-speed counter 1, enable input -
102 R102 No High-speed counter 2, enable input -
103 R103 No - -
104 R104 No High-speed counter 0, Z-phase (preset) -
105 R105 No High-speed counter 1, Z-phase (preset) -
106 R106 No High-speed counter 2, Z-phase (preset) -
107 R107 No - -

Note that if you leave long-distance wiring to an input terminal open, the wiring
Point
will become an antenna for picking up noise, which may lead to incorrect input.

Reference You must use a converter to apply line driver output to the inputs.

 Output circuit diagram

Internal circuit

0V 500 501 502 504 505 507 508 509 511 512 513 515

24V C1 C2 C3 503 C4 506 C4 C5 510 C5 C6 514 C6

L L L L L L L L L L L L L L L L

2-30 - KV Nano Series(terminal block type) User’s Manual -


2-5 Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)

SPECIFICATIONS
With the KV-N40AR, the service power supply can also be used for the 24 V power
Reference
supplies of external loads.

500

2
501
502 to 503
504 to 507
Internal circuit

508 to 511

Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)
512 to 515

C1
C2
C3
C4
C5
C6
• C1 to C6 are independent.
The two C4, C5, and C6 terminals are shorted internally.

 Output terminal details

Terminal Signal Name When the Following Functions Are Used


Type Relay
Number High-Speed Counter Positioning
C1 - - Output common (for R500)
High-speed counter 0,
500 General R500 -
comparator matching output
C2 - - Output common (for R501)
High-speed counter 1,
501 General R501 -
comparator matching output
C3 - - Output common (for R502 and R503)
High-speed counter 2,
502 General R502 -
comparator matching output
503 General R503 - -
504 General R504 - -
C4 - - Output common (for R504 to R507)
505 General R505 - -
506 General R506 - -
507 General R507 - -
C4 - - Output common (for R504 to R507)
508 General R508 - -
C5 - - Output common (for R508 to R511)
509 General R509 - -
510 General R510 - -
511 General R511 - -
C5 - - Output common (for R508 to R511)
512 General R512 - -
C6 - - Output common (for R512 to R515)
513 General R513 - -
514 General R514 - -
515 General R515 - -
C6 - - Output common (for R512 to R515)
・ -- NC - -

- KV Nano Series(terminal block type) User’s Manual - 2-31


2-5 Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)
SPECIFICATIONS

Transistor Output Type KV-N40AT/N40DT/N40ATP/N40DTP

 Terminal arrangement diagram


2 Power supply circuit terminals FG C0 001 003 005 007 009 011 013 015 101 103 105 107

AC_L AC_N 000 002 004 006 008 010 012 014 100 102 104 106
Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)

KV-N40AT

Service power supply (24 V) circuit


terminals (AC power supply type only;

NC for the DC power supply type) 0V 500 501 502 504 505 507 508 509 511 512 513 515 •

24V C1 C1 C1 503 C1 506 C1 C2 510 C2 C2 514 C2

 Power supply circuit wiring


AC power supply type DC power supply type

FG
FG

24 V 0V FG
AC_L AC_N FG

Input voltage: 100 to 240 VAC Input voltage: 24 VDC

 Input circuit diagram

Internal circuit

106 104 102 100 014 012 010 008 006 004 002 000

107 105 103 101 015 013 011 009 007 005 003 001 C0

Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue
Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown
Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black
3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

Sensors

With the KV-N40AT, the service power supply can also be used for the 24 V power
Reference
supply that is used to supply power to sensors and other similar devices.

Circuit configuration of inputs 000 to 007 and Circuit configuration of inputs 008 to 013
014 to 107

4.3kΩ Photo-coupler isolation Photo-coupler isolation


Internal circuit

008 to 013
Internal circuit

3.3kΩ
000 to 007
014 to 107 510Ω +
+ C0 560Ω
+
+ C0

2-32 - KV Nano Series(terminal block type) User’s Manual -


2-5 Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)

SPECIFICATIONS
 Input terminal details

Terminal Signal Name When the Following Functions Are Used


Relay
Number Interrupt High-Speed Counter Positioning

2
C0 - Input common (for R000 to R107)
000 R000 Yes -
001 R001 Yes - Axis 1/axis 2, stop sensor input

Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)
002 R002 Yes - Axis 1/axis 2, origin sensor input
003 R003 Yes -
004 R004 No - Axis 3, stop sensor input
005 R005 No - Axis 3, origin sensor input
006 R006 No - -
007 R007 No - -
008 R008 No High-speed counter 0, A-phase -
009 R009 No High-speed counter 0, B-phase -
010 R010 No High-speed counter 1, A-phase -
011 R011 No High-speed counter 1, B-phase -
012 R012 No High-speed counter 2, A-phase -
013 R013 No High-speed counter 2, B-phase -
014 R014 No - -
015 R015 No - -
100 R100 No High-speed counter 0, enable input -
101 R101 No High-speed counter 1, enable input -
102 R102 No High-speed counter 2, enable input -
103 R103 No - -
High-speed counter 0,
104 R104 No Axis 1, Z-phase
Z-phase (preset)
High-speed counter 1,
105 R105 No Axis 2, Z-phase
Z-phase (preset)
High-speed counter 2,
106 R106 No Axis 3, Z-phase
Z-phase (preset)
107 R107 No - -

Note that if you leave long-distance wiring to an input terminal open, the wiring
Point
will become an antenna for picking up noise, which may lead to incorrect input.

Reference You must use a converter to apply line driver output to the inputs.

 Output circuit diagram


Internal circuit

0V 500 501 502 504 505 507 508 509 511 512 513 515

24V C1 C1 C1 503 C1 506 C1 C2 510 C2 C2 514 C2

*1 *1
L L L L L L L L L L L L L L L L

*1 For KV-N40*TP
• With the KV-N40AT(P), the service power supply can also be used for the 24 V power
Reference
supplies of external loads.
• The isolated protection power supply is shared between each common. If even a
single overcurrent is detected, until the cause of the problem is removed, the
protection operation (output turning OFF) and automatic recovery occur repeatedly
for all outputs within the shared common.
- KV Nano Series(terminal block type) User’s Manual - 2-33
2-5 Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)
SPECIFICATIONS

Circuit configuration for sink types Circuit configuration for source types

C1
C2
Isolated power Isolated power
supply supply

2
Protection
circuit
Isolated protection 500 to 507
power supply
508 to 515

Internal circuit
Internal circuit

L Output circuit
Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)

Protection
circuit
L
C1 500 to 507
C2 508 to 515

• The C1 and C2 terminals are independent.


• There are multiple C1 and C2 terminals, and they are each shorted internally.

 Output terminal details

Terminal Signal Name When the Following Functions Are Used


Type Relay
Number High-Speed Counter Positioning
C1 - - Output common (for R500 to R507)
High-speed counter 0,
500 High speed R500 Axis 1, CW
comparator matching output
C1 - - Output common (for R500 to R507)
High-speed counter 1,
501 High speed R501 Axis 1, CCW
comparator matching output
C1 - - Output common (for R500 to R507)
High-speed counter 2,
502 High speed R502 Axis 2, CW
comparator matching output
503 High speed R503 - Axis 2, CCW
504 High speed R504 - Axis 3, CW
C1 - - Output common (for R500 to R507)
505 High speed R505 - Axis 3, CCW
506 General R506 - -
507 General R507 - -
C1 - - Output common (for R500 to R507)
508 General R508 - Axis 1, deviation counter clear
C2 - - Output common (for R508 to R515)
509 General R509 - Axis 2, deviation counter clear
510 General R510 - Axis 3, deviation counter clear
511 General R511 - -
C2 - - Output common (for R508 to R515)
512 General R512 - -
C2 - - Output common (for R508 to R515)
513 General R513 - -
514 General R514 - -
515 General R515 - -
C2 - - Output common (for R508 to R515)
・ -- NC - -

2-34 - KV Nano Series(terminal block type) User’s Manual -


2-5 Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)

SPECIFICATIONS
Example of Wiring a Transistor Output to a Servo Amplifier (SV Series)

24 V (+)
Power supply
GND
2
KV-N40*T (Sink types) SV Series

Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)
Terminal Pin
Relay Signal Name
Number Number
COM Input common (for R000 to R107) C0 7 NP+ (reverse pulse input, positive)
R000 Axis 1, origin sensor input*1 000 34 PL1 (power supply for open collector instructions)
R001 Axis 1, stop sensor input*1 001 10 PP+ (forward pulse input, positive)
35 PL2 (power supply for open collector instructions)
R002 Axis 1, driver alarm*2 002 14 ALARM
R104 Axis 1, Z-phase 104 32 Z-phase (open collector)
R006 Axis 1, limit switch, CW*3 006
R007 Axis 1, limit switch, CCW*3 007

R500 Axis 1, CW 500 11 PP- (forward pulse input, negative)


R501 Axis 1, CCW 501 8 NP- (reverse pulse input, negative)
R506 Axis 1, servo ON*4 506 24 SVON (servo ON)
R507 Axis 1, driver alarm clear*4 507 44 RESET (alarm reset)
17 COM1 (output common)
COM1 Output common (for R500 to R507) C1 9 SG
12 SG
25 COM0 (input common)

24 V (+)
Power supply
GND

KV-N40*TP (Source types) SV Series


Terminal Pin
Relay Signal Name
Number Number
COM Input common (for R000 to R107) C0 7 NP+ (reverse pulse input, positive)
R000 Axis 1, origin sensor input*1 000
R001 Axis 1, stop sensor input*1 001 10 PP+ (forward pulse input, positive)

R002 Axis 1, driver alarm*2 002 14 ALARM


R104 Axis 1, Z-phase 104 32 Z-phase (open collector)
R006 Axis 1, limit switch, CW*3 006
R007 Axis 1, limit switch, CCW*3 007

R500 Axis 1, CW 500 11 PP- (forward pulse input, negative)


R501 Axis 1, CCW 501 8 NP- (reverse pulse input, negative)
R506 Axis 1, servo ON*4 506 24 SVON (servo ON)
R507 Axis 1, driver alarm clear*4 507 44 RESET (alarm reset)
17 COM1 (output common)
COM1 Output common (for R500 to R507) C1 9 SG
12 SG
25 COM0 (input common)

* Wire the EMG (forced stop), LSP (limit switch in forward direction), and LSN (limit switch in reverse direction) of the SV
Series separately. Alternatively, if you will not wire them, change the corresponding SV Series parameter settings to A
contact.
* We recommend that you use shielded, twisted-pair cables for the I/O cables. Ensure that the I/O connector cables are 3
m or less in length.
* If noise is present in the I/O signals of the sink type, you may be able to improve the problem by twisting the signal cable
in question together with a 0 V or +24 V cable, and then performing the wiring with this twisted-pair.
*1 You can use the parameter settings to change the assignments.
*2 General input is being used. You can freely change this assignment for ladder processing.
*3 General input is being used. Confirm the input status, and then use ladder programs to control CR8012 and CR8013.
*4 General output is being used. You can freely change this assignment for ladder processing.

- KV Nano Series(terminal block type) User’s Manual - 2-35


2-5 Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)
SPECIFICATIONS

Outline Drawings

2 2-ø4.5
122

27.3
Wiring and Internal Circuit Diagrams of the 40-Point Base Unit (KV-N40AR/AT/ATP/DR/DT/DTP)

35.9
90

82
3.8

17.2 83.7
44 (42) 44
130
11

17

2-36 - KV Nano Series(terminal block type) User’s Manual -


2-6 Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)

SPECIFICATIONS
Relay Output Type KV-N60AR

 Terminal arrangement diagram


2
Power supply circuit terminals FG C0 001 003 005 007 009 011 013 015 101 103 105 107 109 111 113 115 201 203

Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)
AC_L AC_N 000 002 004 006 008 010 012 014 100 102 104 106 108 110 112 114 200 202
C0

KV-N60AR


C7

Service power supply (24 V) 0V 500 501 502 504 505 507 508 509 511 512 513 515 600 601 603 604 605 607 •

circuit terminals 24V C1 C2 C3 503 C4 506 C4 C5 510 C5 C6 514 C6 C7 602 C7 C8 606 C8

 Power supply circuit wiring


AC power supply type

FG

AC_L AC_N FG

Input voltage: 100 to 240 VAC

 Input circuit diagram

Internal circuit

202 200 114 112 110 108 106 104 102 100 014 012 010 008 006 004 002 000

203 201 115 113 111 109 107 105 103 101 015 013 011 009 007 005 003 001 C0

Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue
Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown
Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black
3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

Sensors

The service power supply can also be used for the 24 V power supply that is used to
Reference
supply power to sensors and other similar devices.

Circuit configuration of inputs 000 to 007 and Circuit configuration of inputs 008 to 015
100 to 203

4.3kΩ Photo-coupler isolation Photo-coupler isolation


Internal circuit

Internal circuit

008 to 015 3.3kΩ


000 to 007
100 to 203 510Ω +
+ C0 560Ω
+
+ C0

- KV Nano Series(terminal block type) User’s Manual - 2-37


2-6 Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)
SPECIFICATIONS

 Input terminal details

Terminal Signal Name When the Following Functions Are Used


Relay
Number Interrupt High-Speed Counter Positioning

2
C - Input common (for R000 to R203)
000 R000 Yes - -
001 R001 Yes - -
Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)

002 R002 Yes - -


003 R003 Yes - -
004 R004 No - -
005 R005 No - -
006 R006 No - -
007 R007 No - -
008 R008 No High-speed counter 0, A-phase -
009 R009 No High-speed counter 0, B-phase -
010 R010 No High-speed counter 1, A-phase -
011 R011 No High-speed counter 1, B-phase -
012 R012 No High-speed counter 2, A-phase -
013 R013 No High-speed counter 2, B-phase -
014 R014 No High-speed counter 3, A-phase -
015 R015 No High-speed counter 3, B-phase -
100 R100 No High-speed counter 0, enable input -
101 R101 No High-speed counter 1, enable input -
102 R102 No High-speed counter 2, enable input -
103 R103 No High-speed counter 3, enable input -
High-speed counter 0,
104 R104 No -
Z-phase (preset)
High-speed counter 1,
105 R105 No -
Z-phase (preset)
High-speed counter 2,
106 R106 No -
Z-phase (preset)
High-speed counter 3,
107 R107 No -
Z-phase (preset)
108 R108 No - -
109 R109 No - -
110 R110 No - -
111 R111 No - -
112 R112 No - -
113 R113 No - -
114 R114 No - -
115 R115 No - -
200 R200 No - -
201 R201 No - -
202 R202 No - -
203 R203 No - -

Note that if you leave long-distance wiring to an input terminal open, the wiring
Point
will become an antenna for picking up noise, which may lead to incorrect input.

Reference You must use a converter to apply line driver output to the inputs.

2-38 - KV Nano Series(terminal block type) User’s Manual -


2-6 Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)

SPECIFICATIONS
 Output circuit diagram

Internal circuit

Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)
0V 500 501 502 504 505 507 508 509 511 512 513 515 600 601 603 604 605 607

24V C1 C2 C3 503 C4 506 C4 C5 510 C5 C6 514 C6 C7 602 C7 C8 606 C8

L L L L L L L L L L L L L L L L L L L L L L L L

Reference The service power supply can also be used for the 24 V power supply.

500
501
502 to 503
504 to 507
508 to 511
Internal circuit

512 to 515
600 to 603
604 to 607

C1
C2
C3
C4
C5
C6
C7
C8
• C1 to C8 are independent.
The two C4, C5, C6, C7, and C8 terminals are shorted internally.

- KV Nano Series(terminal block type) User’s Manual - 2-39


2-6 Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)
SPECIFICATIONS

 Output terminal details

Terminal Signal Name When the Following Functions Are Used


Type Relay
Number High-Speed Counter Positioning

2
C1 - - Output common (for R500)
High-speed counter 0,
500 General R500 -
comparator matching output
Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)

C2 - - Output common (for R501)


High-speed counter 1,
501 General R501 -
comparator matching output
C3 - - Output common (for R502 and R503)
High-speed counter 2,
502 General R502 -
comparator matching output
High-speed counter 3,
503 General R503 -
comparator matching output
504 General R504 - -
C4 - - Output common (for R504 to R507)
505 General R505 - -
506 General R506 - -
507 General R507 - -
C4 - - Output common (for R504 to R507)
508 General R508 - -
C5 - - Output common (for R508 to R511)
509 General R509 - -
510 General R510 - -
511 General R511 - -
C5 - - Output common (for R508 to R511)
512 General R512 - -
C6 - - Output common (for R512 to R515)
513 General R513 - -
514 General R514 - -
515 General R515 - -
C6 - - Output common (for R512 to R515)
600 General R600 - -
C7 - - Output common (for R600 to R603)
601 General R601 - -
602 General R602 - -
603 General R603 - -
C7 - - Output common (for R600 to R603)
604 General R604 - -
C8 - - Output common (for R604 to R607)
605 General R605 - -
606 General R606 - -
607 General R607 - -
C8 - - Output common (for R604 to R607)
・ -- NC - -

2-40 - KV Nano Series(terminal block type) User’s Manual -


2-6 Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)

SPECIFICATIONS
Transistor Output Type KV-N60AT/N60ATP

 Terminal arrangement diagram


Power supply circuit FG C0 001 003 005 007 009 011 013 015 101 103 105 107 109 111 113 115 201 203
2
terminals AC_L AC_N 000 002 004 006 008 010 012 014 100 102 104 106 108 110 112 114 200 202

Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)
C0

KV-N60AT


C1 C1 C1 C1 C1 C2 C2 C2 C2 C3 C3 C3 C3

0V 500 501 502 504 505 507 508 509 511 512 513 515 600 601 603 604 605 607 •
Service power supply (24 V)
24V C1 C1 C1 503 C1 506 C1 C2 510 C2 C2 514 C2 C3 602 C3 C3 606 C3
circuit terminals

 Power supply circuit wiring


AC power supply type

FG

AC_L AC_N FG

Input voltage: 100 to 240 VAC

 Input circuit diagram

Internal circuit

202 200 114 112 110 108 106 104 102 100 014 012 010 008 006 004 002 000

203 201 115 113 111 109 107 105 103 101 015 013 011 009 007 005 003 001 C0

Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue Blue
Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown
Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black

Black
3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

Sensors

The service power supply can also be used for the 24 V power supply that is used to
Reference
supply power to sensors and other similar devices.

Circuit configuration of inputs 000 to 007 and Circuit configuration of inputs 008 to 015
100 to 203

4.3kΩ Photo-coupler isolation Photo-coupler isolation


Internal circuit

3.3kΩ
Internal circuit

008 to 015
000 to 007
100 to 203 510Ω +
+ C0 560Ω
+
+ C0

- KV Nano Series(terminal block type) User’s Manual - 2-41


2-6 Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)
SPECIFICATIONS

 Input terminal details

Terminal Signal Name When the Following Functions Are Used


Relay
Number Interrupt High-Speed Counter Positioning

2
C0 - Input common (for R000 to R203)
000 R000 Yes -
001 R001 Yes - Axis 1/axis 2, stop sensor input
Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)

002 R002 Yes - Axis 1/axis 2, origin sensor input


003 R003 Yes -
004 R004 No -
005 R005 No - Axis 3/axis 4, stop sensor input
006 R006 No - Axis 3/axis 4, origin sensor input
007 R007 No -
008 R008 No High-speed counter 0, A-phase -
009 R009 No High-speed counter 0, B-phase -
010 R010 No High-speed counter 1, A-phase -
011 R011 No High-speed counter 1, B-phase -
012 R012 No High-speed counter 2, A-phase -
013 R013 No High-speed counter 2, B-phase -
014 R014 No High-speed counter 3, A-phase -
015 R015 No High-speed counter 3, B-phase -
100 R100 No High-speed counter 0, enable input -
101 R101 No High-speed counter 1, enable input -
102 R102 No High-speed counter 2, enable input -
103 R103 No High-speed counter 3, enable input -
High-speed counter 0,
104 R104 No Axis 1, Z-phase
Z-phase (preset)
High-speed counter 1,
105 R105 No Axis 2, Z-phase
Z-phase (preset)
High-speed counter 2,
106 R106 No Axis 3, Z-phase
Z-phase (preset)
High-speed counter 3,
107 R107 No Axis 4, Z-phase
Z-phase (preset)
108 R108 No - -
109 R109 No - -
110 R110 No - -
111 R111 No - -
112 R112 No - -
113 R113 No - -
114 R114 No - -
115 R115 No - -
200 R200 No - -
201 R201 No - -
202 R202 No - -
203 R203 No - -

Note that if you leave long-distance wiring to an input terminal open, the wiring
Point
will become an antenna for picking up noise, which may lead to incorrect input.

Reference You must use a converter to apply line driver output to the inputs.

2-42 - KV Nano Series(terminal block type) User’s Manual -


2-6 Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)

SPECIFICATIONS
 Output circuit diagram

Internal circuit

515 607
2
0V 500 501 502 504 505 507 508 509 511 512 513 600 601 603 604 605

Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)
24V C1 C1 C1 503 C1 506 C1 C2 510 C2 C2 514 C2 C3 602 C3 C3 606 C3

L L L L L L L L L L L L L L L L L L L L L L L L

• The service power supply can also be used for the 24 V power supplies of external
Reference
loads.
• The isolated protection power supply is shared between each common. If even a
single overcurrent is detected, until the cause of the problem is removed, the
protection operation (output turning OFF) and automatic recovery occur repeatedly
for all outputs within the shared common.

Circuit configuration for sink types

Isolated power
supply
500 to 507
Isolated protection
power supply 508 to 515
600 to 607
Internal circuit

Protection
circuit

C1
C2
C3

Circuit configuration for source types


C1
C2
C3
Isolated power
supply
Isolated protection
power supply
Internal circuit

Output circuit

L
500 to 507
508 to 515
600 to 607

• The C1 to C3 terminals are independent.


• There are multiple C1, C2, and C3 terminals, and they are each shorted internally.

- KV Nano Series(terminal block type) User’s Manual - 2-43


2-6 Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)
SPECIFICATIONS

 Output terminal details

Terminal Signal Name When the Following Functions Are Used


Type Relay
Number High-Speed Counter Positioning

2
C1 - - Output common (for R500 to R507)
High High-speed counter 0,
500 R500 Axis 1, CW
speed comparator matching output
Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)

C1 - - Output common (for R500 to R507)


High High-speed counter 1,
501 R501 Axis 1, CCW
speed comparator matching output
C1 - - Output common (for R500 to R507)
High High-speed counter 2,
502 R502 Axis 2, CW
speed comparator matching output
High High-speed counter 3,
503 R503 Axis 2, CCW
speed comparator matching output
High
504 R504 - Axis 3, CW
speed
C1 - - Output common (for R500 to R507)
High
505 R505 - Axis 3, CCW
speed
High
506 R506 - Axis 4, CW
speed
High
507 R507 - Axis 4, CCW
speed
C1 - - Output common (for R500 to R507)
508 General R508 - Axis 1, deviation counter clear
C2 - - Output common (for R508 to R515)
509 General R509 - Axis 2, deviation counter clear
510 General R510 - Axis 3, deviation counter clear
511 General R511 - Axis 4, deviation counter clear
C2 - - Output common (for R508 to R515)
512 General R512 - -
C2 - - Output common (for R508 to R515)
513 General R513 - -
514 General R514 - -
515 General R515 - -
C2 - - Output common (for R508 to R515)
600 General R600 - -
C3 - - Output common (for R600 to R607)
601 General R601 - -
602 General R602 - -
603 General R603 - -
C3 - - Output common (for R600 to R607)
604 General R604 - -
C3 - - Output common (for R600 to R607)
605 General R605 - -
606 General R606 - -
607 General R607 - -
C3 - - Output common (for R600 to R607)
・ -- NC - -

2-44 - KV Nano Series(terminal block type) User’s Manual -


2-6 Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)

SPECIFICATIONS
Example of Wiring a Transistor Output to a Servo Amplifier (SV Series)

24 V (+)
Power supply
GND
2
KV-N60*T (Sink types) SV Series

Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)
Terminal Pin
Relay Signal Name
Number Number
COM Input common (for R000 to R203) C0 7 NP+ (reverse pulse input, positive)
R000 Axis 1, origin sensor input*1 000 34 PL1 (power supply for open collector instructions)
R001 Axis 1, stop sensor input*1 001 10 PP+ (forward pulse input, positive)
35 PL2 (power supply for open collector instructions)
R002 Axis 1, driver alarm*2 002 14 ALARM
R104 Axis 1, Z-phase 104 32 Z-phase (open collector)
R006 Axis 1 limit switch, CW*3 006
R007 Axis 1, limit switch, CCW*3 007

R500 Axis 1, CW 500 11 PP- (forward pulse input, negative)


R501 Axis 1, CCW 501 8 NP- (reverse pulse input, negative)
R506 Axis 1, servo ON*4 506 24 SVON (servo ON)
R507 Axis 1, driver alarm clear*4 507 44 RESET (alarm reset)
17 COM1 (output common)
COM1 Output common (for R500 to R507) C1 9 SG
12 SG
25 COM0 (input common)

24 V (+)
Power supply
GND

KV-N60*TP (Source types) SV Series


Terminal Pin
Relay Signal Name
Number Number
COM Input common (for R000 to R203) C0 7 NP+ (reverse pulse input, positive)
R000 Axis 1, origin sensor input*1 000
R001 Axis 1, stop sensor input*1 001 10 PP+ (forward pulse input,, positive)

R002 Axis 1, driver alarm*2 002 14 ALARM


R104 Axis 1, Z-phase 104 32 Z-phase (open collector)
R006 Axis 1 limit switch, CW*3 006
R007 Axis 1, limit switch, CCW*3 007

R500 Axis 1, CW 500 11 PP- (forward pulse input, negative)


R501 Axis 1, CCW 501 8 NP- (reverse pulse input, negative)
R506 Axis 1, servo ON*4 506 24 SVON (servo ON)
R507 Axis 1, driver alarm clear*4 507 44 RESET (alarm reset)
17 COM1 (output common)
COM1 Output common (for R500 to R507) C1 9 SG
12 SG
25 COM0 (input common)

* Wire the EMG (forced stop), LSP (limit switch in forward direction), and LSN (limit switch in reverse direction) of the SV
Series separately. Alternatively, if you will not wire them, change the corresponding SV Series parameter settings to A
contact.
* We recommend that you use shielded, twisted-pair cables for the I/O cables. Ensure that the I/O connector cables are 3
m or less in length.
* If noise is present in the I/O signals of the sink type, you may be able to improve the problem by twisting the signal cable
in question together with a 0 V or +24 V cable, and then performing the wiring with this twisted-pair.
*1 You can use the parameter settings to change the assignments.
*2 General input is being used. You can freely change this assignment for ladder processing.
*3 General input is being used. Confirm the input status, and then use ladder programs to control CR8012 and CR8013.
*4 General output is being used. You can freely change this assignment for ladder processing.

- KV Nano Series(terminal block type) User’s Manual - 2-45


2-6 Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)
SPECIFICATIONS

Outline Drawings

2 2-ø4.5
167

27.3
Wiring and Internal Circuit Diagrams of the 60-Point Base Unit (KV-N60AR/AT/ATP)

35.9
90

82
17.2 83.7
3.8

44 (87) 44
175
11

17

2-46 - KV Nano Series(terminal block type) User’s Manual -


2-7 Expansion Input Unit (KV-N8EX and KV-N16EX)

SPECIFICATIONS
This section describes the names and functions of the parts of the KV-N8EX and KV-N16EX Expansion
Input Units. It also provides the specifications of the units.

Names and Functions of Parts


2
KV-N8EX KV-N16EX

Expansion Input Unit (KV-N8EX and KV-N16EX)


(front panel) (front panel) (Side panel)
(2) Input terminal block (5) Input voltage
selector switch

24V

5V

(3) Input
indicators (1) POWER LED

(4) Expansion unit


connection cable

(6) Expansion unit connection connector


(2) Input terminal block

Number Name Function


(1) POWER LED This lights when the power is on.
(2) Input terminal block This is the input terminal block.
These indicate the input status of the unit.
(3) Input indicators Lit in red : Conducting
Off : Not conducting
This is used to connect the unit to the base unit or another
(4) Expansion unit connection cable expansion unit.
(The cable is approximately 80 mm long.)
(5) Input voltage selector switch This is a switch for selecting the input voltage.
Expansion unit connection
(6) This connector is used to connect an expansion unit.
connector

Reference Direct processing is not supported.

- KV Nano Series(terminal block type) User’s Manual - 2-47


2-7 Expansion Input Unit (KV-N8EX and KV-N16EX)
SPECIFICATIONS

Specifications

KV-N8EX KV-N16EX
Model
2 External connection
(8 Points) (16 Points)
Terminal block
method
Expansion Input Unit (KV-N8EX and KV-N16EX)

Input terminals 24 VDC mode 5 VDC mode 24 VDC mode 5 VDC mode
Maximum input
voltage 26.4 VDC

Rated input voltage 24 VDC, 5.3 mA 5 VDC, 1 mA 24 VDC, 5.3 mA 5 VDC, 1 mA


Minimum ON voltage 19 V 3.5 V 19 V 3.5 V
Maximum OFF
1.5 mA - 1.5 mA -
current
Maximum OFF
- 1.5 V - 1.5 V
voltage
*1
Common method 8 points/1 common (2 terminals) 16 points/1 common (2 terminals)*1

Input Time OFF  ON ON  OFF


Constant Setting TYP MAX TYP MAX
Input time constant
25 µs 10 µs 50 µs 50 µs 150 µs
(four-level switching)
300 µs 240 µs 290 µs 280 µs 390 µs
1 ms 1 ms 1.2 ms 1 ms 1.2 ms
10 ms 10 ms 11 ms 10 ms 11 ms

Input impedance 4.3 k


Internal current
20 mA or less
consumption
Weight 150 g 220 g
*1 The KV-N8EX and KV-N16EX both have 2 commons, but these are shared internally.

2-48 - KV Nano Series(terminal block type) User’s Manual -


2-7 Expansion Input Unit (KV-N8EX and KV-N16EX)

SPECIFICATIONS
Wiring and Internal Circuit Diagrams

 KV-N8EX terminal arrangement  KV-N8EX input circuit diagram


diagram
Sensors
2
COM 001 003

3-wire

3-wire

3-wire

3-wire

Expansion Input Unit (KV-N8EX and KV-N16EX)


• 000 002

Blue

Black
Blue

Black
Blue

Black
Blue

Black
C0

Brown

Brown

Brown

Brown
KV-N8EX

COM 001 003

• 000 002

C0

• 005 007
Internal circuit
COM 004 006
F

• 005 007

COM 004 006

000 to 007 4.3kΩ


Internal circuit

IN
Brown

Brown

Brown

Brown
Circuit for
switching
Black

Black

Black

Black
Blue

Blue

Blue

Blue
between
5 V and 24 V
3-wire

3-wire

3-wire

3-wire
COM
Photo-coupler isolation

Input Sensors
power supply
* The COM terminals are internally shorted through a
fuse with a rating of 1.6 A. Carry out the wiring so
that an excessive current does not flow between the
upper and lower COM terminals.

 KV-N16EX terminal arrangement  KV-N16EX input circuit diagram


diagram
Sensors
COM 001 003 005 007 •
3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

• 000 002 004 006 •


Blue

Black
Blue

Black
Blue

Black
Blue

Black
Blue

Black
Blue

Black
Blue

Black
Blue

Black
Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

COM 001 003 005 007 ●

● 000 002 004 006 ●

• •
C0 •
Internal circuit
• 009 011 013 015 •
F
COM 008 010 012 014 •

● 009 011 013 015 ●

COM 008 010 012 014 ●

000 to 015 4.3kΩ


Internal circuit

IN
Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Circuit for
switching
Black

Black

Black

Black

Black

Black

Black

Black
Blue

Blue

Blue

Blue

Blue

Blue

Blue

Blue

between
5 V and 24 V
3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

COM
Photo-coupler isolation

Input Sensors
power supply
* The COM terminals are internally shorted through a
fuse with a rating of 1.6 A. Carry out the wiring so
that an excessive current does not flow between the
upper and lower COM terminals.

- KV Nano Series(terminal block type) User’s Manual - 2-49


2-7 Expansion Input Unit (KV-N8EX and KV-N16EX)
SPECIFICATIONS

Outline Drawings

KV-N8EX

2
37

2-ø4.5

27.3
Expansion Input Unit (KV-N8EX and KV-N16EX)

35.9
90

82
3.8

45 17.2 83.7

KV-N16EX
57
2-ø4.5
27.3
35.9
90

82
3.8

65 17.2 83.7

2-50 - KV Nano Series(terminal block type) User’s Manual -


2-8 Expansion Output Unit (KV-N8ER/ET/ETP and KV-N16ER/ET/ETP)

SPECIFICATIONS
This section describes the names and functions of the parts of the KV-N8ER, KV-N16ER, KV-N8ET, and
KV-N16ET Expansion Output Units. It also provides the specifications of the units.

Names and Functions of Parts


2
KV-N8ER/

Expansion Output Unit (KV-N8ER/ET/ETP and KV-N16ER/ET/ETP)


KV-N16ER/
KV-N8ET(P) KV-N16ET(P)
(front panel) (front panel) (Side panel)
(2) Output terminal block

OUT OUT

(3) Output
indicators (1) POWER LED
OUT OUT

(4) Expansion unit


connection cable

(5) Expansion unit connection connector


(2) Output terminal block

Number Name Function


(1) POWER LED This lights when the power is on.
(2) Output terminal block This is the output terminal block.
These indicate the output status of the unit.
(3) Output indicators Lit in red : Conducting
Off : Not conducting
This is used to connect the unit to the base unit or another
(4) Expansion unit connection cable expansion unit.
(The cable is approximately 80 mm long.)
Expansion unit connection
(5) This connector is used to connect an expansion unit.
connector

Reference Direct processing is not supported.

- KV Nano Series(terminal block type) User’s Manual - 2-51


2-8 Expansion Output Unit (KV-N8ER/ET/ETP and KV-N16ER/ET/ETP)
SPECIFICATIONS

Specifications

KV-N8ER KV-N16ER KV-N8ET(P) KV-N16ET(P)


Model
2 Output mode
(8 Points)

Relay
(16 Points) (8 Points) (16 Points)
MOSFET (with overcurrent protection
function)*3,5
Expansion Output Unit (KV-N8ER/ET/ETP and KV-N16ER/ET/ETP)

External connection
Terminal block
method
Rated load 250 VAC/30 VDC, 2 A 30 VDC, 0.5 A
Leakage OFF current - 100 µA or less
0.8 VDC or less (with 0.5 A output)
Residual ON voltage -
0.6 VDC or less (with 0.3 A output)
ON resistance 50 m or less -
16 points/1
4 points/1 common 8 points/1 common
Common method Independent common
(8 terminals)*1 (4 terminals)*2
(8 terminals)*2*4
100 µs or less (with a load of 1 mA or
OFF  ON
Response more)
10 ms or less
time 200 µs or less (with a load of 1 mA or
ON  OFF
more)
Internal current
60 mA or less 100 mA or less 30 mA or less 40 mA or less
consumption
Weight 230 g 260 g 160 g 210 g
Electrical: 100,000 times or more
Relay life (20 times/min) -
Mechanical: 20,000,000 times or more
Relay replacement Impossible -
*1 The two C0, C1, C2, and C3 terminals of the KV-N16ER are shorted internally.
(C0, C1, C2, and C3 are independent.)
*2 The KV-N8ET(P) and KV-N16ET(P) COM terminals are shorted internally.
*3 If even a single overcurrent is detected, until the cause of the problem is removed, the protection
operation (output turning OFF) and automatic recovery occur repeatedly for all outputs within the
shared common*4.
*4 For KV-N16ET, the outputs within the shared common which are protected when overcurrents are
detected are outputs 000 to 007, or outputs 008 to 015.
*5 Sink output types use MOSFET (N-ch) output. Source output types use MOSFET (P-ch) output.

2-52 - KV Nano Series(terminal block type) User’s Manual -


2-8 Expansion Output Unit (KV-N8ER/ET/ETP and KV-N16ER/ET/ETP)

SPECIFICATIONS
Wiring and Internal Circuit Diagrams
KV-N8ER wiring diagram
P :

2
+
• C0 C1 C2 C3 • +

• 000 001 002 003 •


OUT


00
C0
01
C1
02
C2
03
C3

• L L L L
P P P P

Expansion Output Unit (KV-N8ER/ET/ETP and KV-N16ER/ET/ETP)


OUT
● C0 C1 C2 C3 ●

KV-N8ER
● ●
000 001 002 003

OUT
4 5 6 7

• 004 005 006 007 •


Internal circuit
OUT • C4 C5 C6 C7 •

• 004 005 006 007 •

• C4 C5 C6 C7 •

● 004 005 006 007 ●

● ●
C4 C5 C6 C7

P L P L P L P L

KV-N8ER internal circuit diagram


000
001
002
003
004
005
006
007
Internal circuit

OUT
Load

C0
C1
C2
C3
C4
C5
C6
C7 Load power supply

KV-N16ER wiring diagram


P : +
C0 002 C0 C1 006 C1 +

000 001 003 004 005 007


OUT
00
C0
01
02
03
C0
04
C1
05
06
07
C1 L L L L L L L L
P P
4 5 6 7
OUT

C0 002 C0 C1 006 C1

KV-N16ER
000 001 003 004 005 007

OUT
8 9 10 11 12 13 14 15

008 010 011 012 014 015


Internal circuit
OUT C2 009 C2 C3 013 C3

008 010 011 012 014 015

C2 009 C2 C3 013 C3

008 010 011 012 014 015

C2 009 C2 C3 013 C3

P L L L L P L L L L

KV-N16ER internal circuit diagram


000 to 003
004 to 007
008 to 011
012 to 015
Internal circuit

OUT
Load

C0
C1
C2
C3

Load power supply


- KV Nano Series(terminal block type) User’s Manual - 2-53
2-8 Expansion Output Unit (KV-N8ER/ET/ETP and KV-N16ER/ET/ETP)
SPECIFICATIONS

Wiring and Internal Circuit Diagrams


KV-N8ET(P) wiring diagram

2
C0 002 C0
*2

000 001 003 L L L L


C0 02 C0
OUT 00 01 03

C0 002 C0
Expansion Output Unit (KV-N8ER/ET/ETP and KV-N16ER/ET/ETP)

OUT
000 001 003

KV-N8ET

*1

F Internal circuit *1 The COM terminals are internally


OUT
shorted through a fuse with a
OUT C0
04
05
06
C0
07
rating of 5 A. Carry out the wiring
004 006 007
004 006 007
so that an excessive current does
C0 005 C0
C0 005 C0
not flow between the upper and
*2
lower COM terminals.
L L L L
*2 For KV-N8ETP

KV-N8ET internal circuit diagram

Isolated power
supply

Isolated protection 000 to 003


power supply
004 to 007
Internal circuit

Protection
circuit

C0

KV-N8ETP internal circuit diagram


C0
Isolated power
supply
Protection
circuit
Internal circuit

Output circuit

L
000 to 003
004 to 007

KV-N16ET(P) wiring diagram


C0 002 C0 C0 006 C0
*2 *2
000 001 003 004 005 007 L L L L L L L L
C0 02 C0 C0 06 C0
OUT
00 01 03 04 05 07

C0 002 C0 C0 006 C0
4 5 6 7

*1 The connection between the


OUT
000 001 003 004 005 007

KV-N16ET
C0 and C1 terminals is
*1
internally shorted through a
Internal circuit
fuse with a rating of 5 A. Carry
F
OUT

out the wiring so that an


8 9 10 11 12 13 14 15

08 10 11 12 14 15
OUT C1

excessive current does not


09 C1 C1 13 C1

008 010 011 012 014 015

C1 009 C1 C1 013 C1
008 010 011 012 014 015
flow between the C0 and C1
C1 009 C1 C1 013 C1
terminals.
*2 For KV-N16ETP
*2 *2

L L L L L L L L

2-54 - KV Nano Series(terminal block type) User’s Manual -


2-8 Expansion Output Unit (KV-N8ER/ET/ETP and KV-N16ER/ET/ETP)

SPECIFICATIONS
KV-N16ET internal circuit diagram

Isolated power
supply
Isolated protection
power supply 000 to 007
008 to 015
2
Internal circuit

Protection

Expansion Output Unit (KV-N8ER/ET/ETP and KV-N16ER/ET/ETP)


circuit

C0
C1

KV-N16ETP internal circuit diagram


C0
C1
Isolated power
supply
Protection
circuit
Internal circuit

Output circuit

L
000 to 007
008 to 015

Outline Drawings

KV-N8ET(P) KV-N8ER/KV-N16ER/KV-N16ET(P)
37 57

2-ø4.5 2-ø4.5

27.3
27.3

35.9
35.9

90

82
90

82

3.8
3.8

45 17.2 83.7 65 17.2 83.7

- KV Nano Series(terminal block type) User’s Manual - 2-55


2-9 Expansion I/O Unit (KV-N8EXR and KV-N8EXT)
SPECIFICATIONS

This section describes the names and functions of the parts of the KV-N8EXR and KV-N8EXT
Expansion I/O Units. It also provides the specifications of the units.

Names and Functions of Parts


2
KV-N8EXR/
Expansion I/O Unit (KV-N8EXR and KV-N8EXT)

KV-N8EXT
(front panel) (Side panel)
(2) Input terminal block (5) Input voltage
selector switch

24V
(3) Input 4 5 6 7
5V
IN

indicators
KV-N16EXT

(1) POWER LED


(7) Output OUT
8 9 10 11 12 13 14 15

indicators (4) Expansion unit


connection cable

(6) Output terminal block (8) Expansion unit connection connector

Number Name Function


(1) POWER LED This lights when the power is on.
(2) Input terminal block This is the input terminal block.
These indicate the input status of the unit.
(3) Input indicators Lit in red : Conducting
Off : Not conducting
This is used to connect the unit to the base unit or another
(4) Expansion unit connection cable expansion unit.
(The cable is approximately 80 mm long.)
(5) Input voltage selector switch This is a switch for selecting the input voltage.
(6) Output terminal block This is the output terminal block.
These indicate the output status of the unit.
(7) Output indicators Lit in red : Conducting
Off : Not conducting
Expansion unit connection
(8) This connector is used to connect an expansion unit.
connector

Reference Direct processing is not supported.

2-56 - KV Nano Series(terminal block type) User’s Manual -


2-9 Expansion I/O Unit (KV-N8EXR and KV-N8EXT)

SPECIFICATIONS
Specifications

Model KV-N8EXR (8 + 8 Points) KV-N8EXT (8 + 8 Points)


External connection method
Number of inputs
Terminal block
8 2
Input mode 24 VDC mode 5 VDC mode 24 VDC mode 5 VDC mode

Expansion I/O Unit (KV-N8EXR and KV-N8EXT)


Maximum input voltage 26.4 VDC
Rated input voltage 24 VDC/5.3 mA 5 VDC/1 mA 24 VDC/5.3 mA 5 VDC/1 mA
Minimum ON voltage 19 V 3.5 V 19 V 3.5 V
Maximum OFF current 1.5 mA - 1.5 mA -
Maximum OFF voltage - 1.5 V - 1.5 V
Common method 8 points/1 common (1 terminal)*1
Input

Input Time OFF  ON ON  OFF


Constant Setting TYP MAX TYP MAX
Input time constant 25 µs 10 µs 50 µs 50 µs 150 µs
300 µs 240 µs 290 µs 280 µs 390 µs
1 ms 1 ms 1.2 ms 1 ms 1.2 ms
10 ms 10 ms 11 ms 10 ms 11 ms

Input impedance 4.3 kΩ


Number of outputs 8
MOSFET (N-ch; with overcurrent protection
Output mode Relay
function)*4
Rated load 250 VAC/30 VDC, 2 A 30 VDC, 0.5 A
Leakage OFF current - 100 µA or less
0.8 VDC or less (with 0.5 A output)
Residual ON voltage -
0.6 VDC or less (with 0.3 A output)
ON resistance 50 mΩ or less -
4 points/1 common (2 terminals)*1, 2 8 points/1 common (4 terminals)*1, 3
Output

Common method
100 µs or less (with a load of 1 mA or
OFF  ON
Runtime

more)
10 ms or less
200 µs or less (with a load of 1 mA or
ON  OFF
more)
Electrical: 100,000 times or more
Relay life (20 times/min) -
Mechanical: 20,000,000 times or more

Relay replacement Impossible -

Internal current consumption 60 mA or less 30 mA or less


Weight 230 g 210 g
*1 The input COM and output COM terminals are independent.
*2 The KV-N8EXR has two C1 output terminals and two C2 output terminals, but each pair of these terminals
is shared internally. (C1 and C2 are independent.)
*3 The KV-N8EXT has four COM output terminals, but these terminals are shared internally.
*4 If even a single overcurrent is detected, until the cause of the problem is removed, the protection operation
(output turning OFF) and automatic recovery occur repeatedly for all outputs within the shared common.

- KV Nano Series(terminal block type) User’s Manual - 2-57


2-9 Expansion I/O Unit (KV-N8EXR and KV-N8EXT)
SPECIFICATIONS

Wiring and Internal Circuit Diagrams

KV-N8EXR wiring diagram

2
Sensors
C0 001 003 005 007 •

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire
• 000 002 004 006 •

Blue

Black
Blue

Black
Blue

Black
Blue

Black
Blue

Black
Blue

Black
Blue

Black
Blue

Black
C0 01 03 05 07 •
IN

Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown
• 00 02 04 06 •
Expansion I/O Unit (KV-N8EXR and KV-N8EXT)

4 5 6 7
IN

C0 001 003 005 007 ●

KV-N16EXR
● 000 002 004 006 ●

OUT
8 9 10 11 12 13 14 15 Internal circuit
008 010 011 012 014 015
OUT C1 009 C1 C2 013 C2

008 010 011 012 014 015


008 010 011 012 014 015
C1 009 C1 C2 013 C2
C1 009 C1 C2 013 C2

P L L L L P L L L L
P : +
+

KV-N8EXR internal circuit diagram (input) KV-N8EXR internal circuit diagram (output)
000
001
002
000 to 007 4.3kΩ 003
004
Internal circuit

IN 005
Circuit for
switching 006
between 007
Internal circuit

5 V and 24 V OUT
C0
Load
Photo-coupler isolation
C0
Input C1
power supply
C2
C3
C4
C5
C6
C7 Load power supply

KV-N8EXT wiring diagram


Sensors
C0 001 003 005 007 •
3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

3-wire

• 000 002 004 006 •


Blue

Black
Blue

Black
Blue

Black
Blue

Black
Blue

Black
Blue

Black
Blue

Black
Blue

Black

C0 01 03 05 07 •
IN
Brown

Brown

Brown

Brown

Brown

Brown

Brown

Brown

• 00 02 04 06 •

4 5 6 7
IN

C0 001 003 005 007 ●

KV-N16EXT
● 000 002 004 006 ●

OUT
8 9 10 11 12 13 14 15
Internal circuit
008 010 011 012 014 015
OUT C1 009 C1 C1 013 C1

008 010 011 012 014 015


008 010 011 012 014 015
C1 009 C1 C1 013 C1
C1 009 C1 C1 013 C1

L L L L L L L L

KV-N8EXT internal circuit diagram (input) KV-N8EXT internal circuit diagram (output)

Isolated power
supply
000 to 007 4.3kΩ Isolated protection
Internal circuit

power supply
IN
Circuit for 008 to 015
Internal circuit

switching L
between
5 V and 24 V
COM0
Protection
Photo-coupler isolation circuit
Input C1
power supply

2-58 - KV Nano Series(terminal block type) User’s Manual -


2-9 Expansion I/O Unit (KV-N8EXR and KV-N8EXT)

SPECIFICATIONS
Outline Drawings

KV-N8EXR/KV-N8EXT
57
2-ø4.5 2

27.3

Expansion I/O Unit (KV-N8EXR and KV-N8EXT)


35.9
82
90
3.8

65 17.2 83.7

- KV Nano Series(terminal block type) User’s Manual - 2-59


2-10 Extension Serial Communication Cassette (KV-N10L and KV-N11L)
SPECIFICATIONS

This section describes the names and functions of the parts of the KV-N10L and KV-N11L Extension
Serial Communication Cassettes. It also provides the specifications of the cassettes.
For details, see the KV Nano Series "Serial Communication Function User's Manual."

2 Names and Functions of Parts


Extension Serial Communication Cassette (KV-N10L and KV-N11L)

KV-N10L KV-N11L

(1) SD indicator (2) RD indicator

(3) Mounting
screw

(4) D-sub 9-pin connector (6) Electrical termination


(5) 5-pin terminal block selector switch
(for RS-232C (for RS-422A/485
communication) communication)

Number Name Function


(1) SD indicator This lights in orange when data is being transmitted.
(2) RD indicator This lights in orange when data is being received.
(3) Mounting screw Use the mounting screws to mount the cassette on the base unit.
(4) D-sub 9-pin connector This is a male D-sub 9-pin connector.
(5) 5-pin terminal block This is a connector for communications. It cannot be removed.
Use this switch to turn electrical termination on and off.
ON : Electrical termination will be used.
Electrical termination
(6) OFF : Electrical termination will not be used.
selector switch
Only set this to ON when you are installing the KV-N11L as a main
line terminator.

2-60 - KV Nano Series(terminal block type) User’s Manual -


2-10 Extension Serial Communication Cassette (KV-N10L and KV-N11L)

SPECIFICATIONS
Specifications

 General specifications

Item KV-N10L KV-N11L 2


Operating environment As little dust and corrosive gases as possible

Extension Serial Communication Cassette (KV-N10L and KV-N11L)


Operating ambient temperature 0°C to 55°C
Operating ambient humidity 5%RH to 95%RH
Storage ambient temperature -25°C to +75°C
Storage ambient humidity 35%RH to 85%RH (no condensation)
Number of times that the
product can be connected and 80
disconnected

 Communication format specifications


If you will use the device in a mode other than KV STUDIO mode, use the Unit Editor to configure the
settings.

Usable Interface
Operation Mode KV-N10L KV-N11L
RS-232C RS-422A/485 (4-wire) RS-485 (2-wire)
KV mode (host link) Yes Yes No
KV mode (text transmission) Yes Yes Yes
KV STUDIO mode Yes Yes Yes
Non-procedure mode Yes Yes Yes
Modbus master mode Yes Yes Yes
Modbus slave mode Yes Yes Yes
Serial PLC Link mode No No Yes

 Serial communication specifications


KV-N10L

Specification
Communication standard RS-232C
Interface
Connection D-sub 9-pin
1200, 2400, 4800, 9600, 19200, 38400, 57600,
Baud rate
115200 bps
Transmission method Full duplex
Start bit 1 bit
Data format Data bits 7 bits, 8 bits
Transmission
RS-232C Stop bits 1 bit, 2 bits
specifications
Error
Parity Even, odd, none
detection
RS/CS flow control Enabled, disabled
Transmission distance 15 m
Number of transmission units 1
Indication SD (orange), RD (orange)

- KV Nano Series(terminal block type) User’s Manual - 2-61


2-10 Extension Serial Communication Cassette (KV-N10L and KV-N11L)
SPECIFICATIONS

KV-N11L
Specification
Communication standard RS-422A, RS-485 (4-wire), RS-485 (2-wire)
Interface European terminal block (cannot be removed
Connection
2 or reconnected)
1200, 2400, 4800, 9600, 19200, 38400, 57600,
Baud rate
115200 bps
Extension Serial Communication Cassette (KV-N10L and KV-N11L)

Transmission method Full duplex


Start bit 1 bit
Data format Data bits 7 bits, 8 bits
RS-422A,
Stop bits 1 bit, 2 bits
RS-485
Error
(4-wire) Parity Even, odd, none
detection
Transmission distance Extendable up to 1200 m
Number of transmission units 32
Set with the switch on the front panel of the
Electrical termination
Transmission main unit
specifications 1200, 2400, 4800, 9600, 19200, 38400, 57600,
Baud rate
115200 bps
Transmission method Half duplex
Start bit 1 bit
Data format Data bits 7 bits, 8 bits
RS-485 Stop bits 1 bit, 2 bits
(2-wire) Error
Parity Even, odd, none
detection
Transmission distance Extendable up to 1200 m
Number of transmission units 32
Set with the switch on the front panel of the
Electrical termination
main unit
Indication SD (orange), RD (orange)

2-62 - KV Nano Series(terminal block type) User’s Manual -


2-10 Extension Serial Communication Cassette (KV-N10L and KV-N11L)

SPECIFICATIONS
Wiring and Internal Circuit Diagrams

 KV-N10L
2
Pin
Signal Name Signal Direction

Extension Serial Communication Cassette (KV-N10L and KV-N11L)


Number
1 5 1 - -
2 RD (receive data) Input
3 SD (send data) Output
4 ER (data end ready) Output
5 SG (signal ground) -
6 9 6 DR (data set ready) Input
7 RS (request send)*1 Output
8 CS (can send) Input
9 - -

*1 When the product cannot receive data, this signal is set to low. It is normally set to high.

 KV-N11L

RS-422A, RS-485 (4-Wire) RS-485 (2-Wire)


Pin
Signal Signal
Number Direction Direction
Name Name
1 SDA (-) Output S/R (-) -
2 SDB (+) Output S/R (+) -
3 RDA (-) Input - -
4 RDB (+) Input - -
1 5
5 SG - SG -

 RS-422A, RS-485 (4-Wire) interface functional block diagram

220Ω
SDB(+)
Send data +
-
SDA(-)

220Ω
+ RDB(+)
Receive data
- RDA(-)
* SG is isolated from the internal

SG
GND of the base unit.

 RS-485 (2-Wire) interface functional block diagram

S/R(+)
Send data +
-
S/R(-)

220Ω
+
Receive data
- * SG is isolated from the internal
SG GND of the base unit.

- KV Nano Series(terminal block type) User’s Manual - 2-63


2-10 Extension Serial Communication Cassette (KV-N10L and KV-N11L)
SPECIFICATIONS

Outline Drawings

KV-N10L

2 6.4 13.4
83.7

38.6
Extension Serial Communication Cassette (KV-N10L and KV-N11L)

48.6

(142)

KV-N11L

83.7
6.4 13.4

38.6
48.6

2-64 - KV Nano Series(terminal block type) User’s Manual -


2-11 Extension Access Window Cassette (KV-N1AW)

SPECIFICATIONS
This section describes the names and functions of the parts of the KV-N1AW Extension Access
Window Cassette. It also provides the specifications of the cassette.

Names and Functions of Parts


2
KV-N1AW

Extension Access Window Cassette (KV-N1AW)


(1) Display area

(2) M (menu) key (4) ▲ (up arrow) key

(3) (arrows) key (6) (Enter) key

(5) ▼ (down arrow) key

Number Name Function


This displays text.
The backlight is used to display the operation status.
(1) Display area Lit in green: RUN mode.
Lit in red: PROG mode.
An error has occurred.
Press this to switch to the menu display. If you turn the power on
(2) M (menu) key
while holding down this key, a program will be loaded automatically.
Press this to move to the left and right.
(3) (arrows) key (For example, when you need to change the digit to set a device
value.)
(4) ▲ (up arrow) key Press these to select the upper or lower item.
(5) ▼ (down arrow) key (For example, to select a different menu.)
Press this to confirm your entry.
(6) (Enter) key In some cases, you may have to hold down this button for 1 second
or more.
For details, see "Access Window" (page 5-202).

Specifications

Item KV-N1AW
Operating environment As little dust and corrosive gases as possible
Operating ambient
0°C to 55°C
temperature
5%RH to 90%RH
(At 40°C or higher, use the product in an environment with an absolute
Operating ambient humidity
humidity that is less than or equal to the absolute humidity present at 40°C
with 90%RH.)
Storage ambient temperature -25°C to +75°C
35%RH to 85%RH (no condensation)
(At 40°C or higher, store the product in an environment with an absolute
Storage ambient humidity
humidity that is less than or equal to the absolute humidity present at 40°C
with 90%RH.)
Number of times that the
product can be connected and 200
disconnected
Memory save method Built-in flash ROM (can be rewritten 10,000 times)

- KV Nano Series(terminal block type) User’s Manual - 2-65


2-11 Extension Access Window Cassette (KV-N1AW)
SPECIFICATIONS

Outline Drawings

83.7

2
4.5 13.5

38.6
Extension Access Window Cassette (KV-N1AW)

48.6

2-66 - KV Nano Series(terminal block type) User’s Manual -


2-12 Connecting transformer unit (KV-N1)

SPECIFICATIONS
This section describes the names and functions of the parts of the connecting transformer unit.

Names and Functions of Parts

KV-N1 2
(front panel) (side panel)

Connecting transformer unit (KV-N1)


(1)
Expansion unit
connection
cable

(2)
Expansion unit
connection
connector

Number Name Function


Expansion unit connection This is used to connect the unit to the terminal block type base unit
(1)
cable or another expansion unit. (The cable is approximately 80 mm long.)
Expansion unit connection
(2) This connector is used to connect a connector type expansion unit.
connector

Point Up to 1 connecting transformer unit KV-N1 can be used in 1 system.

Outline Drawings
27.3
35.9
90

22.2
3.8

80.4

- KV Nano Series(terminal block type) User’s Manual - 2-67


2-12 Connecting transformer unit (KV-N1)
SPECIFICATIONS

MEMO

2
Connecting transformer unit (KV-N1)

2-68 - KV Nano Series(terminal block type) User’s Manual -


UNIT INSTALLATION AND MAINTENANCE
3
UNIT INSTALLATION AND
MAINTENANCE
This chapter describes how to install the KV Nano Series as well as how to
attach units, wiring precautions, and maintenance procedures.

3-1 Connecting Units...................................................... 3-2


3-2 Unit Installation....................................................... 3-12
3-3 Wiring Precautions ................................................. 3-14
3-4 Maintenance........................................................... 3-20

- KV Nano Series(terminal block type) User’s Manual - 3-1


3-1 Connecting Units
UNIT INSTALLATION AND MAINTENANCE

This section describes how to construct units and how to install units on DIN rails and similar objects.

Precautions When Connecting Units

Be sure to observe the following point when connecting units.


• Be sure to turn each unit and cassette off before you connect them.
3
KV Nano Series Expansion unit
Connecting Units

base unit Up to 8 units (or 3 KV-N14** units)

• The KV-N24**, KV-N40**, and KV-N60** use backup capacitors to store clock
Point
data.
If you do not turn these products on for a long time, the clock data may be lost.
If you want to use the clock data, set it when you start the devices.
• You can use up to two expansion unit connection extension cables (but do not
use them connected to each other).
• If you connect two or more extension access window cassettes to a single base
unit, the base unit will not operate.
• You can connect only 1 each of the connecting transformer units KV-N1 and
KV-NC1.
• Connector type units can be used through the use of terminal block-connector
conversion unit KV-N1.

 Maximum number of connected units


You can connect up to eight expansion units (up to three KV-N14** units) per base unit.

3-2 - KV Nano Series(terminal block type) User’s Manual -


UNIT INSTALLATION AND MAINTENANCE
3-1 Connecting Units

Constructing Units

As an example, this section describes how to construct the KV Nano Series Base Unit and the KV-
N16EX Expansion I/O Unit.

3
KV-N24DT KV-N16EX

Connecting Units
(left side) (right side)

Point Be sure to turn the units off before you construct them.

 When connecting a terminal block type expansion unit

1 Remove the sticker and then the expansion


unit connection connector cover of the unit
on the left side.

2 Insert the connector cable that is coming


out of the left side of the unit on the right
into the expansion unit connection
connector.

3 Attach the cover that you removed in step 1.

- KV Nano Series(terminal block type) User’s Manual - 3-3


UNIT INSTALLATION AND MAINTENANCE

3-1 Connecting Units

 When using the expansion unit connection extension cable

Connector (female)

Connector (male)

3
Expansion unit connection
Connecting Units

extension cable cover

1 Insert the expansion unit connection


extension cable connector (female) into the
expansion unit connection connector of the
unit on the left.

2 Pass the connector cable that is coming out


of the left side of the unit on the right
through the top of the expansion unit
connection extension cable cover.

3 Insert the connector cable of the unit on the


right into the connector (male).

4 Store the connected parts within the


expansion unit connection extension cable
cover.

Reference Attach the expansion unit connection extension cable cover to a DIN rail.

3-4 - KV Nano Series(terminal block type) User’s Manual -


UNIT INSTALLATION AND MAINTENANCE
3-1 Connecting Units

 When connecting to a connector type expansion unit

KV-N24+KV-N1 KV-NC1EP
(left side) (right side)

Connecting Units
Point Be sure to turn the units off before you construct them.

1 Connect the terminal block type base unit (or


expansion unit) and the connecting transformer
unit KV-N1.
• Refer to the procedure in "Connecting a terminal
block type expansion unit".

2 Release the lock levers attached to the top and


bottom of the right unit.
• Slide them towards the front of the unit to release
the lock.

3 Insert the right unit's lock lever into the lock lever
slot on the left unit.
• They can be easily connected by holding them
parallel and aligning the positions of the connectors.

4 Lock the lock levers attached to the top and


bottom of the right unit.
• Perform the reverse of step 1 by sliding the lock
levers towards the back of the unit. Check that
there is not a gap between the units.
If there is a gap, they are not properly connected.

- KV Nano Series(terminal block type) User’s Manual - 3-5


UNIT INSTALLATION AND MAINTENANCE

3-1 Connecting Units

Disconnecting Units

As an example, this section describes how to disconnect the KV Nano Series Base Unit and the KV-
N16EX Expansion I/O Unit.

3 Point Be sure to turn the units off before you construct them.
Connecting Units

 When connected to a terminal block type expansion unit

1 Remove the expansion unit connection


connector cover of the unit on the left side.

2 Grasp the tab of the connection cable, and


then pull the connector free.

 When using the expansion unit connection extension cable

1 Follow steps 1 and 2 of the procedure for when the units have been connected directly.

2 Press the fixation device on the top of the expansion


unit connection extension cable cover to remove the
cable.

3 Press the connector's fixation device to remove the


connector.

3-6 - KV Nano Series(terminal block type) User’s Manual -


UNIT INSTALLATION AND MAINTENANCE
3-1 Connecting Units

 When connected to a connector type expansion unit

1 Release the lock levers attached to the top and


bottom of the right unit.
• Slide them towards the back of the unit.

2 Pull out the unit on the right. 3


• Pull it out straight to ensure that no strain is put on

Connecting Units
the connector.

- KV Nano Series(terminal block type) User’s Manual - 3-7


UNIT INSTALLATION AND MAINTENANCE

3-1 Connecting Units

Attaching Cassettes

As an example, this section describes how to attach the KV-N1AW Extension Access Window Cassette
to the KV Nano Series Base Unit.

3
Connecting Units

KV-N24DT KV-N1AW

Point Be sure to turn the units off before you construct them.

1 Remove the base unit's extension cassette socket


cover.

2 Insert the extension cassette's connector into the


extension cassette socket.

3-8 - KV Nano Series(terminal block type) User’s Manual -


UNIT INSTALLATION AND MAINTENANCE
3-1 Connecting Units

• Ensure that the connector is perpendicular when you insert the cassette into the
Reference
socket. Inserting the cassette into the socket at an angle may damage the products.

Connecting Units
• If you are using the KV-N10L or KV-N11L, after you attach the cassette, tighten the
fixation screws to hold the cassette in place before you use the cassette.
• You will require the extension cassette socket cover to use the base unit after
removing the extension cassette. Therefore, be sure to store the extension cassette
socket cover in a safe place.

 Removing the cassette

1 Grasp the top and bottom of the extension cassette,


and then pull it free of the base unit.

• When you want to use the base unit after removing the extension cassette, first attach
Reference
the extension cassette socket cover.
• For the extension serial communication cassette, first loosen the fixation screw, and
then remove the cassette.

NOTICE Be sure to turn the power off before you remove the cassette.

- KV Nano Series(terminal block type) User’s Manual - 3-9


UNIT INSTALLATION AND MAINTENANCE

3-1 Connecting Units

Installing Units on DIN Rails

This section describes how to install connected units on and remove connected units from DIN rails.

 Installing units

3 1 Hang the slot on the top of the DIN rail onto the DIN-rail
fasteners on the top of each unit.
Connecting Units

Top fastener
DIN rail

2 Insert the bottom part of the DIN rail into the DIN-rail
fasteners on the bottom of each unit.
• The lower black fasteners are attached to a spring. Press
down on these fasteners until you hear a click.
• In locations where it is difficult to install the units, first
release all locks, install the units on the DIN rail, and then
lock all the locks.

3 Check that the bottom DIN-rail fasteners are all inserted


(locked).

Fastener is Fastener is
properly locked not locked

 Removing units

1 Pull the bottom DIN-rail fasteners down.

When rail is not attached

2 Follow the reverse of the installation procedure to


remove the DIN rail from the units.

3-10 - KV Nano Series(terminal block type) User’s Manual -


UNIT INSTALLATION AND MAINTENANCE
3-1 Connecting Units

Installing Units Directly in an Industrial Control Panel

This section describes how to install connected units in and remove connected units from industrial
control panels.

 Installing units
3
1 Use the screw holes on the upper-left and lower-right of

Connecting Units
each KV Nano Series unit to screw the units directly into the
panel surface.

 Removing units

1 Remove the screws from the screw holes on the upper-left


and lower-right of each KV Nano Series unit to remove the
units from the panel surface.

For the dimensions of the mounting holes, see each unit's outline drawings.
Reference
• Connector type expansion units cannot be installed directly onto the panel surface.

- KV Nano Series(terminal block type) User’s Manual - 3-11


3-2 Unit Installation
UNIT INSTALLATION AND MAINTENANCE

This section describes precautions regarding the installation environment of the units and describes the
panel mounting position.

Installation Environment

Don't install the device in the locations listed below.


3 A location that is subject to A location with an ambient temperature A location with an ambient humidity that is
direct sunshine that is not within the range of 0 to +55°C not within the range of 5 to 95%RH
Unit Installation

A location in which condensation forms A location with corrosive or A location with heavy dust, salt,
because of sudden temperature changes combustible gas iron powder, or soot

A location that is subject to A location that is subject to sprayed A location in which strong
direct vibration or shock liquids such as water, oil, and drugs magnetic and electric fields occur

Magnetic
Drugs Electric field
Oil field

• A location at an altitude exceeding 2000 m

Installation Position

 Device orientation
When you install the KV Nano Series Base Unit in a panel, ensure that the front surface faces out.

3-12 - KV Nano Series(terminal block type) User’s Manual -


UNIT INSTALLATION AND MAINTENANCE
3-2 Unit Installation

 Space surrounding the device


Install the device such that there is at least 30 mm of space between the device and the wall behind it
and between the device and other equipment.

30 mm

30 mm
Series units
3
Below

Unit Installation
Allow 30 mm of space so that
you can insert your finger to remove
30 mm the lock lever.

Above and to left of device


Allow 30 mm of space for heat dissipation.

If the panel temperature (the temperature indicated on the lower, central part (30
Point
mm) of the unit) exceeds the ambient usage temperature, reduce the temperature
by using methods such as forced air cooling and improving ventilation by
increasing the space around the device.

- KV Nano Series(terminal block type) User’s Manual - 3-13


3-3 Wiring Precautions
UNIT INSTALLATION AND MAINTENANCE

This section describes how to assemble connectors, the wiring and internal circuits of each unit, and
how to wire each unit.

Unit Wiring Precautions

Wiring precautions for I/O units and expansion I/O units are given below. Be sure to read these

3 precautions before you wire units.

 I/O unit wiring precautions


Wiring Precautions

Note the following precautions when wiring I/O units.


• Wire the input and output cables separately.
• If I/O signal cables are close to power cables, the I/O signal cables may be influenced by high voltage
and current, which may lead to operation errors. I/O signal cables should be laid at least 100 mm
away from power cables.
• Lay 24 VDC I/O cables separately from 100 VAC and 200 VAC power cables.
• When using cable conduits during wiring, ensure that the cable conduits are grounded securely.
• Be sure to turn all devices off before performing wiring. Failure to do so may lead to electric shock
and product damage.
• After performing wiring or similar tasks, be sure to attach the terminal cover that is included with the
product before turning the power on and performing operations. Failure to do so may lead to electric shock.

When you cannot lay cables separately from power cables


Use a shielded cable that houses all the wires, and ground the cable on the PLC side.
(Depending on the environment, you may have to ground the cable on the side opposite the PLC or on
both sides.)

PLC Shielded cable


Sensor or other similar device

Input

RL

Output

24 VDC D-type ground

 Grounding precautions
• Ground each device separately using D-type grounding facilities. In addition, ensure that the
grounding resistance in this situation is 100 or less.
• If separate grounding is not possible, ground all the devices from a common point. However, in this
situation, all cables must be the same length.
• Use the FG terminals to ground the devices (do not ground the power supply terminals).

Other Other Other


PLC device PLC device PLC device

B
A B A

D-type ground A=B A>B


A<B

3-14 - KV Nano Series(terminal block type) User’s Manual -


UNIT INSTALLATION AND MAINTENANCE
3-3 Wiring Precautions

 External wiring example


This section gives an example of wiring a peripheral to the input of the KV Nano Series.
We recommend that you use a shielded, twisted-pair cable to connect the devices.
Ground the shielded cable on the PLC side. (Depending on the environment, you may have to ground
the cable on the side opposite the PLC or on both sides.)

 Using an external 24 V power supply 3

Wiring Precautions
Wiring sink-type output Wiring source-type output

External External
power supply power supply

Peripheral Peripheral
device device

In environments with a great deal of noise, you may be able to reduce the effect of noise
Reference
by implementing the following counter-measures.
• Using separate 24 V power supplies for the KV Nano Series and for I/O.
• Using twisted-pair cables consisting of signal lines (+24 V or 0 V) inputting to the input
side common for the open collector output signal.
• Passing the 24 V and 0 V used for I/O through a ferrite core.

 Using the KV Nano Series service 24 V power supply


Wiring sink-type output Wiring source-type output

KV Nano KV Nano
Service Service
power supply power supply
+24V +24V
0V 0V Peripheral
device
C0 C0
Peripheral
device
R000 R000

The service power supply is only available with the AC power supply type KV
Point
Nano Series. The DC power supply type does not have the service power supply.
Use the 24 V that is supplied to the power supply terminals.

- KV Nano Series(terminal block type) User’s Manual - 3-15


UNIT INSTALLATION AND MAINTENANCE

3-3 Wiring Precautions

 Contact protection
When you are using clutches, motors, solenoids, or other inductive loads, an inrush current will flow
when power is applied to the load, and inverting voltage will be generated when the load is turned off.
Inrush current and inverting voltage are major factors in reducing the life of the contact. To reduce the
occurrences of these phenomena, provide a contact protection circuit.
Contact protection circuit example

3 With an AC load (1) With a DC load (1)


Contact

Contact
Wiring Precautions

L L

Load CR circuit Load Diode


With an AC load (2) With a DC load (2)

a b
L L

Zener diode
Non-linear resistance
• Supply voltage 24 to 48 V To position b
100 to 200 V To position a
Attach the power supply so that it behaves in this manner.
• Use a load coil that has a rating that is less than or equal to the capacity of the contact.
• Use a diode that has a withstand voltage at least 10 times the circuit voltage and that has a forward
current that is greater than or equal to the load current.
• Attach the diode, non-linear resistance, and CR circuit directly to the relay coil terminal.

 Terminal block unit wiring


Use stranded copper wire having a wire gauge of AWG #14 to #20 and temperature rating of 60°C or
higher as the lead for wiring to the terminal block (the temperature rating must be 105°C or higher for
the leads used in wiring to the terminal block on relay type output units).
Use a tightening torque of 0.59 to 0.88 N•m (5.2 to 7.8 lb.-In).
Use Y terminals that have the following dimensions.

B
d2

Compatible dimensions
B : 6 mm or less
L
Y terminal part dimensions
L : 13 mm or less
B : Y-shaped part outer size
d1 : Diameter of power line outlet d2 : 3.2 mm or more
d2 : Y-shaped part inner width
(part that the screw grips)
L : Total length d1
Recommended products

Manufacturer Model B d1 d2 L Compatible Wire (Stranded)


Nippon Tanshi Co., Ltd. VD1.25−3 5.5 1.7 3.3 11.5 0.25 to 1.65 mm2 (AWG 22 to 16)
DAIDO SOLDERLESS
6.0 1.7 3.7 12.8 0.25 to 1.65 mm2 (AWG 22 to 16)
TERMINAL MFG. CO., LTD. F1.25−C3.5
NICHIFU Co., Ltd. 0.3Y−3 5.2 1.0 3.2 12.0 0.3 to 0.5 mm2 (AWG 22 to 20)
JST Mfg. Co., Ltd. 0.5−3A 5.0 1.0 3.2 12.5 0.2 to 0.5 mm2 (AWG 26 to 22)
FUJI TERMINAL V1.25− 5.7 3.3 3.8 20 0.25 to 1.65 mm2 (AWG 22 to 16)
INDUSTRY CO., LTD. YASS3.5

3-16 - KV Nano Series(terminal block type) User’s Manual -


UNIT INSTALLATION AND MAINTENANCE
3-3 Wiring Precautions

Hold the screwdriver so that it is perpendicular with the terminal block screws when
Reference
wiring cables to the terminal block. Tightening the screws with the screwdriver held in
any orientation other than perpendicular with the terminal block screws may damage the
terminal block.

 European terminal block wiring 3


When wiring to the KV-N10L European terminal block, use wires within the following range of

Wiring Precautions
specifications.

Item Description
Compatible cable size AWG22 to AWG20 (0.3 mm2 to 0.5 mm2)
Length of stripped cable 4 to 5 mm
Tightening torque 0.2 N・m
Recommended tool Blade: 0.42 × 2.5 mm

 Cables
 Cables used with the terminal block
(1) When using stranded wires or single wires as is
(a) Twist the tip of stranded wires so that there are no loose wires.
(b) Do not solder plate the tips of single wires.
4 to 5 mm
(2) When using rod terminals with insulating sleeves
Insulating sleeve
Depending on the thickness of the wire's sheath, it may be difficult to
insert the wire into the insulating sleeve. Therefore, use the outline Contact part
diagram as a reference when you select wires.
6 mm
2 to 2.5 mm
10.5 to 12 mm
Manufacturer Shape
AI0.34-6BU (AWG22)
Phoenix Contact GmbH & Co. KG
AI0.5-6BU (AWG20)

- KV Nano Series(terminal block type) User’s Manual - 3-17


UNIT INSTALLATION AND MAINTENANCE

3-3 Wiring Precautions

Removing the Terminal Block

This section describes how to remove the terminal block.

Point Be sure to turn the power off before removing the terminal block.

3
1
Wiring Precautions

Open cover of the terminal block installed on the unit.

2 Remove the screws that are fixing the terminal block in


place, and then remove the terminal block.

These screws are used to fix the


terminal block in place.

3 Pull the terminal block toward you to remove it.


• Pull the terminal block toward you with the minimum force
required.

• You can remove the terminal block from the KV-N24**, KV-N40**, and KV-N60**.
Point
• You cannot remove the terminal block from the KV-N14**.
• You also cannot remove the terminal block from the expansion I/O units and
expansion special units.

3-18 - KV Nano Series(terminal block type) User’s Manual -


UNIT INSTALLATION AND MAINTENANCE
3-3 Wiring Precautions

Precautions When Using the USB Port or Serial Communication Port to Communicate with a PC or Other Peripheral

For the DC power supply type KV Nano Series base units, 0 V of the power supply is electrically
connected to the SGs of the USB port and the serial communication port. A potential difference
between the product being connected to and the SGs will lead to damage to the base unit and to the
product being connected to. For example, if you positively ground (perform grounding on the 24 V side)
the products, a potential difference will occur, and current will flow along the path shown in the following 3
figure. This may cause damage to the products. Do not wire the products in the manner shown in the

Wiring Precautions
following figure.

External power KV Nano Series base unit PC or other peripheral


supply (DC power supply type)

+24V +24V
Serial communication port SG SG Serial communication port

0V 0V USB port SG SG USB port

FG

You may be able to prevent the problem described above by:


Reference
• Not grounding the products on the 24 V side (not performing positive grounding).
• Using the AC power supply type KV Nano Series base unit.
• Using a power supply that is isolated from the power supply connected to the power
supply input of the KV Nano Series base unit.
• Not grounding the FG of the PC or other peripheral.
• Using an isolator to electrically isolate the RS-232C and USB signal wires.
• Using the internal GND and an isolated KV-N10L (when performing serial
communication).

- KV Nano Series(terminal block type) User’s Manual - 3-19


3-4 Maintenance
UNIT INSTALLATION AND MAINTENANCE

This section describes how to inspect and maintain the units as well as how to replace batteries and
relays.

Inspection and Maintenance

3  Inspection
When the KV Nano Series Base Unit and other units are used for a long time, problems such as the
Maintenance

connecting section of the connectors becoming loose occur. Continued use of the devices in this state
may cause operating difficulties.
For this reason, periodically inspect the main unit, the wired parts, and other sections of the KV Nano
Series Base Unit and other units of the KV Nano Series.
The main items to inspect are listed below.
• Are the connecting sections of the connectors of each unit disconnected or loose?
• Are the connecting sections of the connectors disconnected or loose?
• Are the terminal block screws loose?
• Are the wiring cables between the unit and the other devices damaged?

 Maintenance
Dirt adheres to the base unit and other units when they are used over a prolonged period of time.
Clean off any dirt from the units using a clean, dry cloth.
Dust and dirt on fine components such as connectors can be removed with a cotton swab or similar
item after first removing the connector.

About Maintenance

 Battery
The KV Nano Series does not have a battery. Data such as ladder programs, device comments, and
setting information is recorded on flash ROM. Data such as CPU positioning parameters, device
values, and the error log is recorded on nonvolatile RAM.
However, backup capacitors are used to save the clock data, so this data may be cleared.
"How to Set Clock Data" (page 3-21)

 Replacing relays
You cannot replace relays on the KV Nano Series.

3-20 - KV Nano Series(terminal block type) User’s Manual -


UNIT INSTALLATION AND MAINTENANCE
3-4 Maintenance

About the Restoration Method

 How to set clock data (excluding the KV-N14**)


With the KV Nano Series, built-in backup capacitors are used to hold the clock data. If you hold the
clock data for some time without turning the KV Nano Series on, the clock data will be cleared.
* Let electricity flow through the backup capacitor for more than 30 minutes to fully charge it.
3
Hold time of the backup capacitors (when fully charged)

Maintenance
Temperature TYP MIN
25°C 60 days 15 days
40°C 40 days 10 days
75°C 12 days 3 days

If necessary, use one of the following methods to set the clock data.
• While using KV STUDIO to perform monitoring, on the "Debug" menu, click "Setup calendar timer."
• Use the WTIME instruction in a ladder program.
• Use an extension access window cassette, and set the data using a clock.
• If you are using a touch panel (VT3 Series), use the PLC time and date synchronization function.
(If you are using the restoration function, the time will be adjusted automatically.)
"VT STUDIO Reference Manual"

If the clock data is cleared, the following functions may not operate correctly.
Reference
• Tracing function (the trace execution times will be incorrect)
• Error monitor function (the error occurrence times will be incorrect)
• Weekly contact instructions

- KV Nano Series(terminal block type) User’s Manual - 3-21


UNIT INSTALLATION AND MAINTENANCE

3-4 Maintenance

Restoration Method

 How to clear errors


With the KV Nano Series, you can use the following methods to clear errors when they occur.
• Hold the RUN-PROG selector switch and error clear switch in the lowest position for 1 second or

3 more.
"RUN-PROG Selector Switch and Error Clear Switch" (page 2-13)
Maintenance

• If you are using an extension access window cassette, use the error clear function on the cassette.
"Error Clear" (page 5-214)
• While using KV STUDIO to perform monitoring, you can clear the error from the dialog box that
appears when the error occurs.
• Use a ladder program to set the error clear request relay (CR3909). (This method can only be used
for minor errors).
• Restart the product.

For some serious errors that are related to the system, you may have to restart the
Reference
product.

 How to clear the PLC status


With the KV Nano Series, you can set the base unit status to the factory default setting and clear the
device values that are being used within programs.

Resetting the base unit status to the factory default setting


You can clear data such as ladder programs, device comments, setting information, CPU positioning
parameters, device values, and the error log.

Use one of the following methods to clear the data.


• In KV STUDIO, on the "Tool" menu, click "Clear PLC (1)" to display the Clear PLC dialog box.
Select the "Clear All" check box, and then click "Execute."
• Use an extension access window cassette to execute an all clear operation.

Clearing the device values


You can clear data such as the CPU positioning parameters, the device values, and the error log.

Use one of the following methods to clear the data.


• In KV STUDIO, on the "Tool" menu, click "Clear PLC" to display the Clear PLC dialog box. Select
the "Clear RAM" check box, and then click "Execute."
• Use an extension access window cassette to execute a RAM clear operation.

3-22 - KV Nano Series(terminal block type) User’s Manual -


UNIT INSTALLATION AND MAINTENANCE
3-4 Maintenance

System program update

The CPU function version can be updated by updating the system program on the KV Nano Series.
The update procedure is as follows.

1 The version can be confirmed through "Tools (T)"→"Check CPU function version (X)"→"System
program update (U)" on the KV STUDIO menu (* KV STUDIO version 7 or later is required).
3

Maintenance
2 The dialog box below is displayed. Confirm that the KV Nano Series and USB cable are
connected, and click "OK".

Point • System program updates can be carried out when connected via USB.

3 Check if the connected KV Nano Series is the latest version. If it is the latest version, click the
"OK" button to start a system version update.

• Do not turn the unit off during system updates.


Point
• When a system program update is performed, the programs in the unit are deleted.
Create a backup of the programs before performing a system program update.

- KV Nano Series(terminal block type) User’s Manual - 3-23


UNIT INSTALLATION AND MAINTENANCE

3-4 Maintenance

• If the system program is already the latest version, the dialog box below is
Point
displayed and the program update finishes.
If this happens, the programs in the unit are not deleted.

3
Maintenance

4 The dialog below is displayed when the update is complete.

• If there is other communication between the KV Nano Series and computer


Point
when the system program update is executed, the following dialog is displayed
and the system update is not performed.

3-24 - KV Nano Series(terminal block type) User’s Manual -


4

LADDER PROGRAMMING
LADDER
PROGRAMMING
This chapter describes the specifications and setup methods of the functions
that you have to use when creating ladder programs. You can improve
programming efficiency by using modules, macros, and local devices.

4-1 What Is Sequence Control? ..................................... 4-2


4-2 Programming Language........................................... 4-5
4-3 Projects .................................................................... 4-9
4-4 Devices and Constants .......................................... 4-17
4-5 How Data Is Processed.......................................... 4-54
4-6 Program Structure and Operation .......................... 4-61
4-7 Interrupts ................................................................ 4-76
4-8 Modules................................................................ 4-100
4-9 Macros ..................................................................4-112
4-10 Local Devices....................................................... 4-134
4-11 Programming Skills .............................................. 4-140

- KV Nano Series(terminal block type) User’s Manual - 4-1


4-1 What Is Sequence Control?
In vehicle assembly lines such as the one shown below, the various operations, sequences, and
LADDER PROGRAMMING

conditions of the equipment and devices are recorded in control units in advance. When operations are
started, the target operations are executed in sequence according to the status and conditions of the
equipment and devices in order to assemble the vehicle. This is called sequence control.
PLCs (Programmable Logic Controllers) such as the KV Nano Series are used as the devices for
sequence control.

Body assembly line at a vehicle factory

4
What Is Sequence Control?

Reference • In JIS (Japan Industrial Standards), sequence control is defined as "control for
successively advancing each step of a control procedure according to a predetermined
order or an order determined according to a fixed logic."
• In PLC control, in addition to sequence control, feedback control is also available.
Feedback control is the process of detecting the current value of the object and
comparing this with the target value and then repeatedly performing control until the
values match.
(Examples) Temperature control, pressure control, and speed control

4-2 - KV Nano Series(terminal block type) User’s Manual -


4-1 What Is Sequence Control?

 Sequence control example

LADDER PROGRAMMING
Let's take a close look at a fully automatic washing machine as an example of sequence control.
When you press the start button, the fully automatic washing machine follows the predetermined order
to automatically carry out the washing sequence. The washing sequence control is shown below.

ON
(1) Insert the clothes to be washed, and
Start press the start button.

What Is Sequence Control?


(2) After the start button has been pressed,
Water
insert the detergent, and open the water
intake
intake valve.
I

When the (3) When it is detected that the specified


cover is open water level has been reached, the water
Washing intake valve is closed, and the washing
motor is started.
When the cover
Click is closed
(4) When the specified time has elapsed, the
Drainage washing motor is stopped, and the
Pause I drainage valve is opened.

When the cover


is closed (5) When it is detected that drainage is
Spin
complete (the water level is 0), the
drying
When the drainage valve is closed, and the spin dry
I
cover is open motor is started.

(6) When it is detected that the specified time


Water
has elapsed, the spin dry motor is
intake
stopped, and the water intake valve is
II
opened.

When the (7) When it is detected that the specified


cover is open water level has been reached, the water
Rinse intake valve is closed, and the washing
motor is started.
When the cover
Click is closed
(8) When it is detected that the specified time
Drainage has elapsed, the washing motor is
Pause II stopped, and the drainage valve is
opened.
When the cover
is closed (9) When it is detected that drainage is
Spin
complete (the water level is 0), the
drying
When the drainage valve is closed, and the spin dry
II
cover is open motor is started.

(10) When it is detected that the specified time


Finished
has elapsed, the spin dry motor is
stopped.
The completion of the washing process is
Complete indicated, and a sound is generated as a
notification of this.

- KV Nano Series(terminal block type) User’s Manual - 4-3


4-1 What Is Sequence Control?
LADDER PROGRAMMING

Types of Sequence Control

Basic sequence control is divided into three main groups: sequence control, condition control, and time
limit control. Target control circuits are designed by combining these types of control.

 Sequence control
In sequence control, the next operation in a predetermined sequence starts when an external signal,

4 such as from a detector, indicates that the previous operation has finished.
Sequence control of the fully automatic washing machine
(2) Water intake I  Water intake finishes  (3) Washing (washing motor starts)
What Is Sequence Control?

(4) Drainage I  Drainage finishes  (5) Spin drying I (spin dry motor starts)

Reference Typical ladder program instructions used in sequence control include STG and JMP.

 Condition control
In condition control, operations are performed when, in combination with the status signals of the object
being controlled, predetermined conditions are met.
Condition control of the fully automatic washing machine
(3) Washing  The washing machine door is opened.  Pause  The washing machine door is
closed.  (3) Washing
(5) Spin drying I  The washing machine door is opened.  Pause  The washing machine door is
closed.  (5) Spin drying I

Reference Typical ladder program instructions used in condition control include STP, STE, CJ, NCJ,
and LABEL.

 Time limit control


In time limit control, the operation instruction given to the object being controlled is stopped when the
specified time elapses, as determined by a timer or similar device, or when the specified date and time
is reached. The next operation is then started according to the predetermined order.
Time limit control of the fully automatic washing machine
(3) Washing  Detection of the specified time elapsing  (4) Drainage I
(5) Spin drying I  Detection of the specified time elapsing  (6) Water intake II

Reference Typical ladder program instructions used in time limit control include TMR and LDWK.

4-4 - KV Nano Series(terminal block type) User’s Manual -


4-2 Programming Language
With KV STUDIO, you can use "ladder programs" and "KV Script" to create programs.

LADDER PROGRAMMING
"Mnemonics" are used as the language for operating the programs that you have created on the KV
Nano Series. Also, the separation of 16-bit and 32-bit values and signed and unsigned values is
determined not by the instructions, but by the suffixes used.

Ladder Program

Ladder circuits are schematics of actual wiring diagrams. The ladder circuits that you write in KV
STUDIO are called ladder programs.
In KV STUDIO, in addition to the instructions for general switches and lamps that are available, you
4

Programming Language
have access to instructions such as useful ones for controlling ON time and OFF time and for PID
control. You can easily write sequence control programs by combining these instructions.

R000
T1

T1 R001 R500

T1 R002
T2

T2 R003 R501

In addition, you can use expanded ladder mode with KV STUDIO to reduce the number of ladder rungs
and make processing sequences clearer, both of which improve the readability of your programs.
"Expanded ladder mode" (page 4-159)

- KV Nano Series(terminal block type) User’s Manual - 4-5


4-2 Programming Language
LADDER PROGRAMMING

KV Script

Although ladder programs are suitable for sequence control programs, using ladder programs for
complicated calculation processing that handles values and processing that handles character strings leads
to complicated programs, which makes debugging and maintenance difficult.
KV script is a programming language that has been developed to compensate for these ladder program
problems. By using scripts as substitutes for the parts of a program that become too complicated when
written as a ladder program, you can create programs efficiently.
4
The script can be mixed together with a
Programming Language

ladder program, and you can write


comments on each line of the script.
KV script

You can write control sentences, so it You can write mathematical formulae
is easy to understand the flow of the without having to consider the calculation
program. processing and internal registers.

Reference Script programs are converted into ladder programs before they are executed.
You can monitor the operations of script programs after they have been converted into
ladder programs.

KV-7000/5000/3000/1000 Series and KV Nano Series "Script Programming Manuals"

4-6 - KV Nano Series(terminal block type) User’s Manual -


4-2 Programming Language

LADDER PROGRAMMING
Mnemonics

Mnemonics are the language that is used to make the ladder programs that you have created operate
on the KV Nano Series.
By simplifying mnemonics, expanded ladder programs are expressed in a manner that is easy to
understand visually.
Expanded ladder programs are converted to mnemonics lists when they are transmitted to the KV Nano
Series.
You can edit the mnemonics list in KV STUDIO, but this is not required when you create normal ladder 4
programs.

Programming Language
LD R000
OUT R500
LD R002
OUT R501
LD R003
OUT R502

Reference • To edit the mnemonics list, on the "Edit" menu, click "Edit list."
Alternative procedure Ctrl + D

• Mnemonics lists are included in this manual for CPU built-in functions and instruction
sample programs. You can use these mnemonics lists to easily enter sample programs.
"How to Use Mnemonic Lists" (page 16)

• When you create expanded ladder programs, you can reduce the production costs of
programming by entering instructions as mnemonics.
"Mnemonic entry" (page 4-142)

- KV Nano Series(terminal block type) User’s Manual - 4-7


4-2 Programming Language
LADDER PROGRAMMING

Suffixes

Suffixes are appended after an instruction. You can use them to change the way that device data is
handled. There are the following six types of suffixes.

.U .S .D .L .F .DF

4 * The device with corresponding suffix is input in .

Example
ADD(.U) MOV.(U)
Programming Language

ADD.S MOV.S
ADD.D MOV.D
ADD.L MOV.L
ADD.F MOV.F
ADD.DF MOV.DF

.U Data is processed as 16-bit, unsigned BIN data (0 to 65535).


.S Data is processed as 16-bit, signed BIN data (-32768 to +32767).
.D Data is processed as 32-bit, unsigned BIN data (0 to 4294967295).
.L Data is processed as 32-bit, signed BIN data (-2147483648 to 2147483647).
.F Data is processed as single precision floating-point real number data.
-3.4E + 38 ≤ N ≤ -1.2E - 38
N=0
+1+2E - 38 ≤ N ≤ +3.4E + 38
(Approximately 7 significant digits)
.DF Data is processed as double precision floating-point real number data.
-1.79E + 308 ≤ N ≤ -2.23E - 308
N=0
+2.23E - 308 ≤ N ≤ +1.79E + 308
(Approximately 16 significant digits)

In KV STUDIO, .U is not displayed. Also, instructions that do not have a suffix are processed as 16-
bit, unsigned BIN data.
Instructions to which suffixes are applied are executed with BIN data treated as decimal values
according to the suffix.
Therefore, if the suffix is different, the results of executing an instruction may differ even if the BIN data
is the same.

4-8 - KV Nano Series(terminal block type) User’s Manual -


4-3 Projects

LADDER PROGRAMMING
Project Configuration

 What are projects?


All the information that is required to operate the KV Nano Series, such as the program and unit
settings, is managed in projects.
When you create a new project in KV STUDIO, a folder with the same name is generated automatically.
The information contained in each project is shown below.
4
Project

Projects
Program
Unit settings

Device comments
Modules
Labels

CPU system settings

CPU positioning parameters


Macros
Logging and tracing settings

Device default values

Point You can use one project to manage the information of only one KV Nano Series.

 Program
A program is constructed from modules and macros.
By repeatedly executing this program, you can perform various types of control.
"4-6 Program Structure and Operation" (page 4-61)
"4-8 Modules" (page 4-100)
"4-9 Macros" (page 4-112)

 Unit settings
Use this to manage the unit configuration and the detailed settings of each unit. You can use KV
STUDIO to easily configure the settings.
See the "User's Manuals" of each expansion unit.
"Chapter 3 UNIT EDITOR" in the "KV STUDIO User's Manual"

- KV Nano Series(terminal block type) User’s Manual - 4-9


4-3 Projects

 Device comment
LADDER PROGRAMMING

By assigning a comment to each device, you can make it easier to see what functions are assigned to
each device.
"Device comments" (page 4-154)

 Label
By managing the devices that correspond to the labels that have the names you have assigned, you
can write programs using the labels instead of the device names.

4 "Label" (page 4-152)

 CPU system settings


Projects

Set the following items, which are related to the system of the KV Nano Series.
Classification Item Description Reference Page
"Module Execution
Execute sequence of Set the execution sequence of the
Sequence" (page 4-
modules modules within the scan.
105)
"Scan Time"
(page 4-68)
User interrupt Set the priority order of interrupts.
Program setting "Interrupt Priority"
(page 4-81)
Set the fixed scantime operation and "Scan Time"
Scantime related
the END processing time (page 4-68)
"Project Protection
Protection setting Set the project's read/write protection.
Settings" (page 4-13)
Assign all local devices and configure "Local Device
Entire assignment
the settings of each module and Assignment" (page 4-
setting of local devices
macro. 136)
CPU unit buffer Set the buffer capacity of the tracing "Trace detail setting"
capacity function. (page 5-183)

System setting "Configuring Power


Set the devices whose status and
Failure Holding
Power off holding value will be maintained when the
Settings (Latching)"
power turns off.
(page 4-26)
Configure settings such as the
Action when error "Error handling"
operation and stop status when an
occurs (page 4-64)
error occurs.

 CPU positioning parameter


Set the parameters of the CPU positioning function.
"5-2 Motor (Positioning) Control" (page 5-4)

 Logging and tracing settings


Set the tracing function of device data.
"5-7 Tracing" (page 5-177)

 Device default values


Set the device default values that the specified devices will be automatically initialized to when
operation starts.
"Device defaults" (page 4-159)

4-10 - KV Nano Series(terminal block type) User’s Manual -


4-3 Projects

LADDER PROGRAMMING
Program Capacity

The maximum program capacity of the KV Nano Series is shown below.

Item KV-N14** KV-N24** KV-N40** KV-N60**


Program capacity 500 kB 1,100 kB
Object size 384 kB
Operand table size 576 kB
Size of one module 384 kB
Number of modules 100 4
Number of macros 100

Projects
Number of module objects 100
Number of steps 8 k steps 16 k steps
Bits 14,400 bits
Internal work consumption
Words 3,200 words
Maximum global device comment and
800 kB
local device comment size
Maximum total size of unit setting data,
extension function setting data, and 350 kB
recorded data
The percentage of the program capacity that is used is calculated automatically by KV STUDIO when
you convert the program and is displayed in the "Convert result" dialog box, so you do not have to
perform the calculations and manage this information by yourself.

If the number of steps, program capacity, object size, operand table size, or
Point
internal work consumption exceeds the maximum capacity, you will not be able to
transmit the program or perform operations.

Reference Program capacity


The byte size of each instruction is fixed, but the amount of memory required varies
depending on the types of operands, the instruction suffixes, and the presence of index
modification.
In the program capacity calculation, the number of bytes used by row comments, device
comments, labels, device default values, unit setup information, and CPU system settings
are added to the total number of bytes used by the instructions. One device comment
uses 40 bytes. The size of rung comments and labels varies according to the number of
characters used.
If you create a program with the maximum number of steps for the KV Nano Series, and if you
want to use device comments to fill the remaining program capacity, you can manage
- KV Nano Series(terminal block type) User’s Manual - 4-11
4-3 Projects

approximately 10000 comments with the KV-N14** and approximately 20000 comments with
LADDER PROGRAMMING

the KV-N24**, KV-N40**, and KV-N60**. If you want to use labels to fill the remaining program
capacity, you can manage approximately 14000 labels with the KV-N14** and approximately
28000 labels with the KV-N24**, KV-N40**, and KV-N60**.
For details on the byte size of the instructions, see "Appendix 2 List of Instruction
Sizes" in the KV-7000/5000/3000/1000 Series and KV Nano Series "Instruction
Reference Manuals."
<Object size>
Object size is the total size in data (object) format when the KV Nano Series is actually
operating. The object size also is determined by the instructions and varies depending on
4 the types of operands, the instruction suffixes, and the presence of index modification.
Rung comments, device comments, and labels are not included in the object size
Projects

calculation.
For details on the object size of the instructions, see "Appendix 2 List of Instruction
Sizes" in the KV-7000/5000/3000/1000 Series and KV Nano Series "Instruction
Reference Manuals."
<Total steps>
The total number of steps is the total number of instructions and rung comments used in
the project.
The number of steps used is displayed on the left side of the ladder diagram after the
program is converted by KV STUDIO.

000610

000610

000610
The number of steps used in the module or macro is indicated
below each rung number.

000633

000638

000643

<Operand table size>


This is the total size of the operand information used by the ladder program. The same as
the object size, the operand table size is determined by the instructions and varies
depending on items such as the types of operands, the instruction suffixes, and the
presence of index modification. The percentage of the operand table size that is used is
displayed in the output window.
For details on the operand table size of the instructions, see "Appendix 2 List of
Instruction Sizes" in the KV-7000/5000/3000/1000 Series and KV Nano Series
"Instruction Reference Manuals."
<Internal work consumption>
This is the total data that is used internally, such as the previous status of the devices
specified by the operands of each instruction.

4-12 - KV Nano Series(terminal block type) User’s Manual -


4-3 Projects

LADDER PROGRAMMING
Project Protection Settings

 Overview of protection settings


With the KV Nano Series, you can configure project protection settings.
To configure protection settings, click "CPU system setting" in KV STUDIO.

Item Description
The ladder programs stored on the base unit will be write protected (a 4
confirmation dialog box will be displayed when an attempt is made to
Write protection

Projects
write to these programs). You can use this to prevent the programs
from being overwritten by mistake.
The ladder programs stored on the base unit will be read protected (it
Read protection will not be possible to read the programs). You can use this to prevent
your valuable programs from being leaked.
When you read the ladder programs stored on the base unit, a dialog
box will be displayed asking you to enter the password.
Project password * When you have set read protection, the password entry dialog box
will not be displayed, and you will not be able to read the ladder
programs.
When you are editing a project, if you attempt to display the module or
Module and macro passwords
macro, a dialog box will be displayed asking you to enter the password.

Transfer to PLC

Read from PLC

Open file KV-N24 Saving


Open module
or macro
Saving
Loading

KV-N1AW

 Editing projects from a PC


• Opening a file
Protection cannot be set on this operation.
• Saving a file
Protection cannot be set on this operation.
• Opening a module or macro
You can set a password on the module or macro so that a dialog box asking the user to enter the
password is displayed when they attempt to open the module or macro.

- KV Nano Series(terminal block type) User’s Manual - 4-13


4-3 Projects

 Transmitting projects between a PC and the base unit


LADDER PROGRAMMING

• Reading projects from the base unit (1)


You can set read protection to prevent projects from being read.
In this situation, even when the project password has been set, the confirmation dialog box will not be
displayed.
• Reading projects from the base unit (2)
You can set a project password so that a dialog box asking the user to enter the password will be

4
displayed.
• Writing projects to the base unit
You can set write protection so that a confirmation dialog box is displayed when an attempt is made
Projects

to overwrite the project.

Reference When you have set a project password, if the password authentication fails, you will have
to wait a set amount of time until you can read the project again. Also, the wait time gets
longer each time that the authentication fails. The project password authentication
disabled status relay (CR2314) turns ON when you can no longer perform read
authentication due to repeated password authentication failures.
The number of consecutive password authentication failures and the total number of
password authentication failures are stored in CM1658, the number of consecutive
project password authentication failures, and CM1659, the total number of project
password authentication failures.

 Using the extension access window cassette (KV-N1AW) to load and save
projects
• Loading
When you have set write protection, confirmation is performed before a project is loaded.

ロード Load
ライトプロテクト Protected
ロード OK? Load OK?
KVS PROJECT KVS PROJECT

• Saving
If you set the read protection and a project password, you will be able to save projects, but you will
only be able to read device values, not ladder programs.

Reference If you want to save programs on which you have set read protection and a project
password to an extension access window cassette, select the "Clear module/macro in
PLC" check box in KV STUDIO, perform a PLC transfer from KV STUDIO, and then save
the program from the extension window within 60 seconds.

4-14 - KV Nano Series(terminal block type) User’s Manual -


4-3 Projects

 Project passwords

LADDER PROGRAMMING
You can set passwords on projects to place restrictions on what can be read from the KV Nano Series.
Follow the procedure below to set a password.

1 Click "Workspace."

2 Right-click to display a menu, and then click "Project Properties."


Alternative procedure On the "File" menu, click "Project Properties."
The "Project property" dialog box is displayed.
4

Projects
3 Click "Set password."
The "Setup password" dialog box is displayed.

Set the password.


(up to 32 half-width
alphanumeric
characters)

4 Enter the password in both text boxes (the second is for confirmation), and then click "OK."
After you set the password, when an attempt is made to read this project from the KV Nano Series, a
dialog box will be displayed asking the user to enter the password.
The user has to enter the password to read the project from the KV Nano Series.
Also, when you transfer a project that has a different password to the PLC, to protect the projects on the
PLC, you have to enter the password, or transfer all items.

- KV Nano Series(terminal block type) User’s Manual - 4-15


4-3 Projects

 Project write and read protection


LADDER PROGRAMMING

You can set protection on projects to place restrictions on writing to and reading from the KV Nano
Series.
To configure protection settings, in the workspace, click "CPU System Setting" and then "Protection
Setting."

4
Projects

Select the checkboxes, and then transfer programs to the KV Nano Series to enable the protection
settings.

If you transfer programs to the KV Nano Series when you have set read
Point
protection, you will not be able to monitor the execution status of the ladder
program from that point.
After you finish debugging, set read protection, and then transfer programs to the
PLC.
If you are using a password and read protection at the same time, the password
confirmation dialog box will not be displayed, and you will not be able to read
projects.

Reference For details on module and macro passwords, see "Module Passwords" (page 4-109)
and "Macro Passwords" (page 4-125).

4-16 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants
Devices are the elements used in programs such as the relays, timers, counters, and data memory

LADDER PROGRAMMING
entries of the KV Nano Series. Devices are written behind instructions, and devices are used to provide
the data used by the instruction and to store the results of the instruction's execution.

Lists of Devices

 Bit devices

Device
Name
Range*1
Number of
Points
Main
Function
Start of Operation Local Index
Device Modification
Indirect
Specification (*)*2 4
PROG  (@)*1 (:Z/:#) Reference Storage
Power On
RUN

Devices and Constants


Devices used to
R000 to R203*4 capture ON/OFF
Input relay*3 Yes Yes Yes No
(R1000 to 59915*5) information from
Total 9600 peripherals
points for the Devices used to
R500 to R607*6 input, output, output ON/OFF Clear Clear
Output relay*3 Yes Yes Yes No
(R1000 to 59915*5) and internal information to
auxiliary relays peripherals
Devices used by
Internal
R1000 to R59915*3 the CPU and by Yes Yes Yes No
auxiliary relay
expansion units
Link relay B00 to B1FFF*8 8192 Devices that can Clear Clear No Yes Yes No
Internal only be used
MR000 to MR59915 9600 internally by the Clear Clear Yes Yes Yes No
auxiliary relay
Latch relay LR000 to LR19915 3200 CPU Hold Hold Yes Yes Yes No
Among T0 to Among T0 to
Contact device for
T9, only holds T9, only holds
the 10 µs, 1 ms, 10
the devices the devices
ms, and 100 ms
Timer (contact) T0 to T511 512 that are being that are being Yes Yes Yes No
down timers and
used by the used by the
for the 10 ms up/
UDT UDT
down timer
instruction instruction
Contact device for
Counter the up counter and Clear and
C0 to C255 256 Hold Yes Yes Yes No
(contact) the up/down hold*7
counter
High-speed
Contact device for
counter
CTC0 to CTC7*9 8*9 the high-speed Hold Hold No No No No
comparator
counters
(contact)
Devices used to
control the PLC
Control relay CR000 to CR8915 1440 functions and to Clear Clear No No No No
capture the PLC
status

*1 Because this is used as a local device, the applicable range of global devices is limited by the number
of reserved local devices. "List of Local Devices" (page 4-135)
*2 The devices that have "Yes" in the Storage column can be written as "* (device)." The devices that
have "Yes" in the Reference column can be specified indirectly.
"Indirect Specification" (page 4-43)
*3 To perform direct processing, write "DR."
*4 The range of devices that can be used varies according to the unit.
KV-N14**: R000 to R007. KV-N24**: R000 to R013.
KV-N40**: R000 to R107. KV-N60**: R000 to R203.
*5 You can use the Unit Editor to set R1000 to R59915 to expansion I/O relays.
The unassigned input and output relays that have numbers smaller than R1000 are reserved for the
system, so you cannot use these relays.
*6 The range of devices that can be used varies according to the unit.
KV-N14**: R500 to R505. KV-N24**: R500 to R509.
KV-N40**: R500 to R515. KV-N60**: R500 to R607.
*7 You can change the clear/hold setting by using "Power off holding" in the CPU system settings (this
only applies to contacts and current values).
*8 Use hexadecimal numbers to specify the device numbers.
*9 The range of devices that can be used varies according to the unit.
KV-N14**: CTC0 to CTC3 (4). KV-N24**: CTC0 to CTC3 (4).
KV-N40**: CTC0 to CTC5 (6). KV-N60**: CTC0 to CTC7 (8).
- KV Nano Series(terminal block type) User’s Manual - 4-17
4-4 Devices and Constants

 Word devices
LADDER PROGRAMMING

Indirect
Number Start of Operation Local Index
Device *
Specification (*)*2
Range 1 of Main Function Device Modification
Name PROG 
Points Power On (@)*1 (:Z/:#) Reference Storage
RUN
Clear and
Data Memory DM0 to DM32767 32768 Hold Yes Yes Yes Yes
Devices that can store hold*3
numerical data (16 bit) Clear and
Link register W0 to W3FFF*5 16384 Hold No Yes Yes Yes
hold*3
Temporary Devices that can store
TM0 to TM511 512 Clear Clear Yes Yes Yes Yes

4
memory numerical data (16 bit)
Among T0 to Among T0 to
Current value and set
T9, only holds T9, only holds
Timer value of the 10 µs, 1 ms,
the devices the devices
Devices and Constants

(current value T0 to T511 512 10 ms, and 100 ms down Yes Yes Yes No
that are being that are being
and set value) timers and of the 10 ms
used by the used by the
up/down timer (32 bit)
UDT instruction UDT instruction
Current value and set
Counter
value of the down counter Clear and Clear and
(current value C0 to C255 256 Yes Yes Yes No
and up/down counter hold*4 hold*4
and set value)
(32 bit)
High-speed Current value of the
CTH0 to
counter 4*6 high-speed counter Hold Hold No No No No
CTH3*6
(current value) (32 bit)
High-speed
Set value of the
counter CTC0 to
8*6 high-speed counter Hold Hold No No No No
comparator CTC7*6
(32 bit)
(set value)
Devices that are used with
Index register Z1 to Z12*7 12 Clear Clear No No No No
index modification (32 bit)
Devices used to control
the PLC functions and to
Control memory CM0 to CM8999 9000 Hold*8 Hold*8 No Yes Yes No
capture the PLC status
(16 bit)
*1 Because this is used as a local device, the applicable range of global devices is limited by the number
of reserved local devices.
"List of Local Devices" (page 4-135)
*2 The devices that have "Yes" in the Storage column can be written as "* (device)." The devices that
have "Yes" in the Reference column can be specified indirectly.
"Indirect Specification" (page 4-43)
*3 You can change the clear/hold setting by using "Power off holding" in the CPU system settings. Up to
3072 words worth of data can be held in total over all of the devices whose values can be held when
the power turns off.
*4 You can change the clear/hold setting by using "Power off holding" in the CPU system settings (this
only applies to contacts and current values).
*5 Use hexadecimal numbers to specify the device numbers.
*6 The range of devices that can be used varies according to the unit.
KV-N14**: CTH0 and CTH1 (2), CTC0 to CTC3 (4).
KV-N24**: CTH0 and CTH1 (2), CTC0 to CTC3 (4).
KV-N40**: CTH0 to CTH2 (3), CTC0 to CTC5 (6).
KV-N60**: CTH0 to CTH3 (4), CTC0 to CTC7 (8).
*7 Z11 and Z12 are reserved for the system, so you cannot use these devices.
*8 Only for devices that need to be held. For details on the target devices, see "Lists of CR and CM
Devices" (page A-8).

4-18 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

 Writing index modification (modification according to index registers and

LADDER PROGRAMMING
according to index constants)
• Modification according to index registers
After the device (R (DR), MR, LR, B, T, C, D, M, W, TM, CM, *DM, *W, or *TM), append ":Zn" (where "n"
is a number from 1 to 10).

Example
DM0:Z01 If the value of Z1 is 100, this means DM100.
R1000:Z01 If the value of Z1 is 100, this means R1604.
4
• Modification according to index constants

Devices and Constants


After the device (R (DR), MR, LR, B, T, C, D, M, W, TM, CM, *DM, *W, or *TM), append ":#n" (where "n"
is a number from -131072 to +131072).

Example
DM0:#1 This means DM1.
R1000:#1 This means R1001.

 Writing indirect specification (*)


Enter "*" before the device (DM, W, or TM). Use this together with the indirect specification instruction.

Example
*DM0*TM100
"Indirect Specification" (page 4-43)

 Writing local devices


Enter "@" before the device (R, MR, LR, T, C, DM, or TM).
These devices are only valid in modules and macros. You can also perform indirect specification and
index modification.

Example
@DM0 @R10000

"4-10 Local Devices" (page 4-134)

 XYM marking
You can use the following XYM marking to specify devices (R (DR), MR, LR, and DM).

KEYENCE Device Number during XYM


Device Name XYM Marking
Marking Marking
X (DX) 0000 to 599F
Relay R (DR)
Y (DY) 0000 to 599F

Internal auxiliary relay MR M 00000 to 9599

Latch relay LR L 00000 to 3199

Data memory DM D 00000 to 32767

To switch to XYM marking, in KV STUDIO, on the "Tools" menu, click "Options," "Display mode setting,"
and then "XYM marking."

- KV Nano Series(terminal block type) User’s Manual - 4-19


4-4 Devices and Constants

 Details of the input, output, and internal auxiliary relays


LADDER PROGRAMMING

KV-N14**

High-Speed Usage
Device Number Normal Usage
Interrupt High-Speed Counter Positioning

Interrupt input INT High-speed counter 0,


R000 Axis 1/axis 2, stop
R000 enable input
sensor input and origin
Interrupt input INT High-speed counter 1, sensor input
R001
R001 enable input

4 R002
Interrupt input INT
R002
High-speed counter 0,
Z-phase
Axis 1, Z-phase

Interrupt input INT High-speed counter 1,


Devices and Constants

R003 Axis 2, Z-phase


Input relay (direct R003 Z-phase
input possible area) High-speed counter 0,
R004 - -
A-phase

High-speed counter 0,
R005 - -
B-phase

High-speed counter 1,
R006 - -
A-phase

High-speed counter 1,
R007 - -
B-phase

R008 to R415 Reserved for the system

High-speed counter 0,
R500 - comparator matching Axis 1, CW
output

High-speed counter 1,
R501 - comparator matching Axis 1, CCW
output
Output relay (direct
R502 output possible area) - - Axis 2, CW

R503 - - Axis 2, CCW

Axis 1, deviation
R504 - -
counter clear

Axis 2, deviation
R505 - -
counter clear

R506 to R915 Reserved for the system

R1000 to R59915 Input, output, and internal auxiliary relays

MR000 to MR59915 Internal auxiliary relays

LR000 to LR19915 Latch relays

4-20 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

KV-N24**

LADDER PROGRAMMING
High-Speed Usage
Device Number Normal Usage
Interrupt High-Speed Counter Positioning
Interrupt input INT
R000 -
R000

Interrupt input INT


R001 - Axis 1/axis 2, stop
R001
sensor input and origin
Interrupt input INT sensor input
R002 -
R002

R003
Interrupt input INT
R003
-
4
High-speed counter 0,
R004 - -

Devices and Constants


A-phase

High-speed counter 0,
R005 - -
B-phase

Input relay (direct High-speed counter 1,


R006 - -
input possible area) A-phase
High-speed counter 1,
R007 - -
B-phase

High-speed counter 0,
R008 - -
enable input

High-speed counter 1,
R009 - -
enable input

High-speed counter 0,
R010 - Axis 1, Z-phase
Z-phase

High-speed counter 1,
R011 - Axis 2, Z-phase
Z-phase

R012 - - -

R013 - - -

R014 to R415 Reserved for the system

High-speed counter 0,
R500 - comparator matching Axis 1, CW
output

High-speed counter 1,
R501 - comparator matching Axis 1, CCW
output

R502 - - Axis 2, CW

R503 - - Axis 2, CCW


Output relay (direct
output possible area) Axis 1, deviation
R504 - -
counter clear

Axis 2, deviation
R505 - -
counter clear

R506 - - -
R507 - - -

R508 - - -

R509 - - -

R510 to R915 Reserved for the system

R1000 to R59915 Input, output, and internal auxiliary relays

MR000 to MR59915 Internal auxiliary relays


LR000 to LR19915 Latch relays

- KV Nano Series(terminal block type) User’s Manual - 4-21


4-4 Devices and Constants

KV-N40**
LADDER PROGRAMMING

High-Speed Usage
Device Number Normal Usage
Interrupt High-Speed Counter Positioning
R000 Interrupt input INT R000 -
R001 Interrupt input INT R001 - Axis 1/axis 2, stop
sensor input and
R002 Interrupt input INT R002 - origin sensor input
R003 Interrupt input INT R003 -
R004 - - Axis 3, stop sensor input
R005 - - and origin sensor input
R006 - - -
4 R007
R008
-
-
-
High-speed counter 0, A-phase
-
-
Devices and Constants

R009 - High-speed counter 0, B-phase -


R010 - High-speed counter 1, A-phase -
R011 - High-speed counter 1, B-phase -
R012 - High-speed counter 2, A-phase -
R013 - High-speed counter 2, B-phase -
Input relay (direct
R014 input possible area) - - -
R015 - - -
High-speed counter 0,
R100 - -
enable input
High-speed counter 1,
R101 - -
enable input
High-speed counter 2,
R102 - -
enable input
R103 - - -
High-speed counter 0,
R104 - Axis 1, Z-phase
Z-phase
High-speed counter 1,
R105 - Axis 2, Z-phase
Z-phase
High-speed counter 2,
R106 - Axis 3, Z-phase
Z-phase
R107 - - -
R108 to R415 Reserved for the system
High-speed counter 0,
R500 - Axis 1, CW
comparator matching output
High-speed counter 1,
R501 - Axis 1, CCW
comparator matching output
High-speed counter 2,
R502 - Axis 2, CW
comparator matching output
R503 - - Axis 2, CCW
R504 - - Axis 3, CW
R505 - - Axis 3, CCW
R506 - - -
R507 Output relay (direct - - -
output possible area) Axis 1, deviation
R508 - -
counter clear
Axis 2, deviation
R509 - -
counter clear
Axis 3, deviation
R510 - -
counter clear
R511 - - -
R512 - - -
R513 - - -
R514 - - -
R515 - - -
R600 to R915 Reserved for the system
R1000 to R59915 Input, output, and internal auxiliary relays
MR000 to MR59915 Internal auxiliary relays
LR000 to LR19915 Latch relays

4-22 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

KV-N60** (1/2)

LADDER PROGRAMMING
High-Speed Usage
Device Number Normal Usage
Interrupt High-Speed Counter Positioning
Interrupt input INT
R000 -
R000
Interrupt input INT
R001 - Axis 1/axis 2, stop
R001
sensor input and origin
Interrupt input INT
R002 - sensor input
R002
Interrupt input INT
R003 -

4
R003
R004 - -
Axis 3/axis 4, stop
R005 - -
sensor input and origin

Devices and Constants


R006 - - sensor input
R007 - -
High-speed counter 0,
R008 - -
A-phase
High-speed counter 0,
R009 - -
B-phase
High-speed counter 1,
R010 - -
A-phase
High-speed counter 1,
R011 - -
B-phase
High-speed counter 2,
R012 - -
A-phase
High-speed counter 2,
R013 - -
B-phase
High-speed counter 3,
R014 - -
A-phase
High-speed counter 3,
R015 - -
B-phase
Input relay (direct
input possible area) High-speed counter 0,
R100 - -
enable input
High-speed counter 1,
R101 - -
enable input
High-speed counter 2,
R102 - -
enable input
High-speed counter 3,
R103 - -
enable input
High-speed counter 0,
R104 - Axis 1, Z-phase
Z-phase
High-speed counter 1,
R105 - Axis 2, Z-phase
Z-phase
High-speed counter 2,
R106 - Axis 3, Z-phase
Z-phase
High-speed counter 3,
R107 - Axis 4, Z-phase
Z-phase
R108 - - -
R109 - - -
R110 - - -
R111 - - -
R112 - - -
R113 - - -
R114 - - -
R115 - - -
R200 - - -
R201 - - -
R202 - - -
R203 - - -
R204 to R415 Reserved for the system

- KV Nano Series(terminal block type) User’s Manual - 4-23


4-4 Devices and Constants

KV-N60** (2/2)
LADDER PROGRAMMING

High-Speed Usage
Device Number Normal Usage
Interrupt High-Speed Counter Positioning
R500 - High-speed counter 0, Axis 1, CW
comparator matching
output

R501 - High-speed counter 1, Axis 1, CCW


comparator matching
output

4 R502 - High-speed counter 2,


comparator matching
output
Axis 2, CW
Devices and Constants

R503 - High-speed counter 3, Axis 2, CCW


comparator matching
output

R504 - - Axis 3, CW

R505 - - Axis 3, CCW

R506 - - Axis 4, CW

R507 - - Axis 4, CCW

R508 - - Axis 1,
deviation counter clear

R509 - - Axis 2,
Output relay (direct deviation counter clear
output possible area)
R510 - - Axis 3,
deviation counter clear

R511 - - Axis 4,
deviation counter clear

R512 - - -

R513 - - -

R514 - - -

R515 - - -

R600 - - -

R601 - - -

R602 - - -

R603 - - -

R604 - - -

R605 - - -

R606 - - -

R607 - - -

R608 to R915 Reserved for the system

R1000 to R59915 Input, output, and internal auxiliary relays

MR000 to MR59915 Internal auxiliary relays

LR000 to LR19915 Latch relays

4-24 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

 Macro argument devices

LADDER PROGRAMMING
The macro argument devices, which can only be used in macros, are listed below.
Indirect Local Index
Attribute Symbol Range Description Specification Device Modification
(*) (@) (:)
The device is received as the
Device P P0 to P9 No No Yes
argument.
The device's value or constant
Value V V0 to V9 No No No
is received as the argument.

Leading
R
UR
The leading relay (R) assigned
UR0 to UR9 to the expansion unit is received No No Yes 4
as the argument.

Devices and Constants


The leading data memory (DM)
Leading entry assigned to the expansion
Unit UM UM0 to UM9 No No Yes
DM unit is received as the
argument.
The unit number of the
Number UV UV0 to UV9 expansion unit is received as No No No
the argument.

"Setting Arguments" (page 4-120)

 Constants
Constant Range Main Function
Used to specify decimal constants.
#0 to #65535 (unsigned 16 bit)
When you select
-32768 to +32767 (signed 16 bit) Reference
Decimal (#) XYM marking mode,
#0 to #4294967295 (unsigned 32 bit)
this is displayed as
-2147483648 to +2147483647 (signed 32 bit)
"K."
-3.4E + 38 ≤ N ≤ -1.2E - 38
Single precision
N=0 Used to specify single precision
floating-point real
+1.2E - 38 ≤ N ≤ +3.4E + 38 floating-point constants.
number
(Approximately 7 significant digits)
-1.79E + 308 ≤ N ≤ -2.23E - 308
Double precision
N=0 Used to specify double precision
floating-point real
2.23E - 308 ≤ N ≤ 1.79E + 308 floating-point constants.
number
(Approximately 16 significant digits)
Used to specify hexadecimal
constants.
$0000 to $FFFF (16 bit) When you select
Hexadecimal ($) Reference
$00000000 to $FFFFFFFF (32 bit) XYM marking mode,
this is displayed as
"H."
Fixed character Used to specify fixed character
Examples) "Model number ABC", "Month/08:30:15"
string (" ") strings.

 Internal registers
Start of
Operation
Number of
Device Name Range Main Function (Power On,
Points
PROG 
RUN)
A device used to temporarily store data
Internal register - 1 Clear
(16 bit, 32 bit, 64 bit)

- KV Nano Series(terminal block type) User’s Manual - 4-25


4-4 Devices and Constants
LADDER PROGRAMMING

Configuring Power Failure Holding Settings (Latching)

The power failure holding function uses the nonvolatile RAM to hold the device values even when a
power failure occurs. The KV Nano Series can hold the values of up to 3072 words worth of devices.
To configure the settings, in the KV STUDIO workspace, open the "CPU system setting" dialog box,
and then click "System setting" and then "Power off holding."
Set the type and range of the device
that you want to hold.

4 This displays a description of the


device range that can be held.

Set whether to hold the devices that


Devices and Constants

are used by the CPU positioning


function.
For each 1 axis that is used, 40
words are used. For each 1 point
parameter that is held, 10 words are
used.
Set whether to hold the devices
used when connected to a KV-D30.
Holding these devices uses 500
words.

Displays the usage status of the


memory area for power failure
holding.

Holding When the Mode Switches


Power Failure
Name Range between PROG and RUN
Holding
PROG  RUN RUN  PROG
Relay R00000 to R59915 Clear Clear
Link relay B0000 to B1FFF Clear Clear
Internal auxiliary relay MR00000 to MR59915 Clear Clear
Latch relay LR00000 to LR19915 Save Save
Control relay CR0000 to CR8915 Clear *2
Only T0 to T9 Among T0 to T9, only the devices
are saved. used by the up/down timer
Timer T000 to T511
All others are instructions are saved. All others
cleared. are cleared.
Can be held
according to the
Counter C000 to C255 Save
CPU system
settings
Can be held
according to the
Data memory DM00000 to DM32767 Save
CPU system
settings
Can be held
W0000 to W3FFF according to the
Link register Save
(hexadecimal) CPU system
settings
Temporary memory TM000 to TM511 Clear Clear Save
Control memory CM0000 to CM8999 *1 *2
High-speed counter CTH0 to CTH3 Save Save
High-speed counter
CTC0 to CTC7 Save Save
comparator
Index register Z1 to Z12 Clear Clear Save

*1 Only some of the devices are saved, the others are cleared. Built-in positioning and the area used in
configuring the KV-D30 can be held according to the CPU system settings.
*2 Only some of the devices are cleared, the others are saved.
4-26 - KV Nano Series(terminal block type) User’s Manual -
4-4 Devices and Constants

LADDER PROGRAMMING
Bit Devices

I/O relay R

Overview The input relays are the devices that are used to capture the ON/OFF information from
the peripherals and to transfer this information to the PLC.
The output relays are the devices that are used to transfer the ON/OFF instructions and
the calculation results from the PLC to the PLC peripherals.

Notation Device numbers are structured as shown below.


4
(Example)

Devices and Constants


Channel number (000 to 599) Contact number (00 to 15)

R01012
Device name Device number (01000 to 59915)

Reference • "R" can be omitted when you write the device. (However, you cannot omit "R" for
operands in which you can enter a constant.)
• You can use zero suppression when you write your programs
(Example) R12
• This can be used as a word device.
"Processing bit devices in units of words" (page 4-47)
• If you include "D" in the device name, the relay will operate as a direct I/O relay.
(Example) DR500R500 will operate as a direct output relay.
"Direct I/O relay (DR)" (page 4-62)
• When you select XYM display mode, input relays are displayed as "X" and output
relays are displayed as "Y."
"XYM marking" (page 4-19)

Range • R000 to R203 (input only)*


• R500 to R607 (output only)*
• R1000 to R59915 (can be assigned as expansion I/O unit numbers)
* The devices vary according to the unit.

Application Input relay


• Used for connected peripherals such as buttons and switches (selector switches, limit
switches, photoelectric switches, and digital switches).
• Can be used as the high-speed inputs of the interrupts, high-speed counters, and the
positioning function (only R000 to R107).*
Output relay
• Used for connected peripherals such as solenoids, electromagnetic switches, and
displays (signal lamps and digital displays).
• Can be used as the high-speed outputs of the high-speed counter positioning function
(only R500 to R507).*
* The devices vary according to the unit.

Details • One bit of the input relay is assigned per one input terminal.
• One bit of the output relay is assigned per one output terminal.
• You can specify a contact (normally open) or b contact (normally closed).
• Do not use R204 to R415 because these are reserved for the system.
• Do not use R608 to R915 because these are reserved for the system.
- KV Nano Series(terminal block type) User’s Manual - 4-27
4-4 Devices and Constants

Default setting When the power is turned on and when the mode switches from PROG to RUN, the
LADDER PROGRAMMING

status is cleared and the devices are turned OFF.

Reference • Device notation for relay (R) units


In KV STUDIO, aside from the normal notation, you can use a relay notation in which the
unit numbers are the reference.
To use the device notation for units, on the "View" menu, click "Display unit device."
Unit number Unit relay number

4
You can use zero
R05_00010 suppression when you
write your programs.
Channel number Contact number (Example) R5_10
Devices and Constants

Unit number: Starting with the base unit, numbers are assigned in the order
(00, 01, 02, 03, 04, and so on) that the units are connected.
Unit relay number: Starting from 00000, the number of relay points that will be
occupied are assigned as the relay number.

Unit number 00* 01 02 03

KV-N16EX,
KV-N24DT KV-N16EX, KV-N16EX,
16 inputs and
base unit 16 inputs 16 outputs
16 outputs
Unit relay number: (Input) R000 to R107 R1000 to R1015 R2500 to R2515 R3000 to R3015

(Output) R500 to R509 R3500 to R3515

(Example) 5th point of the KV-N16EX...............01_00004


12th point of the KV-N16ET.............01_00012
* The device notation for units is not applied to the built-in I/O devices of the KV Nano Series.

Link relay B

Overview These relays are used to perform data linking in serial PLC link mode. Hexadecimal
notation is used to specify device numbers, which is different from other relays.

Notation Device numbers are structured as shown below.


(Example)

Channel number (000 to 1FF) Contact number (0 to F)

B1A6F
Device name Device number (0000 to 1FFF)

Reference • You can use zero suppression when you write your programs.
(Example) B7A
• This can be used as a word device.
"Processing bit devices in units of words" (page 4-47)

4-28 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

LADDER PROGRAMMING
• Use hexadecimal numbers (0 to F) to specify device numbers.
Point
• You cannot use local devices (@).

Range B0000 to B1FFF

Application These relays can be used to perform data linking in serial PLC link mode.

Details These cannot be assigned as unit devices of expansion units.

Default setting When the power is turned on and when the mode switches from PROG to RUN, the
4

Devices and Constants


status is cleared and the devices are turned OFF.

Internal auxiliary relay R, B, MR, and LR

R
Overview You can use R devices that are not assigned to an actual I/O relay or to an expansion unit relay
as internal auxiliary relays.

Notation Device numbers are structured as shown below.


(Example)

Channel number (000 to 599) Contact number (00 to 15)

R01012
Device name Device number (01000 to 59915)

Reference • "R" can be omitted when you write the device.


• You can use zero suppression when you write your programs.
(Example) R12
• This can be used as a word device.
"Processing bit devices in units of words" (page 4-47)

Range R1000 to R59915 (excluding the numbers that are assigned as expansion input unit
numbers)

Default When the power is turned on and when the mode switches from PROG to RUN, the
status is cleared and the devices are turned OFF.

B
Overview You can use B devices that are not assigned to the link relays of simple PLC links as internal
auxiliary relays.

Notation Device numbers are structured as shown below.


(Example)
Channel number (000 to 1FF) Contact number (0 to F)

B1EE7
Device name Device number (0000 to 1FFF)
- KV Nano Series(terminal block type) User’s Manual - 4-29
4-4 Devices and Constants
LADDER PROGRAMMING

Reference • You can use zero suppression when you write your programs.
(Example) B7A
• This can be used as a word device.
"Processing bit devices in units of words" (page 4-47)

• Use hexadecimal numbers (0 to F) to specify device numbers.


Point
• You cannot use local devices (@).

4 Range B0000 to B1FFF

Details These cannot be assigned as unit devices of expansion units.


Devices and Constants

Default setting When the power is turned on and when the mode switches from PROG to RUN, the
status is cleared and the devices are turned OFF.

 MR
Overview These devices can only be used with CPU internal functions.

Notation Device numbers are structured as shown below.


(Example)

Channel number (000 to 599) Contact number (00 to 15)

MR02809
Device name Device number (00000 to 59915)

Details These cannot be assigned as unit devices of expansion units.

Default setting When the power is turned on and when the mode switches from PROG to RUN or from
RUN to PROG, the status is cleared and the devices are turned OFF.

Reference • You can omit "R" when writing "MR."


• You can use zero suppression when you write your programs.
(Example) M2809
• When you select XYM marking mode, this is displayed as "M."
"XYM marking" (page 4-19)

 LR (Latch relay)
Overview These devices can only be used with CPU internal functions. These devices are used to
hold the status of devices.

Notation Device numbers are structured as shown below.


(Example)
Channel number (000 to 199) Contact number (00 to 15)

LR02308
Device name Device number (00000 to 19915)

4-30 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

Range LR000 to LR19915

LADDER PROGRAMMING
Details These cannot be assigned as unit devices of expansion units.

Default setting The status of another device is held in this device.

Reference • You can omit "R" when writing "LR."


• You can use zero suppression when you write your programs.
(Example) L2308
• When you select XYM marking mode, this is displayed as "L." 4
"XYM marking" (page 4-19)

Devices and Constants


Timer (contact) T

Overview Timers have a contact (1 bit), a set value (32 bits), and a current value (32 bits). These
devices function as follows: when the current value of a count-down timer is 0 (time is up)
or when the current value of a count-up or count-down timer matches the set value or 0,
the contact turns ON.

Notation Device numbers are structured as shown below.


(Example)

Device number (000 to 511)

T0501
Device name

Overview The contact, current value, and set value are determined by the operands of the
instruction used.

Range T000 to T511

Details There are five types of timers: the 1 ms timer, the 10 ms timer, the 100 ms timer, the 10 µs
timer, and the up/down timer.

Default setting When the power is turned on and when the mode switches from PROG to RUN, the
status is cleared and the devices are turned OFF.
When the power is turned on and when the mode switches from PROG to RUN, the
current value is set to the same value as the set value. (Among T0 to T9, only the current
values of up/down timers are held.)
The set value is held.

Reference You can use zero suppression when you write your programs.
(Example) T501

- KV Nano Series(terminal block type) User’s Manual - 4-31


4-4 Devices and Constants

 How to program Timer operations


LADDER PROGRAMMING

To program timer operations, specify in the timer instruction operands the timer number and settings
(the length of time until time is up) of the timer that you want to use.
(Example)
Contact number (000 to 511) Set value (0 to 4294967295)

TMR 001 #1000


UDT 002 #1000
4 Timer instruction
Devices and Constants

Reference • You can also specify a device in the set value.


For details, see "Timer and Counter Instructions" in the KV-7000/5000/3000/1000 Series and
KV Nano Series "Instruction Reference Manuals."
• You can use a device with the same number with both a timer and counter.

Operation differences between timer types


Time until Contact
Timer Type (Instruction) Device Number Set Value
Turns ON
100 ms count-down timer (TMR) n × 100 ms
10 ms count-down counter (TMH) n × 10 ms
1 ms count-down counter (TMS) 000 to 511 0 to 4294967295 n × 1 ms
10 µs count-down timer (TMU) n × 10 µs
10 ms up/down timer (UDT) n × 10 ms

 Timer error
Timer error is shown below:
• TMR (100 ms timer): Within + (±100 ms + 1 scan time)
• TMH (10 ms timer): Within + (±10 ms + 1 scan time)
• TMS (1 ms timer): Within + (±1 ms + 1 scan time)
• TMU (10 µs timer): Within + (±10 µs + 1 scan time)
• UDT (up/down timer): Within + (±10 ms + 1 scan time)

 Precautions when using Timer instructions


When you use a timer instruction between subroutine instructions (SBN to RET), between step
instructions (STP to STE), or between condition branch instructions (CJ or NCJ to LABEL), if, while the
timer instruction is being executed, the execution conditions are turned OFF between the above
opening and closing instructions, the timer's current value will not be updated.
The time calculation continues, and the current value of the timer reflects the elapsed time when the
instructions are executed again. If the set time has elapsed, the timer contact will normally be turned
ON immediately after the execution begins again. However, even if the set time has elapsed, if there is
a long time before execution starts again, the timer contact may not be turned ON. Therefore, execute
timer instructions under the condition that the execution of the timer instruction and its surrounding
instructions will not be stopped.

4-32 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

(Example) Programming a timer instruction with a set value of 20 seconds between the SBN and RET

LADDER PROGRAMMING
instructions

8 seconds 20 seconds

Instructions between Executing


the SBN and
RET instructions Stopped

ON
Execution

4
condition OFF

Timer
(set value: Current Seconds 20 ・18・16・14・ 12 0

Devices and Constants


20 seconds) value

ON
Contact
OFF

The timer's current value is not updated. When the timer restarts,
its contact is turned ON.

Reference • Note that the ONDL, OFDL, SHOT, and FLIK instructions also operate as explained
above.
If you use a timer instruction in a module or macro, when the execution of the module or macro is
stopped, the timer instruction is reset by the OFF processing, so the above phenomenon does not
occur.
"Standby module operation" (page 4-104)
"Macro Type" (page 4-115)

 How to handle the set value and current value of a timer


The instructions to use when reading and changing the set value and current value of a timer are
shown in the following table.
Reading Changing
Current value MOV and LDA instructions MOV and DW instructions
Set value (This value cannot be read.) STA instruction*

* When the power is turned on and when the mode switches from RUN to PROG, the set value that you
changed with the STA instruction is cleared and returned to its original value.
If a device is used to specify the set value of the timer instruction, the set value of the timer is updated
each scan to the value of the specified device.

When you change the value, if the current value is greater than the set value, the
Point
current value will be updated to match the set value.

- KV Nano Series(terminal block type) User’s Manual - 4-33


4-4 Devices and Constants

Counter (contact) C
LADDER PROGRAMMING

Overview Counters have a contact (1 bit), a set value (32 bits), and a current value (32 bits).
These devices function as follows: when the counter's current value is the same as the
set value (counting is finished) the contact is turned ON.

Notation Device numbers are structured as shown below.


(Example)
Device number (000 to 255)

4 C001
Device name
Devices and Constants

The contact, current value, and set value are determined by the operands of the
instruction used.

Range C000 to C255

Details There are three types of counters: the counter, the output counter, and the up/down
counter.

Default setting With the default settings, the contact status, current value, and set value are all held.
By clicking "Power off holding" in the CPU system settings, you can configure the settings
so that the contact status, current value, and set value are cleared when the power is
turned on and when the mode switches from PROG to RUN.

Reference • You can use zero suppression when you write your programs.
(Example) C15
• You can use a device with the same number with both a timer and counter.

 How to program counter operations


To program counter operations, specify in the counter instruction operands the counter number, set
value, and count input relay of the counter that you want to use.

Device number (000 to 255) Set value (0 to 4294967295)

C 011 #01000 R03000


Count input relay
OUTC 012 #01000

UDC 013 #01000


Counter instruction

Reference You can also specify a device in the set value.

Operation differences between counter types


Counter Type Counter Number
Set Value Reset Mode
(Instruction) Assignment
Counter (C) Execution condition OFF
Output counter (OUTC) 000 to 255 0 to 4294967295 RES instruction
Up/down counter (UDC) Reset input ON

For details, see "Timer and Counter Instructions" in the KV-7000/5000/3000/1000 Series and KV Nano Series
"Instruction Reference Manuals."

4-34 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

 Counter maximum counting speed

LADDER PROGRAMMING
Counting is performed only when both the counter input ON time and OFF time are longer than the
scanning time.
The formulae are shown below. If a counting speed greater than that shown below is necessary, use a
high-speed counter or the interrupt function.
Duty cycle (%) 1
Maximum counting speed = X (Unit: times/second)
100 Scan time (sec)
* The ratio of the time that the signal is ON or the time
that the signal is OFF to the total time is called
the duty cycle.
4
T1 T2
T1

Devices and Constants


T1 ≤ T2: Duty cycle = X 100 (Unit: %)
T1+T2

T2
T1 > T2: Duty cycle = X 100 (Unit: %)
T1+T2

 How to handle the set value and current value of a counter


The instructions to use when reading and changing the set value and current value of a counter are
shown in the following table.
Reading Changing
Current value MOV and LDA instructions MOV and DW instructions
Set value (This value cannot be read.) STA instruction*

* If a device is used to specify the set value of the counter instruction, the set value of the counter is updated
each scan to the value of the specified device.

When you change the value, if the current value is greater than the set value, the
Point
current value will be updated to match the set value.

High-speed counter comparator (contact) CTC

Overview These devices function as follows: when the current value of the high-speed counter
matches the set value, the contact is turned ON.

Point If CTC is being used as an interrupt condition, CTC (the contact) is not turned ON.

Range CTC0 to CTC7 (this varies according to the model)

Details CTC can also be used as an interrupt condition to execute an interrupt program.

Default setting With the default settings, the contact status and set value are both held.

- KV Nano Series(terminal block type) User’s Manual - 4-35


4-4 Devices and Constants

Control relay (contact) CR


LADDER PROGRAMMING

Overview These are special internal auxiliary relays that are used to control the PLC functions and
to capture the PLC status.

Range CR0000 to CR8915

Details "App-2 Lists of CR and CM Devices" (page A-8)

4
Word Devices
Devices and Constants

Data memory DM

Overview A data memory entry is a device that is used to save the reference data during function
operations and to store the results of calculations. Each entry has 16 bits.

Notation Device numbers are structured as shown below.


(Example)
Device name Device number

DM06143
Reference • You can omit "M" when writing "DM."
• You can use zero suppression when you write your programs.
(Example) DM6143
• You can use this as a bit device.
(Example) DM1100 ...............The lowest bit of DM1100 is processed.
• You can use this as a bit device by specifying the bit position.
(Example) DM1200.12 ..........The 13th bit of DM1200 is processed.
"Bit device processing of word devices" (page 4-48)
• When you select XYM marking mode, this is displayed as "D."
"XYM marking" (page 4-19)

Range DM00000 to DM32767

Details • You can only assign data memory (DM) entries to the unit devices of expansion units.
• The bit width of one device is 16 bits. When the device is being used as an unsigned,
decimal value, it takes on a value in the range of 0 to 65535. When the device is being
used as a signed, decimal value, it takes on a value in the range of -32768 to +32767.
When the device is being used as a hexadecimal value, it takes on a value in the range
of $0 to $FFFF.
DM1
bit bit bit bit
15 8 7 0

16 bits

4-36 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

• You can also use two devices to process 32-bit data. For 32-bit data, the lower 16 bits

LADDER PROGRAMMING
will be stored in the data memory entry of the specified device number and the upper
16 bits will be stored in the data memory entry of the next device number. When the
devices are being used as an unsigned, decimal value, they take on a value in the
range of 0 to 4294967295. When the devices are being used as a signed, decimal
value, they take on a value in the range of -2147483648 to +2147483647. When the
devices are being used as a hexadecimal value, they take on a value in the range of $0
to $FFFFFFFF.

4
DM1 DM0
bit bit bit bit bit bit bit bit
31 24 23 16 15 8 7 0

Devices and Constants


Upper 16 bits Lower 16 bits

32 bits
• When you are using data memory to specify the operands of an instruction that handles
32-bit data, specify only the number of the device in which the lower 16 bits are stored.

Default setting With the default settings, the values of DM00000 to DM01999 are held.
You can change the range to hold by using "Power off holding" in the CPU system
settings.

Reference Device notation for data memory (DM) units


In KV STUDIO, aside from the normal notation, you can use a notation in which the unit
numbers are the reference.
To use the device notation for units, on the "View" menu, click "Display unit device."

Unit number Device number


You can use zero suppression
when you write your programs.
DM05_0010 (Example) DM_10

Unit number: Starting with the CPU, numbers are assigned in the order (00, 01,
02, 03, 04, and so on) that the units are connected.
Unit DM number: Starting from 0000, the amount of data memory that will be
occupied is assigned as the number.

(Example)
Unit number 00* 01 02 03

KV-N24DT KV-N3AM, KV-N3AM, KV-N3AM,


CPU 50 words 50 words 50 words
Unit DM number 0000 to 0049 0000 to 0049 0000 to 0049

(Example) The 6th KV-N3AM of unit number 1 ............. 01_0006


The 15th KV-N3AM of unit number 3 ........... 03_0015

- KV Nano Series(terminal block type) User’s Manual - 4-37


4-4 Devices and Constants

Link register W
LADDER PROGRAMMING

Overview These registers are used to perform data linking in serial PLC link mode. Hexadecimal
notation is used to specify device numbers, which is different from other word devices.

Notation Device numbers are structured as shown below.


(Example)
Device name Device number (0 to 3FFF)

4 Reference
W3A6F
• You can use zero suppression when you write your programs.
(Example) W7A
Devices and Constants

• You can use this as a bit device. You can also specify the bit position.
(Example) W1200.12 ............The 13th bit of W1200 is processed.
"Bit device processing of word devices" (page 4-48)

• Use hexadecimal numbers (0 to F) to specify device numbers.


Point
• You cannot use local devices (@).

Range W0000 to W3FFF

Application These registers can be used to perform data linking in serial PLC link mode.

Details • These cannot be assigned as unit devices of expansion units.


• The bit width of one device is 16 bits. When the device is being used as an unsigned,
decimal value, it takes on a value in the range of 0 to 65535. When the device is being
used as a signed, decimal value, it takes on a value in the range of -32768 to +32767.
When the device is being used as a hexadecimal value, it takes on a value in the range
of $0 to $FFFF.
W123E
bit bit bit bit
15 8 7 0

16 bits
• You can also use two devices to process 32-bit data. For 32-bit data, the lower 16 bits
will be stored in the data memory entry of the specified device number and the upper
16 bits will be stored in the data memory entry of the next device number. When the
devices are being used as an unsigned, decimal value, they take on a value in the
range of 0 to 4294967295. When the devices are being used as a signed, decimal
value, they take on a value in the range of -2147483648 to +2147483647. When the
devices are being used as a hexadecimal value, they take on a value in the range of $0
to $FFFFFFFF.
W2BE1 W2BE0
bit bit bit bit bit bit bit bit
31 24 23 16 15 8 7 0

Upper 16 bits Lower 16 bits

32 bits

Default setting With the default settings, values are not held.
You can configure the settings so that the values are held by using "Power off holding" in
the CPU system settings.

4-38 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

Temporary data memory TM

LADDER PROGRAMMING
Overview Temporary data memory entries are word devices that can be processed in the same
manner as data memory. Each device has 16 bits. When you use calculation instructions,
a part of the device area can also be used to temporarily store the data for the calculation
and the result data.

Notation Device numbers are structured as shown below.


(Example)
Device name Device number 4

Devices and Constants


TM010
Range TM000 to TM003 (used with calculation instructions)
TM004 to TM511 (used with simple indirect specification and similar functions)
TM Number Application
TM000
Calculations (DIV, MUL, and ROOT instructions)
TM001
TM002
Calculations (DIV instruction)
TM003
TM004 to TM511 Simple indirect specification and general use

For details on instructions such as DIV and MUL, see the KV-7000/5000/3000/1000 Series and KV
Nano Series "Instruction Reference Manuals."
For details on simple indirect specification, see "Indirect Specification" (page 4-43).

Default setting When the power is turned on and when the mode switches from PROG to RUN, values
are cleared and set to 0.

Reference • TM000 to TM003 are designed for usage with calculation instructions such as DIV and
MUL. We recommend that you do not use these devices for any other purpose.
• You can use zero suppression when you write your programs.
(Example) TM10
• TM devices are stored in the internal cache, so you can access them at high speeds.

Timer (current value and set value) T

Use timers as word devices when you set the value of the timer (32 bits) and when you read the current
value of the timer (32 bits).

"Timer (contact) T" (page 4-31)

Counter (current value and set value) C

Use counters as word devices when you set the value of the counter (32 bits) and when you read the
current value of the counter (32 bits).

"Counter (contact) C" (page 4-34)

- KV Nano Series(terminal block type) User’s Manual - 4-39


4-4 Devices and Constants

High-speed counter (current value) CTH


LADDER PROGRAMMING

Overview High speed counters are 32-bit counters used to collect short interval signals that cannot
be captured by common counter instructions.

Range CTH0 to CTH3 (this varies according to the model)

Details • You can use these to process values in the range of 0 to 4294967295 or in the range of

4 -2147483648 to +2147483647.
• You can count not only external input, but the internal clock as well.
• The maximum response frequency is 50% duty cycle, single-phase, 100 kHz, and 50
Devices and Constants

kHz phase difference.

Default setting With the default settings, values are held.

High-speed counter comparator (set value) CTC

Overview These devices store the set values (32 bits) of high-speed counters.

Range CTC0 to CTC7 (this varies according to the model)

Details • You can set these devices to a value between 0 and 4294967295 or between
-2147483648 and +2147483647.
• You can configure two set values (CTC) per high-speed counter (CTH).
CTC0 and CTC1 .......For CTH0
CTC2 and CTC3 .......For CTH1
CTC4 and CTC5 .......For CTH2
CTC6 and CTC7 .......For CTH3

Default setting With the default settings, the contact status and set values are held.
By using "Power off holding" in the CPU system settings, you can configure the settings
so that the contact status and set values are cleared when the power is turned on and
when the mode switches from PROG to RUN.

Index register Z

Overview These are 32-bit word devices that are used to specify the value to add to the target
device number during index modification. You can use these devices in the same manner
as data memory to save data and to store calculation results.

Range Z01 to Z12

Reference You can use zero suppression when you write your programs.
(Example) Z3

4-40 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

LADDER PROGRAMMING
Point • Z11 and Z12 are reserved for the system, so you cannot use these devices.
• You cannot specify the bit for word devices.
• There are no local devices. Use the ZPUSH and ZPOP instructions.
For details, see the ZPUSH instruction in the KV-7000/5000/3000/1000 Series and KV Nano
Series "Instruction Reference Manuals."
For details, see the ZPOP instruction in the KV-7000/5000/3000/1000 Series and KV Nano
Series "Instruction Reference Manuals."

Default setting When the power is turned on and when the mode switches from PROG to RUN, the
values are cleared and set to 0. 4
"Index Modification" (page 4-41)

Devices and Constants


Control memory CM

Overview These are special word devices that are used to control the PLC functions and to capture
the PLC status.

Range CM0000 to CM8999

Details "App-2 Lists of CR and CM Devices" (page A-8)

Index Modification

Index modification is a method for specifying devices by the number that is calculated by adding the
value of the index register (Z) or a constant to devices.
Values in the signed, 32-bit range can be added.
The types of devices that you can use index modification with are R (DR), B, MR, LR, T, C, DM, W, CM,
and TM. Index modification can be performed over all device ranges.
Index modification can be used together with indirect specification (*) and local devices (@).

• You cannot perform index modification with CTH, CTC, CR, Z, and labels (label
Point
arrays) and when specifying the bit position of word devices.
"Label" (page 4-152)
"Bit device processing of word devices" (page 4-48)
• If you specify in a parameter a device that is outside of the usable range after
index modification, control relay CR2012 is turned ON and the instruction is not
executed. Operation will continue.

 Modification according to index registers


Use this to change the device specified with the instruction's operand during operation.
To program device modification according to index registers,
(Device number): Z(1 to 10)
write instructions as shown above.
(Example) DM1000: Z1........ DM990 is referenced when the value of Z1 is -10.
R000: Z5............. R100 is referenced when the value of Z5 is +16.

Point Z11 and Z12 are reserved for system, so you cannot use these devices. Series.

- KV Nano Series(terminal block type) User’s Manual - 4-41


4-4 Devices and Constants
LADDER PROGRAMMING

Example
The current value, which will be stored in DM10000, is saved when a trigger signal (the
rising edge of R001) is received. Recording starts on the rising edge of R000. Data is
saved in the data memory entries in order, starting from DM0.

R000 MOV.L
On the rising edge of R000,
+0 Z1
index register Z1 is set to 0.
Recording
start button
On the rising edge of R001,
R001 MOV the value of DM10000 is written to
DM10000 DM0:Z1
the target device that is being

4
Trigger signal index modified.
Current Leading save
value destination
Z1
Index register Z1 is incremented
Devices and Constants

INC.L
(+ 1).

Current value Save destination

DM10000 1234 DM0 2152


DM1 2348

DM99 1234

Because the value to change through index modification is processed as a


Point
signed, 32-bit value, write ".L" as the suffix of instructions that operate the index
registers.

Reference • If you need to use 10 or more index registers (Z) in a project, use the index register
instructions (ZPUSH and ZPOP) to store and restore all the index registers of a module
or macro at once.
For details, see "Index Instructions" in the KV-7000/5000/3000/1000 Series and KV Nano Series
"Instruction Reference Manuals."
• In the above example, if the suffix of the MOV instruction was ".L," the value of
DM10000 to DM10001 would be saved as data in the following data memory entries:
DM0 to DM1, DM2 to DM3, ... DM98 to DM99.

DM10000 to DM10001 123456 DM0 to DM1 234567

DM2 to DM3 355648


・ ・
・ ・
・ ・
DM98 to DM99 123456

 Modification according to index constants


To program index modification by using constants,
(Device number):#(a constant in decimal notation)
write instructions as shown above.

(Example) DM1000:#-10........DM1000- 10 words = DM990


R000:#16:.............R000+ 16 bits (the amount for one channel) = R100

Reference If you use modification according to index constants in a macro that uses unit devices, it is
easy to tell what number device is specified from the assigned leading device. This is also
effective when you use UR and UM as argument devices during macro creation.
(Example)
UR0:#2
UM1:#32
"Usage example" (page 4-121)
4-42 - KV Nano Series(terminal block type) User’s Manual -
4-4 Devices and Constants

LADDER PROGRAMMING
Indirect Specification

 Indirect specification (*)


Indirect specification (*) is used to modify during program execution the devices that you specify with
instruction operands. You can also use index modification to change the reference devices, but you can
use indirect specification (*) to change the device type.

 What is indirect specification?


Each device is managed with the KV Nano Series' internal memory, and each device has a unique
4
address. Because addresses are managed as 32-bit values, 2 words worth of devices are required to

Devices and Constants


store an address.
In indirect specification (*), the address is manipulated by means of special instructions to change the
reference device.
Index modification (:Z/:#) can be used together with local devices (@).

• Indirect specification (*) cannot be used together with simple indirect


Point
specification (#TM).
• If you specify in an operand a device that is outside of the usable range after
indirect specification, control relay CR2012 is turned ON and the instruction is
not executed. Operation will continue.

 How to program indirect specification


If you write "*(device)" and the instruction operands, the device or device value that corresponds to the
address stored in the device will be referenced. What is referenced is determined by the operands of
the instruction that you use.

(Example)
When you write "*TM10"

Device Value
TM10・TM11 DM0 25
This value indicates * TM10 references 1234
DM1 1234
the address of DM1. or DM1.
DM2 0
DM3 96

• The devices that you can write in "*(device)" (that is, the addresses that can be
Point
stored) are DM, TM, and W.
• The devices that you can specify indirectly are R, MR, LR, B, T, C, DM, TM, W,
and CM.

Reference • If the device that you want to specify indirectly is a timer (T) or counter (C), the contact,
current value, and set value are determined by the operands of the instruction that you
use.
• When you are using local devices, write "*@(device)."

 How to use indirect specification


Follow the procedure below to perform indirect specification.
- KV Nano Series(terminal block type) User’s Manual - 4-43
4-4 Devices and Constants

1 Use the address set instruction (ADRSET) to write the address of the device that you want to
LADDER PROGRAMMING

reference.
(Example)

ADRSET
The address of DM0 is
DM0 TM10
stored in TM10 and TM11.

The devices that can store addresses are TM, DM, W, and CM.
4
Point
Devices and Constants

For details, see the ADRSET instruction in the KV-7000/5000/3000/1000 Series and KV Nano Series
"Instruction Reference Manuals."

2 To use the operands of the instruction to indirectly specify the device, add the prefix "*" before
the device in which the address is stored.
(Example)

MOV
The value of DM10000 is
DM10000 *TM10
stored in DM0.

DM0

Before you add the prefix "*" in front of the device in which the address is stored,
Point
be sure to use the ADRSET instruction to store the address of the device that you
want to specify indirectly.

3 To change the device that you want to reference, use the specialized indirect specification
commands (ADRINC, ADRDEC, ADRADD, and ADRSUB) to change the stored address.
(Example)

The address of DM0 that is


ADRINC
TM10 stored in TM10 and TM11 is
incremented (+ 1).

MOV
The value of DM10000 is
DM10000 *TM10
stored in DM1.

DM1

Do not use normal calculation instructions (such as ADD, INC, SUB, and DEC) to
Point
change the address that you want to reference. The ladder program will not
operate correctly.

For details, see "Indirect Specification Instructions" in the KV-7000/5000/3000/1000 Series and KV Nano
Series "Instruction Reference Manuals."

4-44 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

 Usage example of indirect specification

LADDER PROGRAMMING
The rising edge of R001 is used as the trigger signal, which causes the current value stored in
DM10000 to be saved.
Recording starts on the rising edge of R000. Data is saved in the data memory entries in order, starting
from DM0.

R000 ADRSET On the rising edge of R000, the address


DM0 TM10
of DM0 is written to TM10 and TM11.
Recording Leading save Address storage
start button destination destination

4
R001 MOV On the rising edge of R001, the value of
DM10000 *TM10 DM10000 is written to the target device
Trigger that is being indirectly specified.
Current value Address storage
signal
destination

Devices and Constants


ADRINC The address that is stored in TM10 and
TM10
TM11 is incremented (+ 1).
Address storage
destination

Current value Save destination

DM10000 1234 DM0 2152


DM1 2348

DM99 1234

 Usage example together with index modification


The rising edge of R001 is used as the trigger signal, which causes the current value stored in
DM10000 to be saved.
Measurement starts on the rising edge of R000. Data is saved in the data memory entries in order,
starting from DM0 if R002 is ON when measurement starts and starting from DM1000 if R002 is OFF
when measurement starts.

(1) (2)
R000 +0 R002 ADRSET
DW.S DM0 TM10
Measurement Z1 Save Leading save Address storage
start button destination destination 1 destination
selection (3)
R002 ADRSET
DM1000 TM10
Save Leading save Address storage
destination destination 2 destination
selection
(4)
R001 MOV
DM10000 *TM10:Z1
Trigger
signal Measured Address storage
value destination
Z1
INC.L
(5)

[When measurement starts]


(1) 0 is written in index register Z1.
(2) If R002 is ON, the address of DM0 is written in TM10 and TM11.
(3) If R002 is OFF, the address of DM1000 is written in TM10 and TM11.
[When a trigger occurs]
(4) Z1 is used to index modify the device at the address stored in TM10 and TM11 (the value of Z1 is
added to this device), and the value of DM10000 is written to the resultant device.
(Example)
*TM10  DM1000 *TM10:Z1  DM1023
Z1 = 23
(5) Z1 is incremented.
- KV Nano Series(terminal block type) User’s Manual - 4-45
4-4 Devices and Constants

 Simple indirect specification #TM


LADDER PROGRAMMING

You can use indirect specification that uses temporary data memory (TM) as "simple indirect
specification."

• You cannot use simple indirect specification together with index modification,
Point
indirect specification (*), or local devices (@).
• Simple indirect specification is supported so that existing programs may be
reused. If you are creating new programs, we recommend that you use index

4 modification or indirect specification.


Devices and Constants

 How to specify simple indirect specification


To use simple indirect specification, write #TMnnn in the instruction operands, and change the value
stored in TMnnn.
The relationship between the value stored in TMnnn and the reference value of simple indirect
specification is shown in the following table.

Reference Value of Simple


Value Stored in TMnnn Indirect Specification
0 DM0
1 DM1
2 DM2
DM device indirectly specified
9997 DM9997
9998 DM9998
9999 DM9999

10000 R000
10001 R001
10002 R002
Relay (R) device indirectly
specified
27913 R17913
27914 R17914
27915 R17915

The range of temporary data memory entries that can be used is TM0 to TM511. However, take care to
not overlap over TM0 to TM3, as these are used for calculations.

• With simple indirect specification, you can specify only DM and R devices and
Point
only the ranges of DM10000 to DM32767 and R18000 to R59915.
• If you attempt to perform simple indirect specification when the value of
temporary data memory is greater than 27915, control relay CR2012, the
calculation flag, will be turned ON when the attempt to execute the instruction
is made, and the instruction will not be executed. Operation will continue.

4-46 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

LADDER PROGRAMMING
Processing bit devices in units of words

Normally (in sequence control), a bit device is processed as a single-bit device.

R006 R1500
With an instruction like this one,
the processing target of both R006 and R1500 is 1 bit.

R
0
1
5
R
0
1
4
R
0
1
3
R
0
1
2
R
0
1
1
R
0
1
0
R
0
0
9
R
0
0
8
R
0
0
7
R
0
0
6
R
0
0
5
R
0
0
4
R
0
0
3
R
0
0
2
R
0
0
1
R
0
0
0
4

Devices and Constants


Input relay

Processing target

Output relay
R R R R R R R R R R R R R R R R
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0

In calculation instructions, bit devices can be grouped into 16 bits or 32 bits for processing.
If you specify a bit device as an operand of an instruction that processes data in units of words, the
specified bit device will be treated as the leading bit of the word data for processing.

Example

MOV
R1000 DM0

R1015 R1000

1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0

bit DM0 bit


15 0

1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0

MOV.D
R1000 DM0

R1115 R1100 R1015 R1000

1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0

bit DM1 bit bit DM0 bit


15 0 15 0

1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0

- KV Nano Series(terminal block type) User’s Manual - 4-47


4-4 Devices and Constants

If the bit device specified as an operand is not the leading channel, the next channel will also be used to
LADDER PROGRAMMING

provide the word unit of data for processing

MOV
R1003 R1505

R1102 R1003
301ch 300ch

4 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0

R1604 R1505
Devices and Constants

306ch 305ch

1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0

When the word unit of data is taken across multiple channels for processing, the
Point
processing speed decreases.

Bit device processing of word devices

Normally, word devices are processed as 16-bit or 32-bit devices.


To process a specific bit of a word device, use the bit contact instruction and the bit output instruction.
You can specify the bit position of a word device in the operands of the following instructions.
LD, LDB, AND, ANB, OR, ORB, LDP, ANP, ORP, LDF, ANF, ORF, LDPB, ANPB, ORPB,
LDFB, ANFB, ORFB, OUT, OUB, SET, RST, KEEP, DIFU, and PIFD

Example
DM1200.12...........The 12th bit of DM1200 is processed.
DM1200

0 1 1 1 0 1 1 0 0 1 1 0 1 1 0 0

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

If you specify a word device with an instruction other than those listed above, only the lowest bit of the
specified word device is processed as a bit device.

DM1200.12 R1000

4-48 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

LADDER PROGRAMMING
Example
When the value of DM1000 is #46563 ($B5E3)

DM1000 DM1001

DM1000=#46563($B5E3)

1 0 1 1 0 1 0 1 1 1 1 0 0 0 1 1
4

Devices and Constants


Lowest bit
1: The contact turns ON.
0: The contact turns OFF.

In the above example, the contact is turned ON, so the lowest bit of DM1001 is set to 1.
DM1001=#14($E)

0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0

DM1001=#15($F)

0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1

Reference Bits other than the lowest bit are not changed.

Constants

The constant value and range varies according to the instruction and suffix used.

#Decimal constants

Overview Values that are displayed with a bit width of 16 or 32 bits are represented in decimal
notation.
Notation • Unsigned (when the suffix is ".U" or ".D")
A decimal constant is represented by the prefix "#," which is followed by decimal
numbers.
(Example)
Symbol that indicates
this is a decimal value Value

#06143
• Signed (when the suffix is ".S" or ".L")
A decimal constant is represented by a sign, which is followed by decimal numbers.

Range • 16-bit, unsigned constant: #0 to #65535


• 32-bit, unsigned constant: #0 to #4294967295
• 16-bit, signed constant: -32768 to +32767
• 32-bit, signed constant: -2147483648 to +2147483647
- KV Nano Series(terminal block type) User’s Manual - 4-49
4-4 Devices and Constants
LADDER PROGRAMMING

Reference • You can use zero suppression when you write your programs.
• You can also prefix signed constants with "#." If you include "#," only "+" may be omitted.
• When you select XYM marking mode, you can append "K" when you write these
constants.
"XYM marking" (page 4-19)

$Hexadecimal constants
4 Overview Values that are displayed with two bit widths,16 bits and 32 bits, are represented in
hexadecimal notation.
Devices and Constants

Notation A hexadecimal constant is represented by the prefix "$," which is followed by


hexadecimal numbers.
(Example)
Symbol that indicates
this is a hexadecimal value Value

$1AF7
Range • 16-bit constant: $0000 to $FFFF
• 32-bit constant: $00000000 to $FFFFFFFF

If you enter a hexadecimal value that contains letters A to F without the prefix "$,"
Point
an error will occur. If you enter a hexadecimal value that does not contain letters
A to F without the prefix "$," the hexadecimal value will be recognized as a relay
(R).

Reference • You can use zero suppression when you write your programs.
• When you select XYM marking mode, you can append "H" when you write these
constants.
"XYM marking" (page 4-19)

Single precision floating-point constants

Overview These constants can be written as the operands of floating-point instructions.

• Signed decimal values can be written as-is for these constants.


Notation
• For eight digits or more, exponential notation is used.

Range -3.4E + 38 ≤ N ≤ -1.2E - 38


N=0
+1.2E - 38 ≤ N ≤ +3.4E + 38 (approximately 7 significant digits)

• The prefix "#" can be used. Only "+" can be omitted.


Reference
• On the KV Nano Series, if a sub-normal floating-point number (-1.2E - 38 < N ≤ -1.4E -
45 or +1.4E - 45 ≤ N < +1.2E - 38) that is outside of the normal number range is
calculated, a calculation error will occur. If the calculation result is a sub-normal
number, the value will be set to 0.

4-50 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

Double precision floating-point constants

LADDER PROGRAMMING
Overview These constants can be written as the operands of double precision floating-point
instructions.

Notation • Signed decimal values can be written as-is for these constants.
• For 15 digits or more, exponential notation is used.

4
Range -1.79E + 308 ≤ N ≤ -2.23E - 308
N=0
+2.23E - 308 ≤ N ≤ +1.79E + 308 (approximately 16 significant digits)

Devices and Constants


Reference • The prefix "#" can be used. Only "+" can be omitted.
• On the KV Nano Series, if a sub-normal double precision floating-point number (-2.23E
- 308 < N ≤ -4.9E - 324 or +4.9E - 324 ≤ N < +2.23E - 308) that is outside of the normal
number range is calculated, a calculation error will occur.
If the calculation result is a sub-normal number, the value will be set to 0.

Fixed character strings

Overview These can be written as the operands of character string processing instructions and
calendar contact instructions.

Notation Surround the character string with quotation marks.


(Example)
Character string

SMOV "Calculation result" DM00000


Instruction First operand Second operand

If you do not include the opening and closing quotation marks, the string will be
Point
processed as a label.

Reference To process the quotation mark as a character, escape it by entering two quotation marks.

Range Up to 31 characters (half width)

- KV Nano Series(terminal block type) User’s Manual - 4-51


4-4 Devices and Constants
LADDER PROGRAMMING

Internal Registers

An internal register is a device that is used to store the calculation results of application instructions,
calculation instructions, and expansion instructions and to temporarily store data during calculations.
The data stored in an internal register is not changed until the next time that new data is stored in the
internal register.
When the power is turned on and when the mode switches from PROG to RUN, the values are cleared
and set to 0.

4 The usage of the internal registers is automatically separated into the 16-bit, 32-bit, and 64-bit internal
registers according to the instruction and suffixes used.
"Suffixes" (page 4-8)
Devices and Constants

 16-bit and 32-bit internal registers


The 16-bit internal register and the 32-bit internal register are shown below. The 32-bit register consists
of 16 upper bits and 16 lower bits.
bit bit bit bit
31 16 15 0

Upper 16 bits Lower 16 bits

16-bit internal register

32-bit internal register

The lower 16 bits of the 32-bit internal register are known as the 16-bit internal register. The 32-bit
internal register consisting of the lower 16 bits and the upper 16 bits is known as the 32-bit internal
register.

 64-bit internal registers


The 64-bit internal register is shown below. The 64-bit register consists of 64 bits, and is only used
when double precision floating-point number instructions and suffixes (.DF) are being processed. The
lower 32 bits of the 64-bit internal register are shared with the 32-bit internal register.
bit bit bit bit
63 32 31 0

64-bit internal register

32-bit internal register

4-52 - KV Nano Series(terminal block type) User’s Manual -


4-4 Devices and Constants

 Internal registers and calculation instructions

LADDER PROGRAMMING
(Expansion) Word-unit handling of a
Data memory (internal auxiliary)
DM Current value of a timer
Temporary data memory relay or control relay
TM Constant or counter R00000 to R59915
Control memory #$ MR00000 to MR59915
CM T, C, CTH LR00000 to LR19915
Index register
Z CR0000 to CR3915

4
LDA instruction

Devices and Constants


By way of the calculation instruction,
the calculation is performed in an
internal register on the values read
Internal register with the LDA instruction.
The STA instruction is used to write
the result to the target device.
STA instruction

Data memory Word-unit handling of a


DM (internal auxiliary)
Temporary data memory Current value of a timer relay or control relay
TM or counter
Control memory R00000 to R59915
CM MR00000 to MR59915
Index register T, C, CTH LR00000 to LR19915
Z CR0000 to CR3915

Example
The value of DM0 is read into the internal registers. This value is then multiplied by
2, the value of DM1 is added to the product, and the result is then stored in DM2.

CR2002 DM0 #2 DM1 DM2


LDA MUL ADD STA
#1000 #100 #2100

- KV Nano Series(terminal block type) User’s Manual - 4-53


4-5 How Data Is Processed
The values that are processed by ladder programs are binary values, decimal (unsigned and signed)
LADDER PROGRAMMING

values, hexadecimal values, binary coded decimal (BCD) values, single precision floating-point real
numbers, and double precision floating-point real numbers.
The character codes that can be processed are ASCII code and shift JIS code.

Binary Data

On the KV Nano Series, all data is processed by devices and internal registers as binary data.

4 One digit of a binary value is processed as a bit unit. A bit indicates two states: 0 (OFF) and 1 (ON).

 16-bit binary data


How Data Is Processed

16 bits (16 binary digits) of data are normally processed in units of words. For an unsigned decimal
value, one word indicates a value in the range of 0 to 65535.
(Example)

Highest bit

bit bit bit bit


15 8 7 0

0 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0
Weight of


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 each bit
32768 16384 8192 4096 2048 1024 512 256 128 64 32 16 8 4 2 1 Decimal
number value
0 + 0 +8192 + 0 + 0 +1024+512 +256 + 0 + 0 + 0 +16 + 0 + 0 +0 +0 = 10000

 32-bit binary data


For an unsigned decimal value, 32 bits of data (two words) indicates a value in the range of 0 to
4294967295.

Highest bit

bit bit bit bit bit bit bit bit


31 24 23 16 15 8 7 0

Upper 16 bits Lower 16 bits

If you are using a DM, TM, or other 16-bit word device to process a 32-bit device, 2 consecutive words
will be used. The lower 16 bits of data are processed by the word device with the smaller number, and
the upper 16 bits of data are processed by the word device with the larger number.

Reference Whether a device is processed as 16-bit data or 32-bit data is determined by the suffix.
"Suffixes" (page 4-8)

4-54 - KV Nano Series(terminal block type) User’s Manual -


4-5 How Data Is Processed

LADDER PROGRAMMING
Value Notation

 Binary BIN
The internal binary data of the KV Nano Series is indicated as 0s and 1s without any changes. When a
digit is greater than 1, the digit is carried.

Highest bit

bit
15
bit
8
bit
7
bit
0 4

How Data Is Processed


Weight of


15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 each bit
32768 16384 8192 4096 2048 1024 512 256 128 64 32 16 8 4 2 1 Decimal
number value
(Example) 0110110100110001

Reference These values cannot be entered as instruction operands.

 Decimal DEC
The internal binary data of the KV Nano Series is indicated as decimal values.

 Unsigned
For 16-bit data, the range of values that can be processed is 0 to 65535. For 32-bit data, the range of
values that can be processed is 0 to 4294967295.

 Signed
Whether a value is positive or negative is determined by the highest bit (0: positive; 1: negative).
For 16-bit data, the range of values that can be processed is -32768 to +32767. For 32-bit data, the
range of values that can be processed is -2147483648 to +2147483647.

Reference These values can be entered as instruction operands. Prefix the value with "#" or a sign.
(Examples) #1000, +12, and -25489

 Hexadecimal HEX
The internal binary data of the KV Nano Series is indicated as hexadecimal values.
For hexadecimal values, four bits are processed as one digit. Because the values that can be
expressed in a single digit are 0 to 15 in decimal notation, A, B, C, D, E, and F are used for values
greater than 9. When a digit is greater than F, the digit is carried.
For 16-bit data, the range of values that can be processed is $0000 to $FFFF. For 32-bit data, the range
of values that can be processed is $00000000 to $FFFFFFFF.

Reference These values can be entered as instruction operands. Prefix the value with "$."
(Example) $00FF

- KV Nano Series(terminal block type) User’s Manual - 4-55


4-5 How Data Is Processed

 Binary Coded Decimal BCD


LADDER PROGRAMMING

With binary coded decimal notation, 4 bits are processed as 1 digit in the same manner as hexadecimal
notation. In the same manner as decimal notation, when a digit is 9, the digit is carried, so the letters A
to F are not used.
For 16-bit data, the range of values that can be processed is 0000 to 9999. For 32-bit data, the range of
values that can be processed is
00000000 to 99999999.

4 Example

bit bit bit bit


How Data Is Processed

15 8 7 0
0 0 0 0 1 0 0 1 1 0 0 0 0 1 1 1

When 16-bit data is stored as shown above, while the actual value is $0987
(#2439 in decimal notation), in binary coded decimal, this value is handled in
decimal notation as "0987."

0 0 0 0 1 0 0 1 1 0 0 0 0 1 1 1
Thousands Hundreds Tens Ones
position position position position
0 9 8 7

Binary coded decimal is a useful notation to use when processing data that comes from an external
source (such as a digital switch).
However, this data must be processed as binary data in calculations performed by the KV-5500/5000/
3000. When reading data from an external source, use the TBIN instruction to convert the data to
binary data. When outputting data to an external device (such as a digital display), use the TBCD
instruction to convert the data to binary coded decimal data.

Reference To enter binary coded data values as instruction operands, prefix the value with "$" to
enter the value in hexadecimal notation.

 Single precision floating-point real numbers FLOAT


Floating-point real numbers are processed as values in which 32-bit data has a decimal point.
You can use values in the following range (N).
-3.4 × 10+38 ≤ N ≤ -1.2 × 10-38
N=0
+1.2 × 10-38 ≤ N ≤ +3.4 × 10+38

Reference • These values can be entered as floating-point instruction operands.


In addition to the normal notation using the decimal point (example: -1.2345), you can
also use an exponential notation using "E."
(Examples)-2.743 × 1012-2.743E + 12
+8.9025 × 10-4+8.9025E - 4
• The precision of floating-point real numbers is 32-bit single precision. There are
approximately 7 significant digits.
• Floating-point real numbers stored in 32-bit data are represented internally in the IEEE
standard format.
4-56 - KV Nano Series(terminal block type) User’s Manual -
4-5 How Data Is Processed

 Double precision floating-point real numbers DOUBLE-FLOAT

LADDER PROGRAMMING
Double precision floating-point real numbers are processed as values in which 64-bit data has a
decimal point.
You can use values in the following range (N).
-1.79 × 10+308 ≤ N ≤ -2.23 × 10-308
N=0
+2.33 × 10-308 ≤ N ≤ +1.79 × 10+308
Reference • These values can be entered as double precision floating-point instruction operands.
In addition to the normal notation using the decimal point (example: -1.2345), you can
also use an exponential notation using "E."
(Examples) -2.1437956 × 1012  -2.1437956E + 12 4
-4
+7.63259856 × 10  +7.63259856E - 4

How Data Is Processed


• The precision of double precision floating-point real numbers is 64-bit double precision.
There are approximately 16 significant digits.
• Double precision floating-point real numbers stored in 64-bit data are represented
internally in the IEEE standard format.
• Whether a device is processed as single precision floating-point data or as double
precision floating-point data is determined by the suffix.
"Suffixes" (page 4-8)

Correlations between Value Notations

The correlations between binary values, decimal (unsigned and signed) values, hexadecimal values, and
binary coded decimal values are shown below.

 16-bit data
Decimal Binary
Hexa-
Coded
decimal Binary (BIN) Binary (BIN)
Unsigned Signed Decimal
(HEX)
(BCD)
0 +0 0 0000 0000 0000 0000 0000 0000 0000 0000 0000
1 +1 1 0000 0000 0000 0001 0001 0000 0000 0000 0001
2 +2 2 0000 0000 0000 0010 0002 0000 0000 0000 0010
3 +3 3 0000 0000 0000 0011 0003 0000 0000 0000 0011
4 +4 4 0000 0000 0000 0100 0004 0000 0000 0000 0100
5 +5 5 0000 0000 0000 0101 0005 0000 0000 0000 0101
6 +6 6 0000 0000 0000 0110 0006 0000 0000 0000 0110
7 +7 7 0000 0000 0000 0111 0007 0000 0000 0000 0111
8 +8 8 0000 0000 0000 1000 0008 0000 0000 0000 1000
9 +9 9 0000 0000 0000 1001 0009 0000 0000 0000 1001
10 +10 A 0000 0000 0000 1010 0010 0000 0000 0001 0000
11 +11 B 0000 0000 0000 1011 0011 0000 0000 0001 0001
12 +12 C 0000 0000 0000 1100 0012 0000 0000 0001 0010
13 +13 D 0000 0000 0000 1101 0013 0000 0000 0001 0011
14 +14 E 0000 0000 0000 1110 0014 0000 0000 0001 0100
15 +15 F 0000 0000 0000 1111 0015 0000 0000 0001 0101
16 +16 10 0000 0000 0001 0000 0016 0000 0000 0001 0110
...

...

...

...

...

...

99 +99 63 0000 0000 0110 0011 0099 0000 0000 1001 1001
100 +100 64 0000 0000 0110 0100 0100 0000 0001 0000 0000
...

...

...

...

...

...

32767 +32767 7FFF 0111 1111 1111 1111 0999 0000 1001 1001 1001
32768 -32768 8000 1000 0000 0000 0000 1000 0001 0000 0000 0000
...

...

...

...

...

...

65534 -2 FFFE 1111 1111 1111 1110 9998 1001 1001 1001 1000
65535 -1 FFFF 1111 1111 1111 1111 9999 1001 1001 1001 1001

- KV Nano Series(terminal block type) User’s Manual - 4-57


4-5 How Data Is Processed

 32-bit data
LADDER PROGRAMMING

Decimal Hexadecimal
Binary (BIN)
Unsigned Signed (HEX)
0 +0 0 0000 0000 0000 0000 0000 0000 0000 0000
1 +1 1 0000 0000 0000 0000 0000 0000 0000 0001
2 +2 2 0000 0000 0000 0000 0000 0000 0000 0010
3 +3 3 0000 0000 0000 0000 0000 0000 0000 0011
4 +4 4 0000 0000 0000 0000 0000 0000 0000 0100
5 +5 5 0000 0000 0000 0000 0000 0000 0000 0101
6 +6 6 0000 0000 0000 0000 0000 0000 0000 0110
4 7
8
+7
+8
7
8
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0111
1000
+9
How Data Is Processed

9 9 0000 0000 0000 0000 0000 0000 0000 1001


10 +10 A 0000 0000 0000 0000 0000 0000 0000 1010
11 +11 B 0000 0000 0000 0000 0000 0000 0000 1011
12 +12 C 0000 0000 0000 0000 0000 0000 0000 1100
13 +13 D 0000 0000 0000 0000 0000 0000 0000 1101
14 +14 E 0000 0000 0000 0000 0000 0000 0000 1110
15 +15 F 0000 0000 0000 0000 0000 0000 0000 1111
16 +16 10 0000 0000 0000 0000 0000 0000 0001 0000
...

...

...

...
99 +99 63 0000 0000 0000 0000 0000 0000 0110 0011
100 +100 64 0000 0000 0000 0000 0000 0000 0110 0100
...

...

...

...
2147483647 +2147483647 7FFFFFFF 0111 1111 1111 1111 1111 1111 1111 1111
2147483648 -2147483648 8000000 1000 0000 0000 0000 0000 0000 0000 0000
...

...

...

...

4294967294 -2 FFFFFFFE 1111 1111 1111 1111 1111 1111 1111 1110
4294967295 -1 FFFFFFFF 1111 1111 1111 1111 1111 1111 1111 1111

Binary Coded Decimal (BCD) Binary (BIN)


00000000 0000 0000 0000 0000 0000 0000 0000 0000
00000001 0000 0000 0000 0000 0000 0000 0000 0001
00000002 0000 0000 0000 0000 0000 0000 0000 0010
00000003 0000 0000 0000 0000 0000 0000 0000 0011
00000004 0000 0000 0000 0000 0000 0000 0000 0100
00000005 0000 0000 0000 0000 0000 0000 0000 0101
00000006 0000 0000 0000 0000 0000 0000 0000 0110
00000007 0000 0000 0000 0000 0000 0000 0000 0111
00000008 0000 0000 0000 0000 0000 0000 0000 1000
00000009 0000 0000 0000 0000 0000 0000 0000 1001
00000010 0000 0000 0000 0000 0000 0000 0001 0000
00000011 0000 0000 0000 0000 0000 0000 0001 0001
00000012 0000 0000 0000 0000 0000 0000 0001 0010
00000013 0000 0000 0000 0000 0000 0000 0001 0011
00000014 0000 0000 0000 0000 0000 0000 0001 0100
00000015 0000 0000 0000 0000 0000 0000 0001 0101
00000016 0000 0000 0000 0000 0000 0000 0001 0110
...

...

00000099 0000 0000 0000 0000 0000 0000 1001 1001


00000100 0000 0000 0000 0000 0000 0001 0000 0000
...

...

00000999 0000 0000 0000 0000 0000 1001 1001 1001


00001000 1000 0000 0000 0000 0001 0000 0000 0000
...

...

99999998 1001 1001 1001 1001 1001 1001 1001 1000


99999999 1001 1001 1001 1001 1001 1001 1001 1001

4-58 - KV Nano Series(terminal block type) User’s Manual -


4-5 How Data Is Processed

 Changes to values when the value is greater than the maximum value or

LADDER PROGRAMMING
smaller than the minimum value
When the result of an arithmetic operation is greater than the maximum value or smaller than the
minimum value, the value is changed according to the data format as shown below. Whether data is
processed as unsigned values or signed values is determined by the suffix.
"Suffixes" (page 4-8)

 16-bit data
Changes to values when 65535 is exceeded Changes to values when the value is greater than
the maximum value or smaller than the minimum
4
value

How Data Is Processed


Unsigned decimal notation Hexadecimal notation Unsigned decimal notation Signed decimal notation
3 0003 3 0003
2 0002 2 0002
1 0001 1 0001
0 0000 0 0000
65535 FFFF -1 FFFF
65534 FFFE -2 FFFE
65533 FFFD -3 FFFD


65532 FFFC -4 FFFC

32771 8003 -32765 8003


32770 8002 -32766 8002
32769 8001 -32767 8001
32768 8000 -32768 8000
32767 7FFF 32767 7FFF
32766 7FFE 32766 7FFE
32765 7FFD 32765 7FFD
32764 7FFC 32764 7FFC
32763 7FFB 32763 7FFB

Reference Whether a device is processed as 16-bit data or 32-bit data is determined by the suffix.
"Suffixes" (page 4-8)

 32-bit data
Changes to values when 4294967295 is exceeded Changes to values when the value is greater than
the maximum value or smaller than the minimum
value
Unsigned decimal notation Hexadecimal notation Unsigned decimal notation Signed decimal notation
3 00000003 3 00000003
2 00000002 2 00000002
1 00000001 1 00000001
0 00000000 0 00000000
4294967295 FFFFFFFF -1 FFFFFFFF
4294967294 FFFFFFFE -2 FFFFFFFE
4294967293 FFFFFFFD -3 FFFFFFFD


4294967292 FFFFFFFC -4 FFFFFFFC

2147483651 80000003 -2147483645 80000003


2147483650 80000002 -2147483646 80000002
2147483649 80000001 -2147483647 80000001
2147483648 80000000 -2147483648 80000000
2147483647 7FFFFFFF 2147483647 7FFFFFFF
2147483646 7FFFFFFE 2147483646 7FFFFFFE
2147483645 7FFFFFFD 2147483645 7FFFFFFD
2147483644 7FFFFFFC 2147483644 7FFFFFFC
2147483643 7FFFFFFB 2147483643 7FFFFFFB

- KV Nano Series(terminal block type) User’s Manual - 4-59


4-5 How Data Is Processed
LADDER PROGRAMMING

Reference • Single precision floating-point data


Overflow:If the absolute value is larger than 3.4 × 1038, the value is set to infinity ().
Underflow:If the absolute value is less than 1.2 × 10-38, the value is set to 0.

0 1.2 X 10-38 3.4 X 1038


(1.2E-38) (3.4E+38)

0 ∞ ("----" is displayed)

4 • Double precision floating-point data


Overflow:If the absolute value is larger than 1.79 × 10308, the value is set to infinity (∞).
Underflow:If the absolute value is less than 2.23 × 10-308, the value is set to 0.
How Data Is Processed

0 2.23 X 10-308 1.79 X 10308


(2.23E-308) (1.79E+308)

0 ∞ ("----" is displayed)

Character Codes

The numbers that are assigned to the characters that are used to process ladder programs in terms of
character strings are called character codes.
With KV STUDIO, you can use the following character codes.

 ASCII code
This character code uses 8 bits to represent 1 half-width character.
(Examples) A ... $41 1 ... $31

"ASCII Code Table" (page A-28)

 Shift JIS code


This character code uses 16 bits to represent 1 full-width character.

Reference These can be entered as the operands of character processing instructions and calendar
contact instructions. Enclose character strings in quotation marks.
(Examples) "ModelABC" "Month/08:30:15"

4-60 - KV Nano Series(terminal block type) User’s Manual -


4-6 Program Structure and Operation

LADDER PROGRAMMING
Base Unit Operation

The KV Nano Series follows the procedure shown below to execute programs repeatedly.

Control processing

Automatic refreshing

One scan Program execution


Peripheral processing
4

Program Structure and Operation


Communication processing
Built-in positioning function
Frequency counter
Tracing function
Extension access window processing
Etc.
END processing

* Some of the processing is split up


and performed during program execution.

Reference Apart from the three processing stages shown above, there is also interrupt processing
caused by the execution of external input, high-speed counter comparators, and system
interrupts (peripheral processing).
"4-7 Interrupts" (page 4-76)

 Control processing
One control processing stage is called a scan. Scan time is the execution time of one scan.

 Automatic refreshing
The status and values of devices assigned to the CPU built-in functions and expansion units are
updated. First, the device status and values to be generated are transferred to each unit. Next, the
status and values of each unit are transferred to the input devices.

 Program execution
Calculation processing of the stored program method is performed. The ladder program instructions
are executed one instruction at a time in order starting from the first step.

 END processing
The peripheral processing is applied to control processing. Also, all system errors are checked.
Reference Normally, the END processing time is determined automatically according to the program
execution time. However, you can set the END processing time in situations such as
when there is a great deal of data communications with the peripherals.
"Setting the END processing time" (page 4-70)

 Peripheral processing
In this process, information other than that used in program processing, such as communications and
data management information, is processed. In addition, instructions related to calendar timers and
similar items are executed.
Not all operations are carried out during END processing. Part of the data management is executed as
a system interrupt during program processing, which optimizes the control processing.

- KV Nano Series(terminal block type) User’s Manual - 4-61


4-6 Program Structure and Operation

Direct processing
LADDER PROGRAMMING

As written above, automatic refreshing processing, in which the status and values of devices assigned
to the CPU built-in functions and expansion units are updated, is normally performed only once per
scan. To update information during program execution (direct processing), use one of the following
methods.

 CPU built-in functions


4  Direct I/O relay (DR)
When you specify an I/O relay as the operand of an instruction, if you specify "DR" instead of "R," I/O
Program Structure and Operation

will be updated when the instruction is executed. For details on the instructions with which you can use
"DR," see the KV-7000/5000/3000/1000 Series and KV Nano Series "Instruction Reference
Manuals."
Example)
DR000 DR500

Reference If you are using XYM marking, write "DX" and "DY."
"XYM marking" (page 4-19)

 RFSX and RFSY instructions


When the instructions are executed, all the I/O relays specified with the operands are updated at once.
Example)

CR2002 MOV
DM0 R500
Always ON
Calculation result

RFSY
R500 #16

For details, see the RFSX and RFSY instructions in the KV-7000/5000/3000/1000 Series and KV Nano Series
"Instruction Reference Manuals."

 Other direct processing instructions


There are instructions that can be used to update the current value of the high-speed counter, the
current coordinates of positioning, and the current value of the free run counter to their respective latest
values.
High-speed counter current value refresh "RFSCTH instruction" (page 5-136)
Positioning current coordinates refresh "RFSPS instruction" (page 5-68)
Free run counter current value refresh See the "RFSFRC instruction in the KV-7000/5000/3000/
1000 Series and KV Nano Series" "Instruction Reference
Manuals."

Reference The expansion I/O units and expansion special units of the KV Nano Series do not
support direct refreshing.

4-62 - KV Nano Series(terminal block type) User’s Manual -


4-6 Program Structure and Operation

Operations when power is turned on and off

LADDER PROGRAMMING
The following items are checked when the power is turned on. If everything is OK, operations are
started.
• Hardware check and initialization
• Device check and initialization "Configuring Power Failure Holding Settings (Latching)" (page 4-26)

• Expansion bus check and initialization


• Ladder program check and execution preparation

4
 Power on/off log

Program Structure and Operation


You can retain up to 20 power on log entries and 20 power off log entries. Log entries are saved in
control memory (CM) entries. The newer the log entry, the smaller the log entry number. If an attempt is
made to store more than 20 log entries, existing log entries are deleted starting with the oldest one. In
addition, while using KV STUDIO to perform monitoring, you can view the log in the Error monitor.

- KV Nano Series(terminal block type) User’s Manual - 4-63


4-6 Program Structure and Operation

Error handling
LADDER PROGRAMMING

There are two types of errors: serious errors that stop operation and minor errors in which operation
continues.
For details on the KV Nano Series errors, see "A-1 List of PLC Unit Errors" (page A-2).
For details on the expansion unit errors, see the "User's Manual" of each expansion unit.

 Action when error occurs


4 To set the severity (serious or minor) of base unit errors, in the KV STUDIO workspace, click "CPU
system setting" and then "Action when error occurs."
Program Structure and Operation

 Error log
You can retain up to 32 serious error log entries and 32 minor error log entries. If an attempt is made to
store more than 32 log entries, existing log entries are deleted starting with the oldest one. In addition,
while using KV STUDIO to perform monitoring, you can view the log in the "Error monitor".

4-64 - KV Nano Series(terminal block type) User’s Manual -


4-6 Program Structure and Operation

 Latest error details (CM)

LADDER PROGRAMMING
The detailed information of the latest error is recorded in control memory entries.
Control Memory Description
CM2200 Year and month represented as a decimal number (the last
two digits represent the month, and the digits starting from
the hundreds digit represent the year)
Example: 1210  October 2012
CM2201 Day

Hour
4
CM2202

CM2203 Minute

Second

Program Structure and Operation


CM2204 Detailed information of the
latest serious error, 1 unit Error number
CM2205

CM2206 Detailed information, number of valid pieces of data

CM2207 Detailed information, piece #1*

CM2208 Detailed information, piece #2*

: :
: :
CM2226 Detailed information, piece #20*

CM2250 Year and month represented as a decimal number (the last


two digits represent the month, and the digits starting from
the hundreds digit represent the year)
Example: 1210  October 2012
CM2251 Day

CM2252 Hour

CM2253 Minute

CM2254 Detailed information of the Second


latest minor error, 1 unit Error number
CM2255

CM2256 Detailed information, number of valid pieces of data

CM2257 Detailed information, piece #1*

CM2258 Detailed information, piece #2*

: :
: :
CM2276 Detailed information, piece #20*

* The detailed information varies as shown below according to the number of the error that occurred.

- KV Nano Series(terminal block type) User’s Manual - 4-65


4-6 Program Structure and Operation

• Error number 128 (calculation error)


LADDER PROGRAMMING

Detailed
Description
Information, Piece n
Error details
0 (Not used.)
1 Incorrect indirect specification.
2 The indirectly specified target is T/C.
3 Incorrect simple indirect specification.
4 Outside of operand range.
5 Floating-point real number overflow.
6 Incorrect device specification.
7 The ROOT instruction operand is negative.
4 8
9
No bits set to ON with the ENCO instruction.
Floating-point real number format error.
10 Incorrect trigonometric function instruction operand.
Program Structure and Operation

11 Data could not be converted.


12 Incorrect table specification.
13 Incorrect time comparison instruction operand.
14 Incorrect cam switch operand.
15 Incorrect frequency counter instruction operand.
16 Divide by zero.
17 Illegal logging ID.
18 Direct processing error.
19 Unit on which direct processing cannot be performed.
20 Jump destination subroutine does not exist.
21 Data being written during RUN mode, so instruction cannot be executed.
22 Error for expansion unit-dedicated instructions (unit number).
23 Reserved for the system.
24 PIDAT, outside of operation setting range.
Detailed
25 PIDAT, outside of sampling period range.
information, piece 1
26 PIDAT, outside of comparison constant range.
27 PIDAT, outside of integral constant range.
28 PIDAT, outside of differential constant range.
29 PIDAT comparison constant, two-degree freedom parameters outside of range.
30 PIDAT integral constant, two-degree freedom parameters outside of range.
31 PIDAT differential constant, two-degree freedom parameters outside of range.
32 PIDAT, outside of operation quantity upper limit or lower limit range.
33 PIDAT, outside of operation quantity change width limit range.
34 PIDAT, outside of measured value change width range.
35 PIDAT, AT state transition error.
36 PIDAT, outside of operation control flag range.
37 Operation period exceeded.
38 PIDAT, outside of AT adjustment parameter range.
39 PIDAT, outside of AT hysteresis range.
40 PIDAT, outside of AT timeout range.
41 PIDAT, outside of AT calculation control mode setting range.
42 PIDAT, AT timeout.
43 PIDAT, AT comparison constant exceeded.
44 PIDAT, AT integral constant exceeded.
45 PIDAT, AT differential constant exceeded.
46 Root of negative number cannot be calculated.
47 Incorrect ABS instruction operand.
48 Calculation overflow.
49 UR, UM, or UV unit not connected.
50 Unit device (R) not assigned.
51 Unit device (DM) not assigned.
Detailed information,
Fixed to 00H.
piece 2
Detailed information,
Upper bits of the step number at which the error occurred.
piece 3
Detailed information,
Lower bits of the step number at which the error occurred.
piece 4
Detailed information,
The module name is saved in SJIS format (any parts not occupied with the module name are "00H").
pieces 5 to 20

4-66 - KV Nano Series(terminal block type) User’s Manual -


4-6 Program Structure and Operation

• Error numbers 50, 53, 55, 56, 58, and 59 (unit ID errors)

LADDER PROGRAMMING
Detailed
Description
Information, Piece n
Detailed information, Unit number (the unit number will not be stored if it cannot be determined according to the occurrence
piece 1 conditions of the error)
Detailed information, Fixed to 00H
pieces 2 to 20

• Error number 54 (number of units error)


Detailed
Description
Information, Piece n
Detailed information,
piece 1
Detailed information,
The number of units as specified in the unit setup information

The number of units that are actually connected


4
piece 2

Program Structure and Operation


Detailed information, Fixed to 00H
pieces 3 to 20

• Error number 60 (number of expansion I/O points error)


Detailed
Description
Information, Piece n
Detailed information, Upper limit of the number of base unit expansion I/O points
piece 1
Detailed information, Actually connected number of expansion I/O points
piece 2
Detailed information, Fixed to 00H
pieces 3 to 20

• Error number 61 (assigned device overlap error)


Detailed
Description
Information, Piece n
Detailed Unit number of the expansion unit whose assignment is being overlapped
information, piece 1
Detailed information, Type of device that is being overlapped (R—relay: 1, DM: 2)
piece 2
Detailed information, Number of the device that is being overlapped
piece 3 (channel number when the device type is R—relay, example: R1000  10)
Detailed information, Fixed to 00H
pieces 4 to 20

• Error number 96, 97, 98, 99, or 101 (extension cassette ID error)
Detailed
Description
Information, Piece n
Detailed information, Extension cassette slot number
piece 1 (0 is stored when the slot number cannot be determined)
Detailed information, Reserved for the system
piece 2
Detailed information, Fixed to 00H
pieces 3 to 20

• Error number 129 (unit error)


Detailed
Description
Information, Piece n
Detailed information, Unit number
piece 1
Detailed information, Error number of each unit
piece 2
Detailed information, Fixed to 00H
pieces 3 to 20

• Error numbers other than those listed above


Detailed
Description
Information, Piece n
Detailed information, Fixed to 00H
pieces 1 to 20

- KV Nano Series(terminal block type) User’s Manual - 4-67


4-6 Program Structure and Operation
LADDER PROGRAMMING

Scan Time

The time required to execute one control processing sequence (automatic refreshing  program
execution  END processing) is called the scan time. The scan time varies according to the program
size and the type of instructions that are used.
Scan time Scan time Scan time

Automatic END Automatic END Automatic END


Program execution Program execution Program execution

4
refreshing processing refreshing processing refreshing processing

If the scan time exceeds 300 ms, a scan time over error (CPU error number 30) will
Program Structure and Operation

Point
occur, and operations will stop (the mode will be switched to PROG mode).

Reference • To view the actual measured scan time, while using KV STUDIO to perform monitoring,
on the "Debug" menu, click "Scan time monitor."

• You can use CM720 (in units of 10 µs) to check the actual measured scan time.
"A-2 Lists of CR and CM Devices" (page A-8)

Fixed scan time operation

During normal program execution, the scan time varies according to factors such as (1) the execution
status and processing details of each module and (2) interrupt processing.
By using the fixed scan time processing function, you can maintain a fixed scan time.

 Not using the fixed scan time operation function (normal operation)
0.9 ms 1.1 ms 1.0 ms

Automatic END Automatic END Automatic END


refreshing Program execution processing refreshing Program execution processing refreshing Program execution processing

The scan time varies according to the execution status of each instruction of each module and macro.

4-68 - KV Nano Series(terminal block type) User’s Manual -


4-6 Program Structure and Operation

 Using the fixed scan time operation function

LADDER PROGRAMMING
Example) When the value is set to 1.2 ms:

1.2 ms 1.2 ms

Automatic Automatic END


refreshing Program execution END processing refreshing Program execution processing

In one scan, after all processing is completed, operations do not proceed to the next step until the set
amount of time elapses, so it is possible to fix the scan time.

Point
• If the scan time is longer than the set time, the scan time will be extended. 4
Be sure to confirm the actual measured scan time of the target program before

Program Structure and Operation


you set the time.
• If an interrupt occurs during the wait time before the next scan, the interrupt
program will be executed (only when interrupts are enabled).
Even if the set time of fixed scan time operation elapses during the execution of
the interrupt program, operations will not proceed to the next scan, and instead
the scan time will be extended until the interrupt program execution is
completed.

 Configuring fixed scan time operation settings


To configure the fixed scan time operation settings, from the workspace, open the "CPU system setting"
dialog box, and then click "Program setting" and then "Scantime related."

You can specify a value between 0.3 ms and 200 ms.

Point Set a value that is larger than the actual scan time.

Reference • You can use CM720 (in units of 10 µs) to check the actual measured scan time.
"A-2 Lists of CR and CM Devices" (page A-8)
• If the scan time value is exceeded, CR2304 is set to ON for one scan only.

- KV Nano Series(terminal block type) User’s Manual - 4-69


4-6 Program Structure and Operation

Setting the END processing time


LADDER PROGRAMMING

During normal program execution, the scan time varies according to factors such as (1) the execution
status and processing details of each module and (2) interrupt processing.
If you set the END processing time, END processing is executed for a fixed length of time in each scan.
Because the maximum scan time is large regardless of whether there is a great deal of data
communications with the peripherals, use this function in situations such as when you cannot set the
fixed scan time operation.

4  Setting the END processing time


Program Structure and Operation

Example) When the value is set to 2 ms:

2ms 2ms

Automatic Program Automatic


refreshing execution END processing refreshing Program execution END processing

 Configuring the END processing time settings


To configure the END processing time settings, from the workspace, open the "CPU system setting"
dialog box, and then click "Program setting" and then "Scantime related."

You can specify a value between 0.2 ms and 200 ms.

Reference You can use CM723 (in units of 10 µs) to check the actual measured END processing
time.
"A-2 Lists of CR and CM Devices" (page A-8)

4-70 - KV Nano Series(terminal block type) User’s Manual -


4-6 Program Structure and Operation

LADDER PROGRAMMING
Program Configuration

In a single scan, program execution consists of the modules being executed in the predetermined
order, and within each module, the main routine program being executed step by step from its first step.

Module 1

Automatic refreshing
Module 2 4

Program Structure and Operation


One scan
Program execution

END processing

Module n

"4-8 Modules" (page 4-100)

In each module, you can create the main routine program, subroutine programs, and interrupt
programs.

Main routine program

Module
Subroutine programs

Interrupt programs

Reference Although you can call macros from within modules, macros themselves are constructed of
a main routine program and subroutine programs. You cannot create interrupt programs
in macros.
"4-9 Macros" (page 4-112)

- KV Nano Series(terminal block type) User’s Manual - 4-71


4-6 Program Structure and Operation

 Main routine program


LADDER PROGRAMMING

The program from the start of the module or macro to the END instruction is called the main routine
program.
If you will not write any subroutine or interrupt programs, write the ENDH instruction immediately after
the END instruction.

4
Main routine program
Program Structure and Operation

Modules and macros

END
ENDH

Point If the END or ENDH instruction is not present, a conversion error will occur.

Reference The END and ENDH instructions are inserted automatically when you create a new
module or macro, so do not delete these instructions.

 Subroutine programs
Subroutine programs are programs that are executed from the main routine program by using the CALL
(call subroutine) or ECALL (call subroutine between modules) instruction. When the execution
condition of the CALL instruction turns ON, the subroutine program is executed.
If you want to perform the same processing in multiple locations of the main routine or if you want to
process a program only when the set conditions are met, you can execute the program only when
necessary by writing it as a subroutine program.
You can write up to 100 subprograms (numbered from 0 to 99) between the END and ENDH
instructions.
Each subroutine program starts with the SBN (subroutine entry) instruction and ends with the RET
(subroutine return) instruction.
In one module or macro, you cannot give multiple subroutine programs the same number. In the main
routine program, you can make multiple CALL instructions to the same subroutine program number.

For details, see the CALL, SBN, and RET instructions in the KV-7000/5000/3000/1000 Series and KV Nano
Series "Instruction Reference Manuals."

CALL #0
Main routine program
CALL #1

END
Modules and macros
SBN #0

RET
Subroutine programs
SBN #1

RET
ENDH
4-72 - KV Nano Series(terminal block type) User’s Manual -
4-6 Program Structure and Operation

LADDER PROGRAMMING
• If the SBN instruction that corresponds to the CALL instruction does not exist,
Point
a conversion error will occur.
• If the SBN instruction that corresponds to the ECALL instruction does not
exist, a conversion error or a calculation error will occur.
• The INT, RETI, STG, JMP, and ENDS instructions cannot be used in subroutine
programs.
• Be careful when you use differential execution type instructions, timer
instructions, and macro instructions in subroutine programs.
For details, see "Precautions for Differential Execution Type Instruction" in the KV-7000/
5000/3000/1000 Series and KV Nano Series "Instruction Reference Manuals."
"Precautions when using Timer instructions" (page 4-32)
"Macro instructions" (page 4-126)
4

Program Structure and Operation


• From within a subroutine program, you can use the CALL and ECALL instructions to
Reference
call up to 16 layers of other subroutine programs (nesting).
• Although a subroutine program can call itself (a recursive call), if more than 16 layers of
nesting occur during operations, a CALL nesting error (CPU error number 10) will
occur.

R001 #0
Main routine CALL
program
END

SBN
#1
Subroutine
programs RET

SBN Call
#0

Subroutine R000 #1
programs CALL

RET

ENDH

• To execute a subroutine in another module, use the ECALL instruction.


For details, see the ECALL instruction in the KV-7000/5000/3000/1000 Series and KV Nano
Series "Instruction Reference Manuals."
• To specify the devices and values that are the targets of processing and then call a
program, use a macro.
"Differences between Macros and Subroutines" (page 4-130)

 Interrupt programs
Use the interrupt function when you are acquiring short signals, during input response, and when you
are performing highly accurate time measurements. When the interrupt conditions are met, the
processing of the main routine program is interrupted, and the interrupt program is executed
immediately. After interrupt processing is completed, the processing of the main routine program begins
again from the point where it was interrupted.
There are the following three types of interrupt conditions: external input, high-speed counter
comparators, and the relay for the matching of two comparators of the CPU positioning function.
- KV Nano Series(terminal block type) User’s Manual - 4-73
4-6 Program Structure and Operation
LADDER PROGRAMMING

Interrupt
condition met

Output Input Output Input


Main routine program
processing processing processing processing

4 Input
Interrupt program
processing
Program Structure and Operation

Write interrupt programs between the END and ENDH instructions.


Within one project, you can create one interrupt program per interrupt condition.
You can write interrupt programs in any module.
Start interrupt programs with the INT instruction and end them with the RETI instruction.

Main routine program

END
Module
INT R000

RETI
Interrupt programs
INT CTC0

RETI
ENDH

• You cannot write interrupt programs in macros.


Point
• To execute interrupt programs, use the EI instruction to enable the execution of
interrupt programs (when operations start, the execution of interrupt programs
is disabled).
• When the interrupt condition is an input relay, use the HSP instruction or
CR2305 and CM1620 to set the input time constant to as small a value as
possible.
• When an interrupt program starts, the values of the internal registers, the
operation flags (CR2009 to CR2012), TM0 to TM3, Z11 and Z12, and R000 to
R203 are automatically saved. When the interrupt program finishes, these
values are restored.*
• Some instructions cannot be used in interrupt programs.
"Instructions That Cannot Be Used in Interrupt Programs" (page 4-82)
• To perform direct output (R500 to R607), use the SET and RES instructions.
* The device range varies according to the unit.

4-74 - KV Nano Series(terminal block type) User’s Manual -


4-6 Program Structure and Operation

LADDER PROGRAMMING
Reference • There are no restrictions on the order that you write subroutines and interrupt programs.

Main routine program

END
Module
SBN #1
INT R000
RET
RETI
Subroutine programs
Interrupt programs
4

Program Structure and Operation


SBN #0 RET Subroutine programs
INT R001 RETI Interrupt programs
ENDH

• Interrupt programs are executed even when their modules are not being executed.
• Interrupt programs are executed regardless of the execution status of the module, so
you can make it easier to understand the project structure by managing a single stand-
by module as the one that contains all the interrupt programs.

"4-7 Interrupts" (page 4-76)

- KV Nano Series(terminal block type) User’s Manual - 4-75


4-7 Interrupts
LADDER PROGRAMMING

Overview

Normal PLCs execute ladder sequences by repeating the following cycle: input processing, program
execution, and then output processing. Therefore, signals shorter than the scan time cannot be applied.
If you use the interrupt function, you can execute processing at the point in time that an interrupt occurs
regardless of the scan time.
When an interrupt occurs, even if a program is being executed, the execution is temporarily interrupted,
and the interrupt program that corresponds to the interrupt condition is executed. After the interrupt
4 program is completed, the processing of the interrupted program begins again.
Interrupts

Input processing

Input processing Direct input function


Interrupt condition
met KV-N14**:R000 to R007
Scan time

KV-N24**:R000 to R013
Interrupt program KV-N40**:R000 to R107
Program
execution KV-N60**:R000 to R203
execution

After the interrupt,


return to the next
instruction. Direct output function

KV-N14**:R500 to R505
Output processing KV-N24**:R500 to R509
KV-N40**:R500 to R515
KV-N60**:R500 to R607

 Types of interrupt conditions


You can use programs to set the following three types of interrupt conditions.
• "External Input Interrupts" (page 4-79)
• "High-Speed Counter Comparator Interrupts" (page 4-80)
• "CPU Positioning Parameter Comparator 2 Interrupts" (page 4-80)

 Device processing
Device processing when an interrupt occurs is shown below.
For details on I/O processing, see "I/O Processing during Interrupts" (page 4-83).

Interrupt condition met


(1)

Output Input Output Input


Main routine program
processing processing processing processing

Input Interrupt program


(2) processing (output processing)

(3)

4-76 - KV Nano Series(terminal block type) User’s Manual -


4-7 Interrupts

(1) Processing when the interrupt program starts and finishes.

LADDER PROGRAMMING
When an interrupt program starts, the values of the internal registers, the operation flags, R000 to
R203, TM0 to TM3, and Z11 and Z12 are recorded in the system. When the interrupt program finishes,
the recorded values are restored.
Even if these values are changed during interrupt processing, the main routine program will not be
affected. Changed values are only valid within the interrupt program.
After the interrupt program finishes, the current value of the high-speed counter (CTH) is set to the
value that was acquired during the input processing of the interrupt program.
For other devices, if the values were changed during the interrupt program, these new values take
effect in the main routine program after the interrupt program finishes. 4

Interrupts
You can use the "User interrupt" screen on the "CPU system setting" dialog box
Point
to specify whether to save and restore index registers Z1 to Z10.

(2) Input processing during interrupt program execution


The device values in interrupt programs are as shown below.
• Input relays R000 to R203 and the current value of the high-speed counter (CTH): The value
immediately after the interrupt condition occurred.
• Other devices: The value when the main routine program was interrupted.

(3) Output processing during interrupt program execution


The output relays R500 to R607 are generated immediately after the SET or RES instruction is executed
in an interrupt program.
If these or other output relays are generated by instructions other than SET and RES, the output will be
generated during output processing after the interrupt program finishes.

"Output processing" (page 4-84)

Reference To update to the latest status device values that are not automatically refreshed:
• Use "DR" to write an I/O relay.
• Write the RFSX or RFSY instruction.
• Write the RFSCTH instruction.
"Direct processing" (page 4-62)

 Processing time
When all of the following conditions are met, the time until an interrupt program starts is within 100 µs
(50 µs) TYP.
• The "Enable interrupt in instruction execution" checkbox on the "User interrupt" screen of the "CPU
system setting" dialog box is selected.
• No other interrupt programs with a priority higher than this interrupt program are being used.
The starting and ending processing times (refreshing, saving, and restoring devices) of the interrupt
program are as follows: starting processing time: 30 µs and ending processing time: 15 µs.

- KV Nano Series(terminal block type) User’s Manual - 4-77


4-7 Interrupts
LADDER PROGRAMMING

How to Execute Interrupt Programs

To make interrupt processing possible, write your programs in the following way.
Interrupt program example
CR2008
EI

HSP
R000
4 Main routine program
If you do not use the EI instruction, interrupt programs
cannot be executed.
Interrupts

END Use the HSP instruction (10 μs) or set a value in CM1620
and turn CR2305 ON to set the input time constant.
INT
R000

Interrupt program
Write interrupt programs between the "END" and "ENDH"
RETI
instructions.

ENDH

"HSP Instructions" (page 4-92)

 Interrupt enable (EI) instruction


When operation starts, interrupts are disabled.
To execute interrupt programs, you have to execute the interrupt enable (EI) instruction.
Write the EI instruction in the main routine program.

Reference • To disable interrupts, use the interrupt disable (DI or DIC) instructions.
• When interrupts are disabled, even if an interrupt occurs, the interrupt program will not
be executed until interrupts are enabled.
• The interrupt program starts when interrupts are enabled.
• Even if you have not executed the interrupt enable (EI) instruction, system interrupts
caused by peripheral processing are executed.
"EI Instructions" (page 4-94)
"DI Instructions" (page 4-94) and "DIC Instructions" (page 4-96)

4-78 - KV Nano Series(terminal block type) User’s Manual -


4-7 Interrupts

 INT and RETI instructions

LADDER PROGRAMMING
Between the END and ENDH instructions, write the INT instruction with operands to set the interrupt
condition.
After the INT instruction, program the interrupt processing details, and then finally write the RETI
instruction.

You can only write one INT instruction per interrupt condition.
Point
• Some instructions cannot be used in interrupt programs.
See "Instructions That Cannot Be Used in Interrupt Programs" (page 4-82).
• To shorten the input time constant, you have to use the HSP instruction (10 µs)
or data memory entry CM1620 to enter the input time constant, and then turn 4
CR2305 ON.

Interrupts
For details on the input time constant, see the HSP instruction in the KV-
7000/5000/3000/1000 Series and KV Nano Series "Instruction Reference
Manuals."
CR2008
EI
CR2008 #0 CR2305
EI DW SET or
CM1620 CR2002 HSP
R000

"INT and RETI Instruction" (page 4-98)

External Input Interrupts

Use input relays as the interrupt condition. Interrupts are executed through input relays R000 to R003.
Use control relays to set the polarity of the interrupt condition, that is, whether it is detected on rising or
falling edges.

 Setting the polarity of external input interrupts


Use control relays to set whether the interrupt condition is rising or falling edges.
You can change the interrupt polarity as shown below.
Operation Condition
Interrupt Condition Control Both Rising
INT Instruction Falling
Input Relay Relay Rising Edge and Falling
Edge
Edges
CR2600 OFF ON OFF ON
INT R000 R000
CR2601 OFF OFF ON ON

CR2602 OFF ON OFF ON


INT R001 R001
CR2603 OFF OFF ON ON

CR2604 OFF ON OFF ON


INT R002 R002
CR2605 OFF OFF ON ON

CR2606 OFF ON OFF ON


INT R003 R003
CR2607 OFF OFF ON ON

Point Use the SET and RES instructions to turn special auxiliary relays ON and OFF.

- KV Nano Series(terminal block type) User’s Manual - 4-79


4-7 Interrupts

 Input capturing
LADDER PROGRAMMING

INT R000 to INT R003 of the external input interrupts have the input capture function. When interrupts
occur, this function captures the current value of the high-speed counter into control memory. Just by
specifying the high-speed counter to reference, the current value of the high-speed counter is
transmitted to CM1600 to CM1607 automatically when an interrupt occurs.
For details, see "Input Capture Function" (page 4-86).

High-Speed Counter Comparator Interrupts

4 You can use high-speed counter comparators as interrupt conditions. Interrupt processing is performed
when the current value of high-speed counter CTH is the same as the value of high-speed counter
Interrupts

comparator CTC.

INT Interrupt Condition


High-Speed Counter Operation Condition
Instruction Comparator
When the value of high-speed counter comparator CTC0 is the same
INT CTC0 CTC0
as the current value
When the value of high-speed counter comparator CTC1 is the same
INT CTC1 CTC1
as the current value
When the value of high-speed counter comparator CTC2 is the same
INT CTC2 CTC2
as the current value
When the value of high-speed counter comparator CTC3 is the same
INT CTC3 CTC3
as the current value
When the value of high-speed counter comparator CTC4 is the same
INT CTC4 CTC4
as the current value
When the value of high-speed counter comparator CTC5 is the same
INT CTC5 CTC5
as the current value
When the value of high-speed counter comparator CTC6 is the same
INT CTC6 CTC6
as the current value
When the value of high-speed counter comparator CTC7 is the same
INT CTC7 CTC7
as the current value
INT
*When CTCn exists, the CTCn contact is not turned ON (n: 0 to 7).

CPU Positioning Parameter Comparator 2 Interrupts

You can use the CPU positioning parameter comparator 2 as the interrupt condition. During positioning
and speed control, interrupt processing is performed when the number of pulses output (the current
value) is the same as the value of comparator 2. You can perform simple multi-stage control by
changing the operation speed in the interrupt program.
For details, see "Changing the speed during operation" (page 5-40).

INT Interrupt Condition Operation Condition


Instruction Comparator 2
When the value of axis 1's comparator 2 is the same as the current
INT CR8415 (CR8415)
value
When the value of axis 2's comparator 2 is the same as the current
INT CR8515 (CR8515)
value
When the value of axis 3's comparator 2 is the same as the current
INT CR8615 (CR8615)
value
When the value of axis 4's comparator 2 is the same as the current
INT CR8715 (CR8715)
value

Reference CR8415, CR8515, CR8615, and CR8715 are not actually turned ON and OFF. They are
only used as symbols in ladder programming in KV STUDIO.

4-80 - KV Nano Series(terminal block type) User’s Manual -


4-7 Interrupts

LADDER PROGRAMMING
Interrupt Priority

You can set the interrupt priority for the case in which multiple interrupt conditions are met at the same
time.
To configure this setting, from the KV STUDIO workspace, open the "CPU system setting" dialog box,
and then click "Program setting" and then "User interrupt setting."

Interrupts
You can set the priority to "High", "Middle", or "Low". When an interrupt program is being executed, the
programs of higher order interrupts will be executed, but the programs of same-level and lower order
interrupts will have to wait until the interrupt program currently being executed is finished.
Also, if you select the "Enable interrupt in instruction execution" checkbox, you can suppress variations
in interrupt response time because interrupts will be executed mid-process for instructions that have
long processing times.
If a different interrupt occurs while an interrupt program is being executed, the operation varies
according to the priority settings. See the following table.
Priority of Program Whose Interrupt Has
Priority of Interrupt Program Being Occurred (B)
Executed (A)
High Middle Low
High Wait Wait Wait
Execute
Middle Wait Wait
immediately
Execute Execute
Low Wait
immediately immediately

Wait: After the currently executing interrupt program (A) finishes, the program whose
interrupt has occurred (B) will be executed.
Execute immediately: The currently executing interrupt program (A) is interrupted, and the program
whose interrupt has occurred (B) is executed.
After interrupt program (B) finishes executing, interrupt program (A) continues
from the point it was interrupted at.

- KV Nano Series(terminal block type) User’s Manual - 4-81


4-7 Interrupts
LADDER PROGRAMMING

Instructions That Cannot Be Used in Interrupt Programs

Instruction Type Instruction


Common @XXXX instruction Differential execution type
LDP and LDF Load pulse and load pulse fall

ANP and ANF AND pulse and AND pulse fall

ORP and ORF OR pulse and OR pulse fall


Contact instructions
4 LDPB and LDFB Load pulse bar and load pulse fall bar

ANPB and ANFB AND pulse bar and AND pulse fall bar
Interrupts

ORPB and ORFB OR pulse bar and OR pulse fall bar

DIFU and DIFD Differential up and differential down

ONDL and OFDL On delay and off delay


Basic instructions

Output instructions SHOT One shot

FLIK Flicker

ALT Alternate

TMR, TMH, TMS, and Timer, high-speed timer, 1 ms high-speed timer, and 10
TMU µs high-speed timer

C Counter
Timer and counter OUTC Out counter
instructions
ITVL Interval timer

UDC Up/down counter

UDT Up/down timer


Connection/end
MEP and MEF Mep and mef
instruction
Shift instruction SFT Shift
instructions
Application

STG, JMP, and


Stage, jump, and end stage
ENDS
Stage processing
instructions W-ON and W-OFF Wait on and wait off

W-UE and W-DE Wait rising edge and wait falling edge
instructions
Operation

Data control RAMP, TPOUT, and Ramp signal, time division proportion output, and
instructions LLFLT advancement delay filter

Data processing
HKEY and SORTN Hexadecimal key input and binary data division sort
instructions
Cam switch ABSENC and
Expansion instructions

Absolute encoder and incremental encoder


instructions INCENC
Frequency counter
FCNT and RCNT Frequency and rotation speed measurements
instructions
PID instructions PID and PIDAT PID and PID with automatic tuning

Access window AWNUM and


User message 1 and user message 2
instructions AWMSG
Sensor setting Read sensor parameters, write sensor parameters and
SPRD/SPWR/SSVC
instructions execute sensor parameters

4-82 - KV Nano Series(terminal block type) User’s Manual -


4-7 Interrupts

LADDER PROGRAMMING
I/O Processing during Interrupts

 Input processing
When the interrupt program starts, the status of the input relays (R000 to R203) is captured. (Direct
processing.) The status of other input relays is that captured during the input processing of that scan (I/
O refresh) even when an interrupt program is executed.
The status of the input relays that are captured when the interrupt program starts (R000 to R203) is
only valid during the interrupt program. After the interrupt program is finished, the status captured
during that scan's input processing (automatic refreshing) is used in the main routine program. 4
Example

Interrupts
Interrupt condition met

ON

R000
OFF
ON

R001
OFF
ON

R1000
OFF

R001:OFF R001:ON
R1000:OFF R1000:ON

Output Input Output Input


Main routine program
processing processing processing processing

Input
Interrupt program
processing

R001:ON
R1000:OFF

R001 R001 R001 R001

OFF ON OFF ON

R1000 R1000 R1000 R1000

OFF OFF OFF ON

When the above interrupt program is executed:


(1) Input processing of the main routine program  R001: OFF R1000: OFF.
(2) Input processing of the interrupt program  R001: ON R1000: OFF.
The status shown above is captured.
Since input relay R001 is direct input, the status when the interrupt program is executed can be
captured.
Input relay R1000 is handled with the status captured during the input processing of the main routine
program even during an interrupt program.
Direct input is only valid during interrupt programs.
In the main routine program, R001 is always turned OFF regardless of whether the main routine program
is executed before or after the interrupt program.
R001 will be turned ON only in the interrupt program.

- KV Nano Series(terminal block type) User’s Manual - 4-83


4-7 Interrupts

Ladder program example


LADDER PROGRAMMING

CR2002 <Mnemonics list>


EI When the power is turned on,
LD CR2002
interrupts are enabled.
CR2002 HSP EI
R000 The input time constants of input relays LD CR2002
R000 and R005 are set to 10 μs. HSP R000
HSP HSP R005
R005
LD R1000
R1000 R500 OUT R500
From the interrupt processing, END
internal auxiliary relay R1000 turning ON INT R000
END causes output relay R500 to turn ON. LD R005
SET R1000

4 R005
INT
R000

R1000
When input relay R000 is ON,
the interrupt program is executed.
RETI
ENDH

SET During interrupt processing,


Interrupts

RETI if R005 turns ON, internal relay


R1000 is turned ON.
ENDH * Input information entered directly
is only valid in the interrupt program,
so you have to pass this information
through internal auxiliary relays in
advance.

 Output processing
Interrupt programs have no output processing. After an interrupt program is finished, output is
generated by the output processing (automatic refreshing) of the main routine program.
However, if you write a DR device (such as DR500) on an output relay (R500 to R607), output is
generated immediately when the program is executed (direct output).

Example
R1500: Output

Output Input Output Input


Main routine program
processing processing processing processing

Input
(1) (2) (3)
processing

R500: Output R501: Output

CR2002 DR500
(1) SET

CR2002 DR501
(2)

CR2002 DR1500
(3) SET

When the above interrupt program is executed:


• On rung (1), output relay R500 is a direct output relay, so output is generated immediately.
• On rung (2), output relay R501 is a direct output relay, so output is generated immediately.
• On rung (3), output relay R1500 is turned ON during internal processing, but because it is not a built-
in output relay of the base unit, output is generated during output processing of the main routine
program.

4-84 - KV Nano Series(terminal block type) User’s Manual -


4-7 Interrupts

LADDER PROGRAMMING
Example
• If you want to perform direct output within an interrupt program, use a DR device
on an output relay. (Alternatively, you can also use direct output by using the SET
or RES instruction to specify a device from R500 to R607.)
• Even if in an interrupt program, direct output will not be generated in the following
cases. In these cases, output is generated during that scan's output processing.
(1) When the output source is specified with an instruction other than SET or RES.
(2) When a relay other than R500 to R607 is specified as the device with the SET or
RES instruction or through the use of indirect specification or index
modification. 4
(3) When the SET or RES instruction is executed from a macro or subroutine

Interrupts
called from the interrupt program.

Ladder program example


CR2002 <Mnemonics list>
EI When the power is turned on, LD CR2002
interrupts are enabled.
CR2002 HSP EI
R000 The input time constants of input relays LD CR2002
R000 and R001 are set to 10 μs. HSP R000
HSP HSP R001
R001
END
END INT R000
LD CR2002
SET R500
INT
R000 When input relay R000 is ON, RETI
the interrupt program is executed. INT R001
CR2002 R500 LD CR2002
SET Direct output relay R500 is turned ON. SET R501
RETI
RETI
ENDH

INT
R001 When input relay R001 is ON,
CR2002 R501
the interrupt program is executed.
SET Direct output relay R501 is turned ON.
RETI

ENDH

Reference To update to the latest status device values that are not automatically refreshed:
• Use "DR" to write an I/O relay.
• Write the RFSX or RFSY instruction.
• Write the RFSCTH instruction.
"Direct processing" (page 4-62)

- KV Nano Series(terminal block type) User’s Manual - 4-85


4-7 Interrupts
LADDER PROGRAMMING

Input Capture Function

The input capture function captures the current value of the high-speed counter in data memory when
an interrupt condition occurs. This function is enabled when the interrupt condition is an external input
(only R000 to R003 can be used). You do not have to configure any settings to use this function.
The captured value is stored in control memory entries CM1600 to CM1607.
High-Speed Counter Storage Destination
Interrupt Condition
Whose Current Value
(External Input) Upper Bits Lower Bits
Will Be Captured*
4 INT R000 occurring CTH0 CM1601 CM1600
INT R001 occurring CTH0 CM1603 CM1602
Interrupts

INT R002 occurring CTH1 CM1605 CM1604


INT R003 occurring CTH1 CM1607 CM1606

* You can use the user interrupt settings of the CPU system settings to change which high-speed
counters the input capture function will capture the current values of.

The timing with which input capturing is executed depends on the polarity
Point
settings of the interrupts set with CR2600 to CR2607.

 Difference between the input capture function and the current value of
high-speed counters during interrupt program execution
• Input capture function
...The value is captured the instant that the interrupt condition occurs.
• Current value of high-speed counters during interrupt program execution
...The current value of the high-speed counter is captured through input processing of the interrupt
program by using the LDA and MOV instructions during interrupt program execution.
In the following situations, the captured values are different.

Interrupt condition met


(external input) EI instruction executed
Time difference

Scan Interrupts are disabled. Interrupts are enabled.

High-speed counter
CTH0, current value ... 10 11 12 ... 99 100 101 ... ... 999 1000 1001

Input capture function Interrupt program


Input CTH0
LDA STA
processing

(1) (2)
100 1000

(1) Because the input capture function captures the value the instant that the interrupt condition occurs,
the current value of high-speed counter CTH0 is #100.
(2) Because the interrupt program captures the value during its input processing, the current value of
captured high-speed counter CTH0 is #1000.
As shown above, if there is a time difference between the point in time that the interrupt condition
occurs and the point in time that the interrupt program is executed, there will be a difference in the
current value of the captured high-speed counter.
Reference After the interrupt program finishes, the current value of the high-speed counter (CTH) is
set to the value that was acquired during the input processing of the interrupt program.

4-86 - KV Nano Series(terminal block type) User’s Manual -


4-7 Interrupts

LADDER PROGRAMMING
Sample Program

 Application example of interrupts using a signal converter


In this example, interrupt processing is used to convert minute pulses into fixed width pulses, which are
then output.
• The minute pulses applied to input relay R000 are converted to pulses with an ON width of 1 second,
which are output from output relay R500.
• Output relay R500 is turned ON for 1 second from the rising edge of input relay R000.
4
Scan

Interrupts
ON

Input relay R000


OFF

ON

Output relay R500 ON ON ON


OFF
1 1 1
second second second

<Mnemonics list>
CR2008
When the power is turned LD CR2008
EI
on, interrupts are enabled. EI
LD CR2002
CR2002 HSP HSP R000
R000 The input time constant of LD R500
input relay R000 is set to TMR #0 #10
R500 #10 T0 R500 10 μs. CON
T0 RES Output relay R500 is AND T0
turned ON for just 1 RES R500
second. END
END INT R000
LD CR2002
SET R500
INT RETI
R000 When input relay R000 ENDH
turns ON, output R500 is
R500 turned ON.
CR2002
SET

RETI

ENDH

- KV Nano Series(terminal block type) User’s Manual - 4-87


4-7 Interrupts

 Application example of interrupts using a high-speed counter (Using KV-N24**)


LADDER PROGRAMMING

Output relay R500 is turned ON and OFF according to the input


value of the high-speed counter and the ON/OFF state of the input
relay.

• When the high-speed counter input value from input relay R004 is
#10000, output relay R500 is turned ON.
• When input relay R000 is turned ON, output relay R500 is turned
4 OFF.
Interrupts

Scan
ON

Input relay R004


OFF

ON

Input relay R000


OFF

ON

Output relay R500 ON


OFF

When the power is turned on, <Mnemonics list>


CR2008 CR4303 CTH0 interrupts are enabled and the LD CR2008
EI SET RES automatic resetting of EI
high-speed counter CTH0 is set CON
CR2002 HSP and reset. SET CR4303
R004 The input time constant of input CON
relay R004 is set to 10 μs. RES CTH0
LD CR2002
CR2002 CTH.D 0 HSP R004
R004 The high-speed counter of input LD CR2002
relay R004 is set to CTH0, and CTH.D #0 R004
#10000 the set value is set to #10000. CTC.D #0 #10000
CTC.D 0 LD R000
RES R500
END
R000 R500 INT CTC0
RES When input relay R000 turns LD CR2002
ON, output relay R500 is turned SET R500
END OFF. RETI
ENDH

INT
CTC0 When the value of high-speed
counter comparator CTC0 is
R500 #10000, the interrupt program is
CR2002
SET executed, and output relay R500
is turned ON.

RETI

ENDH

4-88 - KV Nano Series(terminal block type) User’s Manual -


4-7 Interrupts

 Application example of measuring the ON width of high-speed pulses

LADDER PROGRAMMING
The pulse widths of pulses applied to the input relay are
measured.
ON

Input relay R000


OFF

Pulse width

• Control relay CR4201 is used to measure the pulse width in

4
units of 1 µs.
• The input capture value (CM1610 and CM1611) when input relay R000 is turned ON is stored in data
memory entries DM10 and DM11.

Interrupts
The value stored in DM10 and DM11 is subtracted from the input capture value when R000 is turned OFF.
This value is the pulse width.
• The measured value is stored in data memory entries DM0 and DM1 in units of µs.
<Mnemonics list>
CR2008 When the power is
EI turned on, interrupts are LD CR2008
EI
enabled.
LD CR2002
CR2002 HSP The input time constant HSP R000
R000 of input relay R000 is set LD CR2002
to 10 μs. CTH.D #0 CR4201
CR2002 CTH.D 0 END
CR4201 High-speed counter INT R000
CTH0 is used to count LDB CR2601
the 1 μs internal clock. LDA.D CM1600
END CON
STA.D DM10
Input relay R000 is used CON
INT to execute the interrupt. LD CR2601
R000 First, an interrupt is LDA.D CM1600
executed on the rising CON
edge of R000. The SUB.D DM10
CR2601 CM1600 DM10 KEEP current value of CTH0 CON
LDA.D STA.D SET
([CM1600 and CM1601]) STA.D DM0
CR2601 at this point in time is CON
stored in [DM10 and KEEP CR2601
CR2601 CM1600 DM10 DM0
DM11]. What's more, RETI
LDA.D SUB.D STA.D RES
CR2601 is turned ON, ENDH
which changes the
RETI interrupt polarity to falling
edge.
Next, an interrupt is
ENDH executed on the falling
edge of R000. The pulse
width of R000 can be
determined by subtracting
the value of [DM10 and
DM11], which were stored
on the rising edge, from
the current value of CTH0
at this time ([CM1600 and
CM1601]).
The result is stored in
[DM0 and DM1]
Finally, CR2601 is turned
OFF to change the
interrupt polarity to rising
edge.

- KV Nano Series(terminal block type) User’s Manual - 4-89


4-7 Interrupts

 Application example of measuring the elapsed time between two points


LADDER PROGRAMMING

The elapsed time between two input relays is measured.


Sensor 1 ON

Input relay R002


OFF Sensor 1
Sensor 2 ON

Input relay R003 Sensor 2


OFF
Elapsed time (μs)

• The elapsed time between input relays R002 and R003 is measured.
4 • The measured value is stored in data memory entries DM0 and DM1 in units of 1 µs.

When the power is turned <Mnemonics list>


Interrupts

CR2008 CR2604 CR2605 CR2606 CR2607 on, interrupts are enabled LD CR2008
EI RES RES RES RES and the interrupt polarities of EI
input relays R002 and R003 CON
are set to rising edge. RES CR2604
CR2002 HSP
The input time constant of CON
R002
R002 is set to 10 μs. RES CR2605
CON
HSP The input time constant of RES CR2606
R003 R003 is set to 10 μs. CON
RES CR2607
LD CR2002
CR2002 CTH.D1 High-speed counter HSP R002
CR4401 CTH1 is used to count HSP R003
the 1 μs internal clock. LD CR2002
END CTH.D #1 CR4401
END
INT R002
When INT002 is RETI
INT INT R003
R002 executed, the current
value of CTH1 is LD CR2002
automatically stored LDA.D CM1606
RETI (input captured) in CON
[CM1604 and CM1605]. SUB.D CM1604
CON
STA.D DM0
INT RETI
R003 When INT003 is
executed, the current ENDH
value of CTH1 is
CR2002 CM1606 CM1604 DM0 automatically stored
LDA.D SUB.D STA.D (input captured) in
[CM1606 and CM1607].
The elapsed time
RETI
between the two points is
determined by subtracting
the input capture value of
ENDH INT002 from the input
capture value of INT003.
The result is stored in
[DM0 and DM1]

4-90 - KV Nano Series(terminal block type) User’s Manual -


4-7 Interrupts

LADDER PROGRAMMING
Interrupt Processing Instructions

Instruction Mnemonic Operation Overview Page


Reduces the input relay time constant to make the input response
High speed HSP 4-92
faster
Disable
DI Disables the execution of interrupt programs 4-94
interrupts
Enable
EI Enables the execution of interrupt programs 4-94
interrupts
Disable
DIC Sets the interrupt disabled range 4-96
4
interrupts range

Interrupts
Executes the interrupt program from this instruction to the RETI
Interrupt INT 4-98
instruction
Interrupt return RETI Indicates the end of the interrupt program 4-98

- KV Nano Series(terminal block type) User’s Manual - 4-91


4-7 Interrupts
LADDER PROGRAMMING

HSP HSP High speed


HSP
Reduces the input relay time constant to
make the input response faster

Ladder program Entry mode


Execution condition HSP
D H S P D

Available Devices
4 Operand
Bit Devices Word Devices Const
Ind
Spec Device
Index
Local Modify

MR DM
Interrupts

R DR LR T C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z


B W
D  - - - - - - - - - - - - - - - - - -

Operand Description
D Specifies the device number of the relay whose input time constant you want to make smaller*1

*1 The relays that you can use vary depending on the unit.
KV-N14**: R000 to R007
KV-N24**: R000 to R013
KV-N40**: R000 to R107
KV-N60**: R000 to R203

Operation Description

When the execution condition turns ON, the input time constant of the device specified with D is set
to 10 µs.
When the execution condition turns OFF, this value is set to the input time constant specified with
CR2305 and CM1620.
Be sure to set these values when you use the INT and CTH instructions.

When the input time constant is set by both control relay CR2305 and the HSP
Point
instruction, the HSP instruction will be given priority.

• For details on changing the input time constant of the base unit, see "Input Time Constant
Setting" (page 5-198).
• Use the Unit Editor of KV STUDIO to set the input time constants of expansion input units. For details
on changing these values, see "Chapter 3 UNIT EDITOR" in the "KV STUDIO User's Manual."

Operation flags

The operation flags are not changed.

Sample Program

The input time constant of input relay R000 is set to 10 µs.


<Mnemonics list>
CR2002 HSP
R000 LD CR2002
HSP R000

4-92 - KV Nano Series(terminal block type) User’s Manual -


4-7 Interrupts

MEMO

LADDER PROGRAMMING
4

Interrupts

- KV Nano Series(terminal block type) User’s Manual - 4-93


4-7 Interrupts
LADDER PROGRAMMING

DI DI
Disable
interrupts
Disables the execution of interrupt
programs

EI EI
Enable
interrupts
Enables the execution of interrupt programs

Ladder program Entry mode


Execution condition
EI E I

Execution condition
4 DI D I
Interrupts

Available Devices
Index
Ind Local Modify
Bit Devices Word Devices Const
Operand Spec Device
MR DM
R DR LR T C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z
B W
- - - - - - - - - - - - - - - - - - - -

Operation Description

DI When the execution condition turns ON, the execution of interrupt programs is disabled.
Use this instruction when you want to temporarily disable interrupts.

EI When the execution condition turns ON, the execution of interrupt programs is enabled.
Use this instruction to enable the interrupt programs that have been disabled with the DI
instruction.
• When the EI instruction is executed, interrupts are enabled until the DI instruction is executed.
• When operations start, interrupts are disabled.
• If interrupts occur while the DI instruction is being executed (while interrupts are disabled), the
execution of the interrupt programs will be put on hold.
When the EI instruction is executed, the interrupts that were put on hold are executed.
When an interrupt program starts, interrupts are enabled (EI). During the execution of an interrupt
program, to execute further interrupt programs, the priority of these further interrupts must be set higher
than that of the currently executing interrupt program. To set priorities, click "CPU system setting" and
then "User interrupt." You can set up to three levels of priorities.

Operation flags

The operation flags are not changed.

4-94 - KV Nano Series(terminal block type) User’s Manual -


4-7 Interrupts

LADDER PROGRAMMING
Sample Program

When input relay R000 is turned ON, the execution of interrupt programs is disabled.
When R000 is turned OFF, the execution of interrupt programs is enabled.

R000 <Mnemonics list>


DI LD R000
DI
LDB R000
R000
EI
EI
4

Interrupts

- KV Nano Series(terminal block type) User’s Manual - 4-95


4-7 Interrupts
LADDER PROGRAMMING

DIC DIC
Interrupt disabled
range
Sets the interrupt disabled range

Ladder program Entry mode


Execution condition D
DIC D I C D

Interrupt disabled range

4 EI
Interrupts

Available Devices
Index
Ind Local Modify
Bit Devices Word Devices Const
Operand Spec Device
MR DM
R DR LR T C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z
B W
D  -    -   - - - - -  - -   

Operand Description
D Specifies the bit device that generates the interrupt enabled/disabled status*1

*1 If you specify a word device, the lowest bit is used. The bits other than the lowest bit will not be
changed.

Operation Description

DIC Use this instruction together with the EI instruction.


When the execution condition turns ON, the execution of interrupt processing is disabled
from the DIC instruction to the EI instruction.
The interrupt enabled/disabled status prior to the execution of the DIC instruction is
generated by the device specified by D .

4-96 - KV Nano Series(terminal block type) User’s Manual -


4-7 Interrupts

If interrupts were enabled prior to the execution of the DIC instruction, the device

LADDER PROGRAMMING
specified by D is set. If interrupts were disabled, the device is reset.

Interrupts disabled Interrupts enabled

CR2002 D CR2002 D
DIC DIC

Always disabled Always disabled

4
D D
EI EI

Interrupts
OFF ON
Interrupts disabled Interrupts enabled

Interrupt condition met

Output Input Interrupt disabled Output Input


processing processing range processing processing

Input
Interrupt program
processing

Operation flags

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
This is turned ON if the range of indirect specification or index modification is incorrect. Otherwise,
this is turned OFF.
CR2012
There is no change in status if the operands do not specify indirect specification or index
modification.
* If CR2012 is turned ON, the instruction will not be executed.
When CR2012 is turned ON, the detailed error information is stored in CM2250 to CM2276.
"Error log" (page 4-64)

Sample Program

Interrupts are disabled during operation processing. After the DIC instruction is executed, the status of
interrupt processing is returned to the status that was present prior to the DIC instruction being
executed.
<Mnemonics list>
CR2002 R1000
LD CR2002
DIC Interrupt processing is
DIC R1000
disabled. LD CR2002
CR2002 DM0 DM10 DM100 LDA DM0
DM100=DM0+DM10
LDA ADD STA CON
ADD DM10
CON
MR1000
STA DM100
EI The interrupt enabled or LD MR1000
disabled status is recovered. EI

* Make changes to MR and DM as necessary to match your operating environment.


- KV Nano Series(terminal block type) User’s Manual - 4-97
4-7 Interrupts
LADDER PROGRAMMING

Executes the interrupt program defined by the


INT INT
Interrupt instructions up to the RETI instruction upon the
rising or falling edge of the operand

RETI RETI
Interrupt return Indicates the end of the interrupt program

Ladder program Entry mode


INT
S I N T S

4 ( )
I S

Interrupt program
Interrupts

RETI
R E T I
( I R E T )

Available Devices
Index
Ind Local Modify
Bit Devices Word Devices Const
Operand Spec Device
MR DM
R DR LR T C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z
B W
S  - - - -   - - - - - - - - - - - -

Operand Description
S Specifies the bit device*1

*1 The devices that you can specify vary depending on the unit.
KV-N14**: R000 to R003, CTC0 to CTC3, CR8415, and CR8515
KV-N24**: R000 to R003, CTC0 to CTC3, CR8415, and CR8515
KV-N40**: R000 to R003, CTC0 to CTC5, CR8415, CR8515, and CR8615
KV-N60**: R000 to R003, CTC0 to CTC7, CR8415, CR8515, CR8615, and CR8715

Operation Description

INT Specifies the start of the interrupt program


RETI Specifies the end of the interrupt program

The internal registers, index registers, operation flags, R000 to R203, and TM0 to
Point
TM3 are stored automatically when an interrupt program starts. When the
interrupt program is finished, the stored values are restored. By default, the only
index registers that are saved and restored are Z11 and Z12. You can use the
"User interrupt" screen on the "CPU system setting" dialog box to specify
whether to save and restore index registers Z1 to Z10.

Operation flags

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
CR2012 No change in status

4-98 - KV Nano Series(terminal block type) User’s Manual -


4-7 Interrupts

LADDER PROGRAMMING
Instruction Execution Timing

INT and RETI The instruction is executed on the rising or falling edge of the operand.

Scan

Interrupt condition met Interrupt condition met


Interrupt condition

INT, RETI → ←Executing → ←Executing

Interrupts
Sample Program
<Mnemonics list>
CR2002 LD CR2002
EI EI
END
END INT R000
LD CR2002
SET R500
INT
R000 RETI
ENDH
CR2002 R500
SET
RETI

ENDH

- KV Nano Series(terminal block type) User’s Manual - 4-99


4-8 Modules
LADDER PROGRAMMING

Overview

A normal ladder program that is used to control a device involves multiple processes such as
initialization, automatic operation, manual operation, and error handling. Traditionally, these multiple
processes have been managed consecutively in a single ladder program. With KV STUDIO, you can
create programs within a project for the different aspects such as processes and functions, and then
manage these programs as independent components (modules).

<Traditionally> <With KV STUDIO>

4 Project Project

[Error processing]
Modules

[Automatic operation]
[Manual operation]

[Automatic operation]

[Manual operation] [Initial processing]

Modules

All processing is written in You can separate the ladder program into
order in a single ladder different functions and processes,
program that is like a long and manage each of them as its own
scroll. module.

 Module management
In KV STUDIO, modules are managed from the workspace of each project.
You can easily reuse programs by importing modules and macros.

Importing
modules and
macros

4-100 - KV Nano Series(terminal block type) User’s Manual -


4-8 Modules

To display the workspace, click the corresponding item on the "View" menu. You can also use the icons

LADDER PROGRAMMING
on the toolbar to show and hide this element.
You can change the display position of this element.

Reference You can also reuse modules by opening multiple instances of KV STUDIO and copying the
modules between applications.

 Module features
 It's easy to understand the structure of an entire program 4
When you use the workspace of KV STUDIO, each module is displayed as a tree, so even individuals

Modules
who did not create the program can understand its entire structure at a glance.

Modules are
displayed as a
list.

 It's easy to reuse just the necessary parts of a program

Previously used project Newly created project


Reuse
Module A Module A

Module B Reuse Module C


Copy and
change
Module C Module C’
Reuse and change
Module D Module D’

Module E Module G

 Program creation, editing, and debugging can be done efficiently


By splitting modules up according to functions and processes, you can reduce the scope that must be
considered during program creation and debugging. Additionally, by using local devices, you do not
have to assign devices to each module, which makes it easier to have multiple people create programs.

"4-10 Local Devices" (page 4-134)

- KV Nano Series(terminal block type) User’s Manual - 4-101


4-8 Modules

 Password protection is available


LADDER PROGRAMMING

To prevent the contents of modules from being changed easily, you can set a password.
When you set a password, the module program cannot be displayed or edited without first entering the
password.
Use the "Module/macro properties" dialog box to set the password.
"Module Passwords" (page 4-109)
"Macro Passwords" (page 4-125)

Module Type
4 Modules are categorized under the following headings: "Every-scan execution type," "Initialize module,"
and "Standby module."
Modules

Use the KV STUDIO workspace to manage these different types of modules that you create. You can
also change the module type after you create modules.

Every-scan execution type

These modules are executed from the first scan when operations start (when power is turned on and
when the mode is switched from PROG to RUN).
You can use the module instructions, module stop (MDSTOP) and module start (MDSTRT), to control
the execution status of the module during operation.
Operations when you use the module instructions are the same as the standby module operations.
"Standby module operation" (page 4-104)

Reference • If you use a module instruction but do not control the execution status, the module will
be executed during each scan.
• When you create a new project in KV STUDIO, one every-scan execution type module
with the same name as the project will be created automatically.

Initialize module
These modules are executed only during the first scan when operations start. Use these modules to
perform initializations such as the initial processing of devices and restoring the default settings of KV
Nano Series functions. Even if there are no initialize modules in the project, the KV Nano Series can
operate. Create these modules as necessary.
<Traditionally> <KV STUDIO>
Initial processing 1 Initial processing module
CR2008

CR2008
. . .

Initial processing 2 END


CR2008
ENDH

CR2008: This is turned ON for only one scan when operation starts.
By registering modules as initialize modules, you can reduce the scan time by the time that is required
to process the initialize module programs because these modules will not be executed from the second
scan.
4-102 - KV Nano Series(terminal block type) User’s Manual -
4-8 Modules

LADDER PROGRAMMING
• Some instructions cannot be used in initialize modules.
Point
"List of Unusable Instructions" (page A-32)
• You cannot use the module instructions (MDSTRT and MDSTOP) to control the
execution status of initialize modules.
• You cannot operate the KV Nano Series with only initialize modules. Be sure to
use these modules together with at least one every-scan execution type
module or standby module.

Standby module
4

Modules
These modules are stopped when operations start. You can use the module instructions (MDSTRT and
MDSTOP) to control the execution status of these modules during operation.
"Module instructions" (page 4-110)

Example of calling standby modules


In this example, the execution status of the standby module "AutoOpe" is controlled from the every-
scan execution type module "Main."

Main
・・

Execution
starts R000
MDSTRT
Automatic
operation
Execution R000 MDSTOP
stops Automatic
operation
・・・

END
ENDH

You cannot operate the KV Nano Series with only standby modules. Be sure to
Point
use these modules together with at least one every-scan execution type module
or initialize module.

Reference You can control the execution status of every-scan execution type modules in the same
way.

- KV Nano Series(terminal block type) User’s Manual - 4-103


4-8 Modules

 Standby module operation


LADDER PROGRAMMING

The operation of standby modules is shown in the following figure.

1 scan 1 scan 1 scan 1 scan 1 scan 1 scan

Bit that is turned


ON during
execution _ OFF OFF ON ON ON OFF
module B

4
Module A
Executing Executing Executing Executing Executing Executing
(every-scan
execution
type)
Modules

Module B Module B
Execution starts Execution stops

Module B Stopped Stopped


Executing with
Stopped
Executing Executing conditions turned
(standby) OFF

Execution starts Executes from the next scan


from the next scan with conditions turned OFF

 Starting the execution of standby modules


In the scan in which the module execution start instruction is called, standby modules are not executed.
They will be executed from the next scan.

Reference The initial status of the differential execution instruction when the execution of a standby
module starts is ON when a rising edge is detected and OFF when a falling edge is
detected. For example, if this is turned ON from the first scan when execution starts,
rising edge differentials will not be detected.

 Stopping the execution of standby modules


When the stop instruction is called during program execution, these modules are executed in the scan
that the stop instruction was called.
In the subsequent scan, these modules are executed when all execution conditions are turned OFF.*
Operations are stopped in the following scan (the second scan after the stop instruction was called).

* The following instructions are exceptions.

Instruction Status
OUB Turned OFF.
OFDL
Reset.
SHOT
C The status is held.
CJ, NCJ, and GOTO Execution does not jump.

Reference The ladder program within the module operates the same as when the execution
condition of the MC instruction is turned OFF for just one scan before operations are
stopped.
For details, see the MC and MCR instructions in the KV-7000/5000/3000/1000 Series and KV
Nano Series "Instruction Reference Manuals."

4-104 - KV Nano Series(terminal block type) User’s Manual -


4-8 Modules

LADDER PROGRAMMING
Module Execution Sequence

You can set the execution sequence within a scan of the modules registered in a project.
Normally, this is the order in which the modules are created. Only when the execution sequence within
a scan of the ladder programs has an effect on operations should you change the sequence.
From the workspace, open the "CPU system setting" dialog box, and then click "Program setting" and
then "Execute sequence of modules."

Order Module Name Module Type 4


1 PosInit Initialize Range within which

Modules
the order can be changed
2 HSPInit Initialize

3 Pos Every-scan execution type


4 LogInfoUpdate Standby
5 HSP Every-scan execution type Range within which
the order can be changed
6 CommProc Standby
7 MainOpeProc Every-scan execution type

The following rules apply to setting the execution sequence of modules within a scan.

• You can change the order of initialize modules, but you cannot switch the order of initialize modules
with those of other types of modules.
• You can change the order of every-scan execution type and standby modules, but you cannot move
these modules ahead of the initialize modules in the sequence.

- KV Nano Series(terminal block type) User’s Manual - 4-105


4-8 Modules
LADDER PROGRAMMING

Module Configuration Examples

This section shows module configuration examples.


To simplify the explanations, the initialize modules are omitted.

[Legend]

Every-scan execution type Standby module

4
Modules

 Configuration by functions
Modules are created according to process details, connected devices, and expansion units.
Use the every-scan execution type and standby modules differently depending on the execution
conditions when operations start.
Stopping the unnecessary modules makes debugging easier and reduces scan time.

Module control*

Function A Function B Function C Function D Function E

Modules to execute from


the start of operations

Modules to stop at the start


of operations

* The execution status of each function is controlled by the "Project" module. Create the "Project" module if
necessary.
4-106 - KV Nano Series(terminal block type) User’s Manual -
4-8 Modules

 Configuration by processes

LADDER PROGRAMMING
Modules are created according to processes and operations.
In this example, the modules to be executed when operations start are created as every-scan
execution type modules and all other modules are created as standby modules.

Process 1

Process 2 4

Modules

Error
Process 3
surveillance*

* Create this module


Process 4 if necessary.

Process 5

Reference Because the module execution sequence is the execution sequence within a scan, there
is also no need to consider the module execution sequence when creating programs by
processes.

 Programming without considering modules


When you create a new project, one every-scan execution type module with the name "Main" is created
automatically, so you can create programs without considering modules.

- KV Nano Series(terminal block type) User’s Manual - 4-107


4-8 Modules
LADDER PROGRAMMING

Module System Devices

A module system device is a device that is used to capture the operation status of a module.
Only the bit that is turned ON during execution can be referenced by other modules and macros.

Point You cannot attach device comments to module system devices.

4 Reference KV STUDIO automatically assigns module system devices to the KV Nano Series work
area.
Modules

 Bit that is turned ON for only one scan when module execution starts,
"@CR2008"
This bit is turned ON for only the first scan after module execution starts.
From the second scan, it is turned OFF.
This bit can only be referenced from its own module. It cannot be referenced from the macros executed
in its own module.
In KV STUDIO, this device is represented by "@CR2008."

 Bit that is turned OFF for only one scan when module execution starts,
"@CR2007"
This bit is turned OFF for only the first scan after module execution starts.
From the second scan, it is turned ON.
This bit can only be referenced from its own module. It cannot be referenced from the macros executed
in its own module.
In KV STUDIO, this device is represented by "@CR2007."

 Bit that is turned ON during execution, "_(module name)"


This bit is turned ON when the module is being executed.
Because this bit can be referenced not only from its own module but from other modules and macros as
well, it is useful in situations such as when you want to control the execution of standby modules.
In KV STUDIO, this device is represented by "_(module name)."

Example
_AutoExec _main

4-108 - KV Nano Series(terminal block type) User’s Manual -


4-8 Modules

LADDER PROGRAMMING
Module Passwords

 Module passwords
You can limit who can display modules in KV STUDIO by setting passwords on the modules.
Follow the procedure below to set a password.

1 Select a module in the workspace.

2 Right-click, and then click "Module/macro property" in the menu that is displayed.
4
Alternatively, click "Set password" in the menu that is displayed when you right-click a module

Modules
in the workspace.
Alternative procedure On the "File" menu, click "Module/macro property."
The "Module/macro property" dialog box is displayed.

3 Click "Set password."


The "Set password" dialog box is displayed.

4 Enter the password in both text boxes (the second is for confirmation), and then click "OK."
After you set the password, when an attempt is made to display the module in KV STUDIO, a dialog
box will be displayed asking the user to enter the password.
If the user does not enter the password, they will not be able to display the module in KV STUDIO.

- KV Nano Series(terminal block type) User’s Manual - 4-109


4-8 Modules
LADDER PROGRAMMING

Module instructions

MDSTRT MDSTRT Module execution


start
Starts the execution of the
specified module

MDSTOP MDSTOP Module execution


stop
Stops the execution of the
specified module

Ladder program Entry mode


Execution condition MDSTRT
S M D S T R T S

4 Execution condition MDSTOP


S
S M D S T O P
Modules

Available Devices
Index
Ind Local Modify
Bit Devices Word Devices Const
Operand Spec Device
MR DM
R DR LR T C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z
B W
S *1
- - - - - - - - - - - - - - - - - -

Operand Description
*1
S Specifies the module name
*1 You cannot use quotation marks, "#", and "$." Directly enter the module name that you used KV
STUDIO to set.
You can specify up to 24 half-width alphanumeric characters and up to 12 full-width alphanumeric
characters.

Operation Description

MDSTRT When the execution condition is turned ON, the module specified with S starts.
The specified module starts operating from the next scan.
If the specified module is already operating, nothing happens.
MDSTOP When the execution condition is turned ON, the module specified with S stops.
The specified module stops operating after the OFF processing of the next scan is
completed.
If the specified module has already stopped, nothing happens.
You can use this instruction to stop the instruction's own module.
See "Standby module operation" (page 4-104).

• The initial status of the differential execution instruction when the execution of a
Point
module starts is ON when a rising edge is detected and OFF when a falling edge
is detected. Differentials will not be detected immediately after execution starts.
• If multiple MDSTRT and MDSTOP instructions are executed in the same scan to
manipulate the same module, operation is performed according to the last such
module instruction to be executed.
• Do not stop all modules. If you stop all modules, all programs will not be
executed. In this situation, use one of the following methods to recover
operation. (You have to stop programs temporarily to recover operation.)
◆ Restart the KV Nano Series main unit.

◆ Use the RUN-PROG selector switch of the KV Nano Series main unit to switch to

PROG mode, and then switch to RUN mode.


◆ Use KV STUDIO to set RUN of the program to OFF, and then set this to ON.

• During OFF processing, the same processing as when the execution condition
of the MC instruction is turned OFF is performed for only one scan. For details
on the operations of the instructions, see the MC instruction.
• You cannot start and stop the execution of initialize modules.

4-110 - KV Nano Series(terminal block type) User’s Manual -


4-8 Modules

Operation flags

LADDER PROGRAMMING
CR2009 No change in status
CR2010 No change in status
CR2011 No change in status
CR2012 No change in status

Sample Program

When a rising edge is detected on input relay R000, the module selected by the mode selector (R001 to
4

Modules
R003) is executed. When input relay R009 is turned ON, the execution of all modules stops. When a
module is being executed, you cannot start the execution of other modules.

R000 Module1 Module2 Module3 R001 MDSTRT


↑ Module1 When R001 is turned ON, "Module1" is executed.

Bits that are turned ON R002 MDSTRT


*1
during module execution Module2 When R001 is turned ON, "Module2" is executed.

R003 MDSTRT
Module3 When R001 is turned ON, "Module3" is executed.

R009 MDSTOP
Module1

When R009 is turned ON,


MDSTOP
the execution of Module1 to Module3 is stopped.
Module2

MDSTOP
Module3
<Mnemonics list>
LDP R000
ANB _module1
ANB _module2
ANB _module3
MPS
AND R001
MDSTRT module1
MRD
AND R002
MDSTRT module2
MPP
AND R003
MDSTRT module3
LD R009
MDSTOP module1
MDSTOP module2
MDSTOP module3

*1 For details on the bit that is turned ON during module execution, see "Module System Devices"
(page 4-108).

- KV Nano Series(terminal block type) User’s Manual - 4-111


4-9 Macros
LADDER PROGRAMMING

Overview

A macro is a section of a ladder program that has been registered with a name so that it can be used
repeatedly in a project. By creating macros, you can use the sections of ladder programs in the same
way that ladder instructions are used, which enables you to reduce the amount of time you spend
writing programs. When you make changes to the program, just by modifying the data in the location
that is registered as a macro, all the process details executed when the corresponding macro
instruction is called in the project are changed. This reduces the amount of time that you spend
changing programs and also prevents mistakes that occur during program modifications.
4 <Before the introduction of macros> <After the introduction of macros>
Macros

Project 1 Project 1

[ModuleA] [ModuleA]

MacroC

[ModuleB]
Macro call
[ModuleB] instructions

MacroC

MacroC

Register the
same
[MacroC]
processing
as a macro.

 Macro management
In KV STUDIO, the workspace is used to manage macros for each project.
Also, you can easily reuse programs by registering frequently used macros in the user macro library.

Workspace

4-112 - KV Nano Series(terminal block type) User’s Manual -


4-9 Macros

 Macro features

LADDER PROGRAMMING
 Macros can be used as original instructions
If you register a ladder program segment that occurs multiple times in the program as a macro, you can
reduce the amount of time you spend writing programs and you can also reduce input mistakes.
As a result, the number of rungs in the ladder program decreases, which makes it easier to understand
the program structure.
You can assign any name to the macro that you want to register.

 You can use arguments


You can use arguments to create highly general macros because you can specify the operands of
4
instructions in the macro (devices and values) at the time that the macro is called.

Macros
"Setting Arguments" (page 4-120)

 You can create two types of macros


There are two types of macros: subroutine macros and self-hold macros.
Subroutine macros are executed only when their execution condition is turned ON, the same as
subroutine programs.
Once self-hold macros are executed, they will continue to operate until the macro execution stop
instruction (MEND) is executed, regardless of the status of the execution condition.
This is useful in situations such as when you want to request processing from expansion units or
peripherals and the processing will take time to complete (when the processing will take multiple
scans).

"Macro Type" (page 4-115)

 You can use local devices


Even if you use a local device with the same number in a separate macro, these devices will be
processed as different devices, so you can easily assign devices for usage only within the macro.

"4-10 Local Devices" (page 4-134)

 You can reuse the macros that you create


You can easily reuse programs by registering frequently used macros. To register these macros, in the
workspace, click the "Macro" tab, "Program library," and then "User."

 Password protection is available


To prevent the contents of macros from being changed easily, you can set passwords.
When you set a password, people who do not know the password cannot display or edit the macro
program.
Use the "Module/macro properties" dialog box to set the password.

 Objects are created when the macro is called


Ladder program objects are created each time that the macro is called from a module. When you want
to execute the same macro repeatedly in the same scan or when there are multiple macros that must
each be executed across multiple scans, by using macros together with local devices, you can use
macros without having to consider conflicts between the devices that you are using and without having
to consider the execution status of the different macros.

"Differences between Macros and Subroutines" (page 4-130)

- KV Nano Series(terminal block type) User’s Manual - 4-113


4-9 Macros
LADDER PROGRAMMING

Usage Procedure

The macro usage procedure is shown below.

(1) Create a new macro.


Click "Modules/macros" and then "New macro."
Select the macro type. "Macro Type" (page 4-115)

4 (2) Create the program.


Macros

Write the ladder program in the created macro.

(3) Set the arguments.


Click "Modules/macros" and then "Macro argument settings."
Register the arguments. "Setting Arguments" (page 4-120)

(4) Write the macro call instructions.


Use the dedicated instructions to call the created macro.
Use system devices if necessary. "Macro instructions" (page 4-126)
"Macro System Devices" (page 4-122)

4-114 - KV Nano Series(terminal block type) User’s Manual -


4-9 Macros

LADDER PROGRAMMING
Macro Type

There are two types of macros: subroutine macros and self-hold macros.

Subroutine macros

 Overview
Subroutine macros operate the same as subroutines in that the macro may only be executed when its
execution condition is turned ON. The program within the macro is executed each time that the macro
call instruction (MCALL) is executed. After the macro finishes executing, execution proceeds to the next
4
step after the macro call instruction. If the execution condition is turned OFF, the program within the

Macros
macro is not executed, and execution proceeds to the next step.

 Usage method
To start a subroutine macro, use the MCALL instruction from a module.

MR0 MCALL MacroA

Started by the MCALL instruction

 Operation description
An explanation of the operation of subroutine macros is shown in the following figure.
In this example, macro A is called twice from within module 1.

Reference To differentiate between the objects of the created macro, "#(management number)" is
appended after the macro name.
In KV STUDIO, this is only displayed during monitoring and simulation.
Module1
Macro objects (MacroA#1 and MacroA#2) are created
separately by each MCALL instruction.
When the execution conditions of the MCALL
instruction are ON, execution leaves Module1, and
the macro is executed.
ON
MCALL MacroA

MacroA#1

OFF
MCALL MacroA

×
MacroA#2

- KV Nano Series(terminal block type) User’s Manual - 4-115


4-9 Macros

 Operations when execution stops


LADDER PROGRAMMING

In only the one scan in which execution conditions are turned OFF, subroutine macros are executed
with all execution conditions turned OFF.*
Operations are stopped in the following scan.

[Image of the operation of a subroutine macro]

1 scan 1 scan 1 scan 1 scan 1 scan

4
Macros

Execution condition
OFF ON ON OFF OFF
to call MacroA

MacroA Stopped Executing Executing Executing with Stopped


conditions turned OFF

* The following instructions are exceptions.

Instruction Status
OUB Turned OFF.
OFDL
Reset.
SHOT
C The status is held.
CJ, NCJ, and GOTO Execution does not jump.

Reference When macro execution stops, the same processing as when the execution condition of
the MC instruction is turned OFF is performed for only one scan.
For details, see the MC and MCR instructions in the KV-7000/5000/3000/1000 Series and KV
Nano Series "Instruction Reference Manuals."

Self-hold macros

 Overview
Self-hold macros operate the same as subroutine macros in that the macro may only be executed when
its execution condition is turned ON. The program within the macro is executed each time that the macro
call instruction (MSTRT) is executed. Once the macro has started, it is continually executed during
subsequent scans, regardless of the execution condition of the macro call instruction, until the macro
execution stop instruction (MEND) is called from within the macro.

 Usage method
To start a self-hold macro, use the MSTRT instruction from a module.

MR0 MSTRT MacroA

Started by the MSTRT instruction

4-116 - KV Nano Series(terminal block type) User’s Manual -


4-9 Macros

 Operation description

LADDER PROGRAMMING
An explanation of the operation of self-hold macros is shown in the following figure.
In this example, macro A is called twice from within module 1.
1 When the execution condition is turned ON, macro A starts.

Module1

ON

4
MSTRT MacroA

MacroA#1

Macros
MEND

ON
MSTRT MacroA

MacroA#2

MEND

Reference To differentiate between the objects of the created macro, "#(management number)" is
appended after the macro name.
In KV STUDIO, this is only displayed during monitoring and simulation.
2 Once the macro is started, it continues to be executed regardless of the status of the MSTRT
instruction's execution condition.
Module1

ON
MSTRT MacroA

MacroA#1

Even when the execution MEND

condition is OFF,
execution continues.

OFF
MSTRT MacroA

MacroA#2

MEND

- KV Nano Series(terminal block type) User’s Manual - 4-117


4-9 Macros

3 When the execution condition of the MEND instruction in the macro is turned ON, all execution
LADDER PROGRAMMING

conditions will be turned OFF in the next scan, and the program in the macro is executed for
only one scan.*
Operations are stopped in the following scan.

Module1
When the execution condition of the MEND
instruction is turned ON, from the next scan,
macros are executed for only one scan with all
execution conditions turned OFF.

4 OFF
MSTRT MacroA
Macros

MacroA#1

ON MEND

OFF
MSTRT MacroA

MacroA#2

ON MEND

• You must include the MEND instruction in self-hold macros.


Point
• To stop the execution of a macro, be sure to turn its execution conditions OFF.
While the execution conditions of a macro are turned ON, the macro will not
stop even if the execution conditions of the MEND instruction are turned ON.
* The following instructions are exceptions.

Instruction Status
OUB Turned OFF.
OFDL Reset.
SHOT
C The status is held.
CJ, NCJ, and GOTO Execution does not jump.

Reference When macro execution stops, the same processing as when the execution condition of
the MC instruction is turned OFF is performed for only one scan.
For details, see the MC and MCR instructions in the KV-7000/5000/3000/1000 Series and KV
Nano Series "Instruction Reference Manuals."

4-118 - KV Nano Series(terminal block type) User’s Manual -


4-9 Macros

 Operations when execution stops

LADDER PROGRAMMING
In only the one scan after the macro stop instruction (MEND) was executed, self-hold macros are
executed with all execution conditions turned OFF. They will be stopped from the following scan.
[Image of the operation of a self-hold macro]

1 scan 1 scan 1 scan 1 scan 1 scan 1 scan

Execution condition
to call Macro A
OFF ON *1 *1 OFF*2 OFF*3
4

Macros
Execution condition of - OFF OFF ON *1 -
the MEND instruction
within Macro A

Executing with
Macro A Stopped Executing Executing Executing Stopped
conditions turned OFF

*1 This being ON or OFF has no effect on operations.


*2 Be sure to turn this OFF. Until this is turned OFF, the MEND instruction will be ignored,
and execution will continue.
*3 If this has been turned ON, the macro will start executing.

- KV Nano Series(terminal block type) User’s Manual - 4-119


4-9 Macros
LADDER PROGRAMMING

Setting Arguments

 What are arguments?


Arguments are devices and values that are passed to the macro object when the macro is called. They
are specified as the operands of macro call instructions. In the macro, the passed devices and values
are used to execute the ladder program. If a macro is being executed, its arguments are updated each
scan.

4 Module1
Macros

MCALL MacroA Call


R001 #50
Argument 1 Argument 2
MacroA

Argument 1 MOV
Argument 2 DM0
When the macro is called,
the specified devices and
values are used during
the execution of the R001 MOV
macro's ladder program. #50 DM0

 List of argument devices


An argument device is a device that is used to specify what instruction inside the macro the passed
devices and values will be used as the operands of. You can only use argument devices inside macros.
In KV STUDIO, on the "Modules/macros" menu, click "Macro argument settings" to display a dialog box
that you can use to configure the settings. There are five types of argument devices: P, V, UR, UM, and
UV. The specifications of each device are shown below. You can specify up to 10 macro arguments.
Indirect Index
Local
Type Symbol Range Description Specification Modification
Device (@)
(*) (:)
The device is received as the
Device P P0 to P9 No No Yes
argument.
The device's value or constant is
Value*2 V V0 to V9 No No No
received as the argument.
Unit The leading relay (R) assigned to
device UR UR0 to UR9 the expansion unit is received as No No Yes
(R)*1 the argument.
Unit The leading data memory (DM)
device UM UM0 to UM9 entry assigned to the expansion No No Yes
(DM)*1 unit is received as the argument.
Unit The unit number of the expansion
UV UV0 to UV9 No No No
number*1 unit is received as the argument.

*1 In macro call instructions, only the target unit number is specified.


You can specify up to five units as arguments in a single macro.
*2 If you specify DR, direct processing is performed immediately before the macro is called, and the result
is received as the argument.

4-120 - KV Nano Series(terminal block type) User’s Manual -


4-9 Macros

 Usage example

LADDER PROGRAMMING
A usage example of argument devices is shown in the following figure.
In this example, the macro call instruction of macro 1 is executed from module 1.

Argument device usage example


Argument 1: UR0/UM0  #1
Argument 2: P0  MR000
Argument 3: V0  #1000
Argument 4: V1  DM0 4
Unit number 1 ... KV-N3AM R1000 to R1115

Macros
DM10000 to DM10021

Module1
@CR2008 MCALL Macro1 マクロ命令
Macro instruction
#1 MR000 #1000
Argument 1 Argument 2 Argument 3

DM0
Argument 4

UM0: DM10000
UR0: R1000
Call P0: MR000
V0: #1000
Module1 V1: #1234

UR0 UR0:#01 @R000


SET

R1000 R1001
UR0:#02 P0
SET

R1002 MR000
P0 MOV
#0 UM0:#4

MR000 DM10004
MOV
V1 UM0:#3

Value of DM0 = #1234 DM10003


MOV
V0 @DM0

#1000

If you are using character strings as arguments, use argument device "P", and
Point
specify the leading device in which the character string is stored. You cannot use
argument device "V" to designate character strings directly.

- KV Nano Series(terminal block type) User’s Manual - 4-121


4-9 Macros
LADDER PROGRAMMING

Macro System Devices

A macro system device is a device that is used to capture the operation status of a macro.
Only the bit that is turned ON during execution can be referenced by other modules and macros.

Point You cannot attach device comments to macro system devices.

4 Reference KV STUDIO automatically assigns macro system devices to the KV Nano Series internal
work area.
Macros

 Bit that is turned ON for only one scan when macro execution starts, "@CR2008"
This bit is turned ON for only the first scan after macro execution starts.
From the second scan, it is turned OFF.
This bit can only be referenced from its own macro. It cannot be referenced from the module that called
this macro.
In KV STUDIO, this device is represented by "@CR2008."

 Bit that is turned OFF for only one scan when macro execution starts,
"@CR2007"
This bit is turned OFF for only the first scan after macro execution starts.
From the second scan, it is turned ON.
This bit can only be referenced from its own macro. It cannot be referenced from the module that called
this macro.
In KV STUDIO, this device is represented by "@CR2007."

 Bit that is turned ON during execution, "_(macro name)_(ID number)"


This bit is turned ON when the macro is being executed.
Because this bit can be referenced from all modules, it is useful in situations such as when you want to
reference the bit before calling the macro to control macro execution.
In KV STUDIO, this device is represented by "_(macro name)_(ID number)."

Example
_BatchSend_2 _ParamCalc_1

Reference To use this bit that is turned ON during macro execution, you need an ID number for each
macro that you want to call.
"Bit That Is Turned ON during Macro Execution" (page 4-123)

4-122 - KV Nano Series(terminal block type) User’s Manual -


4-9 Macros

LADDER PROGRAMMING
Bit That Is Turned ON during Macro Execution

 Overview
This bit is turned ON when the macro is being executed. Because this bit can be referenced from all
modules, it is useful in situations such as when you want to reference the bit before calling the macro to
control macro execution.
To use this bit that is turned ON during macro execution, you need an ID number for each macro that
you want to call.
In KV STUDIO, this device is represented by "_(macro name)_(ID number)."
4

Macros
 How to set the bit that Is turned ON during execution
To use this bit that is turned ON during execution, select the "ID No.('in execution')" check box in the
"Instruction/macro/pack pallet" dialog box.

1 Select the "IdentNo. (execution bit)"check box in the "Instruction/macro/pack pallet" dialog box.

You cannot use this bit that is turned ON during macro execution if you do not
Point
select the "IdentNo. (execution bit)" check box.

2 Enter the ID number.

When you select the "IdentNo. (execution bit)"


check box, the number is set to "1" by default.

To use the same macro repeatedly in the same project, change the number each time that you want to
use the macro.

If you specify the same number for different instances of the same macro, a
Point
conversion error will occur.

- KV Nano Series(terminal block type) User’s Manual - 4-123


4-9 Macros

 Usage example
LADDER PROGRAMMING

While Macro4_1 and Macro4_2 are in operation,


Macro5 will not be executed even if R000 is turned ON.

CR2008 MSTRT Macro4_1

@DM0 #100
Macro4_1

MSTRT Macro4_2
4 @DM10 #1000
Macro4_2 Macro4_2
Macros

Bit that is turned ON during execution


R000 _Macro4_1 _Macro_2 MCALL Macro5
#1 #2 @DM0
Macro4_1
Bit that is turned ON during execution
#0

If you write the bit that is turned ON during execution of an unused macro (a
Point
macro that is not specified by a macro call instruction in the project), a
conversion error will occur.

Reference You can use macro call instructions that call a macro with an ID number together with
macro call instructions that call the same macro without an ID number.

You cannot use the bit that is turned ON during execution.

R000 _Macro4_1 MCALL Macro4

@DM0 #100

R001 MCALL Macro4_1

@DM10 #1000

You can use the bit that is turned ON during execution.

4-124 - KV Nano Series(terminal block type) User’s Manual -


4-9 Macros

LADDER PROGRAMMING
Macro Passwords

 Macro passwords
You can limit who can display macros in KV STUDIO by setting passwords on the macros.
Follow the procedure below to set a password.

1 Select a macro in the workspace.

2 Right-click, and then click "Module/macro property" in the menu that is displayed.
4
Alternative procedure On the "File" menu, click "Module/macro property."
Right-click a macro in the workspace, and then click "Set password" in the menu that is

Macros
displayed.
The "Module/macro property" dialog box is displayed.

3 Click "Setup password."


The "Setup password" dialog box is displayed.

4 Enter the password in both text boxes (the second is for confirmation), and then click "OK."
After you set the password, when an attempt is made to display the macro in KV STUDIO, a dialog box
will be displayed asking the user to enter the password.
If the user does not enter the password, they will not be able to display the macro in KV STUDIO.

- KV Nano Series(terminal block type) User’s Manual - 4-125


4-9 Macros
LADDER PROGRAMMING

Macro instructions

Executes the specified


MCALL MCALL
Macro call subroutine macro (written
within the module)
Executes the specified self-
MSTRT MSTRT
Macro start hold macro (written within the
module)
Stops execution of the self-hold
MEND MEND
Macro end macro (written within the self-
hold macro)

4 Ladder program Entry mode


Execution condition MCALL *1
Macros

Varies depending on the macro to be executed*1 M C A L L 〔


S Argument 1 Argument 2 …〕

Execution condition MSTRT *1


Varies depending on the macro to be executed*1 M S T R T 〔
S Argument 1 Argument 2 …〕

Execution condition MEND


M E N D

Available Devices
Index
Ind Local Modify
Bit Devices Word Devices*1 Const
Operand Spec Device
MR DM
R DR LR T C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z
B W
S - - - - - - - - - - - - - -  - - - -

Operand Description
S Specifies the macro name*1

*1 The number of operands (0 to 10) starting from the second operand and the attributes of these
operands vary according to the argument settings specified by the macro that will be executed.
The devices that you can use with the different attributes are shown below.

Available Devices
Index
Ind Local Modify
Bit Devices Word Devices Const Spec Device
Attribute
MR DM
R DR LR T C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z
B W
Device  -  *4 *4    *4 *4 - - -  - -   
Value  -  - - -          -   
Unit - - - - - - - - - - - - - - *5 - - - -

*2 You cannot use quotation marks, "#", and "$." Directly enter the macro name that you used KV
STUDIO to set.
You can specify up to 12 half-width alphanumeric characters and up to 6 full-width alphanumeric
characters.
*3 When you are using ID numbers, the format becomes "(macro name)_(ID number)."Example)
"batch send_2"
For details on ID numbers, see "Bit That Is Turned ON during Macro Execution" (page 4-123).
*4 Timers and counters are handled differently according to the instructions that you use within the
macro.
Example) For the MOV instruction, the current value is processed. For details, see each
instruction.
*5 Specify the expansion unit number. If you are using the "Instruction/macro/pack pallet" dialog
box, specify the target expansion unit by selecting it from the list.

4-126 - KV Nano Series(terminal block type) User’s Manual -


4-9 Macros

LADDER PROGRAMMING
Operation Description

MCALL While the execution condition is turned ON, the subroutine macro specified with S is
executed during each scan.
The specified macro starts executing from the scan in which the execution condition
changed from OFF to ON.
Off processing is performed in the scan in which the execution condition changes from
ON to OFF.
MSTRT While the execution condition is turned ON, the self-hold macro specified with S is
executed during each scan.
The specified macro starts executing from the scan in which the execution condition 4
changed from OFF to ON.

Macros
Once the macro is executed, it will continue to operate even when the execution condition
is turned OFF.
MEND When the execution condition is turned ON, the OFF processing of the self-hold macro in
which this MEND instruction is written will be performed in the subsequent scan, and the
macro will stop executing in the scan after OFF processing is performed.
Scan
ON

Execution condition
OFF

MSTRT Executing OFF processing


ON
Execution condition
of the MEND instruction OFF

MEND Executing

• If you add, delete, or change the calling order of MCALL and MSTRT
Point instructions, you will not be able to write data during RUN mode.
• To stop the execution of self-hold macros, use the MEND instruction in the
macro.
While the execution condition of the MSTRT instruction is turned ON, the MEND
instruction will be ignored.
• You cannot write the MEND instruction in modules and in subroutine macros.
• You cannot use the MEND instruction to stop other macros.
• The previous status of differential execution instructions within a macro is
initialized each time that the macro starts executing (rising edge differential: ON
and falling edge differential: OFF).
• If the attribute of an MCALL or MSTRT instruction is a value operand, and if T,
C, CTH, or CTC is specified for this operand, the following values will be passed
to the macro.
T or C: Current value (32-bit data)
CTH: Current value (32-bit data)
CTC: Set value (32-bit data)
• If you write an MCALL or MSTRT instruction between the MC and MCR
instructions, when the MC instruction's execution condition is turned OFF
during macro execution, off processing will be performed during that scan, and
then operations will be stopped during the subsequent scan.
• If you write an MCALL or MSTRT instruction in a subroutine (between the SBN
and RET instructions), in a condition transfer (between the CJ or NCJ and
LABEL instructions), in a step (between the STP and STE instructions), or in an
interrupt (between the INT and RETI instructions), when the instructions
between these opening and closing instructions are not executed during macro
execution, the macro execution will be suspended. The next time that the
instructions between these opening and closing instructions are executed, the
macro execution will be restarted. In this situation, the previous status of
differential execution instructions in the macro will not be initialized. (If you
write these instructions in an initialize module, they will only be executed
during the first scan when operation starts.)

- KV Nano Series(terminal block type) User’s Manual - 4-127


4-9 Macros
LADDER PROGRAMMING

• If you write an MCALL or MSTRT instruction in a stage (between the STG and
JMP instructions), when the STG instruction's relay is turned OFF during macro
execution, for subroutine macros, the macro is executed for that scan with all
execution conditions within the macro turned OFF, and then the macro
execution stops in the subsequent scan. For self-hold macros, the macro
execution is suspended.
• If a macro is being executed when the module in which the MCALL or MSTRT
instruction is written stops, the macro's OFF processing is performed at the
same time as the module's OFF processing, and the macro execution stops in
the subsequent scan.
• During OFF processing, the same status as when the execution condition of the

4 MC instruction is turned OFF is used for only one scan.


• You cannot use MCALL and MSTRT instructions in macros.
• You can use subroutines in macros, but you cannot use interrupt programs.
• When you execute the same macro multiple times in a project, if you use global
Macros

devices with the OUT or OUB instruction in the macro, a duplicate coil will
occur.

Operation flags

CR2009 Depends on the processing result of the macro being executed


CR2010 Depends on the processing result of the macro being executed
CR2011 Depends on the processing result of the macro being executed
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
• If the range of indirect specification or index modification is incorrect.
• If a unit device (UR or UM) is set for an argument and a reserved unit that is not connected is
CR2012 specified in the operands.
• If the UM corresponding to a unit whose DM is not assigned is used.
There is no change in status if the operands do not specify indirect specification or index
modification.

* If the arguments are incorrect, the macro will not be executed.


When CR2012 is turned ON, the detailed error information is stored in CM2250 to CM2276.
"Error log" (page 4-64)

Point The MEND instruction does not cause the operation flags to change.

Instruction Execution Timing

MCALL While the execution condition is turned ON, this instruction is executed in each
scan.

Scan
ON

Execution condition
OFF

MCALL Executing Executing

MSTRT While the execution condition is turned ON, this instruction is executed in each
scan.
MEND While the execution condition is turned ON, this instruction is executed in each
scan.

4-128 - KV Nano Series(terminal block type) User’s Manual -


4-9 Macros

LADDER PROGRAMMING
Sample Program

While input relay R000 is turned ON, subroutine macro "MacroA" is executed with argument 1 set to
DM0 and argument 2 set to #10.
<Mnemonics list>
R000 MCALL MacroA LD R000
DM0 #10 MCALL MacroA DM0 #10

On the rising edge of input relay R001, self-hold macro "MacroB" starts executing with argument 1 (the
unit number) set to #1 and argument 2 set to #10.
4

Macros
<Mnemonics list>
R001 MSTRT MacroB LDP R001
↑ #1 #10 MSTRT MacroB #1 #10

When input relay R002 is turned ON, the execution of self-hold macro "MacroB" is stopped.
MacroB <Mnemonics list>
LD R002

MEND

R002 MEND

・・

- KV Nano Series(terminal block type) User’s Manual - 4-129


4-9 Macros
LADDER PROGRAMMING

Differences between Macros and Subroutines

The same as subroutine programs, call instructions are used to start macros. In this section we will
show a comparison of the macro and subroutine operations.
For details on subroutine programs, see "Subroutine programs" (page 4-72).

 Object creation

4 Macro
The number of objects that will be created is equal to the total number of macro call instructions
(MCALL or MSTRT) that you write in a module.
Macros

Module1 MacroA#1
Call
MCALL MacroA

MacroA#2
Call
MCALL MacroA

Call MacroA#3
MCALL MacroA

Module2
MacroA#4
Call
MCALL MacroA

MacroA, which is registered


Each time that the macro is called,
in the project
a new object is created.

Reference • Macros that are registered in the project but that are not called (unused macros) are not
transferred to the KV Nano Series. Unused macros are not included in the targets to be
verified during project verification and during verification with the PLC.
• To differentiate between the objects of the created macro, "#(management number)" is
appended after the macro name. In KV STUDIO, this is only displayed during
monitoring and simulation.

4-130 - KV Nano Series(terminal block type) User’s Manual -


4-9 Macros

Subroutine

LADDER PROGRAMMING
Subroutines are written between the END and ENDH instructions of a module or macro, and they are
executed by the subroutine call instruction (CALL) that is written in the main routine program of the
module or macro. Objects are not created each time that a call instruction is executed.

Module1 Module2
You can execute
#0 the subroutines of
CALL other modules by
using the ECALL
#0
CALL
instruction.
4
#0

Macros
CALL

END END

SBN SBN
#0
Call
× #0

RET RET

ENDH ENDH

 Callable position
[Macro]
In a module, you can write macro call instructions anywhere in the main routine, in subroutines, and in
interrupt routines. You cannot write macro call instructions in macros.

[Subroutine]
Subroutine call instructions are only valid in the module or macro in which the subroutine is created. To
execute subroutines in other modules, use the inter-module subroutine call instruction.

 Name
[Macro]
You can freely assign names to macros.
"List of Characters That Cannot Be Used" (page A-45)

[Subroutine]
Numbers are used to manage subroutines.

- KV Nano Series(terminal block type) User’s Manual - 4-131


4-9 Macros

 Arguments
LADDER PROGRAMMING

[Macro]
Macros have arguments.

[Subroutine]
Subroutines do not have arguments.

 Operation when the execution condition is turned OFF


4 [Macro]
When execution is stopped, the macro is executed for just one scan with all the execution conditions of
Macros

the program in the macro turned OFF. For example, the devices written with the OUT instruction are
automatically turned OFF.
"Macro Type" (page 4-115)

[Subroutine]
The program in the subroutine is not executed. The written devices retain their status from the last time
the subroutine was executed.

 Default status of differential execution instructions


[Macro]
The previous status that is used to detect differentials with instructions such as differential execution
instructions is turned ON when a rising edge differential occurs at the start of execution and is turned
OFF when a falling edge differential occurs at the start of execution. Differentials will not be detected
immediately after execution starts.

[Subroutine]
The same as macros, except that the operation is only performed when execution starts for the first
time. When execution starts for the second time and later, the status is set to that of the previous
execution.

 Operation when the program is called between the MC (master control) and MCR
(master control reset) instructions
• When the MC instruction's execution condition is turned ON
Macros and subroutines operate normally.

• When the MC instruction's execution condition is turned OFF


[Macro]
The operations described under "Operation when the execution condition is turned OFF" above are
performed, and the macro then stops. (Self-hold macros also stop.)

[Subroutine]
Subroutines are not executed.

4-132 - KV Nano Series(terminal block type) User’s Manual -


4-9 Macros

 Applications

LADDER PROGRAMMING
When you want to retain the status and values of the devices that you are using in the locations that
programs are called
[Macro] ...........Better
Because separate objects are created for each call instruction, if you use macros together with local
devices, you can retain the status from the previous execution without having to consider problems
such as device conflicts.

[Subroutine] ....Good
Because the same program is executed, you have to use indirect specification or a similar method to
4

Macros
create a program that stores and restores the status of the devices that you are using.

When you want to perform execution until a series of operations finishes


[Macro] ...........Better
If you use self-hold macros, after the macro starts executing, it will continue to operate regardless of the
status of the execution condition until the macro execution stop instruction (MEND) is executed.
Also, when you want to execute multiple instances of this type of processing at the same time, you can
do so without having to consider device conflicts and the various operation statuses.

[Subroutine] ....Good
You have to write the program so that the execution condition is not turned OFF until the operations are
finished.
Also, when you want to execute multiple instances of this type of processing at the same time, you
have to write the program while considering device conflicts and the various operation statuses.

When you want to reduce the number of steps


[Macro] ...........Good
Because objects are created for each call instruction, you cannot reduce the number of steps.

[Subroutine] ....Better
Because the number of objects created remains the same no matter how many times the subroutine is
called, the more times the subroutine is called, the more you can reduce the number of steps.

- KV Nano Series(terminal block type) User’s Manual - 4-133


4-10 Local Devices
Traditionally, the devices that were processed by the PLC were common to the entire project.
LADDER PROGRAMMING

Therefore, it was necessary for the user to manage all devices used in the program.
In KV STUDIO, for each module or macro, local devices can be processed as separate devices. Even if
you use a local device with the same number in a different module or macro, because it will be
processed as a separate device, you can easily manage the assignments of devices that are used only
within the module or macro.
In contrast with the local devices that are valid only within a module or macro, devices that are shared
within the entire project are called global devices.

4 <Traditionally> <With KV STUDIO>


Project Project
Local Devices

ModuleA

Local
Program
devices

ModuleB
Program (Global)
Devices Local (Global)
Program
devices Devices

MacroC

Program Local
devices

How to Write Local Devices

To specify a local device, prefix the device name with "@."

Example
Global devices Local devices
DM0 @DM0
MR0 @MR0

You have to write this as "@device number" only when you want to specify the
Point
device number as the operand of a timer or counter instruction.
Mnemonic input example: TMR @0 #100

4-134 - KV Nano Series(terminal block type) User’s Manual -


4-10 Local Devices

LADDER PROGRAMMING
List of Local Devices

The number of local and global devices that are reserved when you create a project and the default
ranges of these devices are shown below. To change the reserved number of local devices, from the
workspace, open the "CPU system setting" dialog box, and then click "Entire assignment setting of local
devices."
Local Device Global Device
Reserved Number of Total Number of
Device Name*1 Number of Devices
Devices in the Entire
Project*2
and Range
Devices
4
9600 (600 channels) 9600

Local Devices
Relay (R)*3 None
R000 to R59915 (600 channels)
1600 8000 (500 channels) 9600
Internal auxiliary relay (MR)*3
(100 channels) MR000 to MR49915 (600 channels)
320 3560 (180 channels) 3200
Latch relay (LR)*3
(20 channels) LR000 to LR17915 (200 channels)
412
Timer (T)*4 100 512
T0 to T411
206
Counter (C)*4 50 256
C0 to C205
27768
Data memory (DM) 5000 32768
DM0 to DM27767
512
Temporary data memory (TM) None 512
TM000 to TM511
*1 Link relays (B), link registers (W), high-speed counters (CTH), high-speed counter comparators
(CTC), control relays (CR), control memory entries (CM), and index registers (Z) cannot be used
as local devices.
*2 When you create a new project, ensure that the area is large enough for all the devices that can
be used as local devices. (To calculate the area, assume that 10 modules will be used and that
there will be 50 macro calls.)
You can freely change the number of reserved devices.
*3 Set the number of devices used in units of channels (ch).
*4 You have to write this as "@device number" only when you want to specify the device number as
the operand of a timer or counter instruction. Mnemonic input example: TMR @0 #100

• If you are using relays (R) and temporary memory entries (TM) as local devices,
Point
you have to set the number of devices that you will use.
• The following devices must be processed as global devices.
• KV Nano Series I/O relays
• Devices assigned to expansion units
• Devices that are referenced by connected peripherals such as touch panels
• Devices that are common to the entire project
• Devices that have to transfer data between modules
• The first local device is number 0. Use local devices with as small numbers as
possible.
• Because R devices are assigned to expansion units, an area that is used as
global devices is required. For local devices, use MR devices with a higher
priority.
• If you use a local device or global device outside of the usable range, a
conversion error will occur.
• When you are using instructions in which you specify the leading device in the
operands, index modification, and indirect specification, do not exceed the
usable range of local and global devices.

- KV Nano Series(terminal block type) User’s Manual - 4-135


4-10 Local Devices
LADDER PROGRAMMING

Local Device Assignment

During conversion, local devices are automatically assigned to the reserved areas that have been
prepared for the different device types in advance.

Device area
Leading device

Project 1

4 ModuleA
Global devices
Local of Project 1
Program
Local Devices

devices
Convert
ModuleB
Global
devices Local Local devices of
Program
devices ModuleA
Convert
Local devices
MacroC
of ModuleB
Local Reserved area of
Program Convert local devices
devices Local devices
of MacroC

Not used

Last device

For macros, the number of local devices assigned corresponds directly to the
Point
number of times that the macro is called in the project.

Reference Just like global devices, you can assign device comments to local devices.

4-136 - KV Nano Series(terminal block type) User’s Manual -


4-10 Local Devices

 Setting assignments in batches

LADDER PROGRAMMING
The number of local devices that are reserved for usage in a project is set in advance, but you can
change the number of devices used per type of device. The changes that you make are saved in KV
STUDIO, so there is no need to make the same changes each time that you create a new project.
From the workspace, open the "CPU system setting" dialog box, and then click "Entire assignment
setting of local devices."

Local Devices
 Configuring device settings for modules and macros
You can set the number of reserved local devices for usage in each module or macro, and you can
make this setting for each type of device. The default setting is "Auto." With this setting, the number of
local devices used in a module or macro is set automatically, so there is normally no need to consider
the number of local devices.
From the workspace, open the "CPU system setting" dialog box, and then click "Set module/macro type
device."

- KV Nano Series(terminal block type) User’s Manual - 4-137


4-10 Local Devices
LADDER PROGRAMMING

Local Device Input and Errors during Conversion

 During ladder entry


A typical example of an error occurring during ladder entry is shown below.
An attempt is made to use a device whose type cannot be used as a local device.
B, W, CTH, CTC, CR, CM, and Z cannot be used as local devices.
"List of Local Devices" (page 4-135)

4  During ladder conversion


Local Devices

Typical examples of errors occuring during ladder conversion are shown below.
An attempt is made to use as a global device the device area that has been reserved for local
devices.
•Check the "Global device range" settings on the "Entire assignment setting of local devices" screen.
Leading device Last device
Entire assignment Global devices Reserved area of local devices

Specified as a global device

"Setting assignments in batches" (page 4-137)


•There is a chance that the unit devices you have used the Unit Editor to set are using the local
device area. Check whether this is the case.
Leading device Last device
Entire assignment Global devices Reserved area of local devices

Assigned to a unit device

See "UNIT EDITOR" in the "KV STUDIO User's Manual."

An attempt is made to use a local device that has been assigned outside of the range for local
devices.
This error can only occur when you configure settings manually.
Check the settings on the "Set module/macro type device" screen.

Example

@DM0 @DM1999
Assigned separately to modules and macros
Setting range @DM3000

"Configuring device settings for modules and macros" (page 4-137)

4-138 - KV Nano Series(terminal block type) User’s Manual -


4-10 Local Devices

The reserved number of local devices is insufficient.

LADDER PROGRAMMING
Check the settings under "Display local assignment" on the "Entire assignment setting of local
devices" screen. See if there are devices whose settings, such as the number of devices used, are
displayed in red. Configure the settings—by increasing the reserved number of applicable devices
or by decreasing the number of local devices set for each module and macro—so that the number
of devices that can be used (the number of reserved local devices) is greater than the number of
devices used.
Insufficient number of
Leading device Last device
reserved devices
Entire assignment Global devices Reserved area of local devices
4
Number of local devices used

Local Devices
Module 1 Module 3
Module 2 Module 4

"Setting assignments in batches" (page 4-137)

- KV Nano Series(terminal block type) User’s Manual - 4-139


4-11 Programming Skills

From Installation to Operation


LADDER PROGRAMMING

The procedure from KV Nano Series installation to operation is shown in the figure below.

Use information such as the operation flow, specifications,


timing charts, and circuit diagrams to design the operation
details.

Operation flow Circuit diagram


Push-button switch PB1:ON Pilot lamp (PL) lit PB1 is an a contact switch

4
Push-button switch PB2:OFF PB2 is a b contact switch
Lit status of pilot lamp PB1 PB2
Push-button switch PB1:OFF
(PL) is maintained
Operation details Push-button switch PB2:OFF
even if PB1 is turned OFF.
consideration
Programming Skills

Push-button switch PB1:OFF Pilot lamp (PL) turns off


Push-button switch PB2:ON when PB2 is turned ON.

Timing chart RL
ON
PB1 contact
OFF
ON
PB2 contact
OFF
ON PL
PL
OFF

 Unit Configuration
When there are many pieces of I/O equipment used in control and
when you are using expansion functions, consider using extension
expansion units.

KV Nano Series and Expansion Unit "User's Manuals."


Program
consideration  Module Configuration
Design the configuration of the modules that you will create for
different aspects such as processes and functions.
"Module Configuration Examples" (page 4-106)

 Sequence Program Configuration


Design the outline while you consider the control contents of the
program that you will create per module and while you consider the
instructions that you will use.
For details, see the KV-7000/5000/3000/1000 Series and KV
Nano Series "Instruction Reference Manuals."

Use KV STUDIO to Create the Program

 Create a New Project


"New Project" in the "KV STUDIO User's Manual"
Key Points to Program Creation

Program creation  Configure Unit Settings


Use the Unit Editor to assign unit devices to the expansion units.
"Chapter 3 UNIT EDITOR" in the "KV STUDIO User's Manual"

 Create Modules and Programs


"4-8 Modules" (page 4-100)
"Program Creation Support" (page 4-142)
"Creating Clear, Legible Programs" (page 4-154)
"Key Points to Program Creation" (page 4-159)
"4-9 Macros" (page 4-112)
For details, see the KV-7000/5000/3000/1000 Series and KV
Nano Series "Instruction Reference Manuals."

4-140 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

LADDER PROGRAMMING
Programs are converted when they are transmitted to a PLC for
monitoring and when you switch to the simulator. If a conversion error
occurs, remove the cause of the error while referring to the output
window.
Program "Conversion" (page 4-168)
"4-10 Local Device Input and Errors during Conversion" (page 4-
conversion
138)
"Appendix 1 Error Message Lists" in the "KV STUDIO User's
Manual"
"Key Points to Program Creation" (page 4-159)
4

Programming Skills
Program
Change and add programs.
changes
"Creating Clear, Legible Programs" (page 4-154)
and "Online editing" (page 4-171)
additions "Writing data during RUN mode" (page 4-169)

Use the useful monitor and simulator functions to debug the program.
Monitor "Monitor" (page 4-170)
Monitor and Simulator "Simulator" (page 4-172)

simulator

Frequently used modules  Import modules and macros


"Module management" (page 4-100)
Frequently used macros  Register in the macro library
"Macro management" (page 4-112)

Completion

- KV Nano Series(terminal block type) User’s Manual - 4-141


4-11 Programming Skills
LADDER PROGRAMMING

Program Creation Support

This section will explain some convenient functions that can reduce your entry and modification
workload during ladder program creation.

Mnemonic entry

When you perform mnemonic entry, you can enter instructions without using a mouse, so you can
4 create programs in less time than is required if you use the "Instruction/macro/pack pallet" dialog box.
Programming Skills

 Entry mode
Use the keyboard to enter the first character of the instruction.
(Example) Entering the MOV instruction

Move the cursor to the cell that you


want to enter data in, and then press
M on your keyboard.

The "mnemonic direct entry" dialog


box is displayed, so continue by
entering the mnemonic.

Press Enter to display the ladder


symbol in the ladder editing window.

Reference On the "Tool" menu, click "Option," click the "Setup edit/key" tab, and then select the
"Zoom out direct entry dialog box" check box to minimize the display of the "mnemonic
direct entry" dialog box.

For details on the instructions, see the KV-7000/5000/3000/1000 Series and KV Nano Series
"Instruction Reference Manuals."

4-142 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

LADDER PROGRAMMING
Reference • You can omit the target devices and values that are specified by the instruction and
operands when you enter the instruction.
(Example) A 0  LD R000
"App-6 List of Abbreviated Mnemonics" (page A-33)
• To use the "mnemonic direct entry" dialog box to edit cells that have already been
entered, press Esc or F2 . (If you click "Option" on the "Tool" menu, click the
"Setup edit/key" tab, and then select the "Start up direct entry by Enter key" check box,
the Enter key will be assigned to the "mnemonic direct entry" dialog box.)

 Entry assistance 4

Programming Skills
There are several functions that can assist you in entering instructions when you are using mnemonic
entry.

 Instruction list display


When you enter the first character of an instruction, a dialog box that contains a list of candidate
instructions that all start with the leading character that you have entered is displayed, and you can
select the instruction from the list.

Dialog box that contains a list of candidate instructions


that all start with the leading character that you have
entered.

 Instruction operand simple explanation display


A simple explanation of the operand that you are currently entering and which number this operand is
are displayed.

When entering the first operand

When entering the second operand

 Simple search for unused devices


If you enter part of a device type or number, and then enter "?," the unused devices will be listed.

- KV Nano Series(terminal block type) User’s Manual - 4-143


4-11 Programming Skills

Shortcut keys
LADDER PROGRAMMING

If you use shortcut keys, you can perform operations with just the keyboard and without using a mouse.
Also, because this reduces the number of keystrokes, it also reduces the amount of time spent entering
data.
This section will explain typical shortcut keys.
"App-7 List of Shortcut Keys" (page A-35)

 Entry and editing


4  Esc F2
Programming Skills

The "mnemonic direct entry" dialog box is displayed, and you can use it to directly enter and edit
mnemonics.

"Mnemonic entry" (page 4-142)

 Enter

When a blank cell is selected in editor mode


The "Instruction/macro/pack pallet" dialog box is displayed.

When a cell with an existing entry is selected in editor mode


The "Operand" dialog box is displayed.

You can change the target device, device


comment, and constant for each operand.

In monitor mode or simulation mode


The "Search/replace" dialog box is displayed.

 Ctrl + M
If a cell with an existing entry has been selected, the "Operand" dialog box described above is
displayed, and you can edit the comment.

4-144 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

 + X / C / V

LADDER PROGRAMMING
Ctrl

These are standard editing shortcut keys for Windows applications.


Ctrl + X Cut
Ctrl + C Copy
Ctrl + V Paste

 Ctrl + Shift + V
Set the number of items to paste to paste multiple times.
In addition, you can offset the included devices. 4
See in "5-1 About Edit Functions - Multiple Paste" in the "KV STUDIO User's Manual."

Programming Skills
 Ctrl + Z / Y
These are standard editing shortcut keys for Windows applications.
Ctrl + Z Undo

Ctrl + Y Redo

 Tab / Shift + Tab

Move the cursor an amount specified by the ladder symbol unit.

 Ctrl + /
Move the cursor in units of ladder circuit blocks.

 Ctrl +
Select the entire line in which the selected cell resides.

 Ctrl + Shift + /
Change the operand number of the selected cell.

- KV Nano Series(terminal block type) User’s Manual - 4-145


4-11 Programming Skills

 Insertion
LADDER PROGRAMMING

 Insert

Insert a horizontal connecting line in the selected cell.

 Shift + Enter or Shift + Insert


Insert a rung.

4  Shift + Delete
Delete a rung.
Programming Skills

 Ctrl + Enter
Insert rung comments.
"Rung comments" (page 4-156)

 Connecting line editing


 Alt + Enter or Ctrl + Tab

Draw a connecting line from the selected cell to the end of the line.

 Alt + / / /
If there is no connecting line in the direction of the arrow key, draw a connecting line in this direction.
If there is a connecting line in the direction of the arrow key, delete this connecting line.

 Search and replace

 Ctrl + F
The "Device search" tab of the "Search/replace" dialog box is displayed.
"Search and replace" (page 4-148)

 Ctrl + H
The "Device replace" tab of the "Search/replace" dialog box is displayed.

 Space

Cross references are displayed.


"Cross references" (page 4-148)

4-146 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

 View

LADDER PROGRAMMING
 Ctrl + F7

The "Device comment edit" window is displayed.


"Device comments" (page 4-154)

 Ctrl + E
The "Device use list" window is displayed.
You can use this to easily check the unused devices.
See "6-2 About View Functions - Device Use List" in the "KV STUDIO User's Manual."
4

Programming Skills
Page
 Ctrl + Up / Ctrl + Page
Down

Zooms in to and out from the ladder editing window.


*When "Auto zoom" on the "View" menu is selected, pressing these shortcut keys has no effect.

 Ctrl + Space
Shows and hides comments in the ladder editor.

- KV Nano Series(terminal block type) User’s Manual - 4-147


4-11 Programming Skills

Search and replace


LADDER PROGRAMMING

You can search for instructions and operands that match the specified conditions. You can also display
the items that match the search conditions as a list in the output window.
When searching for devices, use the cross reference function. You can display this list just by pressing
the space bar.
"Cross references" (page 4-148)

1 Select the ladder editing window.

4 2 Right-click, and then click "Search" in the menu that is displayed.


Alternative procedure • On the "Edit" menu, click "Search."
Programming Skills

• Ctrl + F

The "Search/replace" dialog box appears.

You can set the target to "Device," "Constant," "Module/macro," "Device Comment," "Label," or
"Reserve/Disable."

Cross references

Edit (E)  Cross reference (X)

The search result list of the specified device is displayed in the output window.

1 Select the device (ladder symbol) whose cross references you want to create.

2 On the "Edit" menu, click "Cross reference."


The search result list is displayed in the output window.
Alternative procedure • (space) bar
• Right-click, and then click "Cross reference" in the menu that is displayed.

4-148 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

3 Double-click the item that you want to check in the search result list.

LADDER PROGRAMMING
When you double-click a device that is displayed in the list, the cursor moves to the corresponding
device (symbol) on the ladder.
Alternative procedure • F3
• Shift + F3

Programming Skills
4 When you want to move the cursor focus to the next item, press F3 .

5 To move the cursor focus to the previous item, press Shift + F3 .

- KV Nano Series(terminal block type) User’s Manual - 4-149


4-11 Programming Skills

Window menu
LADDER PROGRAMMING

Using the Window menu can help you improve your program creation efficiency.
This section will explain "Tile" and "Split," which are commands in the Window menu.

 Tile
This function is useful when you want to create or debug multiple modules and macros at the same
time.
4 On the "Window" menu, click "Tile."
The currently open modules and macros are displayed in a tiled format on the screen.
Programming Skills

Reference You can copy and paste parts of ladder programs between modules and macros.

 Split
You cannot display a program in its entirety if the program is too long.
You can use the "Split" function to split the display of a program into two, so that you can view two parts
of the program at the same time.

4-150 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

1 On the "Window" menu, click "Split."

LADDER PROGRAMMING
A separating
line is displayed.
Use the mouse

4
to determine
the split position.

Programming Skills
2 Click to fix the split position.

[Split screen]

After you
determine
the split position,
you can freely
change
the height.

When you determine the split position, the upper and lower screens both display the start of the
program by default.
Use the scroll bars on the right side of the upper and lower screens to display the desired program
positions.

Alternative procedure If you move the mouse cursor to the position shown in the following figure, the mouse
cursor will change to " ," and you can drag the cursor to start splitting the program
display.

Release the mouse cursor at the position that you want to fix the split.

Reference • You can copy and paste parts of the ladder program between the upper and lower
screens.
• You can also set the display sizes of the screens independently.
- KV Nano Series(terminal block type) User’s Manual - 4-151
4-11 Programming Skills

Label
LADDER PROGRAMMING

By managing devices that correspond to the labels in which you have added conditions, you can write
programs using labels instead of device names. KV STUDIO automatically assigns local labels to the
internal work area, so you can write programs without considering devices.

Reference Even if you add local labels, you will not be able to write to them during RUN mode.

 Entry mode

4 Use the "Label edit window" to set labels.


1 In the workspace, double-click "Edit labels."
Programming Skills

Alternative procedure On the "View" menu, click "Label edit window."

The "Label edit" window is displayed.

1 2 3 4

Number Item Description Setting Range


Up to 32 half-width
1 Label name Enter the label name that you want to set.* characters and up to 16 full-
width characters
Select the data format.
Point According to the devices that you are
2 Data format ―
using, some data formats cannot be
used.
Enter the device or constant that you want to assign
the label to. This is not necessary for local labels.
Device/
3 ―
Constant
Reference You can set labels on R, MR, LR, B, DM,
W, TM, T, and C devices.
Up to 32 half-width
Label The device comments (which you cannot enter) are
4 characters and up to 16 full-
comment displayed here.
width characters
* "App-8 List of Characters That Cannot Be Used" (page A-45)

You can use the labels of the devices that have been registered in the "Label edit" window to create
ladder programs.
(Example)
Automatic Automatic
operation operation
starts in progress R000 R500

MOV MOV
Automatic
#1000 operation speed #1000 DM0

4-152 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

 Display method

LADDER PROGRAMMING
After you set labels, on the "View" menu, click "Displaying Labels" to show and hide the global labels.
Alternative procedure Ctrl + space
Back

 Assigning local labels


Local labels are automatically assigned to the local work area. Use the "Setup work area" dialog box to
check the number of labels in use in the local work area and to change the number of labels that are
assigned to the local work area.
To display the "Setup work area" dialog box, from the KV STUDIO workspace, open the "CPU system
setting" dialog box, click "Entire assignment setting of local devices," and then click "Setup work area."
4

Programming Skills
1

Number Item Description


1 Number of work Set the number of work areas when character string functions are processed
area for script text with scripts.
string The local work for the words of the local work area is used.
2 Possible quantity Displays the number of local work areas that can be used in the project.
used
Used nums Displays the local work areas that are used for each module and macro.
Residual nums Displays the number of remaining local work areas that can be used.
Residual nums = Possible quantity used - Used nums
3 Assignment status Displays the local work area status of each module and macro.
of modules and If you clear the check boxes in the Auto column, you can set the number of
macros local work areas used.

The default setting is Auto (the check boxes are selected). With this setting, local work areas are
assigned automatically according to local label settings and the content of KV scripts, so there is
normally no need to consider the number of local work areas.

Reference • You can display the items that local labels are assigned to during monitoring. When the
data format is bit, this is displayed as "VB." When the data format is word, this is
displayed as "VM." For timers and counters, this is displayed as the devices in the local
device usage area.
"Displaying the assignment destinations of local devices and local labels" (page 4-175)
• If a conversion error occurs when you execute a program that performs character string
processing using KV scripts, increase the number of work areas for script character
strings.
- KV Nano Series(terminal block type) User’s Manual - 4-153
4-11 Programming Skills
LADDER PROGRAMMING

Creating Clear, Legible Programs

Device comments

You can set comments for each device.


Because the set comments (1) are displayed below each device when the ladder is displayed in KV
STUDIO and (2) can be displayed in the access window when an extension access window cassette
(KV-N1AW) is attached to the KV Nano Series, it is easy to see the functions and contacts that are
4 assigned to the devices.
Additionally, if device comments are present, it takes less time to understand the program when a
Programming Skills

person other than the program's creator views the program. Device comments can be used on both
global devices and local devices. When bit processing is being performed on a word device, you can
use device comments in units of bits.

<Device comments hidden>


R1100 R1102 @R000 @R001 DM4000.1 MOV
#0 DM8

R4000

Because it is difficult to understand


the meaning and function of all
R1100 R4000 R1102 DM4000.1 @R000 @R001 R4013 the devices, itMOV
is difficult to quickly
#1 DM8
understand the details of the ladder
program.
R4000 R1011 @R001 DM4000.1 R1102 @R000

@R000 R1013 R1114 MOV


#4 DM8

<Device comments displayed>


R1100 R1102 @R000 @R001 DM4000.1 MOV
#0 DM8
Automatic/ Emergency Settings Spot settings Alarm 2
manual SW stop SW in progress in progress Display screen
number
R4000
This is useful, because the meaning
Automatic operations in progress and function of all the devices can
be understood at a glance, which
R1100 R4000 R1102 DM4000.1 @R000 @R001 R4013 MOVto understand
makes it possible
#1ladder
the details of the DM8
program
Automatic/ Automatic operations Emergency Alarm 2 Settings Spot settings Spot error quickly. 表示画面番号
manual SW in progress stop SW in progress in progress standby
R4000 R1011 @R001 DM4000.1 R1102 @R000

Automatic operations Settings Spot settings Alarm 2 Emergency Settings


in progress SW in progress stop SW in progress
@R000 R1013 R1114 MOV
#4 DM8
Settings Settings Change screen Display screen
in progress finished during settings number

Point You cannot set device comments on index registers (Z).

4-154 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

 Entry mode

LADDER PROGRAMMING
The following two methods are available for entering device comments.
• Enter the comments in the "Operand" dialog box ( Ctrl + M ).
• Enter the comments in the "Device comment edit" window.

Reference It is useful to write programs with the "Device comment edit" window displayed, because
you can enter instructions while viewing the device comments. You can display up to three
of these windows at the same time.
4

Programming Skills
 Display method
After you set device comments, on the "View" menu, click "Display cmnts" to show and hide the device
comments on the ladder editor.
Alternative procedure Ctrl + Space

- KV Nano Series(terminal block type) User’s Manual - 4-155


4-11 Programming Skills

Rung comments
LADDER PROGRAMMING

You can write comments on every rung in the ladder editing window.
Rung comments make it easy to understand the contents of each circuit block at a glance during
program editing.
Also, you can display just rung comments in a list and move to the rung of a specific rung comment.

Emergency stop Rung comment

Circuit
4 block
description
Programming Skills

Screen display processing Rung comment


Circuit
block
description

 Entry mode
Follow the procedure below to enter rung comments.

1 In the ladder editing window, position the cursor on the rung in which you want to enter a rung
comment.

2 Right-click, and then click "Insert rung comment" in the menu that is displayed.
Alternative procedure • On the "Edit" menu, click "Insert," and then "Rung cmnt."
• Ctrl + Enter

The rung comment editor is displayed as shown below. Enter the rung comment.

3 Press Esc or Ctrl + Enter .


The rung comment is entered.

4-156 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

 How to search for rung comments

LADDER PROGRAMMING
Display the rung comments in the ladder editing window as a list. You can move to the rung whose
comment you select from this list.
Follow the procedure below to search for rung comments.
Alternative procedure Ctrl + L

1 Select the ladder editing window.

2 Right-click, and then click "Search" in the menu that is displayed.


4
Alternative procedure On the "Edit" menu, click "Search rung cmnts."

Programming Skills
The "Search/replace" dialog box is displayed.

Number Item Description Setting Range


Select the range that the rung comment search will The default value is "Module/
1 Search range
be performed over. macro."
All rung comments in the target range are displayed
2 List display -
in the output window.
Only disp If rung comments span multiple rungs, you can
leading select whether all rungs will be displayed as search Select or clear the check box.
3
rung of results or whether just the leading rung of multiple- (The default is selected.)
comments rung comments will be displayed.

3 Click "List display."


The list of rung comments is displayed in the output window.

- KV Nano Series(terminal block type) User’s Manual - 4-157


4-11 Programming Skills

4 Double-click the rung comment whose rung you want to jump to.
LADDER PROGRAMMING

The rung of the selected rung comment will be displayed in the ladder editing window.

4
Double-click
Programming Skills

KV script

Write calculations, character string processing, and other parts that are tedious to write in ladder
programs as KV script.

Ladder program
The ladder program contains multiple
rungs, so the program flow is hard to
understand.
When you have to use simple
calculations such as addition,
subtraction, multiplication, and division
as well as when you have to use
specialized instructions, it is hard to
understand the program with just
comments assigned to each circuit block.

The script can be mixed together with


a ladder program, and you can write
comments on each line of the script.

KV script

You can write control sentences, so You can write mathematical


it is easy to understand the flow of formulae without having to consider
the program. the calculation processing and
internal registers.

For details, see the KV-7000/5000/3000/1000 Series and KV Nano Series "Script Programming Manuals."
4-158 - KV Nano Series(terminal block type) User’s Manual -
4-11 Programming Skills

Program organization

LADDER PROGRAMMING
To create programs that are easy to debug and reuse, write programs in modules (components) for
each function and process, and assign easily understandable names to these modules. Also, extract
frequently used ladder circuit blocks to macros (original instructions), and assign to these macros easy-
to-remember names that can be entered concisely like the instructions.
"4-8 Modules" (page 4-100)
"4-9 Macros" (page 4-112)

Device defaults 4

Programming Skills
Use the "Setup defaults device" dialog box to manage the programs in which initializing the devices is
tedious when done by writing all the initializations in the ladder program. When operations start, the
registered values are all written automatically.
Click "device default" in the workspace.

Key Points to Program Creation

This section explains the information and precautions that you should understand to create ladder
programs.

 Expanded ladder mode


In normal ladder notation, you can only position a single output instruction, such as OUT and TMR, on
one rung of the ladder. If you use expanded ladder mode, you can position multiple output instructions
on one rung, which reduces the number of rungs in the program, and thus clarifies the processing
sequence.

In KV STUDIO, you can switch between expanded ladder input mode and normal ladder input mode.
Follow the procedure below to switch between the modes.

1 On the "Edit" menu, click "Expanded ladder mode."


Alternative procedure Click .

- KV Nano Series(terminal block type) User’s Manual - 4-159


4-11 Programming Skills
LADDER PROGRAMMING

Reference • When the expanded ladder mode is enabled, "Expanded ladder mode" on the menu is
displayed with a check mark, and the icon is displayed with a frame surrounding it.
• When you select expanded ladder mode, the cursor does not automatically move to the
right side of the rung when you enter an output instruction, and you can continue
entering instructions on the same rung. When you are in normal ladder mode, the
cursor automatically moves to the right side of the rung when you enter an output
instruction.
• In the default settings, expanded ladder mode is disabled.

4  Ladder program execution sequence


Programming Skills

As shown below, ladder programs are executed from left to right and from top to bottom.

(1) (2) (4)


R000 R001 R500

(3)
R002

(5) (6)
R003 MOV
#1000 DM0

Reference • A program is executed in the order specified by its mnemonics list.

LD R000................................... (1)
ANB R001................................... (2)
OR R002................................... (3)
OUT R500................................... (4)
LD R003................................... (5)
MOV #1000 DM0......................... (6)

• To set the module execution sequence, in KV STUDIO, open the "CPU system setting"
dialog box, and then click "Execute sequence of modules."
"4-8 Module Execution Sequence" (page 4-105)

4-160 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

 Ladder programs that cannot be converted

LADDER PROGRAMMING
Typical patterns that cause conversion errors are shown below.

 Rail or output line not connected

Ensure that all contacts and coils are on R500


lines that are connected from the rail to
the output line, and that no items are
unconnected.
4

Programming Skills
Reference The ladder program to
the right is unconnected, A B
so a conversion error will
occur. C

R500

 An instruction that cannot be written directly from a rail is in use

Internal
You cannot write instructions such as those for R500 auxiliary relay R500
output coils, timers, and counters directly from
the rail.
If execution conditions are not required, insert
the b contact of an unused internal auxiliary #10 CR2002 #10
relay or control relay CR2002 (the contact that is T0 T0
always turned ON) as a dummy.
(Incorrect) (Correct)

 An instruction that cannot be written directly on an output line is in use

A B D R500 E

- KV Nano Series(terminal block type) User’s Manual - 4-161


4-11 Programming Skills

 Illegal short circuit present


LADDER PROGRAMMING

R500

4
A B C
Programming Skills

 Output coils are connected in parallel

 Circuit groups that contain output


coils cannot be connected in parallel. A B C R500

D R501

However, as shown in the figure to A B C R500


the right, you can connect circuit groups
in parallel provided each circuit group
is connected to the output line.
D R501

 Missing END or ENDH instruction


Each module or macro needs an "END" or "ENDH" instruction.

Reference When you use KV STUDIO to create a new module or macro, the "END" or "ENDH"
instruction is automatically inserted. Write the "END" or "ENDH" instruction in a ladder
program. If you write these in a script, the program may not operate correctly.

4-162 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

 Ladders that must be rewritten

LADDER PROGRAMMING
Non-convertible ladders Convertible ladders

 You cannot program circuits such as those A B R500 C E B R500


shown in the figure on the right.
Rewrite these circuits.
A
E
C D A E D

C
4

Programming Skills
 In the circuit shown in the figure to the right, A R1000 A R1000 R500
R500 will not be output.
By rewriting the circuit, the output can be
generated for only one scan.

R1000 R500 A R1000

 If you use the same coil twice, as shown in A B R500 A B R500


the figure to the right, the later part of
the program will be given priority,
and the earlier part will be ignored.

C E R500 C E

 You cannot program circuits such as those A B C R500 B C A R500


shown in the figure on the right.
Rewrite these circuits.
D E D E

F F E

 You cannot program circuits such as those A B R500 C D B R500


shown in the figure on the right.
Rewrite these circuits.
C D A

E R501 C E R501

- KV Nano Series(terminal block type) User’s Manual - 4-163


4-11 Programming Skills

 Duplicate coil
LADDER PROGRAMMING

If you use two or more of the same OUT or OUB instruction for the same device within a project, the
last instruction to be executed within a scan is given priority, and the other instructions are ignored.
If the instructions are on separate rungs or exist in different modules or macros, they are processed as
shown below.

(Example) As shown in the figure below, when the R500 output instruction is used twice

4 R000 R001 R500 R000 R001 R1000


Programming Skills

R002 R501 R002 R501


・・・

・・・
R003 R500 R003 R1001

・・・
R1000 R500

First generate the output using different


devices, separately perform an OR on
the results, and then output this result R1001
from R500.

A conversion error will not occur for duplicate coils, but do not use them because they make operations
complicated.
To check whether duplicate coils exists, in KV STUDIO, on the "Convert" menu, click "Duplicate coil
check."

If you call the same macro two or more times, a duplicate coil will occur if an OUT
Point
or OUB instruction that uses a global device is present in the macro.

4-164 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

 How to avoid duplicate coils between the same macro

LADDER PROGRAMMING
If you make two or more calls to a macro in which an OUT or OUB instruction that uses a global device
is present, a duplicate coil will occur. You can avoid these duplicate coils by performing processing as
shown below.

(1) Set the operand of the OUT or OUB instruction in the macro to argument P.

R000 R500 R000 P1

(2) Use the argument added by (1) that you specify by the macro call instruction to specify a different
4
internal auxiliary relay per call.

Programming Skills
MCALL MacroA MCALL MacroA
DM0 DM0 R1000
・・・

・・・
P1

MCALL MacroA MCALL MacroA


DM100 DM100 R1001

P1

(3) Add the ladder program to generate using logical OR outside of the macro.

R1000 R500

R1001

 Interlock
In programs, when one party acts, another party cannot act to prevent simultaneous actions by both
parties. This exclusive processing composition mode is called interlock.
Although this is often necessary for actual equipment, its operations are very complicated to explain, so
it is omitted from the sample programs introduced in the KV-7000/5000/3000/1000 Series and KV
Nano Series "Instruction Reference Manuals."

(Example) A circuit that prevents R500 and R501 from being turned ON at the same time

R000 R501 R001 R500

When R000 and R001 turn ON, R500 turns ON.


In this state, even if R002 turns ON, R501 will not
R500 R002 R501 turn ON because the b contact of R500 is inserted.

If you use the bit that is turned ON during module or macro execution, you can easily create an
interlock circuit.
"Bit That Is Turned ON during Macro Execution" (page 4-123)
"Macro System Devices" (page 4-122)

- KV Nano Series(terminal block type) User’s Manual - 4-165


4-11 Programming Skills

 Reducing the scan time


LADDER PROGRAMMING

When the scan time becomes long, the update period of I/O and values becomes long, so the response
of the machines and equipment worsens. Also, if the scan time exceeds 300 ms, a "Scan time over
error" (CPU error number 30) will occur, and it will not be possible to continue operations.
You can reduce the scan time by using the following methods.

 Stopping unnecessary modules


If modules that do not need to operate are being kept in the execution state, use the module

4 instructions (MDSTRT and MDSTOP) to only execute the modules when necessary.
"Module instructions" (page 4-110)
Programming Skills

 Jumping over unnecessary ladder circuit blocks


Enclose ladder circuit blocks that do not need to operate in conditional branches (between CJ or NCJ
and LABEL instructions) or steps (between STP and STE instructions) to only execute the circuit blocks
when necessary.

 Reducing looped content (between FOR and NEXT instructions)


If there are unnecessary parts in the ladder circuit blocks that are repeatedly executed between FOR
and NEXT instructions, the repeated processing time is added to the scan time. Write instructions for
processing that does not need to be executed repeatedly outside of the FOR and NEXT instructions.

Reference The same concept holds when you use the CJ or GOTO instructions to create programs
with looped processing.

 Specifying devices with even numbers to 32-bit and 64-bit processing operands
Use even-numbered devices to specify 16-bit word devices such as DM, W, and TM for the operands of
instructions that process 32-bit or 64-bit data such as those with the .D, .L, .F, or .DF suffix. If you use
two words from an odd number, the processing speed will decrease.

Reference In the same manner, for DM and TM, use even numbers for local devices. During
conversion, even-numbered local devices are always assigned to even-numbered global
devices, and odd-numbered local devices are assigned to odd-numbered global devices.
Therefore, more device areas than those assigned to the module or macro may be used.

 Carefully selecting the type of devices to use


If, instead of a DM device, you specify R, MR, LR, B, or TM devices for the operands of the instruction,
you can make the processing speed faster by at least 0.040 µs. Especially when the operand specifies
a data block leading device, the processing speed increases by 0.040 µs per 2 words.

 Effective use of modules and macros


To organize your programs by using modules and macros effectively, use local devices and local labels
to the maximum extent. Precautions for using local devices are explained below.
• Except for the devices assigned to the KV Nano Series and the expansion units that you are using,
the devices referenced by the connected peripherals (such as touch panels), the devices that will be
shared among the entire project, and the devices that need to transfer data between modules, use all
devices as local devices.
• The first local device is number 0. Use local devices with as small numbers as possible.

4-166 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

• Because R and DM devices are assigned to expansion units, an area that is used as global devices is

LADDER PROGRAMMING
required. Give priority to MR and LR when using local devices.
"4-10 Local Devices" (page 4-134)
For details on local labels, see "Label" (page 4-152).

 Separate usages for index modification and indirect specification


There are two methods for using instruction operands to change the specified devices during operation:
index modification and indirect specification.

<Index modification>
4
Better The specification method is simple.

Programming Skills
Good You cannot change the type of devices that are specified.
Good You cannot use index register Z as a local device.
You can use the "ZPOP" and "ZPUSH" instructions without considering how many
index registers you can use.

<Indirect specification>
Better You can change the type of devices that are specified.
Good The specification method is complicated (to process addresses, you have to use
dedicated instructions).

Unless you want to change the device type, we recommend that you use index modification, which is
easier to handle.
"Modification according to index registers" (page 4-41)

How to Perform Debugging

Eliminating errors in a program is called debugging.


If you use the KV STUDIO monitor function, you can view the state of the KV Nano Series that is
actually connected.
In addition, you can perform more efficient debugging by using the online editor function, which enables
you to edit ladder programs during monitoring.
If you use the simulator function, which enables you to view the operation of a ladder program just from
a PC even if you do not have a KV Nano Series, you can simulate the operation of the KV Nano Series
on the PC to perform debugging.

- KV Nano Series(terminal block type) User’s Manual - 4-167


4-11 Programming Skills

Conversion
LADDER PROGRAMMING

Before you use the monitor or simulator, you have to convert the ladder program that you have created
to a format that can be processed by the KV Nano Series.

On the "Convert" menu, click "Convert."

Alternative procedure • Click .

4 • Ctrl + F9
Programming Skills

Reference • On the "Monitor/Simulator" menu, click "PLC transfer  monitor mode" to automatically
convert and transfer the data and to start the monitor.
• On the "Monitor/Simulator" menu, click "Simulator" to automatically convert the data
and start the simulator.

<If conversion finishes normally>


The message "Conversion end OK" is displayed in the output window.
The usage percentage of the program capacity is displayed in the "Convert result" dialog box.
"Program Capacity" (page 4-11)

<If conversion fails>


The error details are displayed in the output window.
Double click an error to jump directly to the corresponding location. Correct the errors one at a time in
order.

"Key Points to Program Creation" (page 4-159)


"Appendix 1 Error Message Lists" in the "KV STUDIO User's Manual"

Reference On the "Convert" menu, click "Convert individual modules/macros" to convert module and
macro data separately. Use this function in situations such as when there are many errors
and when it is difficult to determine the cause of an error.

Transfer

On the "Monitor/Simulator" menu, click "Transfer to PLC" to transfer the converted ladder program to
the KV Nano Series.

Alternative procedure Click .

4-168 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

LADDER PROGRAMMING
With the default settings, the modules and macros stored on the PLC will not be
Point
deleted when you transfer a program. To delete unused modules when you
transfer programs, select the "Clear module/macro in PLC" check box in the
"Transfer program" dialog box.

Reference On the "Monitor/Simulator" menu, click "PLC transfer  monitor mode" to automatically
convert and transfer the data and to start the monitor.

 Writing data during RUN mode 4


You can write data during RUN mode if the KV Nano Series is in the RUN state when you transfer a ladder

Programming Skills
program.
This function enables you to overwrite the executing ladder program when the KV Nano Series is in the
RUN state. You can make fine operation adjustments and parameter changes without stopping the
device and the production line.
Writing data during RUN mode extends the scan time by a maximum of 2 ms. (So long as there are less
than 5000 changes to timer and counter instructions.)

Select this to write data


during RUN mode.

Depending on the status of the control equipment connected to the KV Nano


CAUTION Series, it may be dangerous to write data during RUN mode. Exercise caution
when executing this function.

 Data that you cannot write during RUN mode


• Projects that are different from the projects stored on the KV Nano Series
• Unit settings
• Execution sequence of modules
• Entire assignment setting of local devices
• Protection setting
• Input capture setting
• Whether interrupts are enabled during instruction execution
• Whether Z1 to Z10 are saved when interrupt programs start
• CPU unit buffer capacity
• Action when error occurs

- KV Nano Series(terminal block type) User’s Manual - 4-169


4-11 Programming Skills

 Conditions under which you cannot write during RUN mode


LADDER PROGRAMMING

• When the number of used local devices has been changed


• When a macro instruction has been added or deleted
• When the sequence of macro instruction calls has been changed
• When macro argument settings have been changed
• When the automatically acquired local work area has been exceeded due to local labels being
added, changed, or deleted or KV scripts being edited

4 Point
• When data finishes being written during RUN mode, even if the execution
condition ON/OFF state changes, differential instructions within the range of
Programming Skills

data written will not be executed.


• Even if you change the set value of a timer or counter and then write the data
during RUN mode, the current values will not have changed when the data
finishes being written.

Monitor

The monitor is used to transfer the ladder program that you have created with the ladder editor to the
KV Nano Series, execute the program, and view the operating status.

You can use the monitor to:


• View the program's operating status in real time with the ladder diagram and real-time chart monitor.
• Switch the operation mode of the KV Nano Series.
• Force the input contacts to turn ON or OFF from the monitor screen by disabling input refreshing and
registering forced sets and resets.
• Easily change the device data and the set and current values of timers and counters.
• Specify the range of data, such as the current value of a device, to save or load the data.
• Return some devices to their initial values.

On the "Monitor/Simulator" menu, click "PLC transfer  monitor mode" to start the monitor. Before you
carry out this process, connect the KV Nano Series and the PC, and configure both devices so that they
can communicate with each other.

Alternative procedure • Click .

• Ctrl + F8

Reference The current status (such as monitor, online editing, or editor) is displayed in the KV
STUDIO title bar.

Use the toolbar or the menus to operate the monitor.

For details on the different functions, see "Chapter 9 MONITOR & SIMULATOR" in the "KV
STUDIO User's Manual."

4-170 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

Online editing

LADDER PROGRAMMING
You can use the online editing function to change ladder programs directly from the KV STUDIO
monitor screen. This function is useful when you want to make on-site adjustments during the final
debugging of program creation and when you want to change simple programs.
While you are monitoring, on the "Monitor/Simulator" menu, click "Start Online Edit" to start online
editing.
The location being edited is displayed in light blue, which enables you to see which cell is being edited
at a glance.
When the program finishes being transferred, the light blue of the location being edited returns to the
4
original background color.

Programming Skills
Alternative procedure • Select "Online edit" from the mode list.

• Click .

• F10

If the online editing function is used while the PLC is in the RUN state, incorrect
operations may cause serious damage to equipment and serious injury to
workers. Thoroughly check the following precautions to ensure correct use of
this function.
• Thoroughly check the area around the equipment, and ensure that no damage
to equipment and injury to workers will arise even if problems occur when you
CAUTION use the function.
• Do not add circuits that operate immediately after the program is transferred
(such as circuits whose execution condition is the B contact). Doing so may
cause the equipment to run out of control.
• If you delete output instructions that have been turned ON (such as OUT) and
then transfer the program, the output will be retained as being turned ON.

Reference When you transfer data during online editing, only the changed circuit blocks are written
to the PLC. However, changed modules and macros are written in their entirety in the
following situations.
• When several modules have been changed.
• When scripts have been edited so that the local work area is exceeded.
• When local labels have been added so that the local work area is exceeded.
• When the program inside of a macro has been edited (the macro is transferred in its
entirety).
• When the number of individual local device assignments has been changed.
• When a macro call has been added.
• When the ENDH instruction has been edited.

For limitations and precautions of writing data during RUN mode, see "Writing data during RUN
mode" (page 4-169).
For details on the online editing function, see "9-9 Online Edit" in the "KV STUDIO User's Manual."

- KV Nano Series(terminal block type) User’s Manual - 4-171


4-11 Programming Skills

Simulator
LADDER PROGRAMMING

The simulator simulates on a PC without connecting the PLC the operation of the ladder programs that
you have created with the ladder editor.
You can use the simulator to:
• View the operating status of the program by using the ladder monitor, registration monitor (time
chart), and batch monitor.
• Perform simulations with various execution methods such as continuous scan/continuous step and

4 single step/single scan.


• Perform efficient debugging by using convenient functions such as reverse step and reverse
Programming Skills

continuous step.
• Easily change the set values and current values of timers, counters, and devices.
• Register forced sets and resets of contacts.
On the "Monitor/Simulator" menu, click "Simulator" to start the simulator.

Alternative procedure • Select "Simulator" from the mode list.

• Click .

• Ctrl + F2

Reference The current status (such as simulator, monitor, or editor) is displayed in the KV STUDIO
title bar.

Use the toolbar or the menus to operate the simulator.

For details on the different functions, see "9-11 Simulator - Executing Simulator" in the "KV
STUDIO User's Manual."

 Differences with the monitor


You can use the simulator to control the operating status to a finer degree than the monitor by using
functions such as single scan execution, single step execution, and single step reverse execution.
Because you can only simulate the operation of the CPU, you cannot check the operation of expansion
units. In addition, there are limits on the operation of some CPU built-in functions and devices.

For details, see "9-11 Simulator - Simulator Restrictions" in the "KV STUDIO User's Manual."

Reference There may be variations in the numeric values of timers because of the performance of
your PC.

4-172 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

Monitor functions

LADDER PROGRAMMING
This section explains the functions that are useful when using the monitor and simulator to debug
efficiently.
For details on how to operate each function, see the "KV STUDIO User's Manual."

 Changing the current value and status of devices


 Bit device ON/OFF
Double-click the cell whose bit device status you want to change. Each time that you double-click, the
4
status will be inverted.

Programming Skills
Alternative procedure Select the cell whose bit device status you want to change, and then press Space .

During monitoring, the contacts and external I/O relays of timers and counters
Point
cannot be turned ON and OFF.

Reference To force an external I/O relay to turn ON or OFF during monitoring, on the "Debug" menu,
click "Forced set/reset register" or "Inhibit input refresh."

 Correct device value window


Select the cell that corresponds to the current value of the device that you want to change, and then
press F2 .

The "Correct device value" window is displayed. If you select multiple cells and then press F2 , all the
devices contained within the selected range are displayed.
You can change the values by entering values in the "Current value" column.

Reference If you select an instruction in which index modification or indirect specification is being
used, the referenced device is displayed.

- KV Nano Series(terminal block type) User’s Manual - 4-173


4-11 Programming Skills

 Register and batch monitors


LADDER PROGRAMMING

To register a device in the Register monitor or Batch monitor, select the instruction that includes the
device you want to monitor. Move the cursor to the edge of the cell until it becomes a " ," and then
drag the cell to the "Register monitor" dialog box.

4
Programming Skills

Reference • If you select multiple cells and drag them all to the dialog box, all the devices contained
within the selected range will be registered.
• You can also enter devices directly in the "Register monitor" dialog box.

 Watch window
This function is used to automatically monitor all the devices that are contained within the circuit block
of the selected cell.
To show and hide this window, on the "Monitor/Simulator" menu, click "Hide/show monitoring window."

 Real time chart monitor


This displays the information of the devices registered in the Register monitor as a time chart.
Right-click the "Register monitor" dialog box, and then click "Real-time Chart Monitor" from the menu
that appears.
You can display previously acquired data and display the values of the selected points.

Alternative procedure On the "Monitor/Simulator" menu, click "Real-time Chart Monitor."


See "9-6 Real-time Chart Monitor" in the "KV STUDIO User's Manual."

4-174 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

 Displaying the assignment destinations of local devices and local labels

LADDER PROGRAMMING
In the monitor or simulator, you can display the local devices and local labels in the ladder program that
you have created as the assignment destination devices that are assigned at the time of conversion.
On the "Tool" menu, click "Option" to display the "Setup option" dialog box. On the "Set display mode"
tab, select the "Display local assign devs during mon" check box.

Programming Skills
Select this check box.

Reference Local labels are assigned to local work areas.


"Assigning local labels" (page 4-153)

 Viewing the execution status of modules and macros


In the monitor or simulator, click the "Monitor" tab at the bottom of the workspace to display the module/
macro monitor, which you can use to view this information.

- KV Nano Series(terminal block type) User’s Manual - 4-175


4-11 Programming Skills

 Monitoring CPU built-in functions


LADDER PROGRAMMING

In the workspace, right-click "KV Nano Series," and then click "Built-in function monitor" in the menu
that appears to display the "Built-in function monitor selection" dialog box. Select the functions that you
want to monitor, and then click "Display" to display a built-in function monitor for each function.

Alternative procedure On the "Monitor/Simulator" menu, click "Built-in Function Monitor".

(Example) Monitoring CPU frequency counters

4
Programming Skills

When using the simulator, there are limits on the operation of some functions and
Point
devices.
For details, see "9-10 Simulator - Simulator Restrictions" in the "KV STUDIO
User's Manual."

 Monitoring instructions
You can monitor the devices used in the PIDAT instructions that are written in the ladder program.
Right-click a PIDAT instruction, and on the menu that appears, click "Command monitor" and then
"PIDAT."
This is useful when monitoring measured values, set values, and other parameters that are used with
PIDs.
Alternative procedure On the "Monitor/Simulator" menu, click "Command monitor," and then "PIDAT."
For details, see "Command monitor" in the "KV STUDIO User's Manual."

 Monitoring rising and falling edges of devices


Right-click the instruction that includes the device you want to monitor, and then click "Derivation
monitor" in the menu that appears.
Alternative procedure On the "Debug" menu, click "Derivation monitor."
For details, see "Derivation monitor" in the "KV STUDIO User's Manual."

4-176 - KV Nano Series(terminal block type) User’s Manual -


4-11 Programming Skills

 Monitoring the execution time in units of modules, macros, and interrupt

LADDER PROGRAMMING
programs (Performance monitor)
You can monitor the execution time of the module, macro, or interrupt program that is currently being
executed.

1 Switch to monitor mode. On the "Debug" menu, click "Performance monitor."

Programming Skills
 Monitoring expansion units
In the workspace, right-click an expansion unit, and then click "Unit Monitor" in the menu that appears
to display the unit monitor.
Alternative procedure • On the "View" menu, click "Unit Monitor."

• When you are monitoring from the Unit Editor, you can display the unit monitor by
right-clicking a unit and clicking the appropriate menu item in the menu that appears.

(Example) KV-N3AM

Point This cannot be displayed when you are using the simulator.

- KV Nano Series(terminal block type) User’s Manual - 4-177


4-11 Programming Skills

MEMO
LADDER PROGRAMMING

4
Programming Skills

4-178 - KV Nano Series(terminal block type) User’s Manual -


5

CPU BUILT-IN FUNCTIONS


CPU BUILT-IN
FUNCTIONS
This chapter describes the functions that you can implement by using the KV
Nano Series base unit and items such as expansion access window
cassettes, the communication ports, I/O, and high-speed counters.

5-1 Overview of Built-In Functions ................................. 5-2


5-2 Motor (Positioning) Control ...................................... 5-4
5-3 Specified Frequency Pulse Output......................... 5-95
5-4 High-Speed Counter............................................... 5-98
5-5 Frequency Counter .............................................. 5-156
5-6 Cam Switch .......................................................... 5-163
5-7 Tracing ................................................................. 5-177
5-8 USB Communication............................................ 5-192
5-9 Serial Communication .......................................... 5-193
5-10 I/O ........................................................................ 5-197
5-11 Access Window.................................................... 5-202
5-12 Clock Function ..................................................... 5-251

- KV Nano Series(terminal block type) User’s Manual - 5-1


5-1 Overview of Built-In Functions
This section describes the built-in functions that you can use with the base unit.
CPU BUILT-IN FUNCTIONS

What You Can Do with the Built-In Functions

Built-In I/O
Motor control of multiple axes Using rotation positioning to control
• "Motor (Positioning) Control" (page 5-4) output
• "High-Speed Counter" (page 5-98) • "Cam Switch"
(page 5-163)

5 Reset switch,
stop sensor, etc.

Y1 axis
Overview of Built-In Functions

motor driver Encoder


X1 axis
motor driver X1 axis
motor
Y1 axis Slide table
motor

Fixed-speed rotation control, such as with spin


coaters
• "Specified Frequency Pulse Output" (page 5-95)
• "Frequency Counter" (page 5-156) Base unit

Built-In Tracing
Function

Improved debugging efficiency


• "Tracing" (page 5-177)
Built-In
• Real time chart monitor
"KV STUDIO User's Manual"
Communication Ports
Communication with PCs
• "USB Communication"
(page 5-192)
• "Serial Communication"
(page 5-193)

5-2 - KV Nano Series(terminal block type) User’s Manual -


5-1 Overview of Built-In Functions

Built-In Communication Ports + Extension Serial


Communication Cassette

CPU BUILT-IN FUNCTIONS


Function for communicating with HMI Modbus function to connect to temperature
• "Serial Communication" (page 5-193) controllers, etc.
"Serial Communication" (page 5-193)

Temperature 5
controller

Overview of Built-In Functions


Data link among base units (requires the KV-N11L)
• "Serial Communication" (page 5-193)

Extension Access Window Cassette

Increase in device production Device value monitoring


• "Access Window" (page 5-202) • "Access Window" (page 5-202)
• "Load and Save" (page 5-230) • "Device Mode" (page 5-206)

- KV Nano Series(terminal block type) User’s Manual - 5-3


5-2 Motor (Positioning) Control
The transistor output type KV Nano Series can output pulses, which are not affected by scan times, to
stepping motors and servo motors to control positioning of two to four axes (this varies depending on
the units).
CPU BUILT-IN FUNCTIONS

Reference The positioning function cannot be used with relay output type base units.

Overview of Motor (Positioning) Control

You can use the built-in positioning function of the KV Nano Series to perform the following operations.

5  Positioning control with relative or absolute coordinates specified


"Operation mode" (page 5-9)
Motor (Positioning) Control

 Speed control in which the frequency of the output pulses is specified


"Operation mode" (page 5-9)

 Changes the target coordinate during positioning execution


Changes the positioning target coordinate

 Changes the speed during positioning execution


"Changing the speed during operation" (page 5-40)

 Changes the pulse output mode to match the motor


1-pulse and 2-pulse (page 5-20)

 Positioning to the coordinate specified by JOG operation


"Teaching" (page 5-58)

 Positioning control while changing the target coordinate by the ladder program
"Reference example of specifying the point parameters directly and starting the positioning operation"
(page 5-87)

 Stopping at the specified position after receiving stop sensor input


"Travel after stop sensor input" (page 5-13)

 Output according to comparator matching


"Comparator settings" (page 5-33)

5-4 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

Positioning Control Specifications

CPU BUILT-IN FUNCTIONS


Item Specification
Positioning control (P to P), speed control
Control method
"Operation mode" (page 5-9)
KV-N14*T(P) and KV-N24*T(P): 2
Number of axes controlled KV-N40*T(P): 3
KV-N60*T(P): 4
Number of positioning
20/axis (all axes are independent)*
points
Position instruction -2147483648 to 2147483647 (relative or absolute)
Speed instruction
Acceleration rate and
1 to 100 kHz (in units of 1 Hz)
Acceleration and deceleration can be set independently
5
deceleration rate 0 to 65535 Hz/ms (this cannot be set according to time)

Motor (Positioning) Control


Starting time 50 µs
Pulse output format NPN transistor output, 1-pulse or 2-pulse can be selected
PSTRT (positioning operation), ORG (origin returning operation), JOG (jog),
Dedicated instructions TCH (teaching), HOME (travel to home position), CHGSP (change speed),
CHGTGT (change target coordinate), RFSPS (refresh current values)
Change speed, change deceleration rate, change target coordinate, stop sensor
Other functions
(speed  position control)
* Parameters are stored in control memory (CM). By using programs to change values, you can manage 21
positioning points or more.

Positioning Control Mechanism

After you configure settings such as the target coordinate (number of pulses), the starting speed, the
operating speed, and the deceleration rate, positioning control is performed using a trapezoidal time
chart such as the one shown below.
Frequency (Hz)

Acceleration rate
Operating speed
Deceleration rate

Starting speed
(stopping speed)
Target coordinate/travel
(number of output pulses)

Time (ms)
Acceleration time Deceleration time

- KV Nano Series(terminal block type) User’s Manual - 5-5


5-2 Motor (Positioning) Control

Positioning Control Procedure


CPU BUILT-IN FUNCTIONS

The procedure to follow to perform positioning control is shown below.

(1) Configure the initial settings "Setting Parameters" (page 5-6)


of the parameter.

(2) Create the ladder program.


"Creating Ladder Programs" (page 5-35)
"List of Positioning Instructions" (page 5-45)

5
"Reference Example of Positioning Control" (page 5-
(3) Execute the program.
78)
Motor (Positioning) Control

No Do you want to
change the parameter details "Lists of Devices and Error Codes for Positioning"
during execution? (page 5-88)
"Changing the speed during operation" (page 5-40)
Yes "Reference example of changing speed during
operation" (page 5-82)
Change the parameter.
"Reference example of executing positioning control
with more than 21 points" (page 5-86)

Setting Parameters

Parameters are divided into two types: point parameters and system parameters.
To set parameters, use "Set CPU positioning parameters" in KV STUDIO.
On the "Tool" menu, click "Set CPU positioning parameters."

Other
method Click .
Right-click in the ladder editing window, and select "Set CPU positioning parameters" from the menu.

Point parameters
Point parameters, such as the travel target point (position), operating and starting speed, and
deceleration time, are the basic parameters for trapezoidal control.
"How to use the menu" (page 5-7)

System parameters
System parameters are used to set the sensor input, pulse output, comparator, origin returning
operation, and JOG operation.
"I/O settings" (page 5-15)
"Comparator settings" (page 5-33)
"Origin returning operation" (page 5-22)
"JOG settings" (page 5-31)

Control memory (CM) entries are used to manage all parameters. You can also change parameters
during operation by using ladder programs to rewrite values.
To save changed parameters in the case of power outages, you have to set "Power off holding" to
"Hold" in the CPU system setting window.

5-6 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

How to use the menu

CPU BUILT-IN FUNCTIONS


(2) Display (4) Help
(1) Edit (3) Monitor

(5) Apply button

(6) Show
assignment
button
(7) Show
column
button
(8) Monitor
button 5

Motor (Positioning) Control


Function Name Description
Click this to select functions to use while setting parameters.
• In editor (online editing) mode
Undo Ctrl + Z
Redo Ctrl + Y
(1) Edit
Copy Ctrl + C
Paste Ctrl + V
• In monitor mode
Copy Ctrl + C
Click this to select display functions.
Show assignment Ctrl + M ..... Clicking this performs the same function as
clicking the "Show assignment" button.
Set column display Ctrl + P ..... Clicking this performs the same function as
(2) Display
clicking the "Show column" button.
(This is only available when you are editing
point parameters.)
Initialize column width .................... Click this to initialize the column width.
Click this to select monitor functions. (This is only available in monitor—online
(3) Monitor editing—mode.)
When you select the axis number, the built-in function monitor starts.
(4) Help Click this to display the manual for setting the CPU positioning parameters.
Click this to apply the changed parameters to the ladder program.
(* Parameters changes are not applied to the base unit when you click the Apply
(5) Apply button button. Use the PLC transfer function or the online editing transfer function to
apply the changes to the base unit.) When configuring CPU positioning
parameter settings, you can use " Ctrl + S " as a shortcut for the Apply button.)
Show assignment Click this button to switch between the parameter value display and the storage
(6)
button position (control memory) display.
Show column Click this to show and hide the parameter column.
(7)
button (This is only available when you are editing point parameters.)
When you click this button and select an axis, the built-in function monitor starts.
(8) Monitor button
(This is only available in monitor—online editing—mode.)

- KV Nano Series(terminal block type) User’s Manual - 5-7


5-2 Motor (Positioning) Control

Point parameters
(1) Point number (6) Deceleration rate [Hz/ms]
CPU BUILT-IN FUNCTIONS

(2) Axis number (7) Operating speed [Hz]


(3) Operation mode (8) Stop sensor setting

(4) Target coordinate/travel [PLS] (9) Travel after stop sensor input [PLS]
(5) Acceleration rate (10) Comment
[Hz/ms]

5
Motor (Positioning) Control

Default
Function Name Setting Range See Page
Value
(1) Point number 1 to 20 5-9
KV-N14*T(P) and KV-N24*T(P): 2
KV-N40*T(P): 3
(2) Axis number KV-N60*T(P): 4 5-9
* You can also hide this information by
clearing the check boxes.
Positioning INC
Positioning ABS Positioning
(3) Operation mode 5-9
Speed control CW INC
Speed control CCW
Target coordinate/travel
(4) -2147483648 to 2147483647 0 5-11
[PLS]
(5) Acceleration rate [Hz/ms] 0, 1 to 65535 10 5-11
(6) Deceleration rate [Hz/ms] 0, 1 to 65535 10 5-11
(7) Operating speed [Hz] 1 to 100,000 1000 5-12
(8) Stop sensor setting Enabled, disabled Disabled 5-12
0 to 65535
Travel after stop sensor
(9) (This can only be set when the stop sensor 0 5-13
input [PLS]
setting is enabled.)
Up to 32 single-byte characters (16 double-
byte characters)
* If you specify the point number in the
operands of a KV STUDIO positioning
instruction, the set comment will be
(10) Comment
displayed on the ladder diagram.
Also, when you are using the RT editing
function, comments are displayed in the
entry completion candidates of the point
number operand.

5-8 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

Setting Storage Position


Point Number
Axis 1 Axis 2 Axis 3 Axis 4

CPU BUILT-IN FUNCTIONS


1 CM8000 to CM8009 CM8200 to CM8209 CM8400 to CM8409 CM8600 to CM8609
2 CM8010 to CM8019 CM8210 to CM8219 CM8410 to CM8419 CM8610 to CM8619
3 CM8020 to CM8029 CM8220 to CM8229 CM8420 to CM8429 CM8620 to CM8629
4 CM8030 to CM8039 CM8230 to CM8239 CM8430 to CM8439 CM8630 to CM8639

Click to switch to the storage position display.


"Lists of Devices and Error Codes for Positioning" (page 5-88)

Reference • The set parameters are stored in control memory (CM) entries of the CPU.
• You can display only the parameters of the required axes by selecting and clearing the
appropriate axis display check boxes.
5

Motor (Positioning) Control


 Point number
This is used as an operand of PSTRT instructions. It can also be specified according to the device.

Execution PSTRT
condition
Unit number Axis number Point number
#0 #1 #2

When the above ladder program is executed, the pulse will be generated according to the point
parameters of point number 2 of axis number 1.
"PSTRT Instructions" (page 5-46)

 Operation mode
Position control (Positioning INC and Positioning ABS) moves an object from a certain position to a
target value or by the specified travel amount.
Speed control (Speed control CW and Speed control CCW) moves an object in the specified direction
until the stop sensor turns on.

 Positioning INC
In this mode, relative coordinates are used for position control.
The distance from an object's current position to the travel target point is specified as the travel. For
example, in the following figure, to move the object at A to B, specify a value of +100 for the travel.
Next, to move the object from B to C, specify a value of +200. To return the object from C to B, specify
a value of -200.
If the current position overflows, the warning relay will be turned ON. However, pulse output will not be
stopped.
"Lists of Devices and Error Codes for Positioning" (page 5-88)
A B C

+100 +200

-200

Current Coordinate
position 0 (origin) 100 200 300

- KV Nano Series(terminal block type) User’s Manual - 5-9


5-2 Motor (Positioning) Control

 Positioning ABS
In this mode, absolute coordinates are used for position control.
CPU BUILT-IN FUNCTIONS

The distance from the origin to the travel target point is specified as the target value. For example, in
the following figure, to move the object at A to B, specify a value of +100 for the target value. Next, to
move the object from B to C, specify a value of +300. To return the object from C to B, specify a value
of +100.
If you execute this type of positioning when the warning relay is turned ON, an error will occur and
pulse output will be stopped.
"Lists of Devices and Error Codes for Positioning" (page 5-88)

A B C

5 100 300

100
Motor (Positioning) Control

Current Coordinate
position 0 (origin) 100 200 300

 Speed control CW
In this mode, regardless of the number of pulses to be generated, pulses are continuously generated in
the CW (clockwise) direction at the specified speed.

Speed
CW

Time
CCW

 Speed control CCW


In this mode, regardless of the number of pulses to be generated, pulses are continuously generated in
the CCW (counter-clockwise) direction at the specified speed.
CW
Time

CCW
Speed

Reference Parameter storage position: Parameters are stored in bit 0 and bit 1 of CM8006 + ((point
number - 1) × 10) + ((axis number - 1) × 200), as shown below.

bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 bit1 bit0 Setting Details


0 0 Positioning INC
0 1 Positioning ABS
1 0 Speed control CW
1 1 Speed control CCW

5-10 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

 Target coordinate/travel
The travel target point is called the target coordinate or the travel.

CPU BUILT-IN FUNCTIONS


If you have set "Operation mode" to "Positioning ABS," this is the target coordinate. If you have set
"Operation mode" to "Positioning INC," this is the travel. If you have selected "Speed control CW" or
"Speed control CCW", you cannot set this value.
Frequency (Hz)
Target coordinate/travel (number of output pulses)

Operating speed

Starting speed
(stopping speed) 5

Motor (Positioning) Control


Time (ms)
Acceleration time Deceleration time

Setting range : -2147483648 to 2147483647


Parameter storage position : Upper 16 bits: CM8001 + ((point number - 1) × 10) +
((axis number - 1) × 200)
Lower 16 bits: CM8000 + ((point number - 1) × 10) +
((axis number - 1) × 200)

 Acceleration rate and deceleration rate


Acceleration rate : The rate at which the speed increases from the starting speed to the operating
speed. The higher the value, the faster the acceleration will become, and the
shorter the travel time will be.
Deceleration rate : The rate at which the speed decreases from the operating speed to the stopping
speed. The higher the value, the faster the deceleration will become, and the
shorter the travel time will be.
The acceleration rate and deceleration rate can be set separately.

Speed
Setting range : 0 (to start at the operating
speed or to stop Operating
suddenly), 1 to 65535 speed
(Hz/ms)
0 Time
If you specify 0, the
operation during acceleration or deceleration will be as shown in the
chart to the right.
Parameter storage position : Acceleration rate: CM8002 + ((point number - 1) × 10) +
((axis number - 1) × 200)
Deceleration rate: CM8003 + ((point number - 1) × 10) +
((axis number - 1) × 200)

Reference You cannot configure settings based on the acceleration time or deceleration time.

- KV Nano Series(terminal block type) User’s Manual - 5-11


5-2 Motor (Positioning) Control

 Operating speed
This specifies the speed of the pulses to be output to the motor during operation.
CPU BUILT-IN FUNCTIONS

Setting range : 1 to 100000 (Hz; specify a value that is greater than or equal to the
starting operating speed)
Parameter storage position : Upper 16 bits: CM8005 + ((point number - 1) × 10) +
((axis number - 1) × 200)
Lower 16 bits: CM8004 + ((point number - 1) × 10) +
((axis number - 1) × 200)

5 "Operation startup speed" (page 5-14)

(1)If the starting operating speed and the operating speed are equivalent, the
Motor (Positioning) Control

Point
operation will be as shown in the following chart.
Speed

Starting speed
(stopping speed)

0 Time

In this situation, the acceleration rate and deceleration rate are ignored.
(2)Trapezoidal control over a short time period (over a short distance) will be as
shown in the following charts.
Speed Speed

Operating Operating
speed speed
Deceleration rate Deceleration rate
Starting Acceleration rate Starting Acceleration rate
operating speed operating speed

0 Time 0 Time

With trapezoidal control, the acceleration rate and deceleration rate are
always controlled to uniform values.
Therefore, during trapezoidal control over a short time period, the speed is
decreased before it reaches the operating speed.

 Stop sensor setting


Use this setting to specify whether to use a stop sensor.
Disabled ...No stop sensor will be used.
Enabled ....Pulse output is stopped after the number of pulses specified by the travel after stop sensor
input is received are generated.

Parameter storage position : Parameters are stored in bit 4 of CM8006 + ((point number - 1) × 10) +
((axis number - 1) × 200), as shown below.
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
bit4 Setting Details
0 Disabled
1 Enabled

5-12 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

 Travel after stop sensor input


When the stop sensor setting is enabled, pulse output is stopped after the number of pulses that you

CPU BUILT-IN FUNCTIONS


specify with "Travel after stop sensor input."

Speed Stop sensor input turns ON


Deceleration

Travel after input

If you specify 0, pulse output will be stopped immediately when the stop sensor input turns ON.
The deceleration rate is ignored.
5

Motor (Positioning) Control


Speed Stop sensor input turns ON

Immediate stop

If you specify 65535 (the maximum value), when the stop sensor input turns ON, the speed is
decelerated according to the deceleration rate, and pulse output is stopped after the starting speed is
reached.

Speed Stop sensor input turns ON

Deceleration rate

Setting range : 0 to 65534, 65535 (decrease the speed according to the deceleration
rate and then stop pulse output)
Parameter storage position : CM8008 + ((point number - 1) × 10) + ((axis number - 1) × 200)

- KV Nano Series(terminal block type) User’s Manual - 5-13


5-2 Motor (Positioning) Control

Point common setting


CPU BUILT-IN FUNCTIONS

(1) Operation startup speed [Hz]

5
Function Name Setting Range Default Value See Page
Motor (Positioning) Control

(1) Operation startup speed [Hz] 0 to 65535 200 5-14

 Operation startup speed


When you are performing positioning control, set the starting output pulse speed to ensure that the
motor starts rotating smoothly.
Setting range : 0 to 65535 (Hz; however, specify a value that is less than or equal to the
operating speed)
Parameter storage position : CM8808 + ((axis number - 1) × 40)

Reference • Set the starting operating speed separately for each axis. For details on changing the
value for each point parameter, see "Reference example of specifying the point
parameters directly and starting the positioning operation" (page 5-87).
• You can display only the parameters of the required axes by selecting and clearing the
appropriate axis display check boxes.

5-14 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

I/O settings

CPU BUILT-IN FUNCTIONS


(1) Origin sensor input (5) Z-PHASE input (9) Limit switch CCW input
(2) Origin sensor polarity (6) Z-PHASE polarity (10) Limit switch CCW polarity
(3) Stop sensor input (7) Limit switch CW input (11) Select output type
(8) Limit switch CW polarity (12) Output pulse during
(4) Stop sensor polarity
forward operation

Motor (Positioning) Control


 KV-N14*T and KV-N24*T

See
Function Name Setting Range Default Value Page
Origin sensor
Axis 1 CR8014, R000, R001, R002, R003*1 R000
(1) Input 5-17
Axis 2 CR8114, R000, R001, R002, R003*1 R002*2
(2) Polarity NO (A contact), NC (B contact) NO (A contact)
Stop sensor
Axis 1 CR8015, R000, R001, R002, R003*1 R001*3
(3) Input 5-17
Axis 2 CR8115, R000, R001, R002, R003*1 R003*4
(4) Polarity NO (A contact), NC (B contact) NO (A contact)
Z-phase
Axis 1 R010 (fixed) R010*5
(5) Input 5-18
Axis 2 R011 (fixed) R011*6
(6) Polarity NO (A contact), NC (B contact) NO (A contact)
Limit switch CW
Axis 1 CR8012 (fixed) CR8012
(7) Input 5-18
Axis 2 CR8112 (fixed) CR8112
(8) Polarity NO (A contact), NC (B contact) NO (A contact)
Limit switch CCW
Axis 1 CR8013 (fixed) CR8013
(9) Input 5-18
Axis 2 CR8113 (fixed) CR8113
(10) Polarity NO (A contact), NC (B contact) NO (A contact)
(11) Select output type 1-pulse, 2-pulse 1-pulse
Output pulse during forward
(12) Forward pulse, Reverse pulse Forward pulse
operation
*1 You cannot specify R002 and R003 on the KV-N14*T.
*2 R001 on the KV-N14*T
*3 CR8015 on the KV-N14*T
*4 CR8115 on the KV-N14*T
*5 R002 on the KV-N14*T
*6 R003 on the KV-N14*T

- KV Nano Series(terminal block type) User’s Manual - 5-15


5-2 Motor (Positioning) Control

 KV-N40*T and KV-N60AT

See
CPU BUILT-IN FUNCTIONS

Function Name Setting Range Default Value


Page
Origin sensor
Axis 1 CR8014, R000, R001, R002, R003 R000
Axis 2 CR8114, R000, R001, R002, R003 R002
(1) Input 5-17
Axis 3 CR8214, R004, R005, R006*2, R007*2 R004
Axis 4*1 CR8314, R004, R005, R006*2, R007*2 R006
(2) Polarity NO (A contact), NC (B contact) NO (A contact)
Stop sensor
Axis 1 CR8015, R000, R001, R002, R003 R001
5 (3) Input
Axis 2 CR8115, R000, R001, R002, R003 R003
5-17
Axis 3 CR8215, R004, R005, R006*2, R007*2 R005
Motor (Positioning) Control

Axis 4*1 CR8315, R004, R005, R006*2, R007*2 R007


(4) Polarity NO (A contact), NC (B contact) NO (A contact)
Z-phase
Axis 1 R104 (fixed) R104
Axis 2 R105 (fixed) R105
(5) Input 5-18
Axis 3 R106 (fixed) R106
Axis 4*1 R107 (fixed) R107
(6) Polarity NO (A contact), NC (B contact) NO (A contact)
Limit switch CW
Axis 1 CR8012 (fixed) CR8012
Axis 2 CR8112 (fixed) CR8112
(7) Input 5-18
Axis 3 CR8212 (fixed) CR8212
Axis 4*1 CR8312 (fixed) CR8312
(8) Polarity NO (A contact), NC (B contact) NO (A contact)
Limit switch CCW
Axis 1 CR8013 (fixed) CR8013
Axis 2 CR8113 (fixed) CR8113
(9) Input
Axis 3 CR8213 (fixed) CR8213
Axis 4*1 CR8313 (fixed) CR8313
(10) Polarity NO (A contact), NC (B contact) NO (A contact)
(11) Select output type 1-pulse, 2-pulse 1-pulse 5-20
Output pulse during forward
(12) Forward pulse, Reverse pulse Forward pulse 5-21
operation
*1 You cannot use axis 4 on the KV-N40*T.
*2 You cannot specify R006 and R007 on the KV-N40*T.

Reference You can display only the parameters of the required axes by selecting and clearing the
appropriate axis display check boxes.

5-16 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

 Origin sensor
The origin is the position that is used as the reference for position control. Attach the origin sensor at

CPU BUILT-IN FUNCTIONS


the position that you want to use as the axis origin.

CR8*14 (control relay)......Control relay CR8*14 will be set as the origin sensor.
R000 to R007 ...................The input relays will be set as the origin sensors.
NO, NC.............................The logic of the origin sensor input will be set to the value that you specify.

If you specify R000 to R007, the set input is used as the origin sensor input to the origin returning
operation.
To use input other than the R000 to R007 relays as the origin sensor input, set this parameter to control
relay CR8*14, and then use a ladder program to turn control relay CR8*14 ON and OFF.
5

Motor (Positioning) Control


Example
Using input relay R1000 as the origin
R1000 CR8014
sensor input of axis 1

Parameter storage position: Parameters are stored in CM8800 and CM8801.


CM8800 settings: "I/O setting details" (page 5-90)
CM8801 settings: "Sensor enable details" (page 5-91)

 Stop sensor
During operation, the moving object travels to the stop sensor position. If the stop sensor is ON, the
moving object will decelerate and stop immediately from this position or continue to travel a certain
distance (the travel after stop sensor input), then decelerate and stop.
However, if no stop sensor is specified in the point parameters, input from the stop sensor will be
ignored.

CR8*15 (control relay)......Control relay CR8*15 will be set as the stop sensor.
R000 to R007 ...................Input relays R000 to R007 will be set as the stop sensors.
NO, NC.............................The logic of the stop sensor input will be set to the value that you specify.

If you specify R000 to R007, the set input is used as the stop sensor input to stop travelling.
To use input other than the R000 to R007 as the stop sensor input, set this parameter to control relay
CR8*15, and then use a ladder program to turn control relay CR8*15 ON and OFF.

Example
Using input relay R1001 as the stop
R1001 CR8015
sensor input of axis 1

Parameter storage position: Parameters are stored in CM8800 and CM8801.


CM8800 settings: "I/O setting details" (page 5-90)
CM8801 settings: "Sensor enable details" (page 5-91)

- KV Nano Series(terminal block type) User’s Manual - 5-17


5-2 Motor (Positioning) Control

 Z-phase
The Z-phase is used to improve the position accuracy after origin returning operations complete. This is
CPU BUILT-IN FUNCTIONS

output to standard encoders once per revolution.


By confirming the Z-phase, you can perform origin returning operations that are not affected by the
variations of origin sensors.

The Z-phase input terminal is fixed for each base unit and each axis. You cannot change this terminal.
NO, NC............................ The logic of the Z-phase input will be set to the value that you specify.

Parameter storage position: Parameters are stored as shown below.

5 Axis
Storage
Destination
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
bit12 Setting Details
Axis 1 CM8801 0 NO (normally open: A contact)
Motor (Positioning) Control

Axis 2 CM8841 1 NC (normally closed: B contact)


Axis 3 CM8881
Axis 4 CM8921

 Limit switch CW and Limit switch CCW


For safety, attach limit switches to bodies that move on the axis and to both ends of moving workpieces.

CR8*12, CR8*13 (control relays) .......Control relays CR8*12 and CR8*13 will be set as the limit
switches.
You cannot set the input relays as the limit switch.
NO, NC...............................................The logic of limit switch input will be set to the value that you
specify.

The limit switch that is installed on the end in the CW direction is called limit switch CW.
Travel in the CW direction

CCW direction CW direction


· Forward rotation
(in the direction that increases from the current coordinate)
Stop sensor

Limit switch CW

The limit switch that is installed on the end in the CCW direction is called limit switch CCW.
Travel in the CCW direction

CCW direction CW direction


· Reverse rotation
(in the direction that decreases from the current coordinate)
Stop sensor

Limit switch CW

Use the input relays that are actually connected to the limit switches to turn control relays CR8*12 and
CR8*13 ON and OFF.

5-18 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

Parameter storage position: Parameters are stored as shown below.

Limit switch CW polarity CR8012 (axis 1), CR8112 (axis 2), CR8212 (axis 3), CR8312 (axis 4)

CPU BUILT-IN FUNCTIONS


Storage bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axis Destination bit8 Setting Details
Axis 1 CM8801 0 NO (normally open: A contact)
Axis 2 CM8841 1 NC (normally closed: B contact)
Axis 3 CM8881
Axis 4 CM8921

Limit switch CCW polarity CR8013 (axis 1), CR8113 (axis 2), CR8213 (axis 3), CR8313 (axis 4)

Axis
Storage
Destination
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
bit9 Setting Details 5
Axis 1 CM8801 0 NO (normally open: A contact)

Motor (Positioning) Control


Axis 2 CM8841 1 NC (normally closed: B contact)
Axis 3 CM8881
Axis 4 CM8921

Example
Using input relay R1002 as limit switch R1002 CR8012
CW of axis 1 and input relay R1003 as
limit switch CCW of axis 1
R1003 CR8013

When a limit switch is turned ON, a limit error (error code 31, 32, or 33) occurs and the workpiece
decelerates and stops. Remove the cause of the error, and use the error clear relay CR8*02 to clear the
error status.

• For safety reasons, use NC (normally closed) limit switches whenever possible.
If you use NO (normally open) limit switches, the switch will not operate in the
event of breaks in the line, which is very dangerous.
• After positioning equipment is installed, be sure to verify that limit switches
NOTICE
operate normally.
• To prevent objects from crossing the limit switch in the event that motors
decelerate and stop, the near-point detector of the limit switch must be
sufficiently wide.

- KV Nano Series(terminal block type) User’s Manual - 5-19


5-2 Motor (Positioning) Control

 Select output type


Select the output type. The relays that are output differ between the different units and between the
CPU BUILT-IN FUNCTIONS

axes.
Base Unit Axis 1 Axis 2 Axis 3 Axis 4
KV-N14*T(P) R500 and R501 R502 and R503 - -
KV-N24*T(P) R500 and R501 R502 and R503 - -
KV-N40*T(P) R500 and R501 R502 and R503 R504 and R505 -
KV-N60AT(P) R500 and R501 R502 and R503 R504 and R505 R506 and R507

1-pulse..............................The output format is set to 1-pulse mode.


2-pulse..............................The output format is set to 2-pulse mode.

5 Parameter storage position: Parameters are stored as shown below.


Motor (Positioning) Control

Storage bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axis Destination bit0 Setting Details
Axis 1 CM8814 0 1-pulse mode
Axis 2 CM8854 1 2-pulse mode
Axis 3 CM8894
Axis 4 CM8934

Connection example
(1-pulse mode) (2-pulse mode)

Pulse Axis 1 Forward rotation pulse Axis 1


Axis R500 Motor Axis R500 Motor
1 Rotation direction 1 Reverse rotation pulse
R501 driver R501 driver

Pulse Axis 2 Forward rotation pulse Axis 2


Axis R502 Motor Axis R502 Motor
2 Rotation direction 2 Reverse rotation pulse
R503 driver R503 driver

Pulse Axis 3 Forward rotation pulse Axis 3


Axis R504 Motor Axis R504 Motor
3 Rotation direction 3 Reverse rotation pulse
R505 driver R505 driver

Pulse Axis 4 Forward rotation pulse Axis 4


Axis R506 Motor Axis R506 Motor
4 Rotation direction 4 Reverse rotation pulse
R507 driver R507 driver

* You cannot use axis 3 and axis 4 on the KV-N14*T and KV-N24*T.
You cannot use axis 4 on the KV-N40*T.

5-20 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

 Output pulse during forward operation


Set the pulse to output during normal direction operation.

CPU BUILT-IN FUNCTIONS


Forward pulse.............Forward rotation pulses in reference to the normal direction (the direction in
which coordinates increase) are output.
Reverse pulse ............Reverse rotation pulses in reference to the normal direction (the direction in
which coordinates increase) are output.

1-pulse mode
Forward rotation pulse Reverse-rotation pulse
Increased by 1 Decreased by 1 Increased by 1 Decreased by 1
Pulse
Rotation
OFF  ON

ON
OFF  ON

OFF
Pulse
Rotation
OFF  ON

OFF
OFF  ON

ON
5
direction direction

Motor (Positioning) Control


2-pulse mode
Forward rotation pulse Reverse-rotation pulse
Increased by 1 Decreased by 1 Increased by 1 Decreased by 1
Forward Forward
OFF  ON OFF OFF OFF  ON
rotation (CW) rotation (CW)
Reverse Reverse
OFF OFF  ON OFF  ON OFF
rotation (CCW) rotation (CCW)

Reference "ON" and "OFF" in the above tables refer to the output transistor logic output.

Parameter storage position: Parameters are stored as shown below.


Storage bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axis destination bit0 Setting details
Axis 1 CM8814 0 Forward pulse
Axis 2 CM8854 1 Reverse pulse
Axis 3 CM8894
Axis 4 CM8934

- KV Nano Series(terminal block type) User’s Manual - 5-21


5-2 Motor (Positioning) Control

Origin returning operation


CPU BUILT-IN FUNCTIONS

If a power outage occurs during positioning, and if the axes are moved manually while the power is off,
the position of the object recorded by the KV Nano Series and the object's actual position will be
different.
By performing an origin returning operation, you can match the actual origin and the internal current
position (the current value).
(1) Starting speed [Hz] (4) Operating speed [Hz] (7) Clear deviation counter
(5) Origin return
(2) Acceleration rate [Hz/ms] direction (8) Automatic home position
(3) Deceleration rate [Hz/ms] (6) Origin return method (9) Home coordinate setting value

5
Motor (Positioning) Control

See
Function Name Setting Range Default Value
Page
(1) Starting speed [Hz] 1 to 65535 200 5-22
(2) Acceleration rate [Hz/ms] 0, 1 to 65535 10 5-22
(3) Deceleration rate [Hz/ms] 0, 1 to 65535 10 5-22
(4) Operating speed [Hz] 1 to 100000 1000 5-23
(5) Origin return direction CW, CCW CCW 5-24
Origin sensor up edge
Medium point of the origin sensor
Origin sensor and Z-phase Origin sensor up
(6) Origin return method 5-24
Dog type (Z-phase not used) edge
Dog type (Z-phase used)
Dog type (press-against)
(7) Clear deviation counter Output, No output No output 5-25
(8) Automatic home position Move, Not move Not move 5-24
(9) Home coordinate setting value -2147483648 to 2147483648 0 5-26

 Starting speed
Set the starting output pulse speed for origin returning and home position operations.

Setting range : 1 to 65535 (however, specify a value that is less than or equal to the
operating speed)
Parameter storage position : Axis 1 CM8809
Axis 2 CM8849
Axis 3 CM8889
Axis 4 CM8929

 Acceleration and deceleration rates


Acceleration rate : The rate at which the speed increases from the starting speed to the operating
speed. The higher the value, the faster the acceleration will become, and the shorter
the travel time will be. If you specify 0, the starting speed will be the same as the
operating speed.
Deceleration rate: The rate at which the speed decreases from the operating speed to the starting
speed. The higher the value, the faster the deceleration will become, and the shorter
the travel time will be. If you specify 0, operations will stop immediately.
5-22 - KV Nano Series(terminal block type) User’s Manual -
5-2 Motor (Positioning) Control

On the KV Nano Series, you can set the acceleration rate and the deceleration rate to separate values.
Setting range : 0 (to start at the operating speed or to stop suddenly),
1 to 65535

CPU BUILT-IN FUNCTIONS


Parameter storage position :
Acceleration Rate Deceleration Rate
Axis 1 CM8810 CM8811
Axis 2 CM8850 CM8851
Axis 3 CM8890 CM8891
Axis 4 CM8930 CM8931

Reference You cannot configure settings based on the acceleration time or deceleration time.

 Operating speed 5
Set the speed of the pulse to output to the motor during origin returning and home position operations.

Motor (Positioning) Control


Setting range : 1 to 100000
Parameter storage position :
Axis 1 CM8813 (upper bits) and CM8812 (lower bits)
Axis 2 CM8853 (upper bits) and CM8852 (lower bits)
Axis 3 CM8893 (upper bits) and CM8892 (lower bits)
Axis 4 CM8933 (upper bits) and CM8932 (lower bits)

(1) If the starting speed and the operating speed are equivalent, the operation will
Point
be as shown in the following chart.
Speed

Starting speed
(stopping speed)

0 Time

In this situation, the acceleration rate and deceleration rate are ignored.
(2) Trapezoidal control over a short time period (over a short distance) will be as
shown in the following charts.
Speed Speed

Operating Operating
speed speed Deceleration rate
Acceleration rate
Starting Deceleration rate Starting
Acceleration rate
speed speed

0 Time 0 Time

With trapezoidal control, the acceleration rate and deceleration rate (slopes)
are always controlled to uniform values.
Therefore, during trapezoidal control over a short time period, the speed is
decreased before it reaches the operating speed.

- KV Nano Series(terminal block type) User’s Manual - 5-23


5-2 Motor (Positioning) Control

 Origin return direction


Set the starting direction for origin returning operations.
CPU BUILT-IN FUNCTIONS

CW .......... Origin returning operations will start in the CW (clockwise) direction.


CCW........ Origin returning operations will start in the CCW (counter-clockwise) direction.
"Limit switch CW and Limit switch CCW" (page 5-18)

Parameter storage position: Parameters are stored as shown below.


Storage bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axis Destination bit8 Setting Details
Axis 1 CM8814 0 CCW

5 Axis 2 CM8854 1 CW
Axis 3 CM8894
Motor (Positioning) Control

Axis 4 CM8934

 Origin return method


Set the method for detecting the origin stop position.

Parameter storage position: Parameters are stored as shown below.


Storage bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axis Destination bit11 bit10 bit9 Setting Details
Axis 1 CM8814 0 0 0 Origin sensor up edge
Axis 2 CM8854 0 0 1 Medium point of the origin sensor
Axis 3 CM8894 0 1 0 Origin sensor and Z-phase
Axis 4 CM8934 0 1 1 Dog type (Z-phase not used)
1 0 0 Dog type (Z-phase used)
1 0 1 Dog type (press-against)
Other combination Invalid setting

Reference • Advantages to selecting "Medium point of the origin sensor"


In comparison with the "Origin sensor up edge" setting, selecting the "Medium point of
the origin sensor" setting makes it more difficult for the position to vary over time after
the origin returning operation is completed even if the exposure of the origin sensor
degrades.
(If photoelectric sensors deteriorate, the detection width may change, but even in this
situation, it is difficult for the detection center to change, so the origin position does not
fluctuate.)
• Advantages to selecting "Origin sensor and Z-phase"
In comparison with the "Origin sensor up edge" setting, selecting the "Origin sensor
and Z-phase" setting provides minimal variations to the encoder Z-phase even when
the origin sensor's ON position varies somewhat, so it is difficult for the return position
to vary.
• Advantages to selecting "Dog type (Z-phase not used)"
In comparison with the "Origin sensor up edge" setting, selecting the "Dog type (Z-
phase not used)" setting makes operations decelerate and stop after near-point
detector signal recognition, so return operations to compensate for excessive travelling
are eliminated, which reduces the time required to complete origin returning operations.
• Advantages to selecting "Dog type (Z-phase used)"
In comparison with the "Dog type (Z-phase not used)" setting, selecting the "Dog type
(Z-phase used)" setting provides minimal variations to the encoder Z-phase even when
the origin sensor's ON position varies somewhat, so it is difficult for the return position
to vary.

5-24 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

• Advantages to selecting "Dog type (press-against)"


In comparison with the "Dog type (Z-phase not used)" setting, selecting the "Dog type
(press-against)" setting provides origin returning operations that match the

CPU BUILT-IN FUNCTIONS


mechanisms even when the origin sensor's ON position varies somewhat.
• You have to make changes to the wiring to match the method that you have selected
for performing origin returning operations.

Origin return wiring

Origin return method Origin Sensor Input Z-Phase Input


Origin sensor up edge Origin sensor None (not used)
Medium point of the origin
Origin sensor None (not used)
sensor
Origin sensor and Z-phase Origin sensor Z-phase
Dog type (Z-phase not used) Near-point detector None (not used) 5
Dog type (Z-phase used) Near-point detector Z-phase

Motor (Positioning) Control


Torque limit signal (see the manual
Dog type (press-against) Near-point detector
of the motor that you are using)

"Origin sensor" (page 5-17)


"Z-phase" (page 5-18)

 Clear deviation counter


You can select whether a signal to clear the deviation counter is generated automatically when the
origin returning operation finishes. (You do not need to make a ladder program to perform this
operation.)
For details on the control relays and control memory entries when an error occurs, see "Lists of Devices and
Error Codes for Positioning" (page 5-88).

Parameter storage position: Parameters are stored as shown below.


Storage bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axis Destination bit12 Setting Details
Axis 1 CM8814 0 No output
Axis 2 CM8854 1 Output
Axis 3 CM8894
Axis 4 CM8934

Deviation counter clear signal


Base Unit Axis 1 Axis 2 Axis 3 Axis 4
KV-N14*T(P) R504 R505 - -
KV-N24*T(P) R504 R505 - -
KV-N40*T(P) R508 R509 R510 -
KV-N60AT(P) R508 R509 R510 R511

 Automatic home position


You can configure the settings so that the axis moves to the home position coordinate automatically
after an origin returning operation completes.
Parameter storage position: Parameters are stored as shown below.
Storage bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axis Destination bit13 Setting Details
Axis 1 CM8814 0 Not move
Axis 2 CM8854 1 Move
Axis 3 CM8894
Axis 4 CM8934
- KV Nano Series(terminal block type) User’s Manual - 5-25
5-2 Motor (Positioning) Control

 Home coordinate setting value


Set the home position.
CPU BUILT-IN FUNCTIONS

Setting range : -2147483648 to 2147483647


Parameter storage position :
Axis 1 CM8821 (upper bits) and CM8820 (lower bits)
Axis 2 CM8861 (upper bits) and CM8860 (lower bits)
Axis 3 CM8901 (upper bits) and CM8900 (lower bits)
Axis 4 CM8941 (upper bits) and CM8940 (lower bits)

Origin Returning Path


5 The path that an object moves on during an origin returning operation varies depending on the position
that the moving object starts the origin returning operation from and depending on the parameters that
Motor (Positioning) Control

have been set in KV STUDIO. In addition, even if one of the CW and CCW limit switches is ON, the
origin returning operation can be performed so long as the error is cleared.
If the origin returning direction is CW, use the text in parentheses below.

 When "Origin return method" is set to "Origin sensor up edge"


Origin return direction: CCW (CW)
Start position: CW (CCW) side
(1) The workpiece accelerates to the operating speed, and travels in
the origin return direction.
Origin sensor (2) When the origin sensor turns ON, the workpiece decelerates, and
Acceleration rate Deceleration rate then stops at the starting speed. The position at which the origin
[Operating speed] sensor turned ON is recorded as position A.
Speed in the (3) (3) The workpiece travels from its stop position to position A
CW (CCW) (4) according to trapezoidal control.
direction [Starting speed (4) After the workpiece travels to position A, it continues moving until
Origin Starting position the origin sensor turns OFF.
CCW (CW) CW(CCW) (5) The workpiece travels toward the origin, and stops moving when
the origin sensor turns ON. (This is the end of the origin returning
Speed in the [Operating speed] operation.)
CCW (CW) (2) (5) (1)
direction * During steps (1) and (2), if the limit switch on the travel direction
[Starting speed]
side turns ON, the workpiece decelerates and stops, and remains
Deceleration rate Acceleration rate stopped for 300 ms. After that, the workpiece travels in the
opposite direction. An emergency stop occurs if the limit switch on
(A) the start position side turns ON.
* Clear deviation counter" is turned ON for 50 ms when the origin
returning operation completes.
Start position: CCW (CW) side (1) When the origin direction stop position is outside of the origin sensor range
after a limit switch turns ON
(1) The workpiece accelerates to the operating speed, and travels in
the origin return direction.
(2) When a limit switch turns ON, the workpiece decelerates and
stops. The workpiece then accelerates to the operating speed
and begins moving again.
(3) When the origin sensor turns ON, the workpiece decelerates and
Origin sensor stops at the starting speed.
Acceleration rate Deceleration rate (4) The workpiece accelerates until it reaches the origin sensor.
(5) When the origin sensor turns ON, the workpiece decelerates and
[Operating speed] stops at the starting speed. The position at which the origin
Speed in the (2) (3) sensor turned ON is recorded as position A.
CW (CCW) [Starting speed] (6) The workpiece travels from its stop position to position A
direction (6) (7) according to trapezoidal control.
(7) After the workpiece travels to position A, it travels to the position
CCW (CW) CW (CCW) in which the origin sensor turns OFF. The workpiece then stops
(8) moving.
Speed in the [Starting speed] (8) The workpiece travels toward the origin, and stops moving when
CCW (CW) (1) (5) the origin sensor turns ON. (This is the end of the origin returning
direction (4)
[Operating speed] operation.)

Limit switch * During step (1), if the limit switch on the travel direction side turns
Acceleration rate ON, the workpiece decelerates and stops, and remains stopped
for 300 ms. After that, the operations of step (2) are performed.
* During step (3), if the limit switch on the travel direction side turns
ON, an emergency stop occurs.
* "Clear deviation counter" is turned ON for 50 ms when the origin
returning operation completes.

5-26 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

Start position: CCW (CW) side (2) When the origin direction stop position is within the origin sensor range after a
limit switch turns ON
(1) The workpiece accelerates to the operating speed, and travels in

CPU BUILT-IN FUNCTIONS


the origin return direction.
Origin sensor (2) When a limit switch turns ON, the workpiece decelerates and
Acceleration rate Deceleration rate stops. The workpiece then accelerates to the operating speed
and begins moving again.
[Operating speed] (3) When the origin sensor turns ON, the workpiece decelerates and
Speed in the stops at the starting speed.
(3) (4)
CW (CCW) (2) (4) The workpiece moves until the origin sensor turns OFF.
[Starting speed]
direction (5) The workpiece travels toward the origin, and stops moving when
the origin sensor turns ON. (This is the end of the origin returning
CCW (CW) CW (CCW) operation.)
Speed in the
[Starting speed] * During step (1), if the limit switch on the travel direction side turns
CCW (CW)
ON, the workpiece decelerates and stops, and remains stopped
direction (1)
[Operating speed] for 300 ms. After that, the operations of step (2) are performed.
* During step (3), if the limit switch on the travel direction side turns
ON, an emergency stop occurs.

5
Limit switch Acceleration rate
* Clear deviation counter" is turned ON for 50 ms when the origin
returning operation completes.
Start position: Within the range of the origin sensor

Motor (Positioning) Control


(1) The workpiece moves at the starting speed in the opposite
Origin sensor direction of the origin returning operation to a position at which the
origin sensor turns OFF. The workpiece then stops moving.
[Operating speed] (2) The workpiece travels toward the origin, and stops moving when
Speed in the the origin sensor turns ON. (This is the end of the origin returning
CW (CCW) (1)
[Starting speed] operation.)
direction
Origin
CCW (CW) CW (CCW) * "Clear deviation counter" is turned ON for 50 ms when the origin
Starting position returning operation completes.
Speed in the [Starting speed]
CCW (CW) (2)
direction
[Operating speed]

You have to set "Clear deviation counter" to "Output" in the system parameters.
Point
"Clear deviation counter" (page 5-25)

 When "Origin return method" is set to "Medium point of the origin sensor"
Origin return direction: CCW (CW)
Origin sensor (1) After the operation at the origin sensor's rising edge completes,
Acceleration rate Deceleration rate the workpiece travels at the starting speed in the opposite
(3) direction of the origin returning operation to a position at which the
[Operating speed]
Speed in the (2) origin sensor turns OFF. The workpiece then stops moving. The
[Starting speed] position of the workpiece after the operation at the origin sensor's
CW (CCW)
direction rising edge completes is recorded as position B.
Origin (2) The workpiece moves at the starting speed until the origin sensor
CCW (CW) CW (CCW) turns ON. The position at which the origin sensor turned on is
Origin at the "origin recorded as position C.
Speed in the sensor's rising edge" (3) The workpiece travels from position C to position B according to
CCW (CW) trapezoidal control, and then stops.
[Starting speed]
direction (1) (4) (4) According to trapezoidal control, the workpiece travels to the
[Operating speed] central position of the origin sensor as calculated from position B
and position C, and then stops. (This is the end of the origin
returning operation.)
(C) Medium point (B)
of the origin sensor Note "Clear deviation counter" is not turned ON.

 When "Origin return method" is set to "Origin sensor and Z-phase"


Origin return direction: CCW (CW)
Origin sensor (1) The operations performed until the workpiece stops are the same
as the "Origin sensor up edge" case.
(2) The workpiece travels to the origin at the operating speed. The
[Operating speed]
Speed in the origin sensor turns ON, the Z-phase turns ON, and the workpiece
CW (CCW) [Starting speed] then stops moving. (This is the end of the origin returning
Operation at the
direction origin sensor's (1) operation.)
Origin rising edge
CCW (CW) CW (CCW) * Clear deviation counter" is turned ON for 50 ms when the origin
returning operation completes.
Speed in the
CCW (CW) (2)
[Starting speed]
direction
[Operating speed]

Z-phase

- KV Nano Series(terminal block type) User’s Manual - 5-27


5-2 Motor (Positioning) Control

 When "Origin return method" is set to "Dog type (Z-phase not used)"
Origin return direction: CCW (CW)
CPU BUILT-IN FUNCTIONS

Start position: CW (CCW) side


(1) The workpiece accelerates to the operating speed, and moves in
the origin return direction.
[Operating speed]
Speed in the (2) When the near-point detector signal turns ON, the workpiece
CW (CCW) decelerates to the starting speed.
direction Origin (3) The workpiece travels to a position at which the near-point
Starting position [Starting speed] detector signal turns OFF. The workpiece then stops moving.
CCW (CW) CW (CCW) * "Clear deviation counter" is turned ON for 50 ms when the origin
[Starting speed] returning operation completes.
Speed in the (3)
CCW (CW) (1)
direction (2)
[Operating speed]
Deceleration rate Acceleration rate
Near-point detector

5 Start position: CCW (CW) side


(1) The workpiece accelerates to the operating speed, and moves in
[Operating the origin return direction.
speed]
Motor (Positioning) Control

(3) Deceleration (2) When the limit switch (CCW) turns ON, the workpiece decelerates
Speed in the (2) and stops. The workpiece remains stopped for 300 ms and then
Acceleration rate rate
CW (CCW) [Starting moves in the opposite direction.
direction speed] (3) When the near-point detector signal is detected as turning OFF,
CCW (CW) CW (CCW) the workpiece decelerates to the starting speed, and then moves
[Starting in the opposite direction.
Speed in the (5) speed] (4) When the near-point detector signal turns ON, the workpiece
(1) (4) Acceleration
CCW (CW) decelerates to the starting speed.
Acceleration rate rate
direction (5) The workpiece travels to a position at which the near-point
[Operating
speed] detector signal turns OFF. The workpiece then stops moving.
Deceleration Deceleration rate * "Clear deviation counter" is turned ON for 50 ms when the origin
rate Limit switch Near-point detector
(CCW) returning operation completes.

Start position: Within the range of the origin sensor


(1) The workpiece moves in the opposite direction of the origin
[Operating speed] returning operation while accelerating to the operating speed.
(1) (2) When the near-point detector signal turns ON, the workpiece
Speed in the (2)
CW (CCW) decelerates to the starting speed and then moves in the opposite
direction direction.
Origin [Starting speed] (3) When the near-point detector signal turns ON, the workpiece
CCW (CW) CW (CCW) decelerates to the starting speed.
Starting position
[Starting speed] (4) The workpiece travels to a position at which the near-point
Speed in the (4) detector signal turns OFF. The workpiece then stops moving.
CCW (CW) * "Clear deviation counter" is turned ON for 50 ms when the origin
direction (3) returning operation completes.
[Operating speed]

Near-point detector

• If the range in which the near-point detector signal turns ON is narrow, the
Point
workpiece cannot decelerate to the starting speed, which may cause variations
in the origin position. Widen the range in which the near-point detector signal
turns ON, reduce the operating speed, or increase the deceleration rate so that
the near-point detector signal can turn OFF after the workpiece decelerates to
the starting speed.
• Ensure that the near-point detector signal turns ON for 10 ms or more. To
prevent chattering, do not detect the near-point detector signal turning OFF for
10 ms after it turns ON.
• For details on wiring to the origin sensor, see " Origin return wiring" (page 5-25).

5-28 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

 When "Origin return method" is set to "Dog type (Z-phase used)"


Origin return direction: CCW (CW)

CPU BUILT-IN FUNCTIONS


Start position: CW (CCW) side
(1) The workpiece accelerates to the operating speed, and moves in
Z-phase the origin return direction.
[Operating (2) When the near-point detector signal turns ON, the workpiece
speed] decelerates to the starting speed.
Speed in the (3) After the near-point detector signal turns OFF, the workpiece
CW (CCW)
direction
Origin [Starting stops moving the first time the Z-phase turns ON (switches from
Starting position speed] OFF to ON).
CCW (CW) CW (CCW) * "Clear deviation counter" is turned ON for 50 ms when the origin
[Starting returning operation completes.
Speed in the (3) speed]
(1)
CCW (CW)
direction (2)
[Operating
speed]
Deceleration rate Near-point detector Acceleration rate

Start position: CCW (CW) side 5


(1) The workpiece accelerates to the operating speed, and moves in
the origin return direction.

Motor (Positioning) Control


Acceleration rate Deceleration rate (2) When the limit switch (CCW) turns ON, the workpiece decelerates
Z-phase
and stops. The workpiece remains stopped for 300 ms and then
Speed [Operating moves in the opposite direction.
in the speed] (3) When the near-point detector signal turns OFF, the workpiece
CW (2) (3)
decelerates to the starting speed and then moves in the opposite
(CCW)
direction
[Starting direction.
Starting position Origin speed] (4) When the near-point detector signal turns ON, the workpiece
CCW CW (CCW) decelerates to the starting speed.
(CW) [Starting (5) After the near-point detector signal turns OFF, the workpiece
Speed (5) speed]
in the (1) stops moving the first time the Z-phase turns ON (switches from
(4)
CCW OFF to ON).
Acceleration rate [Operating * "Clear deviation counter" is turned ON for 50 ms when the origin
(CW)
direction Deceleration rate speed] returning operation completes.
Limit switch Near-point detector Acceleration rate
Deceleration rate (CCW)

Start position: Within the range of the origin sensor


Acceleration rate Deceleration rate (1) The workpiece moves in the opposite direction of the origin
Z-phase returning operation while accelerating to the operating speed.
(2) When the near-point detector signal turns OFF, the workpiece
[Operating speed] decelerates to the starting speed, and then moves in the opposite
(1) (2) direction.
Speed in the Starting (3) When the near-point detector signal turns ON, the workpiece
CW (CCW) position
direction decelerates to the starting speed.
[Starting speed]
Origin (4) After the near-point detector signal turns OFF, the workpiece
CCW (CW) CW (CCW) stops moving the first time the Z-phase turns ON (switches from
[Starting speed] OFF to ON).
Speed in the (4) * "Clear deviation counter" is turned ON for 50 ms when the origin
CCW (CW) returning operation completes.
direction (3)
[Operating speed]

Deceleration rate Near-point Acceleration rate


detector

• If the range in which the near-point detector signal turns ON is narrow, the
Point
workpiece cannot decelerate to the starting speed, which may cause variations
in the origin position. Widen the range in which the near-point detector signal
turns ON, reduce the operating speed, or increase the deceleration rate so that
the near-point detector signal can turn OFF after the workpiece decelerates to
the starting speed.
• Ensure that the near-point detector signal turns ON for 10 ms or more. To
prevent chattering, do not detect the near-point detector signal turning OFF for
10 ms after it turns ON.
• For details on wiring to the origin sensor, see " Origin return wiring" (page 5-25).

- KV Nano Series(terminal block type) User’s Manual - 5-29


5-2 Motor (Positioning) Control

 When "Origin return method" is set to "Dog type (press-against)"


Origin return direction: CCW (CW)
CPU BUILT-IN FUNCTIONS

Start position: CW (CCW) side


(1) The workpiece accelerates to the operating speed, and moves in
the origin return direction.
[Operating
speed](2) When the near-point detector signal turns ON, the workpiece
Speed in the decelerates to the starting speed.
CW (CCW) [Starting (3) When the workpiece reaches the stopper, the servo motor's
direction speed] torque limit signal turns ON (switches from OFF to ON), and the
Origin Starting position
CCW (CW) CW (CCW) workpiece stops moving.
[Starting * After the near-point detector signal has turned ON, whether the
Speed in the (3) speed] near-point detector signal is ON or OFF, the workpiece stops
(1)
CCW (CW) moving when the torque limit signal turns ON (switches from OFF
direction (2) [Operating to ON).
speed] * "Clear deviation counter" is turned ON for 50 ms when the origin
Stopper Near-point detector Acceleration rate returning operation completes.

5 Deceleration rate

Start position: CCW (CW) side


If you have set "Origin return method" to "Dog type (press-against)," if
Motor (Positioning) Control

the torque limit signal turns ON or a limit switch turns ON before the
near-point detector signal turns ON, an error will occur, and the
workpiece will stop moving. If the origin returning direction is CCW
(CW), ensure that the start position is not on the CCW (CW) side.
Start position: Within the range of the origin sensor
Acceleration rate (1) The workpiece moves in the opposite direction of the origin
Deceleration rate
Z-phase returning operation while accelerating to the operating speed.
(2) When the near-point detector signal turns OFF, the workpiece
[Operating speed] decelerates to the starting speed, and then moves in the opposite
Speed in the
(1) (2) direction.
Starting
CW (CCW) position (3) When the near-point detector signal turns ON, the workpiece
direction [Starting speed] decelerates to the starting speed.
Origin (4) After the near-point detector signal turns OFF, the workpiece
CCW (CW) CW (CCW)
stops moving the first time the Z-phase turns ON (switches from
[Starting speed] OFF to ON).
Speed in the (4) * "Clear deviation counter" is turned ON for 50 ms when the origin
CCW (CW)
direction (3) returning operation completes.
[Operating speed]

Deceleration rate Near-point


detector Acceleration rate

• When you have set "Origin return method" to "Dog type (press-against)," you
Point
have to wire the torque limit signal of the motor that you are using to the Z-
phase input.
• Before the near-point detector signal turns ON, the torque limit signal turning
ON will be ignored. Check the arrangement of the mechanisms.
• If the range in which the near-point detector signal turns ON is narrow, the
workpiece cannot decelerate to the starting speed, which may cause variations
in the origin position. Widen the range in which the near-point detector signal
turns ON, reduce the operating speed, or increase the deceleration rate so that
the near-point detector signal can turn OFF after the workpiece decelerates to
the starting speed.
• Ensure that the near-point detector signal turns ON for 10 ms or more. To
prevent chattering, do not detect the near-point detector signal turning OFF for
10 ms after it turns ON.
• For details on wiring to the origin sensor, see " Origin return wiring" (page 5-25).

5-30 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

JOG settings
(1) Starting speed [Hz]

CPU BUILT-IN FUNCTIONS


(2) Acceleration rate [Hz/ms]
(3) Deceleration rate [Hz/ms]
(4) High speed [Hz]

Motor (Positioning) Control


Function Name Setting Range Default Value See Page
(1) Starting speed [Hz] 1 to 65535 500 5-31
(2) Acceleration rate [Hz/ms] 0, 1 to 65535 10 5-32
(3) Deceleration rate [Hz/ms] 0, 1 to 65535 10 5-32
(4) High speed [Hz] 1 to 100000 5000 5-32

 Starting speed
Set the starting output pulse speed for JOG operation.
If you turn ON the CW or CCW execution condition with the HIGH execution condition of the JOG
instruction turned OFF, operations will be performed at the starting speed.

Setting range : 1 to 65535 (however, specify a value that is less than or equal to the high
speed)
Parameter storage position :
Axis 1 CM8815
Axis 2 CM8855
Axis 3 CM8895
Axis 4 CM8935

- KV Nano Series(terminal block type) User’s Manual - 5-31


5-2 Motor (Positioning) Control

 Acceleration and Deceleration Rates


Acceleration rate: The rate at which the speed increases from the starting speed to the high speed.
CPU BUILT-IN FUNCTIONS

The higher the value, the faster the acceleration will become, and the shorter the
travel time will be. If you specify 0, the starting speed will be the same as the high
speed.
Deceleration rate: The rate at which the speed decreases from the high speed to the starting speed.
The higher the value, the faster the deceleration will become, and the shorter the
travel time will be. If you specify 0, operations will stop immediately.

Reference The acceleration and deceleration rates are only valid when you specify HIGH with the
JOG instruction. When you do not specify HIGH, operations start at the starting speed
5 and stop immediately.

On the KV Nano Series, you can set the acceleration rate and the deceleration rate to separate values.
Motor (Positioning) Control

Setting range : 0 (to start at the high speed or to stop suddenly),


1 to 65535
Parameter storage position :
Acceleration Rate Deceleration Rate
Axis 1 CM8816 CM8817
Axis 2 CM8856 CM8857
Axis 3 CM8896 CM8897
Axis 4 CM8936 CM8937

 High speed
Set the pulse speed to output to the motor when you specify HIGH with the JOG instruction. Set this to
a value that is greater than or equal to the starting speed.

When you specify HIGH with the JOG instruction, the acceleration rate and
Point
deceleration rate (slopes) are always controlled to uniform values.
Therefore, if you specify HIGH with the JOG instruction while you are performing
JOG operation over a short time period, the workpiece will decelerate before it
reaches the specified high speed.

Setting range : 1 to 100000


Parameter storage position :
High Speed
Axis 1 CM8819 (upper bits) and CM8818 (lower bits)
Axis 2 CM8859 (upper bits) and CM8858 (lower bits)
Axis 3 CM8899 (upper bits) and CM8898 (lower bits)
Axis 4 CM8939 (upper bits) and CM8938 (lower bits)

5-32 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

Comparator settings

CPU BUILT-IN FUNCTIONS


During positioning control, the generated pulses are counted as the current coordinate. You can
compare the current coordinate with the value of (2) or (4), and if the values match, the same operation
is performed with the value specified by (1) or (3).
Also, if the current value matches the value that you specify with (6), an interrupt occurs.

(1) Comparator 0 function (3) Comparator 1 function


selection selection (5) Comparator 2 function selection
(2) Comparator 0 setting value (4) Comparator 1 setting value (6) Comparator 2 setting value

Motor (Positioning) Control


Function Name Setting Range Default Value
Comparator 0 setting
Not used
Stop sensor
(1) Function selection Not used
Soft limit switch CW
Soft limit switch CCW
(2) Setting value -2147483648 to 2147483647 0
Comparator 1 setting
Not used
Stop sensor
(3) Function selection Not used
Soft limit switch CW
Soft limit switch CCW
(4) Setting value -2147483648 to 2147483647 0
Comparator 2 setting
Interrupt (fixed) Interrupt (fixed)
Axis 1: CR8415 Axis 1: CR8415
(5) Function selection Axis 2: CR8515 Axis 2: CR8515
Axis 3: CR8615 Axis 3: CR8615
Axis 4: CR8715 Axis 4: CR8715
(6) Setting value -2147483648 to 2147483647 0

- KV Nano Series(terminal block type) User’s Manual - 5-33


5-2 Motor (Positioning) Control

 Function selection
Not used ...........................No operation is performed when the comparator is matched.
CPU BUILT-IN FUNCTIONS

Stop sensor ......................The stop sensor performs the same operation as that entered.
Soft limit switch CW..........The CW direction limit switch performs the same operation as that entered.
Soft limit switch CCW .......The CCW direction limit switch performs the same operation as that entered.

Parameter storage position: Parameters are stored as shown below.

Comparator 0
Storage bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axis destination bit5 bit4 Operation When the Current Position and Comparator 0 Match
Axis 1 CM8814 0 0 Not used

5 Axis 2 CM8854 0 1 Used as a stop sensor


Axis 3 CM8894 1 0 Used as a limit switch in the CW direction
Motor (Positioning) Control

Axis 4 CM8934 1 1 Used as a limit switch in the CCW direction

Comparator 1
Storage bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axis destination bit7 bit6 Operation When the Current Position and Comparator 1 Match
Axis 1 CM8814 0 0 Not used
Axis 2 CM8854 0 1 Used as a stop sensor
Axis 3 CM8894 1 0 Used as a limit switch in the CW direction
Axis 4 CM8934 1 1 Used as a limit switch in the CCW direction

 Setting value
Set the value (the comparator value) that will be compared with the number of output pulses (the
current position—the current value).

Setting range : -2147483648 to 2147483647


Parameter storage position :
Comparator 0 = CM8803 (upper bits) and CM8802 (lower bits)
Axis 1 Comparator 1 = CM8805 (upper bits) and CM8804 (lower bits)
Comparator 2 = CM8807 (upper bits) and CM8806 (lower bits)
Comparator 0 = CM8843 (upper bits) and CM8842 (lower bits)
Axis 2 Comparator 1 = CM8845 (upper bits) and CM8844 (lower bits)
Comparator 2 = CM8847 (upper bits) and CM8846 (lower bits)
Comparator 0 = CM8883 (upper bits) and CM8882 (lower bits)
Axis 3 Comparator 1 = CM8885 (upper bits) and CM8884 (lower bits)
Comparator 2 = CM8887 (upper bits) and CM8886 (lower bits)
Comparator 0 = CM8923 (upper bits) and CM8922 (lower bits)
Axis 4 Comparator 1 = CM8925 (upper bits) and CM8924 (lower bits)
Comparator 2 = CM8927 (upper bits) and CM8926 (lower bits)

The values for interrupts (axis 1: CM8807 and CM8806, axis 2: CM8847 and
Point
CM8846, axis 3: CM8887 and CM8886, axis 4: CM8927 and CM8926) that the KV
Nano Series recognizes are each axis' PSTRT, JOG, ORG, HOME, and CHGSP*
instructions. Just writing the values to control memory is not enough to make
this function operate correctly.
If you want to use interrupts, write the value to the control memory entries, and
then execute the PSTRT, JOG, ORG, HOME, or CHGSP* instruction.
"Reference example of changing speed during operation" (page 5-82)
* Comparator 0 and comparator 1 are not applied when the CHGSP instruction is executed.

5-34 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

Creating Ladder Programs

CPU BUILT-IN FUNCTIONS


To perform positioning control, use dedicated positioning control instructions, control relays (CR), and
control memory (CM) entries to create ladder programs. For a ladder program reference example, see
"Reference Example of Positioning Control" (page 5-78).
"List of Positioning Instructions" (page 5-45)
"Control relays for positioning control" (page 5-36)
"Control memory entries for positioning control" (page 5-40)
"Reference Example of Positioning Control" (page 5-78)
In addition, the operating speed can be changed while positioning control is being performed.
"Changing the speed during operation" (page 5-40)
If you are managing 21 or more positioning points, use ladder programs to change the point parameters
that you are using control memory (CM) entries to manage.
"Reference example of executing positioning control with more than 21 points" (page 5-86) 5
On the KV Nano Series, point parameter settings are cleared when a power outage occurs. For details

Motor (Positioning) Control


on how to save settings even if power outages occur, see "Configuring Power Failure Holding Settings
(Latching)" (page 4-26).

 Positioning operation timing chart


(1) (2) (3) (4)
PSTRT (axis 1, point 1)
instruction execution
PSTRT (axis 1, point 2)
instruction execution
ORG (axis 1) instruction
execution
JOG instruction execution
Turns ON the axis 1 pulse
output in progress flag CR8400
Axis 1 operating point
number CM8835 1 2 1000 1001
Axis 1 positioning CR8401
complete relay
Axis 1 origin returning CR8404
operation in progress relay
Axis 1 origin returning CR8405
operation complete relay
(1) The execution of the PSTRT (axis 1, point 1) instruction starts pulse output. CR8400, ON during
axis 1 pulse output, is turned ON. CR8401, the axis 1 positioning complete relay, and CR8405, the
axis 1 origin returning operation complete relay, are turned OFF.
At the same time, "1," the point number that is being operated, is written to CM8835, the axis 1
operating point number.
(2) The execution of the PSTRT (axis 1, point 2) instruction starts pulse output. CR8400, ON during
axis 1 pulse output, is turned ON. CR8401, the axis 1 positioning complete relay, and CR8405, the
axis 1 origin returning operation complete relay, are turned OFF.
At the same time, "1," the point number that is being operated, is written to CM8835, the axis 1
operating point number.
(3) The execution of the ORG (axis 1) instruction starts the origin returning operation. CR8400, ON
during axis 1 pulse output, and CR8404, the axis 1 origin returning operation in progress relay, are
turned ON. CR8405, the axis 1 origin returning operation complete relay, and CR8401, the axis 1
positioning complete relay, are turned OFF.
At the same time, "1000," the origin returning operation code, is written to CM8835, the axis 1
operating point number.
(4) The execution of the JOG instruction starts the JOG operation. CR8400, ON during axis 1 pulse
output, is turned ON. CR8401, the axis 1 positioning complete relay, and CR8405, the axis 1 origin
returning operation complete relay, are turned OFF.
At the same time, "1001," the JOG operation code, is written to CM8835, the axis 1 operating point
number.
- KV Nano Series(terminal block type) User’s Manual - 5-35
5-2 Motor (Positioning) Control

 Control relays for positioning control


This section describes the control relays related to positioning control programs.
For the list of control relays for positioning control, see "List of control relays" (page 5-88).
CPU BUILT-IN FUNCTIONS

 Origin returning operation in progress (axis 1: CR8404, axis 2: CR8504, axis 3:


CR8604, and axis 4: CR8704)
During origin returning operations, these control relays are turned ON. They will be turned OFF when
the origin returning operation is completed.

 Origin returning operation complete (axis 1: CR8405, axis 2: CR8505, axis 3:


CR8605, and axis 4: CR8705)
These control relays are set when origin returning operations are completed. They are reset the next
5 time a pulse is output.
"Positioning operation timing chart" (page 5-35)
Motor (Positioning) Control

 Error (axis 1: CR8402, axis 2: CR8502, axis 3: CR8602, and axis 4: CR8702)
These control relays are turned ON when an error occurs. Error codes are stored in CM8834 (axis 1),
CM8874 (axis 2), CM8914 (axis 3), and CM8954 (axis 4).
To clear the error status (error clear), turn the error clear relays ON.
If an error occurs during pulse output, operations will be stopped.
For details on error codes, see "Lists of Devices and Error Codes for Positioning" (page 5-88).

 Error clear (axis 1: CR8002, axis 2: CR8102, axis 3: CR8202, and axis 4: CR8302)
When an error has occurred (error relays are turned ON), turn these relays ON to clear the error status
(error clear).
When you are clearing errors, leave the error clear relays (CR8002, CR8102, CR8202, and CR8302)
turned ON until the error relays (CR8402, CR8502, CR8602, and CR8702) are turned OFF.

MR000 CR8402 CR8002

Axis 1 error Axis 1 error clear


CR8002

Axis 1 error clear

 Pulse output in progress (axis 1: CR8400, axis 2: CR8500, axis 3: CR8600, and
axis 4: CR8700)
These relays will be turned ON during pulse output.

 Deceleration stop (axis 1: CR8001, axis 2: CR8101, axis 3: CR8201, and axis 4:
CR8301)
If you turn these relays ON while the pulse output in progress relays are turned ON, the workpiece will
decelerate according to the deceleration rate and then stop. When the workpiece decelerates and then
stops, the positioning complete relays are not turned ON.
When the workpiece is decelerating and stopping, requests to change the target coordinate, change
the speed, or change the deceleration rate will not be accepted.
Even while the deceleration stop relays are turned ON, you can start positioning.
Example)

MR100 CR8400 CR8001

Deceleration Axis 1 Axis 1


stop execution pulse output deceleration stop
in progress
CR8001

Axis 1
deceleration stop

5-36 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

 Forced stop (axis 1: CR8000, axis 2: CR8100, axis 3: CR8200, and axis 4: CR8300)
If you turn these relays ON while the pulse output in progress relays are turned ON, pulses will be
stopped immediately, and an error (a forced stop error) will occur.

CPU BUILT-IN FUNCTIONS


If the forced stop relays are turned ON while the pulse output in progress relays are turned OFF, an
error will not occur.
If errors are cleared while the forced stop relays are turned ON, the errors will be cleared. However, if
you start positioning while the forced stop relays are turned ON, a forced stop error will occur again.

 Positioning complete (axis 1: CR8401, axis 2: CR8501, axis 3: CR8601, and axis
4: CR8701)
These relays are set when positioning is completed and when origin returning operations are
completed. When the automatic home position function is enabled, these relays are set when the travel
to home position operation is finished. They are reset the next time a pulse is output. 5
* The positioning complete relays will be set even if pulse output is not generated when the PSTRT

Motor (Positioning) Control


instruction is executed.
Example) When "Operation mode" is set to "Positioning INC" and the travel is 0
When "Operation mode" is set to "Positioning ABS" and the target value is the same as the
current position

 Current coordinate change request (axis 1: CR8004, axis 2: CR8104, axis 3:


CR8204, and axis 4: CR8304)
The current coordinate is changed when these relays are turned ON (only when the pulse output in
progress relays are turned OFF).
Store the new values in control memory entries in advance.
"Current Coordinate Change Request" (page 5-37)

Relay
Operation Control Memory Entry to Store the New Value In
Number
Axis 1: Current coordinate
CR8004 CM8825 (upper bits) and CM8824 (lower bits)
change request
Axis 2: Current coordinate
CR8104 CM8865 (upper bits) and CM8864 (lower bits)
change request
Axis 3: Current coordinate
CR8204 CM8905 (upper bits) and CM8904 (lower bits)
change request
Axis 4: Current coordinate
CR8304 CM8945 (upper bits) and CM8944 (lower bits)
change request
Example)
MR008 CR8400 CM8830 MOV.L
<> +0 CM8824
Current Axis 1 #0
Axis 1 Axis 1 current coordinate
coordinate change pulse output change value
in progress current coordinate
CR8004 CR8004

Axis 1 current coordinate Axis 1 current coordinate


change request change value
CR8004 MR009

Axis 1 current coordinate Current coordinate


change change complete
MR008 CM8830
=
#0
Current Axis 1
coordinate change current coordinate

Reference This function is not executed while the error relays are turned ON.

- KV Nano Series(terminal block type) User’s Manual - 5-37


5-2 Motor (Positioning) Control

 Operating speed change request (axis 1: CR8005, axis 2: CR8105, axis 3:


CR8205, and axis 4: CR8305)
During positioning control and speed control, the operating speed is changed when these relays are
CPU BUILT-IN FUNCTIONS

turned ON.
Store the new values in control memory entries in advance.
"Operating Speed Change Request" page 4-34

Relay Control Memory Entry to Store the New


Operation
Number Value In
Axis 1: Operating speed change request CR8005 CM8827 (upper bits) and CM8826 (lower bits)
Axis 2: Operating speed change request CR8105 CM8867 (upper bits) and CM8866 (lower bits)
Axis 3: Operating speed change request CR8205 CM8907 (upper bits) and CM8906 (lower bits)
Axis 4: Operating speed change request CR8305 CM8947 (upper bits) and CM8946 (lower bits)

5 Example)
MR009 CR8400 MOV.L
+1000 CM8826
Motor (Positioning) Control

Operating Axis 1 Axis 1 operating speed


speed pulse output change value
change in progress CR8005

Axis 1 operating speed


change request

Reference • If, in relation to the coordinate speed specified by the speed change, the remaining
travel of the point being executed is small, before the workpiece accelerates to the
specified speed to change to, the operation will switch to deceleration.
• This function will not be executed if a deceleration stop function is being performed
because of the deceleration stop relays (CR).
• If the specified speed to change to is smaller than the starting speed (for example, if the
new speed is 0), operations will be performed at the starting speed.
• If you specify an operating speed that exceeds the upper limit, an error will not occur,
but operations will be performed at the upper limit.
 Target coordinate change request (axis 1: CR8006, axis 2: CR8106, axis 3:
CR8206, and axis 4: CR8306)
During positioning control, the target coordinate is changed when these relays are turned ON.
Store the new values in control memory entries in advance.
"Target Coordinate Change Request" page 4-34

Relay Control Memory Entry to Store the New


Operation
Number Value In
Axis 1: Target coordinate change request CR8006 CM8829 (upper bits) and CM8828 (lower bits)
Axis 2: Target coordinate change request CR8106 CM8869 (upper bits) and CM8868 (lower bits)
Axis 3: Target coordinate change request CR8206 CM8909 (upper bits) and CM8908 (lower bits)
Axis 4: Target coordinate change request CR8306 CM8949 (upper bits) and CM8948 (lower bits)
Example)
MR010 CR8400 MOV.L
+1000 CM8828
Target Axis 1 Axis 1 target coordinate
coordinate pulse output change request
change in progress CR8006

Axis 1 target coordinate


change value

Reference • If the current coordinate has gone too far in relation to the target coordinate specified
with the target coordinate change, the return operation will be executed.
• This function will not be executed if a deceleration stop function is being performed
because of the deceleration stop relays (CR).
• This function will not be executed if the positioning operation is within 250 µs of
completion.
• During fixed dimension operations caused by the stop sensor input, this function will be
ignored.
• This function will only be executed during positioning operations caused by the PSTRT
instruction.
5-38 - KV Nano Series(terminal block type) User’s Manual -
5-2 Motor (Positioning) Control

 Comparator 2 (axis 1: CR8415, axis 2: CR8515, axis 3: CR8615, axis 4: CR8715)


These relays are used as interrupt conditions.

CPU BUILT-IN FUNCTIONS


Use these relays if you need to change the speed during operation or during similar situations.
"4-7 Interrupts" (page 4-76)
"Changing the speed during operation" (page 5-40)

Point These control relays cannot be turned ON or OFF.

 Warning (axis 1: CR8403, axis 2: CR8503, axis 3: CR8603, and axis 4: CR8703)
These relays are turned ON when an overflow occurs at the current position.
Pulse output will not be stopped if a warning occurs. 5
Current position overflow

Motor (Positioning) Control


Axis Current Position Range
Axis 1 CM8831 (upper bits) and CM8830 (lower bits) -2147483648 to 2147483647
Axis 2 CM8871 (upper bits) and CM8870 (lower bits) -2147483648 to 2147483647
Axis 3 CM8911 (upper bits) and CM8910 (lower bits) -2147483648 to 2147483647
Axis 4 CM8951 (upper bits) and CM8950 (lower bits) -2147483648 to 2147483647

 Warning clear (axis 1: CR8003, axis 2: CR8103, axis 3: CR8203, and axis 4:
CR8303)
When the warning relays are turned ON, turn these relays ON to clear the warnings.
When you are clearing warnings, leave the warning clear relays (CR8003, CR8103, CR8203, and
CR8303) turned ON until the warning relays (CR8403, CR8503, CR8603, and CR8703) are turned
OFF.

 Axis n present (axis 1: CR8414, axis 2: CR8514, axis 3: CR8614, and axis 4:
CR8714)
For models that can use axis n (n: 1 to 4), these relays are turned ON. For other models, these relays
are turned OFF.
In situations such as when the units used with the KV Nano Series are changed, you can create
interlocks so that instructions related to nonexistent axes cannot be executed.

Model Axis 1: CR8414 Axis 2: CR8514 Axis 3: CR8614 Axis 4: CR8714


KV-N14*T(P) ON ON OFF OFF
KV-N24*T(P) ON ON OFF OFF
KV-N40*T(P) ON ON ON OFF
KV-N60AT(P) ON ON ON ON
Example)

R000 CR8614 PSTRT


Unit number #0 Axis number #3 Point number #1

Axis 3 present

* If the base unit is the KV-N40*T(P) or KV-N60AT(P), point number 1 of axis 3 is executed. If the base unit
is the KV-N14*T(P) or KV-N24*T(P), positioning control is not started.

Reference With the KV Nano Series, you can share programs of different base units by using the
model change function.

- KV Nano Series(terminal block type) User’s Manual - 5-39


5-2 Motor (Positioning) Control

If you specify the axis numbers that cannot be used and then execute an instruction such
as PSTRT, errors will not occur. However, by using the "axis n present" flag, you can
create interlocks for when the base unit varies.
CPU BUILT-IN FUNCTIONS

 Control memory entries for positioning control


This section describes the control memory entries related to positioning control programs.
For the list of control memory entries for positioning control, see "List of control memory entries"
(page 5-88).

 Operating point number (axis 1: CM8835, axis 2: CM8875, axis 3: CM8915, axis 4:
5 CM8955)
These control memory entries store the starting point numbers when instructions such as PSTRT, JOG,
Motor (Positioning) Control

and ORG are executed. Also, "1001" is stored when the JOG instruction is executed, "1000" is stored
when the ORG instruction is executed, and "1002" is stored when the HOME instruction is executed.
* "1000" is stored when the automatic home position function is being executed.

 Current coordinate (axis 1: CM8830 and CM8831, axis 2: CM8870 andCM8871,


axis 3: CM8910 and CM8911, and axis 4: CM8950 and CM8951)
These control memory entries store the current positions (PLS).
For details on changing the current position, see "Creating Ladder Programs" (page 5-35).

 Current speed (axis 1: CM8832 and CM8833, axis 2: CM8872 and CM8873,
axis 3: CM8912 and CM8913, and axis 4: CM8952 and CM8953)
These control memory entries store the current speed (Hz).
For details on changing the speed during operation, see "Changing the speed during operation"
(page 5-40).

 Error code (axis 1: CM8834, axis 2: CM8874, axis 3: CR8914, and axis 4: CR8954)
These control memory entries store the error codes.
"Lists of Devices and Error Codes for Positioning" (page 5-88)

 Changing the speed during operation


There are two methods for changing speed during operation.
• Using the CHGSP instruction
• Using the operating speed change request relay (axis 1: CR8005, axis 2: CR8105, axis 3: CR8205,
and axis 4: CR8305)

You cannot specify a speed that is less than the starting speed. If you specify a
Point
speed that is less than the starting speed, the starting speed will be used.

Reference • If you use the comparator 2 interrupt relay (axis 1: CR8415, axis 2: CR8515, axis 3:
CR8615, and axis 4: CR8715), you can request changes to the speed when a
prescribed position is reached.
• When changing speed, the point number acceleration/deceleration rate is read, and the
speed is changed according to the acceleration/deceleration rate.

5-40 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

 Using the CHGSP instruction


During pulse output, while the execution conditions are turned ON, you can change the operating

CPU BUILT-IN FUNCTIONS


speed to the value that you specify using S .
Execution Execution CHGSP
condition condition processing
turns ON recognition execution

Execution
processing

processing

processing

processing
Main routine condition CHGSP
Output

Output
Input

Input
program Unit number Axis number Speed change value
#0 #1 #10000
Speed

Motor (Positioning) Control


Speed change Time

"CHGSP Instructions" (page 5-62)

 Using the comparator 2 interrupt relay (axis 1: CR8415, axis 2: CR8515, axis 3:
CR8615, and axis 4: CR8715) to change the speed

Comparator 2 compares the current position with the value of comparator 2 that was set in the
comparator settings of the system parameters. If the values match, an interrupt is generated.
Axis Interrupt Relay Storage Position for the Comparator 2 Values
Axis 1 CR8415 CM8807 (upper bits) and CM8806 (lower bits)
Axis 2 CR8515 CM8847 (upper bits) and CM8846 (lower bits)
Axis 3 CR8615 CM8887 (upper bits) and CM8886 (lower bits)
Axis 4 CR8715 CM8927 (upper bits) and CM8926 (lower bits)

To use comparator 2, use the INT instruction. However, this control relay will not actually be turned ON
or OFF. It is only used as a symbol in ladder programming.

Example
(Axis 1) INT (Axis 2) INT (Axis 3) INT (Axis 4) INT
CR8415 CR8515 CR8615 CR8715

"Comparator settings" (page 5-33)


"INT Instructions" (page 4-98)

- KV Nano Series(terminal block type) User’s Manual - 5-41


5-2 Motor (Positioning) Control

When an interrupt condition according to comparator 2 occurs, the operating speed is immediately
changed to the value specified by S .
CPU BUILT-IN FUNCTIONS

Axis 1 The current value (CM8831 and CM8830) equals the value of comparator 2 (CM8807 and CM8806).
An interrupt according to Axis 2 The current value (CM8871 and CM8870) equals the value of comparator 2 (CM8847 and CM8846).
comparator 2 occurs. Axis 3 The current value (CM8911 and CM8910) equals the value of comparator 2 (CM8887 and CM8886).
Axis 4 The current value (CM8951 and CM8950) equals the value of comparator 2 (CM8927 and CM8926).

processing

processing

processing

processing
Main routine
Output

Output
Input

Input
processing program
Input

Interrupt program CR2008


EI

5 END

Speed INT
Motor (Positioning) Control

CR8415
S
CR2002 CHGSP
Unit number Axis number Speed change value
#0 #1 #10000

RETI

Speed change Time ENDH

The values for interrupts according to comparator 2 (axis 1: CM8807 and CM8806,
Point
axis 2: CM8847 and CM8846, axis 3: CM8887 and CM8886, and axis 4: CM8927 and
CM8929) are recognized by the KV Nano Series when the PSTRT, JOG, ORG,
HOME, or CHGSP instruction is being executed. Just writing the values to control
memory is not enough to make this function operate correctly.
When using comparator 2 as an interrupt condition, write the value to the control
memory entries, and then execute the PSTRT, JOG, ORG, HOME, or CHGSP
instruction.
"Reference example of changing speed during operation" (page 5-82)

 Using operating speed change request relays CR8005 (axis 1), CR8105 (axis 2),
CR8205 (axis 3), and CR8305 (axis 4)
During pulse output, when the operating speed change request relays are turned ON, the speed is
changed to the operating speed change values (axis 1: CM8827 and CM8826, axis 2: CM8867 and
CM8866, axis 3: CM8907 and CM8906, and axis 4: CM8947 and CM8946).
Execution Execution Operating speed
condition condition change request
turns ON recognition relay turns ON

Execution
processing

processing

processing

processing

Main routine condition MOV.D


Output

Output
Input

Input

program S CM8826

Speed
CR8005
SET
CM8827
CM8826

Speed change Time

"Reference example of changing speed during operation" (page 5-82)

5-42 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

 Changing the target coordinate during operation


There are the following two methods for changing the target coordinate during operation.

CPU BUILT-IN FUNCTIONS


• Using the CHGTGT instruction
• Using the target coordinate change request relay (axis 1: CR8006, axis 2: CR8106, axis 3: CR8206,
and axis 4: CR8306)
• After stop sensor input has been received and during deceleration stop
Point
operations, changes to the target coordinate cannot be executed.
• If the current coordinate has gone too far in relation to the target coordinate
specified with the target coordinate change, the return operation will be
executed.
• This function will not be executed if a deceleration stop function is being
performed because of the deceleration stop relays (CR).
• This function will not be executed if the positioning operation is within 250 µs
of completion. 5
• During fixed dimension operations caused by the stop sensor input, this

Motor (Positioning) Control


function will be ignored.
• This function will only be executed during positioning operations caused by the
PSTRT instruction.

 Using the CHGTGT instruction


During pulse output, while the execution conditions are turned ON, you can change the target
coordinate to the value that you specify using S .
Execution Execution CHGTGT
condition turns ON condition recognition processing execution

Output Input Main routine Output Input


processing processing program processing processing
実行条件 S
Current R000 CHGTGT

Target coordinate
n1 CHGSPX
n2 S
coordinate

Target coordinate change Time

 Using the target coordinate change request relay (axis 1: CR8006, axis 2:
CR8106, axis 3: CR8206, and axis 4: CR8306)
During pulse output, when the target coordinate change request relay is turned ON, the target
coordinate is changed to the target coordinate change values (axis 1: CM8829 and CM8828, axis 2:
CM8869 and CM8868, axis 3: CM8909 and CM8908, and axis 4: CM8949 and CM8948).
Execution Execution Target coordinate change
condition turns ON condition recognition request relay turns ON

Output Input Main routine Output Input


processing processing program processing processing Execution
condition CR8006
Current
SET
coordinate
Target coordinate

Target coordinate change Time

"Reference example of changing speed during operation" (page 5-82)


- KV Nano Series(terminal block type) User’s Manual - 5-43
5-2 Motor (Positioning) Control

 Support functions that can be used with the control functions


The operation of support functions, such as changing the speed, during the execution of control
CPU BUILT-IN FUNCTIONS

functions, such as the origin returning operation, is shown below.


Control Function
Origin Travel to Positioning Speed Control
Support Function
Returning Home JOG
INC ABS CW CCW
Operation Position
Speed change ○ ○ ○ ○ ○ ○ ○
Acceleration rate and
○ ○ ○ ○ ○ ○ ○
deceleration rate change
Stop sensor - - ○ ○ ○ ○ -
5 Target coordinate change
Current coordinate change
-
-
-
-

-

-
-
-
-
-
-
-
Motor (Positioning) Control

Deceleration stop ○ ○ ○ ○ ○ ○ ○
Forced stop ○ ○ ○ ○ ○ ○ ○
Limit switch ○* ○ ○ ○ ○ ○ ○

○: The support function can be executed while the control function is being executed.
- : The support function cannot be executed while the control function is being executed.
* Control relay limit switches are valid, but limit switch functions that use comparator 0 or comparator 1 are
ignored.

 Operation when support functions are combined


The operation of support functions executed after other support functions is shown below.
Second Support Function Executed
Speed Change,
First Support Function Acceleration Target Deceleration
Executed Rate Change, Stop Sensor Coordinate Stop Forced Stop
Deceleration Change Limit Switch
Rate Change
Speed change, acceleration
rate change, and deceleration ○ ○ ○ ○ ○
rate change
Stop sensor ○ - - ○ ○
Target coordinate change ○ ○ ○ ○ ○
Deceleration stop, soft limit
- - - - ○
switch
Forced stop - - - - -
○ : The function operates normally. No: The function cannot be executed.

5-44 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

List of Positioning Instructions

CPU BUILT-IN FUNCTIONS


The instructions that are used during positioning control are listed below.
For details on each instruction, see the reference page specified.
Instruction Mnemonic Operation Overview Page
Starts the positioning operation (positioning control or
Positioning operation PSTRT 5-46
speed control)
JOG operation JOG Executes the JOG operation 5-50
Origin returning operation ORG Starts the origin returning operation 5-54
Teaching TCH Acquires the current position as the target coordinate 5-58

5
Travel to home position HOME Starts the travel to home position operation 5-60
Speed change CHGSP Changes the speed during operation 5-62
Target coordinate change CHGTGT Changes the target coordinate during operation 5-66

Motor (Positioning) Control


Current value refresh RFSPS Refreshes the current value and the current speed 5-68

- KV Nano Series(terminal block type) User’s Manual - 5-45


5-2 Motor (Positioning) Control

PSTRT PSTRT Positioning


operation
Starts the positioning operation
CPU BUILT-IN FUNCTIONS

Ladder program Entry mode


Execution condition PSTRT
n1 n2 n3 P S T R T n1 n2 n3

Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand
MR DM
5 R DR LR
B
T C CTC CR TM
W
T C CTH Z CM #/$*1 #TM * @ :#/:Z

n1  -  - - -         -   
Motor (Positioning) Control

n2  -  - - -         -   
n3  -  - - -         -   

Description
n1 Specifies the unit number; this is fixed to "0" (0: CPU built-in function)*2
n2 Specifies the axis number (1 to 4)*2, 3
n3 Specifies the point number (1 to 20)*2

*1 You cannot use "$."


*2 When you specify a bit device, 16 continuous bits will be occupied. When you specify a word device, 1
word will be occupied.
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4

Operation Description

When the execution conditions are met, on the unit specified by n1 's axis number specified by
n2 with the setting details of the point number specified by n3 , the positioning operation is
started.
When the operation is completed, the workpiece stops moving.

Frequency (Hz)
Target value/travel (number of output pulses)

Operating
speed

Acceleration rate Deceleration rate


Starting
speed
(stopping
speed)
Time (ms)

5-46 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

Target Value/ Pulse Clear Deviation


Positioning Operating
Travel Output In Error Error Counter
Axis Complete Point
(N Is the Point Progress Code Flag Output

CPU BUILT-IN FUNCTIONS


Relay Number Setting
Number) Flag Destination
CM8000 + CM8814
Axis 1 CR8400 CR8401 CM8835 CM8834 CR8402 R508*1
((N - 1) × 10) bit 12
CM8200 + CM8854
Axis 2 CR8500 CR8501 CM8875 CM8874 CR8502 R509*2
((N - 1) × 10) bit 12
CM8400 + CM8894
Axis 3 CR8600 CR8601 CM8915 CM8914 CR8602 R510
((N - 1) × 10) bit 12
CM8600 + CM8934
Axis 4 CR8700 CR8701 CM8955 CM8954 CR8702 R511
((N - 1) × 10) bit 12
*1
*2
R504 on the KV-N14*T(P) and KV-N24*T(P).
R505 on the KV-N14*T(P) and KV-N24*T(P). 5

Motor (Positioning) Control


During the positioning operation, the pulse output in progress flags are turned ON and the point
numbers are stored in the control memory entries indicated in the operating point number column.
When the workpiece travels to the position stored in the control memory entries indicated in the target
value/travel column, the pulse output in progress flags are turned OFF, the positioning complete relays
are turned ON, and the workpiece stops moving.
When the next pulse output starts, the positioning complete relays are turned OFF.
Scan
ON

Operating
OFF

PSTRT Executing Executing


CR8400, CR8500, ON
CR8600, CR8700
(pulse output in progress flag) OFF

ON
CR8401, CR8501,
CR8601, CR8701 OFF
(positioning complete)

Error stop and forced stop of the positioning operation


• If an error occurs during operation, the workpiece will stop moving (this is an error stop).
• To force operation to stop, turn the forced stop flags ON.
• If an error stop or forced stop occurs, the error number will be stored in the control memory entries
indicated in the error code column and the error flags will be turned ON.
The pulse output in progress flags will be turned OFF. The positioning complete relays will not be
turned ON.
"Lists of Devices and Error Codes for Positioning" (page 5-88)

• When the pulse output in progress flags are turned ON, the PSTRT instruction
Point
cannot be executed.
• When the error flags are turned ON, the PSTRT instruction cannot be executed.
• The pulse output in progress flags are turned OFF during the first END process
after pulse output is completed.
• If pulse output is stopped due to an emergency stop, the duty cycle of the final
pulse when output is stopped is not guaranteed.
• If you set the parameters so that the number of output pulses is 0, the pulse
output in progress flags will not be turned ON. The positioning complete relays
will be turned ON. In this situation, no warnings will occur.
- KV Nano Series(terminal block type) User’s Manual - 5-47
5-2 Motor (Positioning) Control

Operation flags
CPU BUILT-IN FUNCTIONS

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
• n1 : If this parameter is given a value other than 0 (CPU built-in function).
• n2 : If this parameter is given the value 0 or a value greater than or equal to 5.
CR2012 • If the range of indirect specification or index modification is incorrect.

n3 : If this parameter is outside of its range, an operation error will not occur.
* If CR2012 is turned ON, the instruction will not be executed.

5 When CR2012 is turned ON, the detailed error information is stored in CM2250 to CM2276.
"Lists of CR and CM Devices" (page A-8)
Motor (Positioning) Control

Sample Program

When a rising edge causes input relay R000 to be turned ON, a pulse is generated according to the setting
details of point number 2 of axis 1.
<Mnemonics list>
LDP R000
R000 PSTRT PSTRT #0 #1 #2
Unit number Axis number Point number
#0 #1 #2

5-48 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

MEMO

CPU BUILT-IN FUNCTIONS


5

Motor (Positioning) Control

- KV Nano Series(terminal block type) User’s Manual - 5-49


5-2 Motor (Positioning) Control

JOG

JOG CW
JOG operation Executes the JOG operation
CPU BUILT-IN FUNCTIONS

CCW
HIGH

Ladder program Entry mode


CW signal JOG
CW J O G n1 n2
n1
CCW signal
CCW

HIGH signal n2
HIGH

5 Available Devices
Local
Index
Bit Devices Word Devices Const Ind Spec Device Modify
Motor (Positioning) Control

Operand
MR DM
R DR LR T C CTC CR TM T C CTH Z CM #/$*1 #TM * @ :#/:Z
B W
n1  -  - - -         -   
n2  -  - - -         -   

Description
n1 Specifies the unit number; this is fixed to "0" (0: CPU built-in function)*2
n2 Specifies the axis number (1 to 4)*2, 3

*1 You cannot use "$."


*2 When you specify a bit device, 16 continuous bits will be occupied. When you specify a word device, 1
word will be occupied.
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4

Operation Description

When the CW or CCW signal turns ON, on the unit specified by n1 's axis number specified by
n2 , pulse output starts at the starting speed.
When the HIGH signal is turned ON, pulses will be generated at the operating speed.
The workpiece stops moving after pulse output is completed.
HIGH signal
CW/CCW signal HIGH signal HIGH signal CW/CCW signal
ON ON OFF OFF

Operating speed

Acceleration rate
Deceleration rate
Starting speed
(stopping speed)

Time (ms)

5-50 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

Positioning
Pulse Output in Operating
Axis Complete Error Code Error Flag
Progress Flag Point Number
Relay

CPU BUILT-IN FUNCTIONS


Axis 1 CR8400 CR8401 CM8835 CM8834 CR8402
Axis 2 CR8500 CR8501 CM8875 CM8874 CR8502
Axis 3 CR8600 CR8601 CM8915 CM8914 CR8602
Axis 4 CR8700 CR8701 CM8955 CM8954 CR8702

During the JOG operation, the pulse output in progress flags are turned ON and 1001 is stored in the
control memory entries indicated in the operating point number column.
When the operation is finished, the pulse output in progress flags are turned OFF.

Scan

Execution condition
ON 5
OFF
CW (signal)

Motor (Positioning) Control


ON
Execution condition
OFF
CCW (signal)

JOG Executing Executing

ON
CR8400,CR8500,
CR8600,CR8700 OFF
(pulse output in progress flag)

Error stop and emergency stop of the JOG operation


• If an error occurs during operation, the workpiece will stop moving (this is an error stop).
• To force operation to stop, turn the forced stop flags ON.
• If an error stop or forced stop occurs, the error number will be stored in the control memory entries
indicated in the error code column and the error flags will be turned ON.
The pulse output in progress flags will be turned OFF.
"Lists of Devices and Error Codes for Positioning" (page 5-88)

• When the pulse output in progress flags are turned ON, the JOG instruction
Point
cannot be executed.
• When the error flags are turned ON, the JOG instruction cannot be executed.
• When a limit error occurs (error code 31 or 32), if you turn the error flags OFF,
even if the limit switch is turned ON, the JOG instruction can be executed in the
direction opposite to the direction of travel when the limit error occurred.
• The pulse output in progress flags are turned OFF during the first END process
after pulse output is completed.
• If pulse output is stopped due to a forced stop, the duty cycle of the final pulse
when output is stopped is not guaranteed.
• The origin returning operation relays and the positioning complete relays are
turned OFF when pulse output starts.

- KV Nano Series(terminal block type) User’s Manual - 5-51


5-2 Motor (Positioning) Control

Operation flags
CPU BUILT-IN FUNCTIONS

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
• n1 : If this parameter is given a value other than 0 (CPU built-in function).
CR2012
• n2 : If this parameter is given the value 0 or a value greater than or equal to 5.
• If the range of indirect specification or index modification is incorrect.
* If CR2012 is turned ON, the instruction will not be executed.
When CR2012 is turned ON, the detailed error information is stored in CM2250 to CM2276.
"Lists of CR and CM Devices" (page A-8)

5 Sample Program
Motor (Positioning) Control

When input R000 is turned ON, CW-JOG is executed. When input R001 is turned ON, CCW-JOG is
executed. When input R002 is turned ON at the same time as the other two inputs, the high-speed JOG
operation is executed.
<Mnemonics list>
R000 JOG
CW LD R000
LD R001
R001 #0
LD R002
CCW JOG #0 #1
R002 #1
HIGH

5-52 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

MEMO

CPU BUILT-IN FUNCTIONS


5

Motor (Positioning) Control

- KV Nano Series(terminal block type) User’s Manual - 5-53


5-2 Motor (Positioning) Control

ORG ORG Origin returning


operation
Starts the origin returning
operation
CPU BUILT-IN FUNCTIONS

Ladder program Entry mode


Execution condition ORG
n1 n2 O R G n1 n2

Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand
MR DM

5 R DR LR
B
T C CTC CR TM
W
T C CTH Z CM #/$*1 #TM * @ :#/:Z

n1  -  - - -         -   
Motor (Positioning) Control

n2  -  - - -         -   

Description
n1 Specifies the unit number; this is fixed to "0" (0: CPU built-in function)*2
n2 Specifies the axis number (1 to 4)*2, 3

*1 You cannot use "$."


*2 When you specify a bit device, 16 continuous bits will be occupied. When you specify a word device, 1
word will be occupied.
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4

Operation Description

When the execution condition turns ON, on the unit specified by n1 's axis number specified by
n2 , the origin returning operation starts. The operation stops when pulse output is complete.
Origin Origin
Pulse
Returning Returning Positioning Operating
Output In Error Error
Axis Operation In Operation Complete Point
Progress Code Flag
Progress Complete Relay Number
Flag
Flag Relay
Axis 1 CR8400 CR8404 CR8405 CR8401 CM8835 CM8834 CR8402
Axis 2 CR8500 CR8504 CR8505 CR8501 CM8875 CM8874 CR8502
Axis 3 CR8600 CR8604 CR8605 CR8601 CM8915 CM8914 CR8602
Axis 4 CR8700 CR8704 CR8705 CR8701 CM8955 CM8954 CR8702

During the origin returning operation, the pulse output in progress flags are turned ON and 1000 is
stored in the control memory entries indicated in the operating point number column.
When the workpiece travels to the origin (0) position, the pulse output in progress flags are turned OFF,
and the origin returning operation complete relays and positioning complete relays are turned ON. The
workpiece then stops moving.

5-54 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

When the next pulse output starts, the origin returning operation complete relays and positioning
complete relays are turned OFF.

CPU BUILT-IN FUNCTIONS


Scan
ON

Operating
OFF

ORG Executing Executing


CR8400,CR8500,
ON
CR8600,CR8700
(pulse output in progress flag) OFF

CR8405,CR8505, ON

CR8605,CR8705
OFF
(origin returning operation complete)

5
CR8401,CR8501,
CR8601,CR8701
(positioning complete)

Motor (Positioning) Control


Error stop and emergency stop of the origin returning operation
• If an error occurs during operation, the workpiece will stop moving (this is an error stop).
• If one of the following conditions occurs during operation, an error stop will occur as a limit sensor
error.
When the limit sensor in the opposite direction of the origin returning operation direction is detected.
When the limit sensors on both the CW side and CCW side are detected in a single origin returning
operation (including simultaneous and sequential detection).
• To force operation to stop, turn the forced stop flags ON.
• If an error stop or forced stop occurs, the error number will be stored in the control memory entries
indicated in the error code column and the error flags will be turned ON.
• The pulse output in progress flags will be turned OFF. The origin returning operation complete relays and
positioning complete relays will not be turned ON.

"Lists of Devices and Error Codes for Positioning" (page 5-88)

• When the pulse output in progress flags are turned ON, the ORG instruction
Point
cannot be executed.
• When the error flags are turned ON, the ORG instruction cannot be executed.
• The pulse output in progress flags are turned OFF during the first END process
after pulse output is completed.
• If pulse output is stopped due to a forced stop, the duty cycle of the final pulse
when output is stopped is not guaranteed.

- KV Nano Series(terminal block type) User’s Manual - 5-55


5-2 Motor (Positioning) Control

Operation flags
CPU BUILT-IN FUNCTIONS

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
• n1 : If this parameter is given a value other than 0 (CPU built-in function).
CR2012
• n2 : If this parameter is given the value 0 or a value greater than or equal to 5.
• If the range of indirect specification or index modification is incorrect.
* If CR2012 is turned ON, the instruction will not be executed.
When CR2012 is turned ON, the detailed error information is stored in CM2250 to CM2276.
"Lists of CR and CM Devices" (page A-8)

5 Sample Program
Motor (Positioning) Control

On the rising edge of R000, the origin return operation of axis 1 is started.
<Mnemonics list>
LDP R000
R000 ORG ORG #0 #1
Unit number Axis number
#0 #1

5-56 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

MEMO

CPU BUILT-IN FUNCTIONS


5

Motor (Positioning) Control

- KV Nano Series(terminal block type) User’s Manual - 5-57


5-2 Motor (Positioning) Control

Reads the current position, and


TCH TCH
Teaching sets the target coordinate to this
CPU BUILT-IN FUNCTIONS

value

Ladder program Entry mode


Execution condition TCH
n1 n2 n3 T C H n1 n2 n3

Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand
MR DM

5
R DR LR T C CTC CR TM T C CTH Z CM #/$*1 #TM * @ :#/:Z
B W
n1  -  - - -         -   
Motor (Positioning) Control

n2  -  - - -         -   
n3  -  - - -         -   

Description
n1 Specifies the unit number; this is fixed to "0" (0: CPU built-in function)*2
n2 Specifies the axis number (1 to 4)*2, 3
n3 Specifies the point number to set the target coordinate to

*1 You cannot use "$."


*2 When you specify a bit device, 16 continuous bits will be occupied. When you specify a word device, 1
word will be occupied.
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4

Operation Description

When the execution condition turns ON, on the unit specified by n1 's axis number specified by
n2 , the current value is read and stored in the target coordinate or the travel of the point number
specified by n3 .
Target coordinate or travel (N is the
Axis Current position
point number)
Axis 1 CM8000 + ((N - 1) × 10) CM8831 and CM8830
Axis 2 CM8200 + ((N - 1) × 10) CM8871 and CM8870
Axis 3 CM8400 + ((N - 1) × 10) CM8911 and CM8910
Axis 4 CM8600 + ((N - 1) × 10) CM8951 and CM8950

The storage position changes depending on the axis number and the point number.
"Lists of Devices and Error Codes for Positioning" (page 5-88)
Example
Recording the current position of axis 1 as the target coordinate of point number 1
(1)The TCHX instruction is executed.
(2)The contents of CM8830 and CM8831 (the current position of axis 1) are
transmitted to CM8000 and CM8001 (the target coordinate or travel of point
number 1).

R000 TCH
Unit number Axis number Point number
#0 #1 #2

5-58 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

• When the pulse output in progress flags are turned ON, the TCH instruction
Point
cannot be executed.

CPU BUILT-IN FUNCTIONS


• When the error flags are turned ON, the TCH instruction cannot be executed.

Operation flags

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.


n1 : If this parameter is given a value other than 0 (CPU built-in function).
n2 : If this parameter is given the value 0 or a value greater than or equal to 5.
5
CR2012 • If the range of indirect specification or index modification is incorrect.

Motor (Positioning) Control


n3 : If this parameter is outside of its range, an operation error will not occur.
* If CR2012 is turned ON, the instruction will not be executed.
When CR2012 is turned ON, the detailed error information is stored in CM2250 to CM2276.
"Lists of CR and CM Devices" (page A-8)

Sample Program

Set the target coordinate of point number 2 to the current position of axis 1, which was moved by a JOG
operation.

R000 JOG ;<Mnemonics list>


CW LD R000
#0
LD R001
LD R002
R001 JOG #0 #1
CCW LD R003
TCH #0 #1 #2

R002 #1
HIGH

R003 TCH
Unit number Axis number Point number
#0 #1 #2

- KV Nano Series(terminal block type) User’s Manual - 5-59


5-2 Motor (Positioning) Control

HOME Starts the travel to home position


HOME
Travel to home position
operation
CPU BUILT-IN FUNCTIONS

Ladder program Entry mode


Execution condition HOME
n1 n2 H O M E n1 n2

Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand
MR DM

5 R DR LR
B
T C CTC CR TM
W
T C CTH Z CM #/$*1 #TM * @ :#/:Z

n1  -  - - -         -   
Motor (Positioning) Control

n2  -  - - -         -   

Description
n1 Specifies the unit number; this is fixed to "0" (0: CPU built-in function)*2
n2 Specifies the axis number (1 to 4)*2, 3
*1 You cannot use "$."
*2 When you specify a bit device, 16 continuous bits will be occupied. When you specify a word device, 1
word will be occupied.
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4

Operation Description

When the execution condition turns ON, on the unit specified by n1 's axis number specified by
n2 , the travel to home position operation starts. The operation stops when pulse output is complete.
Pulse Output Positioning
Home Position Operating
Axis In Progress Complete Error Code Error Flag
Coordinate Point Number
Flag Relay
Axis 1 CM8820 CR8400 CR8401 CM8835 CM8834 CR8402
Axis 2 CM8860 CR8500 CR8501 CM8875 CM8874 CR8502
Axis 3 CM8900 CR8600 CR8601 CM8915 CM8914 CR8602
Axis 4 CM8940 CR8700 CR8701 CM8955 CM8954 CR8702

During HOME instruction execution, the pulse output in progress flags are turned ON and 1002 is
stored in the control memory entries indicated in the operating point number column.
When the workpiece travels to the point in which the current values equal the values stored in the
control memory entries indicated in the home position coordinate column, the pulse output in progress
flags are turned OFF, the positioning complete relays are turned ON, and the workpiece stops moving.

5-60 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

When the next pulse output starts, the positioning complete relays are turned OFF.
Scan

CPU BUILT-IN FUNCTIONS


ON

Execution condition
OFF

HOME Executing Executing


CR8400,CR8500, ON
CR8600,CR8700
(pulse output in progress flag) OFF

ON
CR8401, CR8501,
CR8601, CR8701 OFF
(positioning complete)

Error stop and emergency stop of the travel to home position operation
• If an error occurs during operation, the workpiece will stop moving (this is an error stop).
5
• To force operation to stop, turn the forced stop flags ON.

Motor (Positioning) Control


• If an error stop or forced stop occurs, the error number will be stored in the control memory entries
indicated in the error code column and the error flags will be turned ON.
Also, the pulse output in progress flags will be turned OFF and the positioning complete relays will
not be turned ON.
"Lists of Devices and Error Codes for Positioning" (page 5-88)

• When the pulse output in progress flags are turned ON, the HOME instruction
Point
cannot be executed.
• When the error flags are turned ON, the HOME instruction cannot be executed.
• The pulse output in progress flags are turned OFF during the first END process
after pulse output is completed.
• If pulse output is stopped due to a forced stop, the duty cycle of the final pulse
when output is stopped is not guaranteed.

Reference The starting speed, acceleration/deceleration time, and operating speed are the same as
for the origin returning operation.

Operation flags

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
• n1 : If this parameter is given a value other than 0 (CPU built-in function).
CR2012
• n2 : If this parameter is given the value 0 or a value greater than or equal to 5.
• If the range of indirect specification or index modification is incorrect.
* If CR2012 is turned ON, the instruction will not be executed.
When CR2012 is turned ON, the detailed error information is stored in CM2250 to CM2276.
"Lists of CR and CM Devices" (page A-8)

Sample Program

When a rising edge on axis 1 causes input relay R000 to be turned ON, the travel to home position
operation is executed.
;<Mnemonics list>
R000 HOME LDP R000
Unit number Axis number HOME #0 #1
#0 #1

- KV Nano Series(terminal block type) User’s Manual - 5-61


5-2 Motor (Positioning) Control

CHGSP CHGSP Speed


change
Changes the speed
CPU BUILT-IN FUNCTIONS

Ladder program Entry mode


Execution condition CHGSP
n1 n2 S C H G S P n1 n2 S

Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand
MR DM
5 R DR LR
B
T C CTC CR TM
W
T C CTH Z CM #/$*1 #TM * @ :#/:Z

n1  -  - - -         -   
Motor (Positioning) Control

n2  -  - - -         -   
S  -  - - -         -   

Description
n1 Specifies the unit number; this is fixed to "0" (0: CPU built-in function)*2
n2 Specifies the axis number (1 to 4)*2, 3
S Specifies the speed to change to (1 to 100000)*4

*1 You cannot use "$."


*2 When you specify a bit device, 16 continuous bits will be occupied. When you specify a word device, 1
word will be occupied.
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4
*4 When you specify a bit device, 32 continuous bits will be occupied.
When you specify a word device, 2 continuous words will be occupied.
If you specify a relay other than the channel's leading relay (such as R002, R106, and R1012), the next
channel will also be used to provide the necessary 32 bits.

Operation Description
When the execution condition turns ON during pulse output, on the unit specified by n1 's axis
number specified by n2 , the operating speed is changed to the value specified by S .
Execution condition Execution condition CHGTGT
turns ON recognition processing execution

Output Input Main routine Output Input


processing processing program processing processing
実行条件 S
R000 CHGSP

Speed n1 CHGSPX
n2 S

Speed change Time

5-62 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

• You cannot specify a speed that is less than the starting speed. If you specify a
Point
speed that is less than the starting speed, the starting speed will be used.

CPU BUILT-IN FUNCTIONS


• When the execution condition is turned ON, the new value to change the speed
to is always applied. (The response time, the time until the value is applied, is
less than 1.2 ms.)

Using this function together with interrupt conditions according to comparator 2


After an interrupt condition according to comparator 2 is generated, the operating speed is changed to
the value specified by S .

An interrupt according to
comparator 2 occurs.

5
Output Input Main routine Output Input

Motor (Positioning) Control


processing processing program processing processing CR2008
EI

END
Input
processing
Interrupt program
INT
Speed CR8415

R000 CHGTGT
Unit number Axis number Speed change value
S #0 #1 #10000

RETI

ENDH

Speed change Time

For details on comparator 2, see "Comparator settings" (page 5-33).

Reference Using operating speed change request relays CR8005 (axis 1), CR8105 (axis 2), CR8205
(axis 3), and CR8305 (axis 4)
Execution condition Execution condition Operating speed change
turns ON recognition request relay turns ON

Output Input Main routine Output Input


Execution
processing processing program processing processing condition MOV.D
S CM8826

Speed CR8005

CM8826
CM8827 Axis 1
operating speed
change request

Time
Speed change

For details on the operating speed change request relays, see "Lists of Devices and Error Codes
for Positioning" (page 5-88).

Reference • When you are using the operating speed change request relays to change the
operating speed, the operating speed change values are stored in CM8826 and
CM8827 (axis 1), CM8866 and CM8867 (axis 2), CM8906 and CM8907 (axis 3), and
CM8946 and CM8947 (axis 4).
• When changing speed, the point number acceleration/deceleration rate is read, and the
speed is changed according to the acceleration/deceleration rate.
- KV Nano Series(terminal block type) User’s Manual - 5-63
5-2 Motor (Positioning) Control

Operation flags
CPU BUILT-IN FUNCTIONS

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
• n1 : If this parameter is given a value other than 0 (CPU built-in function).
CR2012
• n2 : If this parameter is given the value 0 or a value greater than or equal to 5.
• If the range of indirect specification or index modification is incorrect.
* If CR2012 is turned ON, the instruction will not be executed.
When CR2012 is turned ON, the detailed error information is stored in CM2250 to CM2276.
"Lists of CR and CM Devices" (page A-8)

5
Sample Program
Motor (Positioning) Control

Only when a rising edge causes input relay R000 to be turned ON, the operating speed of axis 1 is
changed to 10000 Hz.
CHGSP ;<Mnemonics list>
R000
Unit number Axis number Speed change value LD R000
#0 #1 #10000 CHGSP #0 #1 #10000

5-64 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

MEMO

CPU BUILT-IN FUNCTIONS


5

Motor (Positioning) Control

- KV Nano Series(terminal block type) User’s Manual - 5-65


5-2 Motor (Positioning) Control

Target
CHGTGT CHGTGT
coordinate
Changes the target coordinate
during positioning operation
CPU BUILT-IN FUNCTIONS

change

Ladder program Entry mode


Execution condition CHGTGT
n1 n2 S C H G T G T n1 n2 S

Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand
MR DM
5 R DR LR
B
T C CTC CR TM
W
T C CTH Z CM #/$*1 #TM * @ :#/:Z

n1  -  - - -        *1 -   
Motor (Positioning) Control

n2  -  - - -        *1 -   
S  -  - - -         -   

Description
n1 Specifies the unit number; this is fixed to "0" (0: CPU built-in function)*2
n2 Specifies the axis number (1 to 4)*2, 3
S Specifies the target coordinate change value*4
*1 You cannot use "$."
*2 When you specify a bit device, 16 continuous bits will be occupied. When you specify a word device, 1
word will be occupied.
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4
*4 When you specify a bit device, 32 continuous bits will be occupied.
When you specify a word device, 2 continuous words will be occupied.
If you specify a relay other than the channel's leading relay (such as R002, R106, and R1012), the next
channel will also be used to provide the necessary 32 bits.

Operation Description
When the execution condition turns ON during pulse output, on the unit specified by n1 's axis
number specified by n2 , the target coordinate is changed to the value specified by S .

Execution Execution CHGTGT


condition turns ON condition recognition processing execution

Output Input Main routine Output Input


processing processing program processing processing
実行条件 S
Current R000 CHGTGT

Target coordinate
n1 CHGSPX
n2 S
coordinate

Target coordinate change Time

5-66 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

• Requests to execute this function will not be accepted when the positioning
Point
operation is within 250 µs of completion, when a deceleration stop is in
progress due to the deceleration stop relay, and during fixed dimension

CPU BUILT-IN FUNCTIONS


operations caused by the stop sensor input.
• When the target coordinate is changed to a coordinate that is in the direction
opposite to the direction of travel (example: if you specify a target coordinate
that is smaller than the current coordinate during operation in the normal
direction), an operation will be performed to move the workpiece in the reverse
direction.
• (The response time between the execution conditions turning ON and the value
being applied is less than 1.2 ms.)

Reference Using target coordinate change request relays CR8006 (axis 1), CR8106 (axis 2),
CR8206 (axis 3), and CR8306 (axis 4)
5
Execution condition Execution condition Target coordinate change

Motor (Positioning) Control


turns ON recognition request relay turns ON

Output Input Main routine Output Input


processing processing program processing processing Execution
condition CR8006
Current SET
coordinate
Target coordinate

Time
Target coordinate change

For details on the target coordinate change request relays, see "Lists of Devices and Error Codes
for Positioning" (page 5-88).

Reference When you are using the target coordinate change request relays to change the target
coordinate, the target coordinate change values are stored in CM8828 and CM8829 (axis
1), CM8868 and CM8869 (axis 2), CM8908 and CM8909 (axis 3), and CM8948 and
CM8949 (axis 4).

Operation flags

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
• n1 : If this parameter is given a value other than 0 (CPU built-in function).
CR2012
• n2 : If this parameter is given the value 0 or a value greater than or equal to 5.
• If the range of indirect specification or index modification is incorrect.
* If CR2012 is turned ON, the instruction will not be executed.
When CR2012 is turned ON, the detailed error information is stored in CM2250 to CM2276.
"Lists of CR and CM Devices" (page A-8)

Sample Program

Only when a rising edge causes input relay R000 to be turned ON, the target coordinate of axis 1 is
changed to 10000.
;<Mnemonics list>
R000 CHGTGT LD R000
Unit number Axis number Target coordinate CHGTGT #0 #1 #10000
#0 #1 #10000

- KV Nano Series(terminal block type) User’s Manual - 5-67


5-2 Motor (Positioning) Control

Updates the current


RFSPS RFSPS
Current value refresh position and current speed
CPU BUILT-IN FUNCTIONS

to the most recent values

Ladder program Entry mode


Execution condition RFSPS
n1 n2 R F S P S n1 n2

Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand
MR DM
5 R DR LR
B
T C CTC CR TM
W
T C CTH Z CM #/$*1 #TM * @ :#/:Z

n1  -  - - -         -   
Motor (Positioning) Control

n2  -  - - -         -   

Description
n1 Specifies the unit number; this is fixed to "0" (0: CPU built-in function)*2
n2 Specifies the axis number (1 to 4)*2, 3
*1 You cannot use "$."
*2 When you specify a bit device, 16 continuous bits will be occupied. When you specify a word device, 1
word will be occupied.
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4

Operation Description

RFSPS When the execution condition turns ON, on the unit specified by n1 's axis number
specified by n2 , the current coordinate (axis 1: CM8830, axis 2: CM8870, axis 3:
CM8910, and axis 4: CM8950) and current speed (axis 1: CM8832, axis 2: CM8872,
axis 3: CM8912, and axis 4: CM8952) are updated to the newest values.
Axis Current Coordinate Current Speed
Axis 1 CM8831 and CM8830 CM8833 and CM8832
Axis 2 CM8871 and CM8870 CM8873 and CM8872
Axis 3 CM8911 and CM8910 CM8913 and CM8912
Axis 4 CM8951 and CM8950 CM8953 and CM8952

Operation flags

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
• n1 : If this parameter is given a value other than 0 (CPU built-in function).
CR2012
• n2 : If this parameter is given the value 0 or a value greater than or equal to 5.
• If the range of indirect specification or index modification is incorrect.
* If CR2012 is turned ON, the instruction will not be executed.
When CR2012 is turned ON, the detailed error information is stored in CM2250 to CM2276.
"Lists of CR and CM Devices" (page A-8)

5-68 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

Sample Program

CPU BUILT-IN FUNCTIONS


Use the most recent current coordinates of axis 1 and axis 2 to stop operation.

CR2002 RFSPS ;<Mnemonics list>


Unit number Axis number
#0 #1 LD CR2002
Always
RFSPS #0 #1
turned ON RFSPS #0 #2
RFSPS LD>=.L CM8830 +10000
Unit number Axis number
#0 #2 AND<=.D CM8870 #20000
OUT CR8015
OUT CR8115
CM8830 CM8870 CR8015
>=.L <=.D

5
#10000 #20000 Axis 1
Axis 1 Axis 2 stop sensor input
current current
coordinate coordinate CR8115

Motor (Positioning) Control


Axis 2
stop sensor input

- KV Nano Series(terminal block type) User’s Manual - 5-69


5-2 Motor (Positioning) Control

List of Positioning Functions


CPU BUILT-IN FUNCTIONS

The functions that are used during positioning control are listed below.
For details on each function, see the reference page specified.

Function Mnemonic Operation Overview Page


Starts the positioning operation (positioning
Positioning operation PSTRT 5-71
control or speed control)
Origin returning operation ORG Starts the origin returning operation 5-72
Acquires the current position as the target
Teaching TCH 5-73
coordinate

5
Travel to home position HOME Starts the travel to home position operation 5-74
Speed change CHGSP Changes the speed during operation 5-75
Target coordinate change CHGTGT Changes the target coordinate during operation 5-76
Motor (Positioning) Control

Refreshes the current value and the current


Current value refresh RFSPS 5-77
speed

5-70 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

PSTRT Positioning operation

CPU BUILT-IN FUNCTIONS


Pulse start

PSTRT ([execution condition,]*1 CPU built-in function or unit number selection,


axis number, point number)
Operand or Recognized Type Const
Return Value Description Device Formula
.U .S .D .L .F .DF .B .T #/$
Specifies the unit number; this is fixed to "0" .U .U .U .U - - -   
n1 Unit number*2
(0: CPU built-in function)
n2 Axis number*2 Specifies the axis number (1 to 4)*3 .U .U .U .U - - -   

n3 Point number*2 Specifies the point number (1 to 20) .U .U .U .U - - -   


5
R Return value Return value - - - - - - - - - -

Motor (Positioning) Control


*1 The values within the brackets may be omitted. (If you omit the execution conditions, the function will
always be executed—every scan.)
*2 You cannot use "$" (hexadecimal specification only).
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4

Operation Description

PSTRT When the execution condition turns ON, on the unit specified by n1 's axis number
specified by n2 with the setting details of the point number specified by n3 , the
positioning operation is started.
When the operation is completed, the workpiece stops moving.

 Format example
PSTRT(MR0,0,1,2)

MR000 PSTRT
Unit number Axis number Point number
#0 #1 #2
Execution condition

• When the pulse output in progress flags are turned ON, the PSTRT function
Point
cannot be executed.
• When the error flags are turned ON, the PSTRT instruction cannot be executed.
• The pulse output in progress flags are turned OFF during the first END process
after pulse output is completed.
• If the pulse output is stopped by an emergency stop, the current position
information may be lost.
Also, the duty cycle of the final pulse when pulse output is stopped cannot be
guaranteed.
• If you set the parameters so that the number of output pulses is 0, the pulse
output in progress flags will not be turned ON. The positioning complete relays
will be turned ON. In this situation, no warnings will occur.

- KV Nano Series(terminal block type) User’s Manual - 5-71


5-2 Motor (Positioning) Control

ORG Origin returning operation


CPU BUILT-IN FUNCTIONS

Origin

ORG ([execution condition,]*1 CPU built-in function or unit number selection,


axis number)
Operand or Recognized Type Const
Return Value Description Device Formula
.U .S .D .L .F .DF .B .T #/$
Specifies the unit number; this is fixed to "0" .U .U .U .U - - -   
n1 Unit number*2
(0: CPU built-in function)
n2 Axis number*2 Specifies the axis number (1 to 4)*3 .U .U .U .U - - -   

5 R Return value Return value - - - - - - - - - -

*1 The values within the brackets may be omitted. (If you omit the execution conditions, the function will
Motor (Positioning) Control

always be executed—every scan.)


*2 You cannot use "$" (hexadecimal specification only).
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4

Operation Description

ORG When the execution condition turns ON, on the unit specified by n1 's axis number
specified by n2 , the origin returning operation starts. The operation stops when pulse
output is complete.

 Format example
ORG(MR0,0,1)

MR000 ORG
Unit number Axis number
#0 #1
Execution condition

• When the pulse output in progress flags are turned ON, the ORG instruction
Point
cannot be executed.
• When the error flags are turned ON, the ORG instruction cannot be executed.
• The pulse output in progress flags are turned OFF during the first END process
after pulse output is completed.
• If the pulse output is stopped by a forced stop, the current position information
may be lost.
Also, the duty cycle of the final pulse when pulse output is stopped cannot be
guaranteed.

5-72 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

TCH Teaching

CPU BUILT-IN FUNCTIONS


Teaching

TCH ([execution condition,]*1 CPU built-in function or unit number selection,


axis number, point number)
Operand or Recognized Type Const
Return Value Description Device Formula
.U .S .D .L .F .DF .B .T #/$
Specifies the unit number; this is fixed to "0" .U .U .U .U - - -   
n1 Unit number*2
(0: CPU built-in function)
n2 Axis number*2 Specifies the axis number (1 to 4)*3 .U .U .U .U - - -   

n3 Point number*2 Specifies the point number (1 to 20) .U .U .U .U - - -   


5
R Return value Return value - - - - - - - - - -

Motor (Positioning) Control


*1 The values within the brackets may be omitted. (If you omit the execution conditions, the function will
always be executed—every scan.)
*2 You cannot use "$" (hexadecimal specification only).
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4

Operation Description

TCH When the execution condition turns ON, on the unit specified by n1 's axis number
specified by n2 , the current value is read and stored in the target coordinate or the travel
of the point number specified by n3 .

 Format example
TCH(MR0,0,1,2)

MR000 TCH
Unit number Axis number Point number
#0 #1 #2
Execution condition

• When the pulse output in progress flags are turned ON, the TCH instruction
Point
cannot be executed.
• When the error flags are turned ON, the TCH instruction cannot be executed.

- KV Nano Series(terminal block type) User’s Manual - 5-73


5-2 Motor (Positioning) Control

HOME Travel to home position


CPU BUILT-IN FUNCTIONS

Home

HOME ([execution condition,]*1 CPU built-in function or unit number selection,


axis number)
Operand or Recognized Type Const
Return Value Description Device Formula
.U .S .D .L .F .DF .B .T #/$
Specifies the unit number; this is fixed to "0" .U .U .U .U - - -   
n1 Unit number*2
(0: CPU built-in function)
n2 Axis number*2 Specifies the axis number (1 to 4)*3 .U .U .U .U - - -   

5 R Return value Return value - - - - - - - - - -

*1 The values within the brackets may be omitted. (If you omit the execution conditions, the function will
Motor (Positioning) Control

always be executed—every scan.)


*2 You cannot use "$" (hexadecimal specification only).
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4

Operation Description

HOME When the execution condition turns ON, on the unit specified by n1 's axis number
specified by n2 , the travel to home position operation starts. The operation stops when
pulse output is complete.

 Format example
HOME(MR0,0,1)

MR000 HOME
Unit number Axis number
#0 #1
Execution condition

• When the pulse output in progress flags are turned ON, the HOME instruction
Point
cannot be executed.
• When the error flags are turned ON, the HOME instruction cannot be executed.
• The pulse output in progress flags are turned OFF during the first END process
after pulse output is completed.
• If the pulse output is stopped by a forced stop, the current position information
may be lost.
Also, the duty cycle of the final pulse when pulse output is stopped cannot be
guaranteed.

5-74 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

CHGSP Speed change

CPU BUILT-IN FUNCTIONS


Change speed

CHGSP ([execution condition,]*1 CPU built-in function or unit number selection,


axis number, speed change value)
Operand or Recognized Type Const
Return Value Description Device Formula
.U .S .D .L .F .DF .B .T #/$
Specifies the unit number; this is fixed to "0" .U .U .U .U - - -   
n1 Unit number*2
(0: CPU built-in function)
n2 Axis number*2 Specifies the axis number (1 to 4)*3 .U .U .U .U - - -   

S Speed change
value
Specifies speed change value
(1 to 100,000) .U .U .D .D - - -    5
R Return value Return value - - - - - - - - - -

Motor (Positioning) Control


*1 The values within the brackets may be omitted. (If you omit the execution conditions, the function will
always be executed—every scan.)
*2 You cannot use "$" (hexadecimal specification only).
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4

Operation Description

CHGSP When the execution condition turns ON during pulse output, on the unit specified by n1 's
axis number specified by n2 , the operating speed is changed to the value specified by
S .

 Format example
CHGSP(MR0,0,1,50000)

MR000 CHGSP
Unit number Axis number Speed change value
#0 #1 #50000
Execution condition

• You cannot specify a speed that is less than the starting speed. If you specify a
Point
speed that is less than the starting speed, the starting speed will be used.
• When the execution condition is turned ON, the new value to change the speed
to is always applied. (It takes a maximum of 1.2 ms until the change is applied
to operation.)

- KV Nano Series(terminal block type) User’s Manual - 5-75


5-2 Motor (Positioning) Control

CHGTGT Target coordinate change


CPU BUILT-IN FUNCTIONS

Change target

CHGTGT ([execution condition,]*1 CPU built-in function or unit number selection,


axis number, target coordinate change value)
Operand or Recognized Type Const
Return Value Description Device Formula
.U .S .D .L .F .DF .B .T #/$
Specifies the unit number; this is fixed to "0" .U .U .U .U - - -   
n1 Unit number*2
(0: CPU built-in function)
n2 Axis number*2 Specifies the axis number (1 to 4)*3 .U .U .U .U - - -   

5 S Target coordinate
change value
Specifies the target coordinate change value. .U .U .D .D - - -   

R Return value Return value - - - - - - - - - -


Motor (Positioning) Control

*1 The values within the brackets may be omitted. (If you omit the execution conditions, the function will
always be executed—every scan.)
*2 You cannot use "$" (hexadecimal specification only).
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4

Operation Description

CHGTGT When the execution condition turns ON during pulse output, on the unit specified by n1 's
axis number specified by n2 , the target coordinate is changed to the value specified by
S .

 Format example
CHGTGT(MR0,0,1,100000)

MR000 CHGTGT
Unit number Axis number Target coordinate
#0 #1 #100000
Execution condition

• Requests to execute this function will not be accepted when the positioning
Point
operation is within 250 µs of completion, when a deceleration stop is in
progress due to the deceleration stop relay, and during fixed dimension
operations caused by the stop sensor input.
• When the target coordinate is changed to a coordinate that is in the direction
opposite to the direction of travel (example: if you specify a target coordinate
that is smaller than the current coordinate during operation in the normal
direction), an operation will be performed to move the workpiece in the reverse
direction.
• After the execution condition turns ON, it takes a maximum of 1.2 ms until the
change is applied to operation.

5-76 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

RFSPS Current value refresh

CPU BUILT-IN FUNCTIONS


Pulse and speed refresh

RFSPS ([execution condition,]*1 CPU built-in function or unit number selection,


axis number)
Operand or Recognized Type Const
Return Value Description Device Formula
.U .S .D .L .F .DF .B .T #/$
Specifies the unit number; this is fixed to "0" .U .U .U .U - - -   
n1 Unit number*2
(0: CPU built-in function)
n2 Axis number*2 Specifies the axis number (1 to 4)*3 .U .U .U .U - - -   

R Return value Return value - - - - - - - - - -


5
*1 The values within the brackets may be omitted. (If you omit the execution conditions, the function will

Motor (Positioning) Control


always be executed—every scan.)
*2 You cannot use "$" (hexadecimal specification only).
*3 The numbers of the axes that can be used vary depending on the unit.
KV-N14*T(P) and KV-N24*T(P): 1 and 2
KV-N40*T(P): 1 to 3
KV-N60AT(P): 1 to 4

Operation Description

RFSPS When the execution condition turns ON, on the unit specified by n1 's axis number
specified by n2 , the current coordinate (axis 1: CM8830, axis 2: CM8870, axis 3:
CM8910, and axis 4: CM8950) and current speed (axis 1: CM8832, axis 2: CM8872, axis 3:
CM8912, and axis 4: CM8952) are updated to the newest values.

 Format example
RFSPS(MR0,0,1)

MR000 RFSPS
Unit number Axis number
#0 #1
Execution condition

- KV Nano Series(terminal block type) User’s Manual - 5-77


5-2 Motor (Positioning) Control

Reference Example of Positioning Control


CPU BUILT-IN FUNCTIONS

 Reference example of positioning control


 Setup example
CPU input wiring This section explains a reference example in
which positioning control is performed with the
Input common following conditions. Internal relays (MR) are
R000 Origin sensor used for the execution conditions, but change
R001 Stop sensor this to match your usage environment.
R002 COM
5 R003 MR000
Origin returning
operation start input
R004 MR001 JOG instruction CW
Motor (Positioning) Control

R005 MR002 JOG instruction CCW


R006 Limit switch CW High-speed JOG
MR003 instruction
R007 Limit switch CCW
Stepping motor
R008 Driver (2-pulse mode)
R009
Twisted-pair cable
+
CW
-
+
CPU output wiring -
CCW

Output common
MR004 Point 0 travel
R500 instruction
R501 FG
Stepping motor
R502
R503

5-78 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

 Configuring settings with the parameter setup tool

1 Click on the KV STUDIO toolbar to display the "CPU positioning parameter edit" window.

CPU BUILT-IN FUNCTIONS


In the workspace of the "CPU positioning parameter edit" window, click "Point common
setting."

2 Use the "Point common setting" window to set the starting


operating speed during the point's operation.
"Point common setting" (page 5-14)

3 Click "I/O setting" to set the input connection target and 5


polarity of items such as the origin sensor and stop sensor.

Motor (Positioning) Control


You can also select values such as the output mode.
"I/O settings" (page 5-15)

4 Click "Origin return setting" to configure settings such as the


speed, direction, and method of the origin returning operation.
You can also set the home position.
"Origin returning operation" (page 5-22)

5 Click "JOG setting" to configure the speeds during JOG


operation and similar operations.
"JOG settings" (page 5-31)

6 Click "Comparator setting" to set the values to compare with


the current value.
" Comparator settings" (page 5-33)

- KV Nano Series(terminal block type) User’s Manual - 5-79


5-2 Motor (Positioning) Control

 Program examples

 Reference example of starting the origin returning operation


CPU BUILT-IN FUNCTIONS

MR000 CR8400 ORG ;<Mnemonics list>


Unit number Axis number
#0 #1 LDP MR000
Origin returning Axis 1
operation start pulse output ANB CR8400
request in progress ORG #0 #1
CR8401 CR8405 MR000 LD CR8401
RES AND CR8405
Axis 1 Axis 1 Origin returning RES MR000
positioning origin returning operation start
complete relay operation complete request

 Reference example of starting the JOG operation


5 MR001 JOG <Mnemonics list>
CW LD MR001
Motor (Positioning) Control

JOG in the positive direction #0 LD MR002


LD MR003
MR002
JOG #0 #1
CCW
JOG in the negative direction

MR003 #1
HIGH
JOG operating speed mode

 Reference example of starting positioning control

PSTRT <Mnemonics list>


MR004 CR8400
Unit number Axis number Point number LDP MR004
#0 #1 #1
Positioning Axis 1 ANB CR8400
starts pulse output KV-N24
PSTRT #0 #1 #1
in progress
LD MR004
MR004 CR8401 MR004
ANP CR8401
RES
Positioning Axis 1 Positioning RES MR004
starts positioning starts
complete relay
* The internal relays (MR) are used for the execution conditions. Make changes as necessary to match
your operating environment.

5-80 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

 Reference example of consecutively starting the positioning operation


On the rising edge of the MR010 relay, the positioning operation is started.

CPU BUILT-IN FUNCTIONS


Point 1  stop for 0.5 seconds  point 2  stop for 1 second  point 3  stop for 1.5 seconds  point 4
<Mnemonics list>
MR010 PSTRT LDP MR010
Unit number Axis number Point number Travel to PSTRT #0 #1 #1
#0 #1 #1 point 1 LD CR8401
AND= CM8835 #1
CR8401 CM8835 #50 MR011 PSTRT Travel to ONDL #50 MR011
= ONDL
Unit number Axis number Point number CON
#0 #1 #2 point 2
Axis 1 positioning #1 MR011 AND MR011
complete relay Axis 1 operating PSTRT #0 #1 #2
point number LD CR8401
CR8401 CM8835 #100 MR012 PSTRT Travel to AND= CM8835 #2

5
= ONDL
Unit number Axis number Point number
point 3 ONDL #100 MR012
#0 #1 #3 CON
Axis 1 positioning #2 MR012
complete relay Axis 1 operating AND MR012
point number PSTRT #0 #1 #3

Motor (Positioning) Control


CR8401 CM8835 #150 MR013 PSTRT Travel to LD CR8401
Unit number Axis number Point number AND= CM8835 #3
= ONDL point 4
#0 #1 #4 ONDL #150 MR013
Axis 1 positioning #3 MR013
complete relay Axis 1 operating CON
point number AND MR013
PSTRT #0 #1 #4

 Reference example of starting the positioning operation at high speed


By executing the PSTRT instruction in an interrupt routine, this program starts high-speed pulse output
without being influenced by scan times.
On the rising edge of input R000, pulse output is started.
<Mnemonics list>
CR2002
EI LD CR2002
EI
Always turned ON HSP R000
END
HSP INT R000
R000 LD CR2002
PSTRT #0#1#1
RETI
ENDH
END

INT
R000

CR2002 PSTRT
Unit number Axis number Point number
#0 #1 #1
Always turned ON

RETI

ENDH

- KV Nano Series(terminal block type) User’s Manual - 5-81


5-2 Motor (Positioning) Control

 Reference example of changing speed during operation

 Using comparator 2 interrupt relays CR8415 (axis 1), CR8515 (axis 2), CR8615
CPU BUILT-IN FUNCTIONS

(axis 3), and CR8715 (axis 4)


Configure the settings to allow interrupt processing.
On the rising edge of the MR100 relay, the multi-stage control state DM5000 (change this to match your
usage environment) is cleared, comparator 2 (the interrupt position) is set to 50000, and the PSTRT
instruction is used to start pulse output.
When the current position and comparator 2 are equal, interrupt processing is started, and
incrementation of the multi-stage control state DM5000 starts.

Interrupt processing

5 First instance of multi-stage processing


If multi-stage control state DM5000 equals 0, 100000—the next interrupt position—is
written to comparator 2, and the speed is changed to 15000 (Hz).
Motor (Positioning) Control

Second instance of multi-stage processing


If multi-stage control state DM5000 equals 1, 150000—the next interrupt position—is
written to comparator 2, and the speed is changed to 25000 (Hz).
Third instance of multi-stage processing
If multi-stage control state DM5000 equals 2, the speed is changed to 20000 (Hz).

• The values for interrupts according to comparator 2 (axis 1: CM8807 and


Point
CM8806, axis 2: CM8847 and CM8846, axis 3: CM8887 and CM8886, axis 4:
CM8927 and CM8926) are recognized by the KV Nano Series when the CHGSP
instruction is executed or when pulse output is started by a PSTRT instruction.
Just writing the values to control memory is not enough to make this function
operate correctly.
When using comparator 2 as an interrupt condition, write the value to the
control memory entries, and then execute the PSTRT, JOG, ORG, HOME, or
CHGSP instruction.
• CR8415, CR8515, CR8615, and CR8715 will not actually be turned ON and OFF.
They are only used as a symbol for ladder programs.

5-82 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

<Mnemonics list>
CR2008 LD CR2008
EI

CPU BUILT-IN FUNCTIONS


EI
Turns ON for one scan LDP MR100
after operations start MOV.D #0 DM5000
MOV.D #50000 CM8806
MR010 MOV.D
PSTRT #0 #1 #1
#0 DM5000 END
Multi-stage INT CR8415
speed LD= DM5000 #0
change MOV.D MOV.D #100000 CM8806
#50000 CM8806 CHGSP #0 #1 #15000
LD= DM5000 #1
Axis 1 MOV.D #150000 CM8806
comparator 2
PSTRT CHGSP #0 #1 #25000
Unit number Axis number Point number LD= DM5000 #2
#0 #1 #1 CHGSP #0 #1 #20000

END
LD CR2002
INC DM5000 5
RETI
ENDH

Motor (Positioning) Control


DM5000 INT
= CR8415
#0
Axis 1 comparator 2
matching relay
DM5000 MOV.D
= #100000 CM8806
#0
Axis 1
comparator 2
CHGSP
Unit number Axis number Speed change value
#0 #1 #15000

DM5000 MOV.D
= #150000 CM8806
#2
Axis 1
comparator 2
CHGSP
Unit number Axis number Speed change value
#0 #1 #25000

DM5000 CHGSP
= Unit number Axis number Speed change value
#2 #0 #1 #20000

CR2002 DM5000
INC
Always turned ON

RETI

ENDN

- KV Nano Series(terminal block type) User’s Manual - 5-83


5-2 Motor (Positioning) Control

Speed
CPU BUILT-IN FUNCTIONS

25000
20000
15000

Starting
speed

50000 100000 150000 Distance

Reference For details about the timing that the speed is changed with, see "Changing the

5 speed during operation" (page 5-40).

 Using operating speed change request relays CR8005 (axis 1), CR8105 (axis 2),
Motor (Positioning) Control

CR8205 (axis 3), and


CR8305 (axis 4)
In the parameter settings, select speed control for
point number 1, and then set the acceleration
rate, deceleration rate, and operating speed.
The acceleration determined by these settings is
also applied to the acceleration when the speed is
changed by means of a speed change request.
Enable the stop sensor setting.
Set the travel after stop sensor input is received.
The value 65535 means deceleration stopping.
For details on the value 65535 of the travel after stop
sensor input is received, see "Travel after stop
sensor input" (page 5-13).

Specify CR8015 for the stop sensor setting.

On the rising edge of MR104, the speed change request relay is turned ON, the value 3000 is written to
CM8826 and CM8827 (the speed to change to), and the PSTRT instruction is used to start pulse
output.
On the rising edge of MR105, 5000 is written to CM8826 and CM8827 (the speed to change to).
On the rising edge of MR106, 6000 is written to CM8826 and CM8827 (the speed to change to).
On the rising edge of MR107, 7000 is written to CM8826 and CM8827 (the speed to change to).
On the rising edge of MR108, the speed change request relay is turned OFF, stop sensor input CR8015
is turned ON, and the workpiece decelerates and stops.

5-84 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

<Mnemonics list>
MR104 MOV.D
#3000 CM8826 LDP MR104

CPU BUILT-IN FUNCTIONS


Axis 1 operating MOV.D #3000 CM8826
speed change value SET CR8005
CR8005 PSTRT #0 #1 #1
SET LDP MR105
Axis 1 operating MOV.D #5000 CM8826
speed change value LDP MR106
PSTRT MOV.D #6000 CM8826
Unit number Axis number Point number LDP MR107
#0 #1 #1 MOV.D #7000 CM8826
LDP MR108
RES CR8005
MR105 MOV.D OUT CR8015
#5000 CM8826
Axis 1 operating
MR106 MOV.D
#6000
speed change value

CM8826
5

Motor (Positioning) Control


Axis 1 operating
speed change value
MR107 MOV.D
#7000 CM8826
Axis 1 operating
speed change value
MR108 CR8005
RES
Axis 1 operating
speed change value
CR8015

Axis 1
stop sensor input

MR104 MR105 MR106 MR107 MR108


Speed
7000
6000
5000

3000

Time

Reference For details about the timing that the speed is changed with, see "Changing the
speed during operation" (page 5-40).

- KV Nano Series(terminal block type) User’s Manual - 5-85


5-2 Motor (Positioning) Control

 Reference example of executing positioning control with more than 21


points
CPU BUILT-IN FUNCTIONS

The target value or travel of each point is stored in CM entries, so you can perform positioning with
multiple points by using a ladder circuit to rewrite the contents of CM entries.
For example, you can change the target value of point number 1 of axis 1 by rewriting the appropriate
target value or travel contents (CM8000, CM8001).
Example

MR110 +10000 PSTRT


DW_L Unit number Axis number Point number
#0 #1 #1
CM8000

5
Axis 1 point 1 target
value/travel
MR111 +20000 PSTRT
DW_L Unit number Axis number Point number
Motor (Positioning) Control

#0 #1 #1
CM8000
Axis 1 point 1 target
value/travel
MR112 +60000 PSTRT
ONDL Unit number Axis number Point number
#0 #1 #1
CM8000
Axis 1 point 1 target
value/travel
"How to use the menu" (page 5-7)

 Reference example of changing the target coordinate during operation


You can change the target coordinate during the positioning operation by executing the CHGTGT
instruction.
On the rising edge of internal relay MR014, the positioning operation is started. On the rising edge of
internal relay MR015, the target coordinate is changed.
<Mnemonics list>
MR014 PSTRT
Unit number Axis number Point number LDP MR014
#0 #1 #1 PSTRT #0 #1 #1
LDP MR015
AND CR8400
CHGTGT #0 #1 +60000
MR015 CR8400 CHGTGT
Unit number Axis number Target coordinate
#0 #1 #60000
Axis 1
pulse output in progress

• You cannot change the target coordinate when a deceleration stop is in


Point
progress due to the deceleration stop relay, when the stop sensor has been
turned ON, and during similar situations.
• You cannot change the target coordinate within 250 µs of the positioning
operation being completed.
• You cannot change the target coordinate during speed control.

Reference For details about operations when the coordinate is changed, see "Changing the
target coordinate during operation" (page 5-43).

5-86 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

 Reference example of specifying the point parameters directly and starting


the positioning operation

CPU BUILT-IN FUNCTIONS


On the rising edge of MR102, the point parameters of point number 1 of axis 1 are set. On the rising
edge of MR103, the positioning operation of point number 1 of axis 1 is started.
Target value or travel: 50000. Acceleration rate: 20. Deceleration rate: 20. Operating speed: 60000.
Operation mode: Positioning ABS. Stop sensor: Enabled. Travel after stop sensor input is received:
600.
<Mnemonics list>
MR102 MOV.L LDP MR102
+50000 CM8000 MOV.L +50000 CM8000
MOV #20 CM8002

5
Axis 1 point target MOV #20 CM8003
value/travel MOV.L +60000 CM8004
MOV.L
MPS
#20 CM8002 SET CM8006.0

Motor (Positioning) Control


Axis 1 point CON
acceleration rate RES CM8006.1
MOV.L CON
#20 CM8003 SET CM8006.4
MPP
Axis 1 point MOV #600 CM8008
deceleration rate
MOV.L LDP MR103
+60000 CM8004 ANB CR8400
PSTRT #0 #1 #1
Axis 1 point
operating speed
CM8006.0 CM8006.1 CM8006.4
SET RES SET
Axis 1 point Axis 1 point Axis 1 point
1 operation mode 1 operation mode 1 operation mode
MOV.D
#600 CM8008
Axis 1 point 1 travel after
stop sensor input
MR103 CR8400 PSTRT
Unit number Axis number Point number
#0 #1 #1
Axis 1 pulse output
in progress

- KV Nano Series(terminal block type) User’s Manual - 5-87


5-2 Motor (Positioning) Control

Lists of Devices and Error Codes for Positioning


CPU BUILT-IN FUNCTIONS

 List of control relays

Attribute
Axis 1 Axis 2 Axis 3 Axis 4 Description R: Read only
Blank: Read/write
CR8000 CR8100 CR8200 CR8300 Forced stop
CR8001 CR8101 CR8201 CR8301 Deceleration stop
CR8002 CR8102 CR8202 CR8302 Error clear
CR8003 CR8103 CR8203 CR8303 Warning clear
Current coordinate Only valid when pulse
CR8004 CR8104 CR8204 CR8304
5 CR8005 CR8105 CR8205 CR8305
change request
Operating speed
stop in progress
Only valid when pulse
change request output in progress
Motor (Positioning) Control

Target coordinate Only valid when pulse


CR8006 CR8106 CR8206 CR8306
change request output in progress
Limit switch CW
CR8012 CR8112 CR8212 CR8312
direction input
Limit switch CCW
CR8013 CR8113 CR8213 CR8313
direction input
Parameter specifies
CR8014 CR8114 CR8214 CR8314 Origin sensor input whether the item is
used
Parameter specifies
CR8015 CR8115 CR8215 CR8315 Stop sensor input whether the item is
used
Pulse output in
CR8400 CR8500 CR8600 CR8700 R
progress
Positioning complete
CR8401 CR8501 CR8601 CR8701 R
relay
CR8402 CR8502 CR8602 CR8702 Error R
Current position
CR8403 CR8503 CR8603 CR8703 Warning R
overflow
Origin returning
CR8404 CR8504 CR8604 CR8704 R
operation in progress
ON when origin
Origin returning returning operation
CR8405 CR8505 CR8605 CR8705 R
operation complete finishes; OFF when
next pulse output
CR8414 CR8514 CR8614 CR8714 Axis n present R
Not turned ON and
Comparator 2 match OFF; used as a
CR8415 CR8515 CR8615 CR8715 R
relay symbol in ladder
programs

 List of control memory entries


 System parameters
Attribute
Axis 1 Axis 2 Axis 3 Axis 4 Description R: Read only
Blank: Read/write
Origin and stop sensor
assignments
Operation setting for
CM8800 CM8840 CM8880 CM8920 I/O setting*1 sensor detection and
comparator matching
Output mode setting
(1-pulse or 2-pulse)
5-88 - KV Nano Series(terminal block type) User’s Manual -
5-2 Motor (Positioning) Control

Attribute
Axis 1 Axis 2 Axis 3 Axis 4 Description R: Read only
Blank: Read/write

CPU BUILT-IN FUNCTIONS


Enables and disables
the origin and stop
sensors and the limit
switches
CM8801 CM8841 CM8881 CM8921 Sensor enable
Polarity setting of the
origin and stop
sensors and of the
limit switches
CM8802 CM8842 CM8882 CM8922 Value of the soft limit
Comparator 0
CM8803 CM8843 CM8883 CM8923 switch or stop sensor
CM8804 CM8844 CM8884 CM8924 function using the
Comparator 1
CM8805
CM8806
CM8845
CM8846
CM8885
CM8886
CM8925
CM8926
comparator
Value of the interrupt 5
Comparator 2 function using the
CM8807 CM8847 CM8887 CM8927

Motor (Positioning) Control


comparator
CM8808 CM8848 CM8888 CM8928 Starting speed
CM8809 CM8849 CM8889 CM8929 Starting speed
CM8810 CM8850 CM8890 CM8930 Acceleration rate
Origin returning
CM8811 CM8851 CM8891 CM8931 Deceleration rate
operation
CM8812 CM8852 CM8892 CM8932
Operating speed
CM8813 CM8853 CM8893 CM8933
Detailed output and origin returning operation
CM8814 CM8854 CM8894 CM8934
settings*3
CM8815 CM8855 CM8895 CM8935 Starting speed
CM8816 CM8856 CM8896 CM8936 Acceleration rate
CM8817 CM8857 CM8897 CM8937 JOG Deceleration rate
CM8818 CM8858 CM8898 CM8938
Operating speed
CM8819 CM8859 CM8899 CM8939
CM8820 CM8860 CM8900 CM8940
Home coordinate setting value
CM8821 CM8861 CM8901 CM8941
Use axis 1: CR8004,
axis 2: CR8104,
CM8824 CM8864 CM8904 CM8944 Current coordinate
axis 3: CR8204, and
CM8825 CM8865 CM8905 CM8945 change value
axis 4: CR8304 to
change the values
Use axis 1: CR8005,
axis 2: CR8105,
CM8826 CM8866 CM8906 CM8946 Operating speed
axis 3: CR8205, and
CM8827 CM8867 CM8907 CM8947 change value
axis 4: CR8305 to
change the values
Use axis 1: CR8006,
axis 2: CR8106,
CM8828 CM8868 CM8908 CM8948 Target coordinate
axis 3: CR8206, and
CM8829 CM8869 CM8909 CM8949 change value
axis 4: CR8306 to
change the values
*1 I/O setting details
The relationships between R000 to R007 and the origin sensor and stop sensor are stored.
When you use KV STUDIO to set parameters, you do not have to pay attention to this information.
"I/O setting details" (page 5-90)
*2 Sensor enable details
The input polarity of the origin sensor, stop sensor, and limit switches as well as whether these are used
is stored.
When you use KV STUDIO to set parameters, you do not have to pay attention to this information.
"Sensor enable details" (page 5-91)
*3 Detailed output and origin returning operation settings
The output mode, comparator, origin returning operation direction, origin returning operation mode,
deviation counter clear, and automatic home position settings are stored.
When you use KV STUDIO to set parameters, you do not have to pay attention to this information.
"Detailed output and origin returning operation settings" (page 5-92)

- KV Nano Series(terminal block type) User’s Manual - 5-89


5-2 Motor (Positioning) Control

I/O setting details


bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 CM8800 (Axis 1), CM8840 (Axis 2),
CPU BUILT-IN FUNCTIONS

CM8880 (Axis 3), CM8920 (Axis 4)

bit1 bit0 R000 Input Setting


0 0 Not used as stop or origin sensor input
0 1 Used as stop sensor input
1 0 Used as origin sensor input
1 1 Invalid setting
bit3 bit2 R001 Input Setting

5
0 0 Not used as stop or origin sensor input
0 1 Used as stop sensor input
1 0 Used as origin sensor input
Motor (Positioning) Control

1 1 Invalid setting
bit5 bit4 R002 Input Setting
0 0 Not used as stop or origin sensor input
0 1 Used as stop sensor input
1 0 Used as origin sensor input
1 1 Invalid setting
bit7 bit6 R003 Input Setting
0 0 Not used as stop or origin sensor input
0 1 Used as stop sensor input
1 0 Used as origin sensor input
1 1 Invalid setting
bit9 bit8 R004 Input Setting
0 0 Not used as stop or origin sensor input
0 1 Used as stop sensor input
1 0 Used as origin sensor input
1 1 Invalid setting
bit11 bit10 R005 Input Setting
0 0 Not used as stop or origin sensor input
0 1 Used as stop sensor input
1 0 Used as origin sensor input
1 1 Invalid setting
bit13 bit12 R006 Input Setting
0 0 Not used as stop or origin sensor input
0 1 Used as stop sensor input
1 0 Used as origin sensor input
1 1 Invalid setting
bit15 bit14 R007 Input Setting
0 0 Not used as stop or origin sensor input
0 1 Used as stop sensor input
1 0 Used as origin sensor input
1 1 Invalid setting

5-90 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

Sensor enable details


bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 CM8801 (Axis 1), CM8841 (Axis 2),

CPU BUILT-IN FUNCTIONS


CM8881 (Axis 3), CM8921 (Axis 4)
bit1 Stop Sensor Enable
0 Disabled
1 Enabled

bit2 CW Direction Limit Switch Enable*1


0 Disabled
1 Enabled

bit3 CCW Direction Limit Switch Enable*1


0
1
Disabled
Enabled
5

Motor (Positioning) Control


bit8 CW Direction Limit Switch Polarity
0 NO (normally open: A contact)
1 NC (normally closed: B contact)

bit9 CCW Direction Limit Switch Polarity


0 NO (normally open: A contact)
1 NC (normally closed: B contact)

bit10 Origin Sensor Polarity


0 NO (normally open: A contact)
1 NC (normally closed: B contact)

bit11 Stop Sensor Polarity


0 NO (normally open: A contact)
1 NC (normally closed: B contact)

bit12 Z-Phase Polarity


0 NO (normally open: A contact)
1 NC (normally closed: B contact)

*1 CW direction limit switch enable and CCW direction limit switch enable
If these bits are not set to 1 (enabled), the limit switch input will not be received.
These settings have higher priority than any other settings related to limit switches. Even if the
limit switches are assigned by the current position comparator settings, these bits must be set to
1 (enabled).
When you are using KV STUDIO to set parameters, these bits are automatically set to enabled.

- KV Nano Series(terminal block type) User’s Manual - 5-91


5-2 Motor (Positioning) Control

Detailed output and origin returning operation settings


bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 CM8814 (Axis 1), CM8854 (Axis 2),
CPU BUILT-IN FUNCTIONS

CM8894 (Axis 3), CM8934 (Axis 4)


bit0 Select output type
0 1-pulse output
1 2-pulse output

bit1 Motor Rotation Direction


0 Reverse pulse
1 Forward pulse

bit5 bit4 Current Value Comparator 0 Function Selection

5 0
0
0
1
Not used
Stop sensor
1 0 Soft limit switch CW
Motor (Positioning) Control

1 1 Soft limit switch CCW

bit7 bit6 Current Value Comparator 1 Function Selection


0 0 Not used
0 1 Stop sensor
1 0 Soft limit switch CW
1 1 Soft limit switch CCW

bit8 Origin Return Direction


0 CCW
1 CW

bit11 bit10 bit9 Origin Return Method


0 0 0 Origin sensor up edge
0 0 1 Medium point of the origin sensor
0 1 0 Origin sensor and Z-phase
0 1 1 Dog type (Z-phase not used)
1 0 0 Dog type (Z-phase used)
1 0 1 Dog type (press-against)
1 1 1 Invalid setting

bit12 Clear Deviation Counter


0 No output
1 Output

bit13 Automatic Home Position


0 Not move
1 Move

 Status
Attribute
Axis 1 Axis 2 Axis 3 Axis 4 Description R: Read only
Blank: Read/write
Current coordinate
CM8830 CM8870 CM8910 CM8950
(Can be changed through current
CM8831 CM8871 CM8911 CM8951
coordinate change requests)
CM8832 CM8872 CM8912 CM8952 R
Current speed
CM8833 CM8873 CM8913 CM8953
CM8834 CM8874 CM8914 CM8954 Error code
CM8835 CM8875 CM8915 CM8955 Execution point number

5-92 - KV Nano Series(terminal block type) User’s Manual -


5-2 Motor (Positioning) Control

 Point parameters

Attribute

CPU BUILT-IN FUNCTIONS


No. Axis 1 Axis 2 Axis 3 Axis 4 Description R: Read only
Blank: Read/write
CM8000 CM8200 CM8400 CM8600
Target value or travel
CM8001 CM8201 CM8401 CM8601
CM8002 CM8202 CM8402 CM8602 Acceleration rate
CM8003 CM8203 CM8403 CM8603 Deceleration rate
CM8004 CM8204 CM8404 CM8604
1 Operating speed
CM8005 CM8205 CM8405 CM8605
Operation mode setting*1
CM8006 CM8206 CM8406 CM8606 (includes the stop sensor

CM8008 CM8208 CM8408 CM8608


setting)
Travel after stop sensor input 5
CM8010 to CM8210 to CM8410 to CM8610 to

Motor (Positioning) Control


2 CM8019 CM8219 CM8419 CM8619
: : : : : The same as point parameter 1
20 CM8190 to CM8390 to CM8590 to CM8790 to
CM8199 CM8399 CM8599 CM8799
*1 I/O setting details
The relationships between R000 to R007 and the origin sensor and stop sensor are stored.
When you use KV STUDIO to set parameters, you do not have to pay attention to this information.
"I/O setting details" (page 5-90)

Operation mode settings

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

bit1 bit0 Operation Mode


0 0 Positioning INC
0 1 Positioning ABS
1 0 Speed control CW
1 1 Speed control CCW

bit4 Stop Sensor


0 Disabled
1 Enabled

- KV Nano Series(terminal block type) User’s Manual - 5-93


5-2 Motor (Positioning) Control

 Error codes

Error Code Description Remedy


CPU BUILT-IN FUNCTIONS

0 This indicates normal operation.


Set the starting speed to a value greater than
10 The starting speed is set to 0.
or equal to 1.
The starting speed is set to a value that is Set the starting speed to a value that is less
13
greater than the operating speed. than or equal to the operating speed.
While the warning relay (CR) was turned ON
Turn the warning clear relay ON to clear the
(the current coordinate was outside of the
warning. While the current coordinate is
signed 32-bit range), an attempt was made to
20 outside of the signed 32-bit range, check that
start the positioning operation with
there are no problems, and then execute
"Positioning ABS" specified as the operation
positioning control.
5 mode.
A point number outside of the setting range
21 Specify a point number between 1 and 20.
was specified.
Motor (Positioning) Control

Operations were stopped because a forced Turn the forced stop relay OFF or switch the
30 stop relay (CR) was turned ON or because mode to RUN mode, and then execute the
the mode was switched to PROG mode. operation again.
A limit error occurred. Operations were Remove the workpiece from the range of the
31 stopped because of input from the CW limit limit switch.
switch. If the limit switch was erroneously turned ON,
check the wiring and the polarity of the limit
A limit error occurred. Operations were switch. If there are no problems with the
32 stopped because of input from the CCW limit wiring and the polarity, check that the limit
switch.
switch is operating correctly.
The motor's rotation direction and the actual
The workpiece moved in the CW (CCW) orientation of the limit switch are reversed.
33 direction, and input from the CCW (CW) limit Reverse the motor rotation direction, change
switch was detected. the wiring of the limit switch, or attach the
limit switch in the correct orientation.
Even if you turn the error clear relay ON, the
error will not be cleared. To clear the error,
switch from PROG mode to RUN mode or
An attempt was made to perform positioning restart the product.
80 control with the number of a non-existant axis To prevent the same error from occurring
or with a relay output type base unit. again, specify axis numbers that match the
number of axes of the base unit.
The positioning operation cannot be
performed with relay output types.
An internal device may not be operating
correctly. If the same error still occurs even
90 A system error has occurred. after you restart the product, or if the same
error occurs frequently, contact your
KEYENCE representative.

5-94 - KV Nano Series(terminal block type) User’s Manual -


5-3 Specified Frequency Pulse Output
You can generate pulses at the specified frequency.

CPU BUILT-IN FUNCTIONS


Specified Frequency Pulse Output Function Overview

You can use PLSOUT, the dedicated instruction for specified frequency pulse output, to easily generate
pulses at the specified frequency from the CPU's output relay just by specifying the high-speed counter
to use, the output frequency, and the duty cycle.

CTH0 Pulse output from R500

PLSOUT instruction
5
CTH1 Pulse output from R501

Specified Frequency Pulse Output


CTH0/CTH1
CTH2/CTH3
Specified frequency
setting duty cycle
CTH2 Pulse output from R502

CTH3 Pulse output from R503

Because the specified frequency pulse output function uses a high-speed


Point
counter, other functions or instructions that use the same high-speed counter
(specified by its number) cannot be used at the same time.

Specified Frequency Pulse Output Instruction

Instruction Mnemonic Operation Overview Page


Specified frequency Uses a high-speed counter (CTH0, CTH1, CTH2, or
PLSOUT 5-96
pulse output CTH3) to generate pulses at the specified frequency

- KV Nano Series(terminal block type) User’s Manual - 5-95


5-3 Specified Frequency Pulse Output

Uses a high-speed counter to


PLSOUT PLSOUT
Specified frequency
pulse output
generate pulses at the specified
CPU BUILT-IN FUNCTIONS

frequency

Ladder program Entry mode


Execution condition S
PLSOUT n1 P L S O U T n1 S n2
n2

Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand
MR DM
5 R DR LR
B
T C CTC CR TM
W
T C CTH CTC Z CM #/$*1 #TM * @ :#/:Z

n1 - - - - - - - - - - - - - -  - - - -
Specified Frequency Pulse Output

S  -  - - -          -   
n2  -  - - -          -   

Operand Description
n1 Specifies the number of the high-speed counter to use (0 to 3)*1, 3
Specifies the frequency (0 to 100000) in Hz, or specifies the leading device that is storing the frequency
S When you specify a bit device, 32 continuous bits will be occupied. When you specify a word device, 2
words will be occupied.*1, 2
Specifies the duty cycle (-499 to 499) of the output pulse, or specifies the leading device that is storing
the duty cycle
When you specify a bit device, 16 continuous bits will be occupied. When you specify a word device, 1
word will be occupied.*1, 2
Value -499 … …
(Duty cycle - 50) × 10 0 499
n1
Duty cycle
TON/(TON + TOFF) 0.1% … 50.0% … 99.9%

ON ON ON

OFF OFF OFF


Output pulse
TON
TOFF

*1 You cannot use "$" to specify the device.


The numbers of the high-speed counters that you can use vary depending on the model.
KV-N14** and KV-N24**: 0 and 1. KV-N40**: 0 to 2. KV-N60**: 0 to 3.
*2 When you specify a bit device, if you specify a relay other than the channel's leading relay (such as
R106 and R1012), the next channel will also be used to provide the necessary bits.
*3 n1 : If a number that cannot be specified by the unit is entered in this operand, the instruction will
not be executed.

Operation Description

While the execution condition is turned ON, pulses are generated from the output relay at the frequency
specified by S . The number of the high-speed counter to use is specified with n1 . The duty
cycle of the pulses to generate is specified with n2 .
Pulse output is stopped when the execution condition is turned OFF.
"Specified Frequency Pulse Output" (page 5-95)

5-96 - KV Nano Series(terminal block type) User’s Manual -


5-3 Specified Frequency Pulse Output

• You cannot simultaneously execute two or more PLSOUT instructions that use
Point
the same high-speed counter (specified by its number).

CPU BUILT-IN FUNCTIONS


• n1 : The high-speed counter whose number is specified by this parameter
can only be used by one function or instruction at a time, so other functions or
instructions that use it cannot be executed at the same time.
• n1 : Do not change the control relay (CR) or control memory (CM) related to
the high-speed counter whose number is specified by this parameter.

Operation flags
5
CR2009 No change in status

Specified Frequency Pulse Output


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
• When a value is specified for an operand that is outside of the available range.
CR2012 • When the indirect specification or index modification range is incorrect.
n1 and n2 : When constants are specified for these parameters, the parameters cannot be
changed.
* If CR2012 is turned ON, the instruction will not be executed. An error will be displayed in KV STUDIO or in
the access window. In addition, the detailed error information will be stored in CM2250 to CM2276.
"Error log" (page 4-64)

Sample Program

While R000 is turned ON, pulses will be generated from R501 at the frequency (duty cycle: 50%) specified by
DM1 and DM0 (CTH1 will be used).
;<Mnemonics list>
R000 DM0
LD R000
PLSOUT 1
PLSOUT #1 DM0 +0
+0

 Application example: synchronized control (counter 0 of the KV-N14** or KV-


N24**)
With encoder input A-phase R004 and B-phase R005, the frequency counter function and the specified
frequency pulse output function are combined to perform synchronized control. (The frequency counter
function uses CTH0, and the specified frequency pulse output function uses CTH1.)
;<Mnemonics list>
CR2002 HSP Set the input time
R004 constant of R004 to LD CR2002
Always turned ON 10 µs. HSP R004
HSP R005
HSP LD R000
R005 Set the input time
FCNT #0 #2 #10 DM0
constant of R005 to PLSOUT #1 DM0 +0
R000 10 µs.
FCNT 0
#2 #10 DM0
Measurement start
Input setting: 2-phase, 1x
DM0
Number of scans: 10
PLSOUT 1
Measured result: DM0 and DM1
+0

- KV Nano Series(terminal block type) User’s Manual - 5-97


5-4 High-Speed Counter
The high-speed counter (CTH) is a counter that can count the high-speed input signals that cannot be
counted with the counter instructions (C, OUTC, and UDC).
The high-speed counter comparator (CTC) is a device used to specify the high-speed counter value. If
CPU BUILT-IN FUNCTIONS

the set value matches the current value, the high-speed counter comparator is turned ON.
You can use CTH and CTC to perform interrupt processing and pulse output that do not rely on the
scan time.

High-Speed Counter Specifications

Item Specification

5 Number of channels
Input response frequency
KV-N14** and KV-N24**: 2. KV-N40**: 3. KV-N60**: 4.
Single-phase: 100 kHz; phase difference: 50 kHz
High-Speed Counter

Other functions or instructions that use the same high-speed counter (specified
Point
by its number) cannot be used at the same time.

For details about the input relays, see “Wiring and Internal Circuit Diagrams” for each base unit.

5-98 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

High-Speed Counter Configuration

CPU BUILT-IN FUNCTIONS


The KV Nano Series has between 2 and 4 high-speed counters. Each high-speed counter has 2 high-
speed counter comparators and a dedicated internal clock.

High-speed counter block diagram


You do not have to use B-phase, you can use the high-speed counters with A-phase only.
* The relay numbers that you can use with each function vary depending on the unit.
"High-Speed Counter Device Numbers Categorized by Function" (page 5-100)

Input terminal 0 Count input 0 32-bit, high-speed counter CTH0 input capture function

5
A-phase External input (A-phase and B- function 0 Input capture condition *1
B-phase phase) CTH0 Storage device*2
Internal clock
Direct clock pulse input
Control circuit 0 Output terminal 0

High-Speed Counter
Enable input Comparator matching
Preset (Z-phase) input (preset value) output

CTH0 value Interrupt function 0


High-speed counter comparator Interrupt condition

Input terminal 1 Count input 1 32-bit, high-speed counter CTH1 input capture function
A-phase External input (A-phase and B- function 1 Input capture condition *1
B-phase phase) CTH1 Storage device*2
Internal clock
Direct clock pulse input
Control circuit 1 Output terminal 1
Enable input Comparator matching
Preset (Z-phase) input (preset value) output

CTH1 value Interrupt function 1


High-speed counter comparator Interrupt condition

Input terminal 2 Count input 2 32-bit, high-speed counter CTH2 input capture function
A-phase External input (A-phase and B- function 2 Input capture condition *1
B-phase phase) CTH2 Storage device*2
Internal clock
Direct clock pulse input
Control circuit 2 Output terminal 2
Enable input Comparator matching
Preset (Z-phase) input (preset value) output

CTH2 value Interrupt function 2


High-speed counter comparator Interrupt condition

Input terminal 3 Count input 3 32-bit, high-speed counter CTH3 input capture function
A-phase External input (A-phase and B- function 3 Input capture condition *1
B-phase phase) CTH3 Storage device*2
Internal clock
Direct clock pulse input
Control circuit 3 Output terminal 3
Enable input Comparator matching
Preset (Z-phase) input (preset value) output

CTH3 value Interrupt function 3


High-speed counter comparator Interrupt condition

Direct
clock pulse*3

*1 Input capture condition can be set at "CPU system settings" of KV STUDIO.


*2 The storage device varies according to the input capture condition, not according to the counter
number.
*3 The comparator matching signal that is generated from output terminal n (where n is a number between
0 and 3) cannot be used as the direct clock pulse of count input n (where n is the same number as the
output terminal).

- KV Nano Series(terminal block type) User’s Manual - 5-99


5-4 High-Speed Counter

High-Speed Counter Device Numbers Categorized by Function


CPU BUILT-IN FUNCTIONS

 Count input and comparator-related devices


External Input Direct Clock Pulse High-Speed
Counter
Model A- B- Internal Clock Input Output Counter
Number
Phase Phase Selection*1 Destination*2 Comparator
CR4200 (50 ns), CR4201 (1 µs), CTC0 and
CTH0 R004 R005 R501 R500
CR4202 (10 µs), and CR4203 (100 µs) CTC1
CR4400 (50 ns), CR4401 (1 µs), CTC2 and
KV-N14** CTH1 R006 R007 R500 R501
CR4402 (10 µs), and CR4403 (100 µs) CTC3
CTH2/
- - - - - -
CTH3
5 CTH0 R004 R005
CR4200 (50 ns), CR4201 (1 µs),
CR4202 (10 µs), and CR4203 (100 µs)
R501 R500
CTC0 and
CTC1
CR4400 (50 ns), CR4401 (1 µs), CTC2 and
High-Speed Counter

KV-N24** CTH1 R006 R007 R500 R501


CR4402 (10 µs), and CR4403 (100 µs) CTC3
CTH2/
- - - - - -
CTH3
CR4200 (50 ns), CR4201 (1 µs), R501 and CTC0 and
CTH0 R008 R009 R500
CR4202 (10 µs), and CR4203 (100 µs) R502 CTC1
CR4400 (50 ns), CR4401 (1 µs), R500 and CTC2 and
CTH1 R010 R011 R501
KV-N40** CR4402 (10 µs), and CR4403 (100 µs) R502 CTC3
CR4600 (50 ns), CR4601 (1 µs), R500 and CTC4 and
CTH2 R012 R013 R502
CR4602 (10 µs), and CR4603 (100 µs) R501 CTC5
CTH3 - - - - - -
CR4200 (50 ns), CR4201 (1 µs), R501, R502, CTC0 and
CTH0 R008 R009 R500
CR4202 (10 µs), and CR4203 (100 µs) and R503 CTC1
CR4400 (50 ns), CR4401 (1 µs), R500, R502, CTC2 and
CTH1 R010 R011 R501
CR4402 (10 µs), and CR4403 (100 µs) and R503 CTC3
KV-N60**
CR4600 (50 ns), CR4601 (1 µs), R500, R501, CTC4 and
CTH2 R012 R013 R502
CR4602 (10 µs), and CR4603 (100 µs) and R503 CTC5
CR4800 (50 ns), CR4801 (1 µs), R500, R501, CTC6 and
CTH3 R014 R015 R503
CR4802 (10 µs), and CR4803 (100 µs) and R502 CTC7

*1 This is direct clock pulse output that can be counted with a high-speed counter.
*2 These are the relay numbers that are generated by comparator matching output.

 Comparator and control-circuit-related devices


Preset
Counter Enable Input Input
Model (Z-Phase) Preset Value Interrupt Condition
Number (Internal) Capture Condition
Input
CTH0 R000 (CR4212) R002 CM4807 and CM4806 CTC0 and CTC1 R000, R001,
CTH1 R001 (CR4412) R003 CM4817 and CM4816 CTC2 and CTC3 R002, and R003
KV-N14**
CTH2/
- - - - -
CTH3
CTH0 R008 (CR4212) R010 CM4807 and CM4806 CTC0 and CTC1 R000, R001,
CTH1 R009 (CR4412) R011 CM4817 and CM4816 CTC2 and CTC3 R002, and R003
KV-N24**
CTH2/
- - - - -
CTH3
CTH0 R100 (CR4212) R104 CM4807 and CM4806 CTC0 and CTC1
R000, R001,
CTH1 R101 (CR4412) R105 CM4817 and CM4816 CTC2 and CTC3
KV-N40** R002, and R003
CTH2 R102 (CR4612) R106 CM4827 and CM4826 CTC4 and CTC5
CTH3 - - - - -
CTH0 R100 (CR4212) R104 CM4807 and CM4806 CTC0 and CTC1
CTH1 R101 (CR4412) R105 CM4817 and CM4816 CTC2 and CTC3 R000, R001,
KV-N60**
CTH2 R102 (CR4612) R106 CM4827 and CM4826 CTC4 and CTC5 R002, and R003
CTH3 R103 (CR4812) R107 CM4837 and CM4836 CTC6 and CTC7

5-100 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 Input capture storage devices


The results of input captures are stored in control memory (CM) entries.

CPU BUILT-IN FUNCTIONS


The storage destination varies according to the input capture condition.

Input Capture Condition Storage Device


INT R000 CM1601 (upper bits) and CM1600 (lower bits)
INT R001 CM1603 (upper bits) and CM1602 (lower bits)
INT R002 CM1605 (upper bits) and CM1604 (lower bits)
INT R003 CM1607 (upper bits) and CM1606 (lower bits)

How to Set the High-Speed Counter


5
When you are using the CPU built-in high-speed counter, you have to create a ladder program that

High-Speed Counter
specifies the count range, input mode, and values. However, if you use the CPU high-speed counter
setup wizard, all you have to do is specify the items as indicated by the wizard, and the ladder program
that is required for the high-speed counter will be created automatically.
• If you want to use the CPU high-speed counter setup wizard, see page 5-105 to page 5-112.
• If you want to create and edit the ladder program while checking the items, see page 5-113 to page 5-
155.

CPU high-speed counter setup wizard function

If you use the CPU high-speed counter setup wizard, all you have to do is select the setup items, and
the ladder program that is required to use the CPU built-in high-speed counter will be created
automatically. The ladder program will be registered under a name from "INIT_CTH0" to "INIT_CTH3"
according to the scanning module.

- KV Nano Series(terminal block type) User’s Manual - 5-101


5-4 High-Speed Counter

List of High-Speed Counter Setup Items


CPU BUILT-IN FUNCTIONS

 Execute counting
The execution condition of the high-speed counter instruction (the CTH instruction) is turned ON.
"CTH Instructions" (page 5-132)

Reference With the KV Nano Series, the counter numbers that can be used vary depending on the
model.
If you create a program that can be used on all KV Nano Series models and then use this
program after changing models in your project to match the scope of your system, you can
5 use the "CTH present" flag to create programs in which the counter instruction is not
executed if the specified counter number indicates a unit that does not exist.
High-Speed Counter

Counter Number "CTH Present" Device


CR4205
CTH0 (ON: High-speed counter 0 function is present. OFF: High-speed
counter 0 function is not present.)
CR4405
CTH1 (ON: High-speed counter 1 function is present. OFF: High-speed
counter 1 function is not present.)
CR4605
CTH2 (ON: High-speed counter 2 function is present. OFF: High-speed
counter 2 function is not present.)
CR4805
CTH3 (ON: High-speed counter 3 function is present. OFF: High-speed
counter 3 function is not present.)

Example) If you create a ladder program like that shown below, the CTH instruction will
not be executed on the KV-N14** and KV-N24**, which do not have high-speed
counter 2.

MR000 CR4605 CTH.D2


CR4600
CTH2 present
50 ns internal
clock for CTH2

When you are using a high-speed counter, set the following items through a ladder program.

 Count range
Set the range within which counting is performed.
• Linear counter...Counting is performed within a 32-bit range.
• Ring counter .....The upper and lower limits are set to arbitrary values, and counting is performed
within the specified range.
"Setting the Count Range" (page 5-114)

 Input mode
Set the mode to use for count input, and log the high-speed counter instruction (the CTH instruction).
• External input....The single phase, phase difference, and 2-pulse pulse input is counted.
• Internal clock.....The 50 ns, 1 µs, 10 µs, and 100 µs internal clocks are counted.
• Direct clock pulse (specified frequency pulse) output...... Output pulses using another high-speed
counter are counted.
"Count Input Settings" (page 5-116)

5-102 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 Set Value
Set the count up or count down value (CTC).

CPU BUILT-IN FUNCTIONS


"High-Speed Counter Set Values (CTC)" (page 5-120)

 Reset
Set the current value of the high-speed counter (CTH) to 0.
• RES instruction
• CTH instruction
• Automatic reset based on comparator matching
• External preset input
• Reset based on counter enable function
"Reset Mode" (page 5-121)
5
 Count enable and disable

High-Speed Counter
You can use the count enable function to enable and disable the execution of the counter.
"Enabling and Disabling Counting (Counter Enable Function)" (page 5-126)

- KV Nano Series(terminal block type) User’s Manual - 5-103


5-4 High-Speed Counter

Settings of the CPU high-speed counter setup wizard


CPU BUILT-IN FUNCTIONS

The settings that are configured with the CPU high-speed counter setup wizard are described below.

Channel selection
CH0
 Step 1, (page 5-105)
CH1
CH2
CH3
Operation mode selection
Up/down count
 Step 2, (page 5-105)
Preset count

5 Enable accu count mode


Enable count
High-Speed Counter

Input mode selection


External input
 Step 3, (page 5-108)
Internal input

Set count
Count range
 Step 4, (page 5-108)
Count mode
Initial value setting

Consistent comparator
When current value=set value
operation setting
Setting default value
 Step 5, (page 5-109)

When the operation When the operation When the operation mode
mode is up/down count mode is preset count is enable accu count

Preset setting of external Setting of external control


Preset value External
control input  Step 6, input (counter enable)
input relay
(page 5-110) External input relay  Step 7, (page 5-111)
polarity
polarity
Counting
Preset timing
enable
condition

Module name setting


Module name
 Step 8, (page 5-112)

5-104 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

Setup procedure of the CPU high-speed counter setup wizard

CPU BUILT-IN FUNCTIONS


This section describes the steps for using the CPU high-speed counter setup wizard and the dialog
boxes that are displayed by the wizard.

1 In KV STUDIO, on the "Tool" menu, click "CPU high-speed counter setting wizard" to start the
CPU high-speed counter setup wizard.
Specify the high-speed counter channel that you want to set, and then click Next.

High-Speed Counter
Reference The number of channels that you can select varies depending on the base unit that you
are using.
KV-N14** and KV-N24**: CTH0 and CTH1
KV-N40**: CTH0 to CTH2
KV-N60**: CTH0 to CTH3

2 Select the operation mode.


Select the operation mode, and then click Next.

Operation Mode Description


Up/down count This is the basic mode, in which the input is counted.
If up/down counting is performed and the preset input is applied, the count
Preset count
value is changed to the preset value.
In this mode, counting is performed only when enable input is turned ON. The
Enable accu count mode
count value is accumulated.
In this mode, counting is performed only when enable input is turned ON. The
Enable count
count value is reset (cleared to zero) on the rising edge of the enable input.
- KV Nano Series(terminal block type) User’s Manual - 5-105
5-4 High-Speed Counter

 Up/down count mode


In this mode, the input is counted simply.
CPU BUILT-IN FUNCTIONS

Up count
Count input
Down count

Overflow*
(1)

Current value

(2)
Overflow*

5 * Overflows do not occur when the ring counter counting mode is selected.

Current Count Mode: Linear Counter Count Mode: Ring Counter


Value Count Range: Count Range: Count Range: Count Range:
High-Speed Counter

Range Unsigned 32-Bit Signed 32-Bit Unsigned 32-Bit Signed 32-Bit


Upper limit
Upper limit
(1) 4294967295 +2147483647 (-2147483647 to
(1 to 4294967295)
+2147483647)
Lower limit
Lower limit
(2) 0 -2147483648 (-2147483648 to
(0 to 4294967294)
+2147483646)

Reference • Use page 2/4 of the CPU high-speed counter setup wizard to set the count mode and
count range.
• If an overflow is detected, CR4206 (CTH0), CR4406 (CTH1), CR4606 (CTH2), and
CR4806 (CTH3) are all turned ON.
 Preset count mode
In this mode, when a preset input (external input) is applied, the current value is changed to the preset
value.
Up count
Count input
Down count

Preset input

(1)

Preset value
Current value

(2)

Current Count Mode: Linear Counter Count Mode: Ring Counter


Value Count Range: Count Range: Count Range: Count Range:
Range Unsigned 32-Bit Signed 32-Bit Unsigned 32-Bit Signed 32-Bit
Upper limit
Upper limit
(1) 4294967295 +2147483647 (-2147483647 to
(1 to 4294967295)
+2147483647)
Lower limit
Lower limit
(2) 0 -2147483648 (-2147483648 to
(0 to 4294967294)
+2147483646)

Reference Use page 2/4 of the CPU high-speed counter setup wizard to set the count mode and
count range.
5-106 - KV Nano Series(terminal block type) User’s Manual -
5-4 High-Speed Counter

 Enable accu count mode


In this mode, counting is performed only when enable input is turned ON. The current value is
accumulated.

CPU BUILT-IN FUNCTIONS


Up count
Count input
Down count

ON
Enable input
OFF

(1)

Current value 5

High-Speed Counter
(2)

Current Count Mode: Linear Counter Count Mode: Ring Counter


Value Count Range: Count Range: Count Range: Count Range:
Range Unsigned 32-Bit Signed 32-Bit Unsigned 32-Bit Signed 32-Bit
Upper limit
Upper limit
(1) 4294967295 +2147483647 (-2147483647 to
(1 to 4294967295)
+2147483647)
Lower limit
Lower limit
(2) 0 -2147483648 (-2147483648 to
(0 to 4294967294)
+2147483646)
Reference Use page 2/4 of the CPU high-speed counter setup wizard to set the count mode and
count range.
 Enable count mode
In this mode, counting is performed only when enable input is turned ON. The current value is reset
(cleared to zero) on the rising edge of the enable input.
Up count
Count input
Down count

ON
Enable input
OFF

(1)

Current value

Reset value

(2)

Current Count Mode: Linear Counter Count Mode: Ring Counter


Value Count Range: Count Range: Count Range: Count Range:
Range Unsigned 32-Bit Signed 32-Bit Unsigned 32-Bit Signed 32-Bit
Upper limit
Upper limit
(1) 4294967295 +2147483647 (-2147483647 to
(1 to 4294967295)
+2147483647)
Lower limit
Lower limit
(2) 0 -2147483648 (-2147483648 to
(0 to 4294967294)
+2147483646)

Reference Use page 2/4 of the CPU high-speed counter setup wizard to set the count mode and
count range.

- KV Nano Series(terminal block type) User’s Manual - 5-107


5-4 High-Speed Counter

3 Configure the count input settings.


Configure the count input settings, and then click Next.
CPU BUILT-IN FUNCTIONS

Step 3, selecting the input method

5
High-Speed Counter

Item Description
Select this when you want to use the high-speed counter to count external
External input
input.
Select the count input mode from the list.
Options : 1-phase (w/o direction), 1-phase (w/ direction), Phase difference (1x),
Count input mode
Phase difference (2x), Phase difference (4x), and 2-pulse
"Count Input Settings" (page 5-116)
Select the input time constant from the list.
Input time constant Options : 10µs, 20µs, 110µs, 500µs, 1ms, 2.5ms, 5ms, and 10ms
"Input Time Constant Setting" (page 5-198)
Select this when you want to use the internal clock and direct pulses (specified
Internal input
frequency pulses) to perform counting.
Select an internal clock from the list.
Internal clock input Options : 50ns, 1.0µs, 10.0µs, and 100.0µs
"Counting the Internal Clock" (page 5-119)
Select this when you want to count direct clock pulses or specified frequency
pulse output.
CTH0: R500; CTH1: R501; CTH2: R502; and CTH3: R503
Direct clock pulse input
* You cannot specify the number of the currently set high-speed counter.
"Counting Direct Clock Pulse (Specified Frequency Pulse) Output" (page 5-
119)

4 Configure count settings.


Configure the "Count range," "Count mode," and "Default value setting" settings, and then click Next.

5-108 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

Item Description
Set the count (current value) range.

CPU BUILT-IN FUNCTIONS


Count range Options : Unsigned 32-bit (0 to 4294967295) and
Signed 32-bit (-2147483648 to +2147483647)
Count mode Set the count mode.
Counting is performed according to the range that you set with "Count range."
If the current value exceeds this range, the overflow detection relay is turned
Linear counter
ON.
"Linear counter" (page 5-114)
Counting is performed according to the range specified by the upper and lower
limits that you set.
Ring counter Even if the current value exceeds the range, the overflow detection relay will

5
not be turned ON.
"Ring counter" (page 5-115)
When the CPU operation mode changes from PROG to RUN, the current value
Initial value setting

High-Speed Counter
is overwritten with the specified default value.

5 Set the comparator matching operation.


Configure the "When current value=set value" and "Setting default value" settings, and then click Next.
Step 5, configuring comparator m
operation settings

Item Description
If you select this check box, the output relay will operate when the current
Use comparator
value and the comparator value (the set value) match.
With the KV Nano Series, the relay that output is generated from when the
Output relay comparator matches the current value is fixed.
CTH0: R500; CTH1: R501; CTH2: R502; and CTH3: R503
When current value (CTH0, Configure the settings to indicate the behavior when the current value (CTH0,
CTH1, CTH2, or CTH3)= CTH1, CTH2, or CTH3) is equal to the set value (CTC0, CTC1 or CTC2,
set value (CTC0, CTC1 or CTC3 or CTC4, CTC5 or CTC6, or CTC7). For the current value, you can
CTC2, CTC3 or CTC4, CTC5 select "Zero clear" or "No zero clear." For the output relay, you can select
or CTC6, or CTC7) "ON," "OFF," "Inverted," or "No change."
Setting (CTC0, CTC1 or
CTC2, CTC3 or CTC4, CTC5 Specify the default setting of the high-speed counter comparator (CTC0,
or CTC6, or CTC7) default CTC1 or CTC2, CTC3 or CTC4, CTC5 or CTC6, or CTC7).
value

- KV Nano Series(terminal block type) User’s Manual - 5-109


5-4 High-Speed Counter

The following steps vary according to the operation mode that you selected in step 2.
• If the mode is "Up/down count" ...................................Go to step 8
• If the mode is "Preset count" .......................................Go to step 6
CPU BUILT-IN FUNCTIONS

• If the mode is "Enable accu count"..............................Go to step 7


• If the mode is "Enable count" ......................................Go to step 7

6 Configure the external control input (preset) settings.


You can only configure these settings when the operation mode is set to "Preset count."
Configure the "Preset value," "Polarity of preset input relay," and "Preset timing" settings. Then, click
Next and proceed to step 8.

5
High-Speed Counter

Item Description
Specify the preset value that the current value will be rewritten as when preset
input is applied.
Specify a preset value that is within the range that you have specified with the
"Count range" setting.
* The number of the device on which the preset value will be stored varies
Preset value
according to the counter number.
Device number 0: CM4807 and CM4806
Device number 1: CM4817 and CM4816
Device number 2: CM4827 and CM4826
Device number 3: CM4837 and CM4836
Select the input polarity of the preset input relay.
NO contact: The preset is executed when the external input is turned ON.
NC contact: The preset is executed when the external input is turned OFF.
Polarity of preset input
* The preset input relay varies according to the type of the base unit and the
relay
counter number.
"High-Speed Counter Device Numbers Categorized by Function" (page 5-
100)
Select the timing with which the preset is performed when preset input is
applied.
Up edge : The preset is executed on the rising edge of the external preset
input relay.
Down edge : The preset is executed on the falling edge of the external preset
Preset timing
input relay.
Level : When the polarity of the external preset input relay is NO (A
contact), the preset will be executed while the relay is turned ON.
When the polarity of the external preset input relay is NC (B
contact), the preset will be executed while the relay is turned OFF.

5-110 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

7 Configure the external control input (counter enable) settings.


You can only configure these settings when the operation mode is set to "Enable accu count" or

CPU BUILT-IN FUNCTIONS


"Enable count."
Configure the "External input polarity" and "Counting enable condition" settings, and then click Next.
Step 7, configuring counter enab

High-Speed Counter
Item Description
Select the enable condition of counting.
When an internal relay is in the enabled state:
When an internal relay is turned ON, counting is enabled.
When an external input is in the enabled state:
If the external input polarity is NO, counting is enabled when the
external input is turned ON.
If the external input polarity is NC, counting is enabled when the
external input is turned OFF.
Counting enable condition
When an internal relay is in the enabled state and an external input is in the
enabled state:
Counting is enabled when the internal relay is turned ON and the
external input is in the enabled state.
When an internal relay is in the enabled state or an external input is in the
enabled state:
Counting is enabled when the internal relay is turned ON or the external
input is in the enabled state.
Select the input polarity of the external enable input relay.
NO contact : When external input is turned ON: .............. Enabled
When external input is turned OFF: ............ Disabled
NC contact : When external input is turned ON: .............. Disabled
External input polarity When external input is turned OFF: ............ Enabled
* The external enable input relay varies according to the type of the base unit
and the counter number.
"High-Speed Counter Device Numbers Categorized by Function" (page 5-
100)
This is fixed to "Fix of NO contact." This setting cannot be changed.
* The internal relays that are used with the enable input vary according to the
Polarity of internal relay counter number.
"High-Speed Counter Device Numbers Categorized by Function" (page 5-
100)

- KV Nano Series(terminal block type) User’s Manual - 5-111


5-4 High-Speed Counter

8 Specify the name of the module to output and confirm the high-speed counter settings.
Specify the name of the module that will be generated as a ladder program that contains the settings
CPU BUILT-IN FUNCTIONS

you have configured with the CPU high-speed counter setup wizard.
Confirm the CPU high-speed counter settings, and then click Finish to complete the setup process.

5
High-Speed Counter

5-112 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

List of High-Speed Counter Functions

CPU BUILT-IN FUNCTIONS


The functions that use the high-speed counter are listed below.

 Reading the current value's change direction


Whether the current value of the high-speed counter is being increased or decreased is read into the
control relay (CR).
"Reading the Current Value's Change Direction" (page 5-129)

 Current value refresh


During program execution, you can use the RFSCTH instruction to refresh the current value of the high-
speed counter. 5
"RFSCTH Instructions" (page 5-136)

High-Speed Counter
 Input capture
When an interruption occurs, the current value of the high-speed counter is stored in control memory
(CM).
"Acquiring the Current Value Based on Input Capture" (page 5-130)

 Interrupting based on comparator matching


When the current value of the counter (CTH) and the comparator value (CTC) match, an interrupt
program will be executed.
"4-7 Interrupts" (page 4-76)

 Comparator matching output


The output relay of the KV Nano Series will be automatically turned ON or OFF when the current value
of the high-speed counter (CTH) and the comparator value (CTC) match.
"Comparator Matching Output" (page 5-128)

 Direct clock pulse output


Clock pulses that are not influenced by the scan time are output.
"Direct Clock Pulse Output" (page 5-145)

Reference You can easily generate pulses by using the specified frequency pulse output function.

 Expansion function
You can use dedicated instructions to easily execute expansion functions that use the high-speed
counter.
• Frequency measurement function ..............Measures the frequency of external pulse input
"5-5 Frequency Counter" (page 5-156)

• Rotation speed measurement function .......Measures the rotation speed of external pulse input
"5-5 Frequency Counter" (page 5-156)

• Specified frequency pulse output function ..Generates pulses at the specified frequency
"5-3 Specified Frequency Pulse Output" (page 5-95)

• Cam switch function....................................You can use an incremental encoder to perform cam


control with the PLC.
"5-6 Cam Switch" (page 5-163)

- KV Nano Series(terminal block type) User’s Manual - 5-113


5-4 High-Speed Counter

Setting the Count Range


CPU BUILT-IN FUNCTIONS

Use the count mode and the signed status of values to set the range of the value that you will count
using the high-speed counter.

 Linear counter
The linear counter counts the value within a 32-bit counting range.

Unsigned 32-bit
Up counting and down counting are performed in the range of 0 to 4294967295.

5
If up counting is performed when the value is 4294967295, the value will become 0. If down counting is
performed when the value is 0, the value will become 4294967295.
In these situations, the overflow detection relays (CR4206, CR4406, CR4606, and CR4806) will be
High-Speed Counter

turned ON.

Signed 32-bit
Up counting and down counting are performed in the range of -2147483648 to +2147483647.
If up counting is performed when the value is +2147483647, the value will become -2147483648. If
down counting is performed when the value is -2147483648, the value will become +2147483647.
In these situations, the overflow detection relays (CR4206, CR4406, CR4606, and CR4806) will be
turned ON.

Counting value ranges and overflow detection relays


Count Mode Overflow
Signed Setting Count Value Range
Selection Detection
CR4210 OFF CM4801 OFF 0 to 4294967295
CTH0 CR4206
(linear counter) bit 7 ON -2147483648 to +2147483647
CR4410 OFF CM4811 OFF 0 to 4294967295
CTH1 CR4406
(linear counter) bit 7 ON -2147483648 to +2147483647
CR4610 OFF CM4821 OFF 0 to 4294967295
CTH2 CR4606
(linear counter) bit 7 ON -2147483648 to +2147483647
CR4810 OFF CM4831 OFF 0 to 4294967295
CTH3 CR4806
(linear counter) bit 7 ON -2147483648 to +2147483647

The overflow detection relays will remain turned ON until they are turned OFF with an RES instruction or
similar instruction.
Up count
Count input
Down count

Unsigned Signed
Overflow
Upper limit 4294967295 +2147483647
($FFFFFFFF) ($7FFFFFFF)

Count value

Lower limit 0 -2147483648


($00000000) ($80000000) Overflow

RES CR4206/CR4406/ RES CR4206/CR44


CR4606/CR4806 CR4606/CR4806

Overflow detection
CTH0:CR4206, CTH1:CR4406,
CTH2:CR4606, CTH3:CR4806

Counting will not stop even if an overflow is detected. Counting will only stop
Point
when the count input is stopped.

5-114 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 Ring counter
You can use the ring counter to set arbitrary upper and lower limits to the high-speed counter.

CPU BUILT-IN FUNCTIONS


Up counting and down counting are performed within the range specified by the upper and lower limits.
If up counting is performed when the value is the upper limit, the value will become the lower limit. If
down counting is performed when the value is the lower limit, the value will become the upper limit.
In these situations, the overflow detection relays (CR4206, CR4406, CR4606, and CR4806) will not be
turned ON.

Setting ranges of the count value and storage destinations of the upper and lower limits
Count Mode
Selection
Signed Setting Count Value Range
Upper
Limit
Lower
Limit 5
CR4210 ON CM4801 OFF 0 to 4294967295 CM4805 CM4803
CTH0

High-Speed Counter
(ring counter) bit 7 ON -2147483648 to +2147483647 CM4804 CM4802
CR4410 ON CM4811 OFF 0 to 4294967295 CM4815 CM4813
CTH1
(ring counter) bit 7 ON -2147483648 to +2147483647 CM4814 CM4812
CR4610 ON CM4821 OFF 0 to 4294967295 CM4825 CM4823
CTH2
(ring counter) bit 7 ON -2147483648 to +2147483647 CM4824 CM4822
CR4810 ON CM4831 OFF 0 to 4294967295 CM4835 CM4833
CTH3
(ring counter) bit 7 ON -2147483648 to +2147483647 CM4834 CM4832

Example
Ring counter settings of MOV.D
CR2008
high-speed counter #10000 CM4804

comparator CTC0 with upper Turns ON


for one scan
limit 10000 and lower limit MOV.D
#100 CM4802
100

• Overflows will not be detected even if the upper or lower limit is exceeded.
Point
Up count
Count input
Down count

CTH0:[CM4805・CM4804]
CTH1:[CM4815・CM4814]
Upper limit
CTH2:[CM4825・CM4824]
CTH3:[CM4835・CM4834]

CTH0:[CM4803・CM4802] Count value

Lower limit CTH1:[CM4813・CM4812]


CTH2:[CM4823・CM4822]
CTH3:[CM4833・CM4832]

• If you change the current value of the high-speed counter or the upper or lower
limit of the ring counter, and if the current value of the counter is then within the
range specified by the lower and upper limits, the counter's current value will
be corrected during the execution of the END instruction.
• If the current value exceeds the upper limit, it will be corrected to the upper
limit.
• If the current value is smaller than lower limit, it will be corrected to the lower
limit.
• Do not set the limits so that the upper limit is less than or equal to the lower
limit. Doing so will prevent normal counting from being executed.

- KV Nano Series(terminal block type) User’s Manual - 5-115


5-4 High-Speed Counter

Count Input Settings


CPU BUILT-IN FUNCTIONS

The high-speed counter can count three values: external input, the internal clock, and direct clock pulse
output.

 Counting external input


When you are using the high-speed counter to count external input, use the following relay numbers
per channel.
KV-N14** KV-N24** KV-N40** KV-N60**

5 CTH0
A-Phase B-Phase A-Phase B-Phase A-Phase B-Phase A-Phase B-Phase
R004 R005 R004 R005 R008 R009 R008 R009
CTH1 R006 R007 R006 R007 R010 R011 R010 R011
High-Speed Counter

CTH2 - - - - R012 R013 R012 R013


CTH3 - - - - - - R014 R015

Example
Using high-speed counter HSP
CTH0 to count external R004

inputs R004 and R005.


HSP
R005

CTH.D 0
R004

When you are using external input, be sure to set the input time constant.
Point
You can use the HSP instruction to set the input time constant to 10 µs.
"Input Time Constant Setting" (page 5-198)

"CTH Instructions" (page 5-132)

You can use one of the count input modes shown below (single phase, phase difference, and 2-pulse)
to count external input with the high-speed counter.
Set the count input mode in combinations of CR4313 to CR4315 (CTH0), CR4513 to CR4515 (CTH1),
CR4713 to CR4715 (CTH2), and CR4913 to CR4915 (CTH3).

CTH0 count input mode


Single Phase Phase Difference
2-Pulse
W/O Direction W/ Direction 1x 2x 4x
CR4313 OFF ON OFF ON OFF ON
CR4314 OFF OFF ON ON OFF OFF
CR4315 OFF OFF OFF OFF ON ON

CTH1 count input mode


Single Phase Phase Difference
2-Pulse
W/O Direction W/ Direction 1x 2x 4x
CR4513 OFF ON OFF ON OFF ON
CR4514 OFF OFF ON ON OFF OFF
CR4515 OFF OFF OFF OFF ON ON

5-116 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

CTH2 count input mode


Single Phase Phase Difference
2-Pulse

CPU BUILT-IN FUNCTIONS


W/O Direction W/ Direction 1x 2x 4x
CR4713 OFF ON OFF ON OFF ON
CR4714 OFF OFF ON ON OFF OFF
CR4715 OFF OFF OFF OFF ON ON

CTH3 count input mode


Single Phase Phase Difference
2-Pulse
W/O Direction W/ Direction 1x 2x 4x
CR4913 OFF ON OFF ON OFF ON
CR4914
CR4915
OFF
OFF
OFF
OFF OFF
ON ON
OFF
OFF
ON
OFF
ON 5

High-Speed Counter
(1) Single phase
Select this option when you want to count single-phase pulses.

W/O direction..... A-phase rising edges are counted.


The B-phase has no influence on the counting operation. (It can be used as a
common input.)

W/ direction ....... Up counting is performed on A-phase rising edges when the B-phase is turned OFF.
Down counting is performed on the A-phase rising edges when B-phase is turned ON.

W/O direction W/ direction


ON ON
(A-phase) (A-phase)

OFF OFF

ON ON
(B-phase) (B-phase)

OFF OFF

(Counter value) (Counter value)


0 1 2 3 4 5 6 0 1 2 3 2 1 0

(2) Phase difference


Select this option when you want to count phase-difference pulses.

1x..............When the B-phase is turned OFF, up counting is performed on A-phase rising edges.
When the B-phase is turned OFF, down counting is performed on A-phase falling edges.
ON
(A-phase)
OFF
ON
(B-phase)
OFF

(Counter value)

0 1 2 3 4 3 2 1 0

- KV Nano Series(terminal block type) User’s Manual - 5-117


5-4 High-Speed Counter

2x..............When the B-phase is turned OFF, up counting is performed on A-phase rising edges.
When the B-phase is turned OFF, down counting is performed on A-phase falling edges.
When the B-phase is turned ON, down counting is performed on A-phase rising edges.
CPU BUILT-IN FUNCTIONS

When the B-phase is turned ON, up counting is performed on A-phase falling edges.
ON
(A-phase)
OFF
ON
(B-phase)
OFF

(Counter value)

5
0 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 0

4x..............When the B-phase is turned OFF, up counting is performed on A-phase rising edges.
High-Speed Counter

When the B-phase is turned OFF, down counting is performed on A-phase falling edges.
When the B-phase is turned ON, down counting is performed on A-phase rising edges.
When the B-phase is turned ON, up counting is performed on A-phase falling edges.
When the A-phase is turned OFF, down counting is performed on B-phase rising edges.
When the A-phase is turned OFF, up counting is performed on B-phase falling edges.
When the A-phase is turned ON, up counting is performed on B-phase rising edges.
When the A-phase is turned ON, down counting is performed on B-phase falling edges.
ON
(A-phase)
OFF
ON
(B-phase)
OFF

(Counter value)

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

(3) 2-pulse
Select this option when you want to count pulses that are applied with the 2-pulse mode.

Up counting is performed on A-phase rising edges. Down counting is performed on B-phase rising
edges.
ON
(A-phase)
OFF
ON
(B-phase)
OFF

(Counter value)

0 1 2 3 4 3 2 1 0

5-118 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 Counting the Internal Clock


When you are counting the internal clock, use the following control relays.

CPU BUILT-IN FUNCTIONS


50 ns 1.0 µs 10.0 µs 100.0 µs
CTH0 CR4200 CR4201 CR4202 CR4203
CTH1 CR4400 CR4401 CR4402 CR4403
CTH2 CR4600 CR4601 CR4602 CR4603
CTH3 CR4800 CR4801 CR4802 CR4803

Example
Using high-speed counter
CTH.D 0
CTH0 to count the internal CR4201
clock (1.0 µs)
5
"CTH Instructions" (page 5-132)

High-Speed Counter
 Counting Direct Clock Pulse (Specified Frequency Pulse) Output
When you are counting direct clock pulse or specified frequency pulse output, specify the following
output relays.
"Direct Clock Pulse Output" (page 5-145)
"5-3 Specified Frequency Pulse Output" (page 5-95)

Counter Direct Clock Pulse (Counter Number Output by Comparator Matching)


Number KV-N14** KV-N24** KV-N40** KV-N60**
R501 (CTH1) and R501 (CTH1), R502 (CTH2),
CTH0 R501 (CTH1) R501 (CTH1)
R502 (CTH2) and R503 (CTH3)
R500 (CTH0) and R500 (CTH0), R502 (CTH2),
CTH1 R500 (CTH0) R500 (CTH0)
R502 (CTH2) and R503 (CTH3)
R500 (CTH0) and R500 (CTH0), R501 (CTH1),
CTH2 - -
R501 (CTH2) and R503 (CTH3)
R500 (CTH0), R501 (CTH1),
CTH3 - - -
and R502 (CTH2)

Example

The direct clock pulse


CTH.D 0
R501 output from R501 is
counted with high-speed
counter CTH0.
The direct clock pulse
CTH.D 1
output from R500 is counted
R500
with high-speed counter
CTH1.

Because the comparator matching output (R500 to R503) is processed within the
Point
PLC, the processing is not reflected in the status of the ladder program.
"Comparator Matching Output" (page 5-128)

- KV Nano Series(terminal block type) User’s Manual - 5-119


5-4 High-Speed Counter

High-Speed Counter Set Values (CTC)


CPU BUILT-IN FUNCTIONS

Use high-speed counter comparators CTC0 to CTC7 to set the values of the high-speed counters.
CTH0 is matched against CTC0 or CTC1.
CTH1 is matched against CTC2 or CTC3.
CTH2 is matched against CTC4 or CTC5.
CTH3 is matched against CTC6 or CTC7.
If CTH and CTC match when no CTC interrupt program is available, the CTC contact is turned ON.
Use the RES instruction or a similar instruction to turn the contact OFF. When a CTC interrupt program
is available, the CTC contact will not be turned ON.
5 Signed Setting Count Value Range
High-Speed Counter
Comparator
High-Speed Counter

CM4801 OFF (unsigned) 0 to 4294967295


CTH0 CTC0 CTC1
bit 7 ON (signed) -2147483648 to +2147483647
CM4811 OFF (unsigned) 0 to 4294967295
CTH1 CTC2 CTC3
bit 7 ON (signed) -2147483648 to +2147483647
CM4821 OFF (unsigned) 0 to 4294967295
CTH2 CTC4 CTC5
bit 7 ON (signed) -2147483648 to +2147483647
CM4831 OFF (unsigned) 0 to 4294967295
CTH3 CTC6 CTC7
bit 7 ON (signed) -2147483648 to +2147483647

Example
The value of CTC0 is set to
HSP
100 and the value of CTC1 is R004

set to 100000.
CTH.D 0
R004

#100
CTC 0

#100000
CTC 1
CTC 0

CTC 1

CTC0
RES
CTC1
RES

When the current value is rewritten to be the same as the value of CTC, the CTC
Point
contact will not be turned ON.
It will only be turned ON when the current value is the same as the value of CTC
after up counting or down counting.
"CTC Instructions" (page 5-132)

5-120 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

Reset Mode

CPU BUILT-IN FUNCTIONS


There are the following five modes for performing resets.
Reset based on the RES instruction
Reset based on the CTH instruction (execution condition OFF)
Automatic reset based on comparator matching
Reset based on external preset input
Reset based on the counter enable function

The timings with which resets are performed for each mode are displayed below.
Point
5
Reset Mode Reset Timing

High-Speed Counter
The point in time that the RES
Reset based on the RES instruction
instruction is executed
Reset based on the CTH instruction (execution The point in time that the CTH
condition OFF) instruction is executed
The point in time that the current
Automatic reset based on comparator matching value and the comparator value
match
The point in time that the external
Reset based on external preset input
preset input is turned ON
Reset based on the Internal enable relay in use
The point in time that the enable
counter enable Internal enable relay and external
signal changes from disabled to
function enable input in use together
enabled or from enabled to disabled
External enable input in use

 Reset based on the RES instruction


"RES CTH" executes the reset. The reset is executed at the point in time that the RES instruction is
executed.
Scan

CTH current value

"RES CTH" execution

Example
The reset is performed
CTH0
based on the RES RES
instruction.

- KV Nano Series(terminal block type) User’s Manual - 5-121


5-4 High-Speed Counter

 Reset based on the CTH instruction (Execution condition OFF)


The reset is performed when the execution condition of the CTH instruction is turned OFF.
CPU BUILT-IN FUNCTIONS

Scan

Execution
condition

CTH current value

5 CTH instruction execution


High-Speed Counter

Example
The reset is performed
based on the CTH Execution
condition CTH.D 0
instruction (execution R004

condition OFF). Turn this OFF to reset the current value.

 Automatic reset based on comparator matching


When up counting or down counting causes the current value (CTH) to match the comparator (CTC)
value, the current value is automatically reset. The reset is performed immediately, with no influence
from the scan.
Use control relays to set this method.
High-Speed
High-Speed Device
Counter Operation ON OFF
Counter Number
Comparator
CTC0 CR4303 Automatic reset when CTH0 and CTC0 are equal Execute Do not execute
CTH0
CTC1 CR4312 Automatic reset when CTH0 and CTC1 are equal Execute Do not execute
CTC2 CR4503 Automatic reset when CTH0 and CTC2 are equal Execute Do not execute
CTH1
CTC3 CR4512 Automatic reset when CTH0 and CTC3 are equal Execute Do not execute
CTC4 CR4703 Automatic reset when CTH0 and CTC4 are equal Execute Do not execute
CTH2
CTC5 CR4712 Automatic reset when CTH0 and CTC5 are equal Execute Do not execute
CTC6 CR4903 Automatic reset when CTH0 and CTC6 are equal Execute Do not execute
CTH3
CTC7 CR4912 Automatic reset when CTH0 and CTC7 are equal Execute Do not execute

Scan

CTH

CTH = CTC
* The reset is performed when CTH and CTC are equal.
Example
The automatic reset is
CR2008 CR4303 CR4503
performed based on SET SET
comparator matching.

5-122 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

Precautions on changing the current value of a CTH when performing automatic


Point
resets are listed below.
• When the value is unsigned or when it is signed and the CTC value is positive,

CPU BUILT-IN FUNCTIONS


even if you change the value of CTH to a value greater than or equal to CTC, the
CTH value will be set to "CTC value - 1."
• When the value is signed and the CTC value is negative, even if you change the
value of CTH to a value less than or equal to CTC, the CTH value will be set to
"CTC value + 1."

 Reset based on external preset input


Use the preset function to execute a reset.
To execute the preset function, set the preset value to 0.
The reset is performed immediately, with no influence from the scan.
5

High-Speed Counter
"Preset Function" (page 5-124)

Scan

External preset
input

CTH

* The reset is performed when the external preset input is turned ON.

 Reset based on the counter enable function


The reset is performed when the counter enable setting switches from disabled to enabled or from
enabled to disabled.
Use the combination of the external enable input and the internal enable relay to disable and enable the
counter enable setting.
"Enabling and Disabling Counting (Counter Enable Function)" (page 5-126)

Disabled  Enabled

Counter input
Enabled
Enable
Disabled

CTH

Enabled  Disabled

Counter input
Enabled
Enable
Disabled

CTH

Example
To configure the high
speed counter to be CR2008 CM4801.4 CM4801.5
SET SET
reset based on the
counter enable function
(enabled  disabled)

- KV Nano Series(terminal block type) User’s Manual - 5-123


5-4 High-Speed Counter

Preset Function
CPU BUILT-IN FUNCTIONS

This function changes the current value of the high-speed counter to the preset value. The value is
changed based on external input.

Count input Up count


Down count

Preset signal

5 A
Count value
High-Speed Counter

Preset value

Linear Counter Ring Counter


Unsigned Signed Unsigned Signed
Upper limit Upper limit
A 4294967295 +2147483647
(0 to 4294967295) (-2147483648 to +2147483647)
Lower limit Lower limit
B 0 -2147483648
(0 to 4294967295) (-2147483648 to +2147483647)

The concept of the preset function and the preset signal settings are described below.

Preset function concept


The preset function operates as shown below according to its settings.
The device numbers shown in the table are, in order from the top, device numbers used by channel 0,
channel 1, channel 2, and channel 3.
Preset Disabled Polarity Setting Operation Timing Preset Execution Timing
CR4211 CM4801 bit 8 CR4208 CR4209
CR4411 CM4811 bit 8 CR4408 CR4409
CR4611 CM4821 bit 8 CR4608 CR4609
CR4811 CM4831 bit 8 CR4808 CR4809
Disables preset
OFF OFF The preset is not executed.
input
Executes preset Rising edge of the
ON OFF
A contact

on rising edge preset input signal.


OFF Executes preset Falling edge of the
OFF ON
on falling edge preset input signal.
Executes preset When the preset
ON ON when signal is input signal is turned
Enabled

level ON.
OFF
Disables preset
OFF OFF The preset is not executed.
input
Executes preset Falling edge of the
ON OFF
B contact

on rising edge preset input signal.


ON Executes preset Rising edge of the
OFF ON
on falling edge preset input signal.
Executes preset When the preset
ON ON when signal is input signal is turned
level OFF.
Disabled

ON - - The preset is not executed.

5-124 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 External preset-related devices

Model High-Speed Counter External Preset Input Preset Value Storage

CPU BUILT-IN FUNCTIONS


CM4807 (upper bits) and
CTH0 R002
CM4806 (lower bits)
KV-N14** CM4817 (upper bits) and
CTH1 R003
CM4816 (lower bits)
CTH2 and CTH3 - -
CM4807 (upper bits) and
CTH0 R010
CM4806 (lower bits)
KV-N24** CM4817 (upper bits) and
CTH1 R011
CM4816 (lower bits)
CTH2 and CTH3 - -

CTH0 R104
CM4807 (upper bits) and 5
CM4806 (lower bits)

High-Speed Counter
CM4817 (upper bits) and
CTH1 R105
KV-N40** CM4816 (lower bits)
CM4827 (upper bits) and
CTH2 R106
CM4826 (lower bits)
CTH3 - -
CM4807 (upper bits) and
CTH0 R104
CM4806 (lower bits)
CM4817 (upper bits) and
CTH1 R105
CM4816 (lower bits)
KV-N60**
CM4827 (upper bits) and
CTH2 R106
CM4826 (lower bits)
CM4837 (upper bits) and
CTH3 R107
CM4836 (lower bits)

- KV Nano Series(terminal block type) User’s Manual - 5-125


5-4 High-Speed Counter

Enabling and Disabling Counting (Counter Enable Function)


CPU BUILT-IN FUNCTIONS

You can use the counter enable function to enable and disable count input.
Use the combination of the external enable input and internal enable relay to control count input.
In addition, you can reset the current value when the counter enable signal changes from disabled to
enabled and from enabled to disabled.

Count input Up count

Down count

Enabled
Enable signal

5
Disabled

When the current value


is not reset
High-Speed Counter

Count value

Reset value 0

When changing from


disabled to enabled A
Count value

Reset value 0

When changing from


enabled to disabled A

Count value

Reset value 0

Linear Counter Ring Counter


Unsigned Signed Unsigned Signed
Upper limit Upper limit
A 4294967295 +2147483647
(0 to 4294967295) (-2147483648 to +2147483647)
Lower limit Lower limit
B 0 -2147483648
(0 to 4294967295) (-2147483648 to +2147483647)

The enable signal settings are described below.

5-126 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 External enable input

Enable Input Polarity

CPU BUILT-IN FUNCTIONS


CM4801 Bit 9 (CTH0)
External Enable Input* CM4811 Bit 9 (CTH1) Enable Status
CM4821 Bit 9 (CTH2)
CM4831 Bit 9 (CTH3)
OFF A contact ON (enabled)
ON Conducting
ON B contact OFF (disabled)
OFF A contact OFF (disabled)
OFF Not conducting
ON B contact ON (enabled)
* This varies depending on the model.
"High-Speed Counter Device Numbers Categorized by Function" (page 5-100)
5
 Internal enable input

High-Speed Counter
Internal Enable Relay
CR4212 (CTH0)
CR4412 (CTH1) Enable Status
CR4612 (CTH2)
CR4812 (CTH3)
OFF A contact Enabled
ON B contact Disabled

 Enable signal
Use the combination of the external enable input and internal enable relay to set the enable signal.
Combination Setting
Description
Bit 2 Bit 1 Bit 0
OFF OFF OFF
Normal enable (counting is performed all the time, regardless
OFF ON OFF
of whether the external enable input and internal enable relay
ON OFF OFF are enabled or disabled).
ON ON OFF
CM4801 (CTH0) Counting is performed when the internal relay is in the
CM4811 (CTH1) OFF OFF ON
enabled state.
CM4821 (CTH2) Counting is performed when the external enable input is in
CM4831 (CTH3) OFF ON ON
the enabled state.
Counting is performed when the internal enable relay and
ON OFF ON
external enable input are in the enabled state.
Counting is performed when the internal enable relay or the
ON ON ON
external enable input is in the enabled state.

 Current value reset setting when changing between enabled and disabled
You can set whether to reset the current value when switching between the enabled and disabled state
of the enable count (count start and count stop).
Bit 5 Bit 4 Operation
OFF OFF
The current value is not reset.
CM4801 (CTH0) OFF ON
CM4811 (CTH1) The current value is reset when the state changes from disabled to
ON OFF
CM4821 (CTH2) enabled.
CM4831 (CTH3) The current value is reset when the state changes from enabled to
ON ON
disabled.

- KV Nano Series(terminal block type) User’s Manual - 5-127


5-4 High-Speed Counter

Comparator Matching Output


CPU BUILT-IN FUNCTIONS

This function turns the output relay ON and OFF when the comparator value matches the current value.
Use control relays to set this method. Comparator matching output is not affected by the scan time.

Comparator Control Details*2


Counter Matching Output
Comparator Device
Number Enabled/ Operation When CTC Is Turned ON
Disabled*1 Number

CR4304 CR4305 ON: R500 is turned OFF. OFF: R500 is not turned OFF.
CTC0 ON: Disabled CR4306 ON: R500 is turned ON. OFF: R500 is not turned ON.
OFF: Enabled CR4307 ON: R500 is inverted. OFF: R500 is not inverted.
5 CTH0
CR4308 CR4309 ON: R500 is turned OFF. OFF: R500 is not turned OFF.
CTC1 ON: Disabled CR4310 ON: R500 is turned ON. OFF: R500 is not turned ON.
High-Speed Counter

OFF: Enabled CR4311 ON: R500 is inverted. OFF: R500 is not inverted.

CR4504 CR4505 ON: R501 is turned OFF. OFF: R501 is not turned OFF.
CTC2 ON: Disabled CR4506 ON: R501 is turned ON. OFF: R501 is not turned ON.
OFF: Enabled CR4507 ON: R501 is inverted. OFF: R501 is not inverted.
CTH1
CR4508 CR4509 ON: R501 is turned OFF. OFF: R501 is not turned OFF.
CTC3 ON: Disabled CR4510 ON: R501 is turned ON. OFF: R501 is not turned ON.
OFF: Enabled CR4511 ON: R501 is inverted. OFF: R501 is not inverted.

CR4704 CR4705 ON: R502 is turned OFF. OFF: R502 is not turned OFF.
CTC4 ON: Disabled CR4706 ON: R502 is turned ON. OFF: R502 is not turned ON.
OFF: Enabled CR4707 ON: R502 is inverted. OFF: R502 is not inverted.
CTH2
CR4708 CR4709 ON: R502 is turned OFF. OFF: R502 is not turned OFF.
CTC5 ON: Disabled CR4710 ON: R502 is turned ON. OFF: R502 is not turned ON.
OFF: Enabled CR4711 ON: R502 is inverted. OFF: R502 is not inverted.

CR4904 CR4905 ON: R503 is turned OFF. OFF: R503 is not turned OFF.
CTC6 ON: Disabled CR4906 ON: R503 is turned ON. OFF: R503 is not turned ON.
OFF: Enabled CR4907 ON: R503 is inverted. OFF: R503 is not inverted.
CTH3
CR4908 CR4909 ON: R503 is turned OFF. OFF: R503 is not turned OFF.
CTC7 ON: Disabled CR4910 ON: R503 is turned ON. OFF: R503 is not turned ON.
OFF: Enabled CR4911 ON: R503 is inverted. OFF: R503 is not inverted.

*1 When power is turned on, the comparator matching output disabled flag is turned ON (disabled).
*2 If, for a single comparator, you have turned ON multiple relays for controlling the operation when CTC is
turned ON, the operation will be performed with the settings of the relay that has the smallest device
number.
(Example: If both CR4305 and CR4306 are turned ON, output will be turned OFF.)

When comparator matching output is enabled (CTC0: CR4304, CTC1: CR4308,


Point
CTC2: CR4504, CTC3: CR4508, CTC4: CR4704, CTC5: CR4708, CTC6: CR4904,
and CTC7: CR4908 are all turned OFF), you cannot use the SET and RES
instructions to control the output of the corresponding relays between R500 and
R503.
"Output specifications" (page 2-11)

5-128 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

Reading the Current Value's Change Direction

CPU BUILT-IN FUNCTIONS


(1) Reading the current value's (CTH) change direction
The change direction of the current value (CTH) is indicated as shown below.
Counter Device
Description
Number Number
CTH0 CR4207 Indicates the change direction of CTH0 (ON: down counting; OFF: up counting)
CTH1 CR4407 Indicates the change direction of CTH1 (ON: down counting; OFF: up counting)
CTH2 CR4607 Indicates the change direction of CTH2 (ON: down counting; OFF: up counting)
CTH3 CR4807 Indicates the change direction of CTH3 (ON: down counting; OFF: up counting)

5
• The change direction is updated once per scan. After operation is completed,
Point

High-Speed Counter
the change direction before operation completed is stored.
• The maximum time required to update the change direction is "change
direction detection time constant + 1 scan period." You can update the value to
the latest value by executing the RFSCTH instruction.
"RFSCTH Instructions" (page 5-136)

(2) Setting the current value's (CTH) change direction detection time constant
Use the MOV instruction or the DW instruction to set the change direction detection time constant.
For details, see the MOV instruction in the KV-7000/5000/3000/1000 Series and KV Nano Series "Instruction
Reference Manuals."

Value Change Direction Detection Time Constant


0 (default setting) No filter (each scan)
1 100 µs
CM4800 (CTH0) 2 500 µs
CM4810 (CTH1) 3 1 ms
CM4820 (CTH2) 4 2.5 ms
CM4830 (CTH3) 5 5 ms
6 10 ms
7 50 ms

When you have selected the 100 µs setting

Example
Set the change direction MOV
detection time constant #1 CM4800
or
of CTH0 to 100 µs. #1
DW
CM4800

- KV Nano Series(terminal block type) User’s Manual - 5-129


5-4 High-Speed Counter

Acquiring the Current Value Based on Input Capture


CPU BUILT-IN FUNCTIONS

Input capture is a function that stores the current value of the high-speed counter in control memory
when an interrupt condition occurs. This function operates when the interrupt condition is external input.
You can use this function just by selecting a high-speed counter.
The acquired value is stored in the control memory entries CM1600 to CM1607.

Interrupt Condition High-Speed Counter Whose Storage Destination


(External Input) Current Value Will Be Acquired*1 Upper Bits Lower Bits
When INT R000 occurs CTH0 to CTH3 (default value: CTH0)*2 CM1601 CM1600
When INT R001 occurs CTH0 to CTH3 (default value: CTH0)*2 CM1603 CM1602

5 When INT R002 occurs


When INT R003 occurs
CTH0 to CTH3 (default value: CTH1)*2
CTH0 to CTH3 (default value: CTH1)*2
CM1605
CM1607
CM1604
CM1606
High-Speed Counter

*1 To change the high-speed counter whose current value will be acquired, In KV STUDIO, click "CPU
system setting" and then "User interrupt setting."

*2 The numbers of the high-speed counters that you can set vary depending on the unit that you are
using.
KV-N14** and KV-N24**: CTH0 and CTH1
KV-N40**: CTH0 to CTH2
KV-N60**: CTH0 to CTH3
For details about interrupts, see "4-7 Interrupts" (page 4-76).

5-130 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

Instructions for High-Speed Counters

CPU BUILT-IN FUNCTIONS


The instructions that are used during high-speed counter control are listed below.
For details on each instruction, see the reference page specified.

Instruction Mnemonic Operation Overview Page


High-speed counter CTH Response frequency 5-132
Single-phase 100 kHz, phase difference 50 kHz, 32-bit (0 to
High-speed counter
CTC 4294967295 or -2147483648 to 2147483647) up counting and 5-132
comparator
down counting operations
High-speed counter Updates the current value of the high-speed counter to the
RFSCTH 5-136
refresh most recent value
5

High-Speed Counter

- KV Nano Series(terminal block type) User’s Manual - 5-131


5-4 High-Speed Counter

32-bit,
CTH CTH(.D)
CTH.L
CTH
high-speed Input response frequency, maximum 100
kHz, 32-bit
CPU BUILT-IN FUNCTIONS

counter
(unsigned: 0 to 4294967295,
High-speed
CTC CTC(.D)
CTC.L
CTC counter
comparator
signed: -2147483648 to 2147483647) up
counting and down counting operations

Ladder program Entry mode


CR2002 HSP
S

Execution condition CTH n C T H n S


S

5 S
CTC n C T C n S

CTC n
High-Speed Counter

Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand
MR DM
R DR LR T C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z
B W
n - - - - - - - - - - - - - -  - - - -
CTH
S  - - - - -  - - - - - - - - - - - -
n - - - - - - - - - - - - - -  - - - -
CTC
S - - - - - - - - - - - - - -  - - - -

Operand Description
n Specifies the counter number from 0 to 3 *1, 3
CTH
S Specifies the count input
n Specifies the comparator number from 0 to 7 *2, 3
CTC Specifies the high-speed counter value with in the range of 0 to 4294967295 (unsigned) and
S
-2147483648 to +2147483647 (signed)
*1 The numbers that can be specified vary depending on the unit.
* KV-N14** and KV-N24**: 0 and 1
* KV-N40**: 0 to 2
* KV-N60**: 0 to 3
*2 The numbers that can be specified vary depending on the unit.
* KV-N14** and KV-N24**: 0 to 3
* KV-N40**: 0 to 5
* KV-N60**: 0 to 7
*3 n : If a number that cannot be specified by the unit is entered in this operand, the instruction will
not be executed.

5-132 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

Operation Description

CPU BUILT-IN FUNCTIONS


CTH(.D) When the execution condition is turned ON, the input of the device specified with S is
counted.
CTH.L When the execution condition is turned OFF, the count value is cleared.
Use control memory (CM) entries to switch between signed and unsigned counting.
"Linear counter" (page 5-114)
You have to reduce the input time constant when you are counting external input.
" Input Time Constant Setting" (page 5-198)

CTC(.D) While the high-speed counter is operating, when the value specified with matches
5
S
the current value of the high-speed counter, CTC(.D) is turned ON.
CTC.L When the suffix is ".D," specify n in the range of 0 to 42497295.

High-Speed Counter
When the suffix is ".L," specify n in the range of -2147483648 to +2147483647.

Use control relays (CR) and data memory (DM) entries to set the count mode and reset mode of the
high-speed counter function. Read the explanation of each setting.

 Reading and changing the current value and changing the set value
(1) Reading the current value
Use the LDA or MOV instruction to read the current value.
For details, see the LDA instruction and the MOV instruction in the KV-7000/5000/3000/1000 Series and
KV Nano Series "Instruction Reference Manuals."

For unsigned values (0 to 4294967295), use suffix ".D."

Example
The current value of CTH0 is
CTH0 DM0
stored into data memory LDA.D STA.D
entries DM0 and DM1. or
MOV.D
CTH0 DM0

For signed values (-2147483648 to +2147483647), use suffix ".L."


Example
The current value of CTH0 is
CTH0 DM0
stored into data memory LDA.L STA.L
entries DM0 and DM1.
or
MOV.L
CTH0 DM0

- KV Nano Series(terminal block type) User’s Manual - 5-133


5-4 High-Speed Counter

(2) Changing the current value (CTH)


Use the MOV or DW instruction to change the current value.
For details, see the MOV instruction and the DW instruction in the KV-7000/5000/3000/1000 Series and
CPU BUILT-IN FUNCTIONS

KV Nano Series "Instruction Reference Manuals."

For unsigned values (0 to 4294967295), use suffix ".D."


Example
The current value of CTH0 is
MOV.D
changed to 100000. #100000 CTH0

#100000
DW.D

5 CTH0
High-Speed Counter

For signed values (-2147483648 to +2147483647), use suffix ".L."

Example
The current value of CTH0 is
MOV.L
changed to -100000. −100000 CTH0

−100000
DW.L
CTH0

Precautions on changing CTH during automatic resets are listed below.


Point
• When the value is unsigned or when it is signed and the CTC value is positive,
even if you change the value of CTH to a value greater than or equal to CTC, the
CTH value will be set to "CTC value - 1."
• When the value is signed and the CTC value is negative, even if you change the
value of CTH to a value less than or equal to CTC, the CTH value will be set to
"CTC value + 1."
"Automatic reset based on comparator matching" (page 5-122)

(3) Changing the set value (CTC)


Use the STA, MOV, or DW instruction to change the set value.
For details, see the STA instruction, the MOV instruction, and the DW instruction in the KV-7000/5000/3000/
1000 Series and KV Nano Series "Instruction Reference Manuals."

For unsigned values (0 to 4294967295), use suffix ".D."


Example
The value of CTC0 is changed
#100000 CTC0
to 100000. LDA.D STA.D

MOV.D
#100000 CTC0

#100000
DW.D
CTC0

5-134 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

For signed values (-2147483648 to +2147483647), use suffix ".L."


Example
The value of CTC0 is changed

CPU BUILT-IN FUNCTIONS


−100000 CTC0
to -100000. LDA.L STA.L

MOV.L
−100000 CTC0

−100000
DW.L
CTC0

Precautions on changing CTC during automatic resets are listed below.


5
Point
• When the value is unsigned or when it is signed and the CTC value is positive,

High-Speed Counter
if you change the value of CTC to a value less than CTH, the CTH value will be
set to "CTC value - 1."
• When the value is signed and the CTC value is negative, if you change the value
of CTC to a value greater than CTH, the CTH value will be set to "CTC value + 1."
"Automatic reset based on comparator matching" (page 5-122)

Sample Program

An encoder is counted with high-speed counter 0 (R004 and R005) with a 1x phase difference. When
the value matches the value of high-speed counter comparator CTC0, output relay R500 is turned ON.

CR2008 CR4313 CR4314 CR4315 CR4303


<Mnemonics list>
RES SET RES SET
Turns ON for one scan CTC0 count input CTC0 count input CTC0 count input Automatic reset of CTH0 LD CR2008
after operations start mode selection mode selection mode selection when CTC0 turns ON
HSP
RES CR4313
CR2002
R004 CON
Always SET CR4314
turned ON CON
HSP RES CR4315
R005 CON
SET CR4303
CTH.D 0
LD CR2002
CR2002
R004 HSP R004
Always HSP R005
turned ON LD CR2002
#100000 CTH.D #0 R004
CTH.D 0 CTC.D #0 #100000
LD CTC0
SET R500
CTC0 R500 CTC0
SET RES
CON
RES CTC0
LDP MR000
MR000 R500 RES R500
↑ RES

- KV Nano Series(terminal block type) User’s Manual - 5-135


5-4 High-Speed Counter

RFSCTH RFSCTH High-speed


counter refresh
Updates the current value of the high-speed
counter to the most recent value
CPU BUILT-IN FUNCTIONS

Ladder program Entry mode


Execution condition RFSCTH
n R F S C T H n

Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand

5 R
MR
DR LR
B
T
DM
C CTC CR TM T
W
C CTH CTC Z CM #/$ #TM * @ :#/:Z

n - - - - - - - - - - - - - -  - - - -
High-Speed Counter

Operand Description
n Specifies the number of the high-speed counter (0 to 3).*1, 3

*1 The numbers that can be specified vary depending on the unit.


KV-N14** and KV-N24**: 0 and 1
KV-N40**: 0 to 2
KV-N60**: 0 to 3
*2 n : If a number that cannot be specified by the unit is entered in this operand, the instruction will not be executed.

Operation Description

Normally, CTH, the current value of the high-speed


counter, is updated during END processing. When High-Speed Refreshed Control Relays
you use this instruction, when the execution condition Counter Overflow Change Direction
is turned ON, CTH, the current value of the high- CTH0 CR4206 CR4207
speed counter, will be updated to the latest value. CTH1 CR4406 CR4407
At the same time, the CTH overflow and change
CTH2 CR4606 CR4607
direction control relays are also updated to the latest
state. CTH3 CR4806 CR4807

Operation flags
CR2009 No change in status
CR2010 No change in status
CR2011 No change in status
CR2012 No change in status

Sample Program
The latest value of high-speed counter 0 is used to change the state of output relays R1500 and R1501.
CR2002 RFSCTH <Mnemonics list>
#0 LD CR2002
Always turned ON RFSCTH #0
LD<.D CTH0 #10000
CTH0 R1500 OUT R1500
<.D LD>=.D CTH0 #10000
#10000 Output 0 AND<.D CTH0 #20000
OUT R1501
CTH0 CTH0 R1501
>=.D <.D
#10000 #20000 Output 1
5-136 - KV Nano Series(terminal block type) User’s Manual -
5-4 High-Speed Counter

List of Devices for High-Speed Counters

CPU BUILT-IN FUNCTIONS


 List of control relays (CR) for CTH0

Device Attribute
R: Read only Description ON OFF
Number Blank: Read/write
CR4200 R Internal clock (50 ns) - -
CR4201 R Internal clock (1 µs) - -
CR4202 R Internal clock (10 µs) - -
CR4203 R Internal clock (100 µs) - -
Do not
CR4211 CTH0 preset disable Execute
execute

CR4212 CTH0 internal enable relay Execute


Do not
execute
5
Do not
CR4303 Automatically resets CTH0 when CTC0 is turned ON Execute

High-Speed Counter
execute
Do not
CR4304 Disables comparator matching output (R500) when CTC0 is turned ON Execute
execute
Do not
CR4305 Turns comparator matching output (R500) OFF when CTC0 is turned ON Execute
execute
Do not
CR4306 Turns comparator matching output (R500) ON when CTC0 is turned ON Execute
execute
Inverts the ON/OFF setting of comparator matching output (R500) when Do not
CR4307 Execute
CTC0 is turned ON execute
Do not
CR4308 Disables comparator matching output (R500) when CTC1 is turned ON Execute
execute
Do not
CR4309 Turns comparator matching output (R500) OFF when CTC1 is turned ON Execute
execute
Do not
CR4310 Turns comparator matching output (R500) ON when CTC1 is turned ON Execute
execute
Inverts the ON/OFF setting of comparator matching output (R500) when Do not
CR4311 Execute
CTC1 is turned ON execute
Do not
CR4312 Automatically resets CTH0 when CTC1 is turned ON Execute
execute

Device Attribute Rising Falling


R: Read only Description Disabled Level
Number Edge Edge
Blank: Read/write
CR4208 OFF ON OFF ON
External preset input setting
CR4209 OFF OFF ON ON

Attribute Single Single


Device 2-
R: Read only Description Phase, W/O Phase W/ 1x 2x 4x
Number Blank: Read/write
Pulse
Direction Direction
CR4313 OFF ON OFF ON OFF ON
CR4314 External input mode selection OFF OFF ON ON OFF OFF
CR4315 OFF OFF OFF OFF ON ON

Device Attribute
R: Read only Description ON OFF
Number Blank: Read/write
CR4205 R CTH0 function Present Not present
CR4206 Overflow detection Detected Not detected
CR4207 R Change direction of current value Down counting Up counting
CR4210 CTH0 ring counter Ring Linear

Reference The default value of CR4304 and CR4308 is ON. Other control relays are turned OFF.

Use the SET instruction to turn control relays ON and the RES instruction to turn
Point
control relays OFF.

- KV Nano Series(terminal block type) User’s Manual - 5-137


5-4 High-Speed Counter

 List of control memory entries for CTH0

Device Attribute
CPU BUILT-IN FUNCTIONS

R: Read only Description


Number Blank: Read/write
The change direction detection time constant setting
Value #0 #1 #2 #3 #4 #5 #6 #7
CM4800 Travel direction No
detection time 100 µs 500 µs 1 ms 2.5 ms 5 ms 10 ms 50 ms
filter
constant

CM4802 Ring counter lower limit (lower bits)


CM4803 Ring counter lower limit (upper bits)
CM4804 Ring counter upper limit (lower bits)
5 CM4805
CM4806
Ring counter upper limit (upper bits)
Preset value (lower bits)
CM4807 Preset value (upper bits)
High-Speed Counter

Attribute
Device Number R: Read only Description
Blank: Read/write
Sets the combination condition of the external enable input and the
internal enable relay
Bit 0 Bit 2 Bit 1 Bit 0 Description
OFF OFF OFF Normal enable (counting is performed all the
OFF ON OFF time, regardless of whether the external
ON OFF OFF enable input and internal enable relay are
ON ON OFF enabled or disabled).
Counting is performed when the internal relay
Bit 1 OFF OFF ON
is in the enabled state.
Counting is performed when the external
OFF ON ON
enable input is in the enabled state.
Counting is performed when the internal
ON OFF ON enable relay and external enable input are in
the enabled state.
Bit 2 Counting is performed when the internal
ON ON ON enable relay or the external enable input is in
the enabled state.
CM4801 Bit 3 Reserved for the system
Current value reset mode setting based on the counter enable function

Bit 4 Bit 5 Bit 4 Description


OFF OFF
The current value is not reset.
OFF ON
The current value is reset when the state changes
ON OFF
Bit 5 from disabled to enabled.
The current value is reset when the state changes
ON ON
from enabled to disabled.
Bit 6 Reserved for the system
ON: Signed
Bit 7 Turns ON the count value's signed setting
OFF: Unsigned
ON: B contact
Bit 8 Polarity setting of the external preset input
OFF: A contact
ON: B contact
Bit 9 Polarity setting of the external enable input
OFF: A contact
Bit 10 to bit 15

5-138 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 List of control relays (CR) for CTH1

Device Attribute

CPU BUILT-IN FUNCTIONS


R: Read only Description ON OFF
Number Blank: Read/write
CR4400 R Internal clock (50 ns) - -
CR4401 R Internal clock (1 µs) - -
CR4402 R Internal clock (10 µs) - -
CR4403 R Internal clock (100 µs) - -
Do not
CR4411 CTH1 preset disable Execute
execute
Do not
CR4412 CTH1 internal enable relay Execute
execute
Do not
CR4503 Automatically resets CTH1 when CTC2 is turned ON Execute
execute

CR4504 Disables comparator matching output (R501) when CTC2 is turned ON Execute
Do not
execute 5
Do not
CR4505 Turns comparator matching output (R501) OFF when CTC2 is turned ON Execute

High-Speed Counter
execute
Do not
CR4506 Turns comparator matching output (R501) ON when CTC2 is turned ON Execute
execute
Inverts the ON/OFF setting of comparator matching output (R501) when Do not
CR4507 Execute
CTC2 is turned ON execute
Do not
CR4508 Disables comparator matching output (R501) when CTC3 is turned ON Execute
execute
Do not
CR4509 Turns comparator matching output (R501) OFF when CTC3 is turned ON Execute
execute
Do not
CR4510 Turns comparator matching output (R501) ON when CTC3 is turned ON Execute
execute
Inverts the ON/OFF setting of comparator matching output (R501) when Do not
CR4511 Execute
CTC3 is turned ON execute
Do not
CR4512 Automatically resets CTH1 when CTC3 is turned ON Execute
execute

Device Attribute Rising Falling


R: Read only Description Disabled Level
Number Blank: Read/write
Edge Edge
CR4408 OFF ON OFF ON
External preset input setting
CR4409 OFF OFF ON ON

Attribute Single Single


Device 2-
R: Read only Description Phase, W/O Phase W/ 1x 2x 4x
Number Blank: Read/write
Pulse
Direction Direction
CR4513 OFF ON OFF ON OFF ON
CR4514 External input mode selection OFF OFF ON ON OFF OFF
CR4515 OFF OFF OFF OFF ON ON

Device Attribute
R: Read only Description ON OFF
Number Blank: Read/write
CR4405 R CTH1 function Present Not present
CR4406 Overflow detection Detected Not detected
CR4407 R Change direction of current value Down counting Up counting
CR4410 CTH1 ring counter Ring Linear

Reference The default value of CR4504 and CR4508 is ON. Other control relays are turned OFF.

Use the SET instruction to turn control relays ON and the RES instruction to turn
Point
control relays OFF.

- KV Nano Series(terminal block type) User’s Manual - 5-139


5-4 High-Speed Counter

 List of control memory entries for CTH1

Device Attribute
CPU BUILT-IN FUNCTIONS

R: Read only Description


Number Blank: Read/write
The change direction detection time constant setting

Value #0 #1 #2 #3 #4 #5 #6 #7
CM4810 Travel direction
No
detection time 100 µs 500 µs 1 ms 2.5 ms 5 ms 10 ms 50 ms
filter
constant
CM4812 Ring counter lower limit (lower bits)
CM4813 Ring counter lower limit (upper bits)
CM4814 Ring counter upper limit (lower bits)
5 CM4815 Ring counter upper limit (upper bits)
CM4816 Preset value (lower bits)
High-Speed Counter

CM4817 Preset value (upper bits)

Attribute
Device Number R: Read only Description
Blank: Read/write
Sets the combination condition of the external enable input and the
internal enable relay
Bit 0 Bit 2 Bit 1 Bit 0 Description
OFF OFF OFF Normal enable (counting is performed all the
OFF ON OFF time, regardless of whether the external
ON OFF OFF enable input and internal enable relay are
ON ON OFF enabled or disabled).
Counting is performed when the internal relay
Bit 1 OFF OFF ON
is in the enabled state.
Counting is performed when the external
OFF ON ON
enable input is in the enabled state.
Counting is performed when the internal
ON OFF ON enable relay and external enable input are in
the enabled state.
Bit 2 Counting is performed when the internal
ON ON ON enable relay or the external enable input is in
the enabled state.
CM4811 Bit 3 Reserved for the system
Current value reset mode setting based on the counter enable function
Bit 4 Bit 5 Bit 4 Description
OFF OFF
The current value is not reset.
OFF ON
The current value is reset when the state changes
ON OFF
Bit 5 from disabled to enabled.
The current value is reset when the state changes
ON ON
from enabled to disabled.
Bit 6 Reserved for the system
ON: Signed
Bit 7 Turns ON the count value's signed setting
OFF: Unsigned
ON: B contact
Bit 8 Polarity setting of the external preset input
OFF: A contact
ON: B contact
Bit 9 Polarity setting of the external enable input
OFF: A contact
Bit 10 to bit 15

5-140 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 List of control relays (CR) for CTH2

Device Attribute

CPU BUILT-IN FUNCTIONS


R: Read only Description ON OFF
Number Blank: Read/write
CR4600 R Internal clock (50 ns) - -
CR4601 R Internal clock (1 µs) - -
CR4602 R Internal clock (10 µs) - -
CR4603 R Internal clock (100 µs) - -
Do not
CR4611 CTH2 preset disable Execute
execute
Do not
CR4612 CTH2 internal enable relay Execute
execute
Do not
CR4703 Automatically resets CTH2 when CTC4 is turned ON Execute
execute

CR4704 Disables comparator matching output (R502) when CTC4 is turned ON Execute
Do not
execute 5
Do not
CR4705 Turns comparator matching output (R502) OFF when CTC4 is turned ON Execute

High-Speed Counter
execute
Do not
CR4706 Turns comparator matching output (R502) ON when CTC4 is turned ON Execute
execute
Inverts the ON/OFF setting of comparator matching output (R502) when Do not
CR4707 Execute
CTC4 is turned ON execute
Do not
CR4708 Disables comparator matching output (R502) when CTC5 is turned ON Execute
execute
Do not
CR4709 Turns comparator matching output (R502) OFF when CTC5 is turned ON Execute
execute
Do not
CR4710 Turns comparator matching output (R502) ON when CTC5 is turned ON Execute
execute
Inverts the ON/OFF setting of comparator matching output (R502) when Do not
CR4711 Execute
CTC5 is turned ON execute
Do not
CR4712 Automatically resets CTH2 when CTC5 is turned ON Execute
execute

Device Attribute Rising Falling


R: Read only Description Disabled Level
Number Blank: Read/write
Edge Edge
CR4608 OFF ON OFF ON
External preset input setting
CR4609 OFF OFF ON ON

Attribute Single Single


Device 2-
R: Read only Description Phase, W/O Phase W/ 1x 2x 4x
Number Blank: Read/write
Pulse
Direction Direction
CR4713 OFF ON OFF ON OFF ON
CR4714 External input mode selection OFF OFF ON ON OFF OFF
CR4715 OFF OFF OFF OFF ON ON

Device Attribute
R: Read only Description ON OFF
Number Blank: Read/write
CR4605 R CTH2 function Present Not present
CR4606 Overflow detection Detected Not detected
CR4607 R Change direction of current value Down counting Up counting
CR4610 CTH2 ring counter Ring Linear

Reference The default value of CR4704 and CR4708 is ON. Other control relays are turned OFF.

Use the SET instruction to turn control relays ON and the RES instruction to turn
Point
control relays OFF.

- KV Nano Series(terminal block type) User’s Manual - 5-141


5-4 High-Speed Counter

 List of control memory entries for CTH2

Device Attribute
CPU BUILT-IN FUNCTIONS

R: Read only Description


Number Blank: Read/write
The change direction detection time constant setting

Value #0 #1 #2 #3 #4 #5 #6 #7
CM4820 Travel direction
No
detection time 100 µs 500 µs 1 ms 2.5 ms 5 ms 10 ms 50 ms
filter
constant

CM4822 Ring counter lower limit (lower bits)


CM4823 Ring counter lower limit (upper bits)
CM4824 Ring counter upper limit (lower bits)
5 CM4825
CM4826
Ring counter upper limit (upper bits)
Preset value (lower bits)
CM4827 Preset value (upper bits)
High-Speed Counter

Attribute
Device Number R: Read only Description
Blank: Read/write
Sets the combination condition of the external enable input and the
internal enable relay
Bit 0 Bit 2 Bit 1 Bit 0 Description
OFF OFF OFF Normal enable (counting is performed all the
OFF ON OFF time, regardless of whether the external
ON OFF OFF enable input and internal enable relay are
ON ON OFF enabled or disabled).
Counting is performed when the internal relay
Bit 1 OFF OFF ON
is in the enabled state.
Counting is performed when the external
OFF ON ON
enable input is in the enabled state.
Counting is performed when the internal
ON OFF ON enable relay and external enable input are in
the enabled state.
Bit 2 Counting is performed when the internal
ON ON ON enable relay or the external enable input is in
the enabled state.

CM4821
Bit 3 Reserved for the system
Current value reset mode setting based on the counter enable function
Bit 4 Bit 5 Bit 4 Description
OFF OFF
The current value is not reset.
OFF ON
The current value is reset when the state changes
ON OFF
Bit 5 from disabled to enabled.
The current value is reset when the state changes
ON ON
from enabled to disabled.
Bit 6 Reserved for the system
ON: Signed
Bit 7 Turns ON the count value's signed setting
OFF: Unsigned
ON: B contact
Bit 8 Polarity setting of the external preset input
OFF: A contact
ON: B contact
Bit 9 Polarity setting of the external enable input
OFF: A contact
Bit 10 to bit 15

5-142 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 List of control relays (CR) for CTH3

Device Attribute

CPU BUILT-IN FUNCTIONS


R: Read only Description ON OFF
Number Blank: Read/write
CR4800 R Internal clock (50 ns) - -
CR4801 R Internal clock (1 µs) - -
CR4802 R Internal clock (10 µs) - -
CR4803 R Internal clock (100 µs) - -
Do not
CR4811 CTH3 preset disable Execute
execute
Do not
CR4812 CTH3 internal enable relay Execute
execute
Do not
CR4903 Automatically resets CTH3 when CTC6 is turned ON Execute
execute

CR4904 Disables comparator matching output (R503) when CTC6 is turned ON Execute
Do not
execute 5
Do not
CR4905 Turns comparator matching output (R503) OFF when CTC6 is turned ON Execute

High-Speed Counter
execute
Do not
CR4906 Turns comparator matching output (R503) ON when CTC6 is turned ON Execute
execute
Inverts the ON/OFF setting of comparator matching output (R503) when Do not
CR4907 Execute
CTC6 is turned ON execute
Do not
CR4908 Disables comparator matching output (R503) when CTC7 is turned ON Execute
execute
Do not
CR4909 Turns comparator matching output (R503) OFF when CTC7 is turned ON Execute
execute
Do not
CR4910 Turns comparator matching output (R503) ON when CTC7 is turned ON Execute
execute
Inverts the ON/OFF setting of comparator matching output (R503) when Do not
CR4911 Execute
CTC7 is turned ON execute
Do not
CR4912 Automatically resets CTH3 when CTC7 is turned ON Execute
execute

Device Attribute Rising Falling


R: Read only Description Disabled Level
Number Blank: Read/write
Edge Edge
CR4808 OFF ON OFF ON
External preset input setting
CR4809 OFF OFF ON ON

Attribute Single Single


Device 2-
R: Read only Description Phase, W/O Phase W/ 1x 2x 4x
Number Blank: Read/write
Pulse
Direction Direction
CR4913 OFF ON OFF ON OFF ON
CR4914 External input mode selection OFF OFF ON ON OFF OFF
CR4915 OFF OFF OFF OFF ON ON

Device Attribute
R: Read only Description ON OFF
Number Blank: Read/write
CR4805 R CTH3 function Present Not present
CR4806 Overflow detection Detected Not detected
CR4807 R Change direction of current value Down counting Up counting
CR4810 CTH3 ring counter Ring Linear

Reference The default value of CR4904 and CR4908 is ON. Other control relays are turned OFF.

Use the SET instruction to turn control relays ON and the RES instruction to turn
Point
control relays OFF.

- KV Nano Series(terminal block type) User’s Manual - 5-143


5-4 High-Speed Counter

 List of control memory entries for CTH3

Device Attribute
CPU BUILT-IN FUNCTIONS

R: Read only Description


Number Blank: Read/write
The change direction detection time constant setting

Value #0 #1 #2 #3 #4 #5 #6 #7
CM4830 Travel direction
No
detection time 100 µs 500 µs 1 ms 2.5 ms 5 ms 10 ms 50 ms
filter
constant
CM4832 Ring counter lower limit (lower bits)
CM4833 Ring counter lower limit (upper bits)
CM4834 Ring counter upper limit (lower bits)
5 CM4835
CM4836
Ring counter upper limit (upper bits)
Preset value (lower bits)
CM4837 Preset value (upper bits)
High-Speed Counter

Attribute
Device Number R: Read only Description
Blank: Read/write
Sets the combination condition of the external enable input and the
internal enable relay
Bit 0 Bit 2 Bit 1 Bit 0 Description
OFF OFF OFF Normal enable (counting is performed all the
OFF ON OFF time, regardless of whether the external
ON OFF OFF enable input and internal enable relay are
ON ON OFF enabled or disabled).
Counting is performed when the internal relay
Bit 1 OFF OFF ON
is in the enabled state.
Counting is performed when the external
OFF ON ON
enable input is in the enabled state.
Counting is performed when the internal
ON OFF ON enable relay and external enable input are in
the enabled state.
Bit 2 Counting is performed when the internal
ON ON ON enable relay or the external enable input is in
the enabled state.

CM4831 Bit 3 Reserved for the system


Current value reset mode setting based on the counter enable function
Bit 4 Bit 5 Bit 4 Description
OFF OFF
The current value is not reset.
OFF ON
The current value is reset when the state changes
ON OFF
from disabled to enabled.
Bit 5
The current value is reset when the state changes
ON ON
from enabled to disabled.

Bit 6 Reserved for the system


ON: Signed
Bit 7 Turns ON the count value's signed setting
OFF: Unsigned
ON: B contact
Bit 8 Polarity setting of the external preset input
OFF: A contact
ON: B contact
Bit 9 Polarity setting of the external enable input
OFF: A contact
Bit 10 to bit 15

5-144 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

Direct Clock Pulse Output

CPU BUILT-IN FUNCTIONS


You can use the high-speed counter (CTH) and high-speed counter comparator (CTC) to output clock
pulses that are not influenced by the scan time to direct output relays R500 to R503.*
* The relays that you can output to vary depending on the unit.
KV-N14**T(P) and KV-N24**T(P): R500 and R501
KV-N40*T(P): R500 to R502
KV-N60*AT(P): R500 to R503
(This function cannot be used on the relay output type units.)

 Overview
For pulse output, internal clock pulses are counted with a high-speed counter (CTH). Each time that the
current value matches the value of the high-speed counter comparator (CTC), the output relay state is
5
switched between ON and OFF, and a pulse is generated.

High-Speed Counter
Count value
CTC

ON ON

• Be sure to start direct clock pulse output with the output in the OFF state.
Point
• Normally, programs do not have access to the output relays during direct clock
pulse output. (The state of the contacts cannot be checked, and the ON/OFF
state cannot be controlled with output instructions.)

 Frequency range that can be output


Use the period of the internal clock for the high-speed counter (CTH) and the high-speed counter
comparator (CTC) to set the pulse period (frequency) and pulse width.
You can use programs to change the clock pulse period (frequency) to a value within the following
ranges.

Output Internal Clock Pulse Period (Frequency) Range


CR4200 (50 ns) 10 µs (100 kHz) to 214748.36475 ms
CR4201 (1.0 µs) 10 µs (100 kHz) to 4294967.295 ms
R500
CR4202 (10.0 µs) 20 µs (50 kHz) to 42949672.95 ms
CR4203 (100.0 µs) 200 µs (5 kHz) to 429496729.5 ms
CR4400 (50 ns) 10 µs (100 kHz) to 214748.36475 ms
CR4401 (1.0 µs) 10 µs (100 kHz) to 4294967.295 ms
R501
CR4402 (10.0 µs) 20 µs (50 kHz) to 42949672.95 ms
CR4403 (100.0 µs) 200 µs (5 kHz) to 429496729.5 ms
CR4600 (50 ns) 10 µs (100 kHz) to 214748.36475 ms
CR4601 (1.0 µs) 10 µs (100 kHz) to 4294967.295 ms
R502
CR4602 (10.0 µs) 20 µs (50 kHz) to 42949672.95 ms
CR4603 (100.0 µs) 200 µs (5 kHz) to 429496729.5 ms
CR4800 (50 ns) 10 µs (100 kHz) to 214748.36475 ms
CR4801 (1.0 µs) 10 µs (100 kHz) to 4294967.295 ms
R503
CR4802 (10.0 µs) 20 µs (50 kHz) to 42949672.95 ms
CR4803 (100.0 µs) 200 µs (5 kHz) to 429496729.5 ms

- KV Nano Series(terminal block type) User’s Manual - 5-145


5-4 High-Speed Counter

 Setting the comparator value (CTC)


The pulse period when clock pulses are generated and the value of the high-speed counter comparator
CPU BUILT-IN FUNCTIONS

are determined from the following formula.


Pulse period (µs) = 1000000/frequency (Hz)

 Pulse with a 1:1 ON/OFF ratio


ON

OFF Pulse
width

Pulse period
5
CTC value = pulse period (µs)/internal clock (µs)/2
High-Speed Counter

 Pulse with a variable pulse width


ON

OFF Pulse
width

Pulse period

CTC value for pulse width = pulse width (µs)/internal clock (µs)
CTC value for pulse period = pulse period (µs)/internal clock (µs)

 CTC setting range


Special Auxiliary Relay (Internal Clock) Period CTC Setting Range
CR4200 CR4400 CR4600 CR4800 50 ns 100 to 4294967295
CR4201 CR4401 CR4601 CR4801 1.0 µs 5 to 4294967295
CR4202 CR4402 CR4602 CR4802 10.0 µs 1 to 4294967295
CR4203 CR4403 CR4603 CR4803 100.0 µs 1 to 4294967295

• If you have set CR4200, CR4400, CR4600, and CR4800 in the high-speed
Point
counter (CTH) operands, set the CTC value to 100 or more. If you specify a
value smaller than 100, the clock pulses will not be generated correctly.
• If you have set CR4201, CR4401, CR4601, and CR4801 in the high-speed
counter (CTH) operands, set the CTC value to 5 or more. If you specify a value
smaller than 5, the clock pulses will not be generated correctly.
• If you are using two comparators for a single high-speed counter (for example,
CTC0 and CTC1 for CTH0) to generate clock pulses, do not specify the same
values for the comparator settings.
• The pulse width that is determined using the above formula is the width of the
pulses that are generated internally within the KV Nano Series. Because pulses
pass through the output circuit when they are actually output, the actual pulse
width may vary due to the influence of response delay and the connected load.
Use an oscilloscope or similar instrument to observe the actual output
waveform, and then set the pulse width.

5-146 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 Setting control relays

 When using CTH0

CPU BUILT-IN FUNCTIONS


By setting the control relays (CR4303 to CR4312) at the start of operation or by changing the control
relays while clock pulses are being generated, you can change the ON/OFF state of output relay R500
as shown in the following table.
Also, you can freely set the pulse period, pulse width, and enabled/disabled state of comparator
matching output.
The operation of output relay R500 when control relays are turned ON or OFF is shown below.
High-Speed
Control
Counter Operation When CTH0 (Current Value) Equals CTC (Set Value)
Relay
Comparator
OFF: Do not
CR4303

CR4304
Automatically resets the current value of CTH0

R500 control
ON: Execute

ON: Disabled
execute
OFF: Enabled
5
OFF: Do not
CR4305 Turns OFF comparator matching output of R500 ON: Execute

High-Speed Counter
CTC0 execute
OFF: Do not
CR4306 Turns ON comparator matching output of R500 ON: Execute
execute
OFF: Do not
CR4307 Inverts the ON/OFF setting of R500 output ON: Execute
execute
CR4308 R500 control ON: Disabled OFF: Enabled
OFF: Do not
CR4309 Turns OFF comparator matching output of R500 ON: Execute
execute
OFF: Do not
CR4310 Turns ON comparator matching output of R500 ON: Execute
CTC1 execute
OFF: Do not
CR4311 Inverts the ON/OFF setting of R500 output ON: Execute
execute
OFF: Do not
CR4312 Automatically resets the current value of CTH0 ON: Execute
execute

• By turning ON CR4304 or CR4308, you can stop clock pulse output. By turning OFF CR4304 or
CR4308, you can generate clock pulse output.

• You can only turn ON one relay from CR4304 to CR4307 and one relay from
Point
CR4308 to CR4311.
• Use the SET, RES, or STA instruction to turn ON and OFF CR4303 to CR4312.
• If the pulse period is variable, be sure to turn ON CR4303 or CR4312 to enable
automatic resetting of the CTH0 current value. If you do not turn CR4303 or
CR4312 ON, the pulse period cannot be changed.
• If you turn ON multiple relays within the range of CR4304 to CR4307 and within
the range of CR4308 to CR4311, the relay with the smallest number in each
range will be given priority.

 Operation of output R500 based on the control relay settings


Pulse with a 1:1 ON/OFF ratio Pulse with a variable pulse width
Relay Number Setting Relay Number Setting Relay Number Setting Relay Number Setting
CR4303 ON CR4312 OFF CR4303 ON CR4312 OFF
CR4304 OFF CR4308 ON CR4304 OFF CR4308 OFF
CR4305 OFF CR4309 OFF CR4305 OFF CR4309 ON
CR4306 OFF CR4310 OFF CR4306 ON CR4310 OFF
CR4307 ON CR4311 OFF CR4307 OFF CR4311 OFF

Count value Count value

CTC4 CTC4
CTC5

ON ON ON ON ON ON

- KV Nano Series(terminal block type) User’s Manual - 5-147


5-4 High-Speed Counter

 When using CTH1


By setting the control relays (CR4503 to CR4512) at the start of operation or by changing the control
relays while clock pulses are being generated, you can change the ON/OFF state of output relay R501
CPU BUILT-IN FUNCTIONS

as shown in the following table.


Also, you can freely set the pulse period, pulse width, and enabled/disabled state of comparator
matching output.
The operation of output relay R501 when control relays are turned ON or OFF is shown below.
High-Speed
Control
Counter Operation When CTH1 (Current Value) Equals CTC (Set Value)
Relay
Comparator
OFF: Do not
CR4503 Automatically resets the current value of CTH1 ON: Execute
execute
CR4504 R501 control ON: Disabled OFF: Enabled

5 CTC2
CR4505 Turns OFF comparator matching output of R501 ON: Execute
OFF: Do not
execute
OFF: Do not
CR4506 Turns ON comparator matching output of R501 ON: Execute
High-Speed Counter

execute
OFF: Do not
CR4507 Inverts the ON/OFF setting of R501 output ON: Execute
execute
CR4508 R501 control ON: Disabled OFF: Enabled
OFF: Do not
CR4509 Turns OFF comparator matching output of R501 ON: Execute
execute
OFF: Do not
CR4510 Turns ON comparator matching output of R501 ON: Execute
CTC3 execute
OFF: Do not
CR4511 Inverts the ON/OFF setting of R501 output ON: Execute
execute
OFF: Do not
CR4512 Automatically resets the current value of CTH1 ON: Execute
execute

• By turning ON CR4504 or CR4508, you can stop clock pulse output. By turning OFF CR4504 or
CR4508, you can generate clock pulse output.

• If the pulse period is variable, be sure to turn ON CR4503 or CR4512 to enable


Point
automatic resetting of the CTH1 current value. If you do not turn ON CR4503 or
CR4512, the pulse period cannot be changed.
• You can only turn ON one relay from CR4504 to CR4507 and one relay from
CR4508 to CR4511.
• Use the SET, RES, or STA instruction to turn ON and OFF CR4503 to CR4512.
• If you turn ON multiple relays within the range of control relay CR4504 to
CR4507 and within the range of control relay CR4508 to CR4511, the relay with
the smallest number in each range will be given priority.

 Operation of output R501 based on the control relay settings


Pulse with a 1:1 ON/OFF ratio Pulse with a variable pulse width
Relay Number Setting Relay Number Setting Relay Number Setting Relay Number Setting
CR4503 ON CR4512 OFF CR4503 ON CR4512 OFF
CR4504 OFF CR4508 ON CR4504 OFF CR4508 OFF
CR4505 OFF CR4509 OFF CR4505 OFF CR4509 ON
CR4506 OFF CR4510 OFF CR4506 ON CR4510 OFF
CR4507 ON CR4511 OFF CR4507 OFF CR4511 OFF

Count value Count value


CTC6 CTC6
CTC7

ON ON ON ON ON ON

5-148 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 When using CTH2


By setting the control relays (CR4703 to CR4712) at the start of operation or by changing the control
relays while clock pulses are being generated, you can change the ON/OFF state of output relay R502

CPU BUILT-IN FUNCTIONS


as shown in the following table.
Also, you can freely set the pulse period, pulse width, and enabled/disabled state of comparator
matching output.
The operation of output relay R502 when control relays are turned ON or OFF is shown below.
High-Speed
Control
Counter Operation When CTH2 (Current Value) Equals CTC (Set Value)
Relay
Comparator
OFF: Do not
CR4703 Automatically resets the current value of CTH2 ON: Execute
execute
CR4704 R502 control ON: Disabled OFF: Enabled

CTC4
CR4705 Turns OFF comparator matching output of R502 ON: Execute
OFF: Do not
execute 5
OFF: Do not
CR4706 Turns ON comparator matching output of R502 ON: Execute

High-Speed Counter
execute
OFF: Do not
CR4707 Inverts the ON/OFF setting of R502 output ON: Execute
execute
CR4708 R502 control ON: Disabled OFF: Enabled
OFF: Do not
CR4709 Turns OFF comparator matching output of R502 ON: Execute
execute
OFF: Do not
CR4710 Turns ON comparator matching output of R502 ON: Execute
CTC5 execute
OFF: Do not
CR4711 Inverts the ON/OFF setting of R502 output ON: Execute
execute
OFF: Do not
CR4712 Automatically resets the current value of CTH2 ON: Execute
execute

• By turning ON CR4704 or CR4708, you can stop clock pulse output. By turning OFF CR4704 or
CR4708, you can generate clock pulse output.

• You can only turn ON one relay from CR4704 to CR4707 and one relay from
Point
CR4708 to CR4711.
• Use the SET, RES, or STA instruction to turn ON and OFF CR4703 to CR4712.
• If the pulse period is variable, be sure to turn ON CR4703 or CR4712 to enable
automatic resetting of the CTH2 current value. If you do not turn ON CR4703 or
CR4712, the pulse period cannot be changed.
• If you turn ON multiple relays within the range of control relay CR4704 to
CR4707 and within the range of control relay CR4708 to CR4711, the relay with
the smallest number in each range will be given priority.

 Operation of output R502 based on the control relay settings


Pulse with a 1:1 ON/OFF ratio Pulse with a variable pulse width
Relay Number Setting Relay Number Setting Relay Number Setting Relay Number Setting
CR4703 ON CR4712 OFF CR4703 ON CR4712 OFF
CR4704 OFF CR4708 ON CR4704 OFF CR4708 OFF
CR4705 OFF CR4709 OFF CR4705 OFF CR4709 ON
CR4706 OFF CR4710 OFF CR4706 ON CR4710 OFF
CR4707 ON CR4711 OFF CR4707 OFF CR4711 OFF

Count value Count value

CTC4 CTC4
CTC5

ON ON ON ON ON ON

- KV Nano Series(terminal block type) User’s Manual - 5-149


5-4 High-Speed Counter

 When using CTH3


By setting the control relays (CR4903 to CR4912) at the start of operation or by changing the control
relays while clock pulses are being generated, you can change the ON/OFF state of output relay R503
CPU BUILT-IN FUNCTIONS

as shown in the following table.


Also, you can freely set the pulse period, pulse width, and enabled/disabled state of comparator
matching output.
The operation of output relay R503 when control relays are turned ON or OFF is shown below.
High-Speed
Control
Counter Operation When CTH3 (Current Value) Equals CTC (Set Value)
Relay
Comparator
OFF: Do not
CR4903 Automatically resets the current value of CTH3 ON: Execute
execute
CR4904 R503 control ON: Disabled OFF: Enabled

5 CTC6
CR4905 Turns OFF comparator matching output of R503 ON: Execute
OFF: Do not
execute
OFF: Do not
CR4906 Turns ON comparator matching output of R503 ON: Execute
High-Speed Counter

execute
OFF: Do not
CR4907 Inverts the ON/OFF setting of R503 output ON: Execute
execute
CR4908 R503 control ON: Disabled OFF: Enabled
OFF: Do not
CR4909 Turns OFF comparator matching output of R503 ON: Execute
execute
OFF: Do not
CR4910 Turns ON comparator matching output of R503 ON: Execute
CTC7 execute
OFF: Do not
CR4911 Inverts the ON/OFF setting of R503 output ON: Execute
execute
OFF: Do not
CR4912 Automatically resets the current value of CTH3 ON: Execute
execute

• By turning ON CR4904 or CR4908, you can stop clock pulse output. By turning OFF CR4904 or
CR4908, you can generate clock pulse output.

• If the pulse period is variable, be sure to turn ON CR4903 or CR4912 to enable


Point
automatic resetting of the CTH3 current value. If you do not turn CR4903 or
CR4912 ON, the pulse period cannot be changed.
• You can only turn ON one relay from CR4904 to CR4907 and one relay from
CR4908 to CR4911.
• Use the SET, RES, or STA instruction to turn ON and OFF CR4903 to CR4912.
• If you turn ON multiple relays within the range of control relays CR4904 to
CR4907 and within the range of control relays CR4908 to CR4911, the relay with
the smallest number in each range will be given priority.

 Operation of output R503 based on the control relay settings


Pulse with a 1:1 ON/OFF ratio Pulse with a variable pulse width
Relay Number Setting Relay Number Setting Relay Number Setting Relay Number Setting
CR4903 ON CR4912 OFF CR4903 ON CR4912 OFF
CR4904 OFF CR4908 ON CR4904 OFF CR4908 OFF
CR4905 OFF CR4909 OFF CR4905 OFF CR4909 ON
CR4906 OFF CR4910 OFF CR4906 ON CR4910 OFF
CR4907 ON CR4911 OFF CR4907 OFF CR4911 OFF

Count value Count value


CTC6 CTC6
CTC7

ON ON ON ON ON ON

5-150 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 Output example of a clock pulse with a 1:1 ON/OFF ratio


This section uses a high-speed counter (CTH0) and a high-speed counter comparator (CTC0) to

CPU BUILT-IN FUNCTIONS


explain a program example in which a clock pulse with a 1:1 pulse ON/OFF ratio is generated from
output R500.

 Setting control relays


Set CR4303 to CR4307 as shown in the table on the right.
Relay Number Setting
You can use the inverted output (toggle) for the pulse with a 1:1
CR4303 ON
ON/OFF ratio to simplify the program. CR4304 OFF
CR4305 OFF
CR4306
CR4307
OFF
ON
5

High-Speed Counter
 Internal clock and CTC0 values
Determine the internal clock, and obtain the corresponding CTC0 value from the following formula.

CTC0 value = pulse period (µs)/internal clock (µs)/2

Let us substitute a pulse period of 1 ms and an


Control Relay Internal Clock CTC0 Value
internal clock of 10 µs (the values for CR4202) into
CR4200 50 ns 10000
the above formula and then determine the value of CR4201 1.0 µs 500
CTC0. CR4202 10.0 µs 50
The value of CTC0 is "50." CR4203 100.0 µs 5
The values that are calculated using the other
internal clocks are shown in the table to the right. Use
these values as a reference.

 Program example
• CR4204 to CR4207 are used to set the pulse output of
CR2008 CR4203 CR4204 CR4205 CR4206 CR4207 CTH0 output R500.
00001 SET RES RES RES SET RES
In this example, the settings are configured so that the
CR2002 CTH.D 0 comparator matching output of R500 is enabled
00002 CR4202 (CR4204 is turned OFF) and the R500 output is
#50 inverted each time that CTH0 and CTC0 are equal
00003 CTC.D 0 (CR4207 is turned ON).
• CR4203 is turned ON to specify that CTH0 will be reset
by CTC0.
Count value Therefore, the current value of CTH0 will be repeatedly
cleared according to the value set by CTC0.
CTC0 • When operation starts, the current value of CTH0 will
be reset (the RES CTH0 part).
Therefore, the pulse width of the clock pulse will be
output correctly from the first pulse.
ON ON
• During clock pulse output, the CTH0 enable input relay
is always turned ON.

If you use the enable input of a high-speed counter to start or stop the clock
Point
pulse, the response may be delayed up to one scan period when the clock pulse
is started.

- KV Nano Series(terminal block type) User’s Manual - 5-151


5-4 High-Speed Counter

 Important tip
When you are using external input to control clock pulse output (enable or disable), turn CR4304 ON
CPU BUILT-IN FUNCTIONS

and OFF to control the clock pulse output.


Use the SET, RES, or KEEP instruction to turn CR4304 ON and OFF.
The clock pulse must start from the OFF state and must end in the OFF state.
If one of the programs shown in the following figures is added to the example on the previous page, the
clock pulse will be output from R500 only when R000 is turned ON.

When using the SET and RES instructions When using the KEEP instruction

R000 CR4304 R000 KEEP


5 SET SET
CR4304
R000 CR4304 R000
High-Speed Counter

RES RES

 Output example of a clock pulse with a variable ON/OFF ratio


This section uses a high-speed counter (CTH1) and a pair of high-speed counter comparators (CTC2
and CTC3) to explain a program example in which a clock pulse with a variable pulse width is
generated from output R501.

 Setting control relays


Set CR4503 to CR4512 as
Relay Number Setting Relay Number Setting
shown in the table on the right.
CR4503 ON CR4512 OFF
CR4504 OFF CR4508 OFF
CR4505 OFF CR4509 ON
CR4506 ON CR4510 OFF
CR4507 OFF CR4511 OFF

 Internal clock, CTC2, and CTC3 values


Determine the internal clock, and obtain the corresponding CTC2 and CTC3 values from the following
formulae.

CTC3 value = pulse width (µs)/internal clock (µs)

CTC2 value = pulse period (µs)/internal clock (µs)

Let us substitute a pulse width of 200 µs, a pulse period of 500 µs, and an internal clock of 10 µs (the
values for CR4202) into the above formulae and then determine the value of CTC2 and CTC3.
The value of CTC3 is "20" and the value of CTC2 is "50."
The values that are calculated using the other internal clocks are shown below. Use these values as a
reference.
Control Relay Internal Clock CTC2 Value CTC3 Value
CR4400 50 ns 10000 4000
CR4401 1.0 µs 500 200
CR4402 10.0 µs 50 20
CR4403 100.0 µs 5 2

5-152 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 Program example
CR2008 CR4503 CR4504 CR4505 CR4506 CR4507 • CR4504 to CR4507 and CR4508 to CR4511 are
00001 SET RES RES SET RES used to set the pulse output of output R501.

CPU BUILT-IN FUNCTIONS


In this example, the settings are configured so that
CR4508 CR4509 CR4510 CR4511 CR4512 CTH1
00002 RES SET RES RES RES RES the comparator matching output of R501 is enabled
(CR4504 is turned OFF) and the R501 output is
CR2002 CTH.D 1 turned ON with CTC2 (CR4506 is turned ON) and is
00003 CR4202 turned OFF with CTC3 (CR4509 is turned ON).
#50 • CR4503 is turned ON to specify that CTH1 will be
00004 CTC.D 2 reset by CTC2.
Therefore, the pulse width of the clock pulse will be
#20
00005 CTC.D 3 output correctly from the first pulse.
• During clock pulse output, the CTH1 enable relay is
always turned ON.
Count value

CTC2
CTC3 5

High-Speed Counter
ON ON ON ON

• If you use the enable input of a high-speed counter to start or stop the clock
Point
pulse, then the response may be delayed up to one scan period when the clock
pulse is started. It may also be delayed by up to one scan period when the clock
pulse is stopped.
• For details on starting and stopping the clock pulse output, see the "Important
Tip" below.

 Important tip
When you are using external input to control clock pulse output (enable or disable), turn CR4504 ON
and OFF to control the clock pulse output.
Use the SET, RES, or KEEP instruction to turn CR4504 ON and OFF.
The clock pulse must start from the OFF state and must end in the OFF state.
If one of the programs shown in the following figures is added to the example on the previous page, the
clock pulse will be output from R501 only when R000 is turned ON.

When using the SET and RES instructions When using the KEEP instruction
R000 CR4504 R000 KEEP
SET SET
CR4504
R000 CR4504 R000
RES RES

• You can change the clock pulse period (frequency) by using the STA instruction to rewrite the value
of high-speed counter comparator CTC2.

- KV Nano Series(terminal block type) User’s Manual - 5-153


5-4 High-Speed Counter

 Example of stopping clock pulses at the specified number of pulses


Clock pulses are stopped after 10000 clock pulses with a period of 500 µs (2 kHz) and a pulse width of
CPU BUILT-IN FUNCTIONS

200 µs are generated from output R500.

 Setting control relays, the internal clock, and CTCs


The CTC0 and CTC1 values will be set as shown below according to the control relays and internal
clock.

Relay Number Setting Relay Number Setting


CR4303 ON CR4312 OFF
CR4304 OFF CR4308 OFF
5 CR4305
CR4306
OFF
ON
CR4309
CR4310
ON
OFF
High-Speed Counter

CR4307 OFF CR4311 OFF

The internal clock, CTC0, and CTC1 values are shown below.
Control Relay Internal Clock CTC0 Value CTC1 Value
CR4200 50 ns 10000 40000
CR4201 1.0 µs 500 200
CR4202 10.0 µs 50 20
CR4203 100.0 µs 5 2

 Program example
• CR4304 to CR4307 and CR4308 to CR4311 are used
CR2008 CR4303 CR4304 CR4305 CR4306 CR4307 to set the pulse output of output R500.
00001 EI SET RES SET SET RES
In this example, the settings are configured so that the
CR4308 CR4309 CR4310 CR4311 CR4312 comparator matching output of R500 is enabled
00002 RES SET RES RES RES (CR4304 is turned OFF) and the R500 output is turned
ON with CTC0 (CR4306 is turned ON) and is turned
CR4503 CTH0 CTH1 OFF with CTC1 (CR4309 is turned ON).
00003 SET RES RES
• CR4303 is turned ON to specify that CTH0 will be
R000 R1000 R1000 CR4305 reset by CTC0.
00004 DIFU RES Therefore, the pulse width of the clock pulse will be
CTH.D 0
output correctly from the first pulse.
CR2002
00005 CR4201
• The EI instruction is used to enable interrupts.
When the current value of high-speed counter CTH1
#50 matches the value of high-speed counter comparator
00006 CTC.D 0
CTC2 (when 10000 pulses have been output), an
#20 interrupt program (INT CTC2) will be used to stop
00007 CTC.D 1 clock pulses.
• CR4503 is turned ON to specify that CTH1 will be
CR2002 CTH.D 1 reset by CTC2.
00008 R500 Therefore, operations can be performed repeatedly
#10000 over the specified number of pulses (10000).
00009 CTC.D 2 • During clock pulse output, the CTH0 enable input relay
is always turned ON.
END
00010 • During clock pulse counting, the CTH1 enable input
relay is always turned ON.
INT • The internal clock (CR4202) is specified on the clock
00011 CTC2 input of high-speed counter CTH0, and R500 is
CR2002 CR4305 specified on the clock input of high-speed counter
00012 SET CTH1.
Therefore, CTH0 is used for clock pulse output and
RETI CTH1 is used for clock pulse counting.
00013
• The number of clock pulses is set by the value of high-
ENDH speed counter comparator CTC2.
00014 • Clock pulse output starts when input R000 is turned
ON.
To restart clock pulse output, turn input R000 ON
again.

5-154 - KV Nano Series(terminal block type) User’s Manual -


5-4 High-Speed Counter

 Important tip
You can use the SET, RES, LDA, and STA instructions to turn CR4303 to CR4311 ON and OFF. If you

CPU BUILT-IN FUNCTIONS


use the LDA and STA instructions to rewrite the example program as shown in the following figure, you
can reduce the number of rungs and steps.

CR2008 CR4303 CR4304 CR4305 CR4306 CR4307 CR2008 $0268 CR4300 CTH0 CR4503 CTH0 CTH1
EI SET RES SET SET RES EI LDA STA RES SET SET RES

CR4308 CR4309 CR4310 CR4311 CR4312


RES SET RES RES RES

CR4503 CTH0 CTH1


SET SET RES

• LDA $0268
When LDA $0268 is executed, the following values will be entered in the internal register.
5
[0] [2] [6] [8]

High-Speed Counter
Internal register 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0

When STA CR4300 is executed, the value of the internal register will be assigned to auxiliary relays
CR4300 to CR4315.
**: 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
CR43**

Therefore, CR4303, CR4305, CR4306, and CR4309 will be turned ON.

- KV Nano Series(terminal block type) User’s Manual - 5-155


5-5 Frequency Counter
You can use the frequency counter to measure frequency or rotation speed.
CPU BUILT-IN FUNCTIONS

Frequency Counter Function Overview

By using dedicated instructions, you can easily measure the frequency (Hz) or rotation speed (rpm) of
external pulse input.
If you use the frequency counter input source switching function, you can count the external input
terminal signals and at the same time use a different high-speed counter to measure frequency or
rotation speed.

External pulse input

5
A-phase R004(R008) CTH0
B-phase R005(R009)*1
Frequency Counter

External pulse input


A-phase R006(R010) CTH1 FCNT instruction
B-phase R007(R011)*1
Frequency
measurement (Hz)

External pulse input


A-phase R012 CTH2 RCNT instruction
B-phase R013*2
Rotation speed
measurement (rpm)
External pulse input *4
A-phase R014 CTH3
B-phase R015*2*3
*1 This is for the KV-N14** and KV-N24**. For the KV-N40** and KV-N60**, see the values within
parentheses.
*2 This cannot be used with the KV-N14** and KV-N24**.
*3 This cannot be used with the KV-N40**.
*4 If you turn ON the input source switching method relays (CR5405, CR5505, CR5605, and CR5705) for
the frequency counters and specify the high-speed counter numbers in the external input source control
memory entries (CM4904, CM4914, CM4924, and CM4934), you can change the external input whose
frequency or rotation speed you want to measure.

Because the frequency counter function uses a high-speed counter, other


Point
functions or instructions that use the same high-speed counter (specified by its
number) cannot be used at the same time.

 Input source switching function


If you use the external input switching function of the KV Nano Series, you can count the external input
terminal signals and at the same time measure frequency or rotation speed.

External pulse input


A-phase R004 CTH0 High-speed counter
B-phase R005

CTH1 Frequency or rotation speed

If you are using the input source switching function to perform counting and at
Point
the same time measure frequency or rotation speed, you have to use two high-
speed counters.

5-156 - KV Nano Series(terminal block type) User’s Manual -


5-5 Frequency Counter

 Frequency counter input source switching method (channel 0: CR5405,


channel 1: CR5505, channel 2: CR5605, and channel 3: CR5705)

CPU BUILT-IN FUNCTIONS


Use these relays when you are using the input source switching function. Turn these relays ON to
change the external input terminal that is measured by the corresponding channel's frequency counter
or rotation speed counter. When these relays are turned OFF, the frequency or rotation speed of each
channel's fixed external input terminal is measured.
 Frequency counter external input source (channel 0: CM4904, channel 1: CM4914,
channel 2: CM4924, and channel 3: CM4934)
When the corresponding channel's frequency counter input source switching method relay turns ON,
the frequency or rotation speed of the external input terminal whose number is specified by the control
memory entry is measured.
 External inputs to measure the frequency or rotation speed 5
When the frequency counter input source switching method relay is turned OFF

Frequency Counter
High-Speed Counter External Input Terminal to Measure
Channel KV-N14** KV-N24** KV-N40** KV-N60**
A-phase, R004 A-phase, R004 A-phase, R008 A-phase, R008
Channel 0
B-phase, R005 B-phase, R005 B-phase, R009 B-phase, R009
A-phase, R006 A-phase, R006 A-phase, R010 A-phase, R010
Channel 1
B-phase, R007 B-phase, R007 B-phase, R011 B-phase, R011
A-phase, R012 A-phase, R012
Channel 2 - -
B-phase, R013 B-phase, R013
A-phase, R014
Channel 3 - - -
B-phase, R015

When the frequency counter input source switching method relay is turned ON

Frequency Counter External External Input Terminal to Measure


Input Source Value KV-N14** KV-N24** KV-N40** KV-N60**
A-phase, R004 A-phase, R004 A-phase, R008 A-phase, R008
0
B-phase, R005 B-phase, R005 B-phase, R009 B-phase, R009
A-phase, R006 A-phase, R006 A-phase, R010 A-phase, R010
1
B-phase, R007 B-phase, R007 B-phase, R011 B-phase, R011
See "When the frequency counter
A-phase, R012 A-phase, R012
2 input source switching method relay is
B-phase, R013 B-phase, R013
turned OFF"
See "When the frequency counter input source switching A-phase, R014
3
method relay is turned OFF" B-phase, R015
See "When the frequency counter input source switching method relay is
4 or more
turned OFF"

Reference For example, if the channel 1 frequency counter input source switching method relay
(CR5505) of the KV-N40** is turned ON and the value of the frequency counter external
input source (CM4914) is 2, counting will be performed with the input of R012 set to
A-phase and the input of R013 set to B-phase.

Frequency Counter Instructions

There are the following two types of frequency counter instructions.


Instruction Mnemonic Operation Overview Page
Frequency Uses a high-speed counter (CTH0, CTH1, CTH2, or CTH3) to
FCNT 5-158
measurement measure the frequency of the pulse input
Rotation speed Uses a high-speed counter (CTH0, CTH1, CTH2, or CTH3) to
RCNT 5-160
measurement measure the rotation speed of the pulse input

- KV Nano Series(terminal block type) User’s Manual - 5-157


5-5 Frequency Counter

Uses a high-speed counter to


FCNT FCNT Frequency
measurement
measure the frequency of the
CPU BUILT-IN FUNCTIONS

pulse input

Ladder program Entry mode


Execution condition FCNT n
S1 S2 D F C N T n S1 S2 D

Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand

5
MR DM
R DR LR T C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z
B W
n - - - - - - - - - - - - - -  - - - -
Frequency Counter

S1 - - - - - - - - - - - - - -  - - - -
S2  -  - - -          -   
D  -  - - -     - - -  - -   

Operand Description
n Specifies the number of the high-speed counter (0 to 3).*1, 3
Specifies the pulse input mode. If this value is out side of the range, only the lower two bits are used.*1
S1 0 = single phase w/o direction; 1 = single phase w/ direction; 2 = phase difference 1x; 3 = 2-pulse
"Count Input Settings" (page 5-116)

Specifies the number of scans within the range of 0 to 65535. If you specify the value "0," the average of
100 scans will be used.
S2
When you specify a bit device, 16 continuous bits will be occupied. When you specify a word device,
1 word will be occupied.*2
Specifies the leading device in which the measured results (Hz) will be stored. When you specify a bit
D
device, 32 continuous bits will be occupied. When you specify a word device, 2 words will be occupied.

*1 You cannot use "$" to specify the device.


*2 The numbers of the high-speed counters that you can use vary depending on the unit that you are
using.
KV-N14** and KV-N24**: 0 and 1
KV-N40**: 0 to 2
KV-N60**: 0 to 3
*3 When you specify a bit device, if you specify a relay other than the channel's leading relay (such as
R106 and R1012), the next channel will also be used to provide the necessary bits.
*4 n : If a number that cannot be specified by the unit is entered in this operand, the instruction will
not be executed.

Operation Description
On the rising edge of the execution condition, the S1 and S2 settings are read. This is performed
during each scan while the execution condition is turned ON. The value (measured result) stored in the
device specified by [ D and D+1 ] is updated once per scan in which the number of scans is
specified by S2 . The number of the high-speed counter to use is specified with n .
When the execution condition is turned ON, the time between external input pulses is measured
continuously, and the frequency is calculated during END processing from the time between pulses.
Frequency (Hz) = 1/(time between pulses)
S2 : The average value (simple average) of the scans whose number is specified by this parameter
is the frequency's measured result and is stored in the device specified with [ D and D+1 ].
The update period will not be less than or equal to the value given by the scan time × (the number of
scans specified by S2 ).
When the execution condition is turned OFF, measurement will be stopped.
5-158 - KV Nano Series(terminal block type) User’s Manual -
5-5 Frequency Counter

• You cannot execute two or more FCNT instructions that use the same high-
Point
speed counter (specified by its number) at the same time.

CPU BUILT-IN FUNCTIONS


• n : The high-speed counter whose number is specified by this parameter
can only be used by one function or instruction at a time, so other functions or
instructions that use it cannot be executed at the same time.
• Measurements start from the first pulse that is applied after the execution
condition is turned ON. Starting from the second pulse, the measured result is
updated.
• When you want to use this instruction, use the HSP instruction and control
relays to set the input time constant to 10 µs. "Input Time Constant Setting" (page


5-198)
n : Do not change the control relay (CR) or control memory (CM) entry
5
related to the high-speed counter whose number is specified by this parameter.

Frequency Counter
• Measurements are started and stopped when a scan is completed. (Not when
the instruction is executed.)
• If there is no pulse input within 1 s, the frequency is set to 0 (Hz).
• S1 and S2 : When you change these parameters, switch the execution
condition from OFF to ON.
• You cannot use this function in interrupt programs and initialization modules.

Operation flags

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
CR2012 • When the indirect specification or index modification range is incorrect.
If you are not using indirect specifying or index modification, the status will not be changed.
* If CR2012 is turned ON, the instruction will not be executed. An error will be displayed in KV STUDIO
or in the access window. In addition, the detailed error information will be stored in CM2250 to
CM2276.
"Error log" (page 4-64)

Sample Program

Using CTH0, the frequencies (Hz) of encoder input R004 (A-phase) and R005 (B-phase) are
measured, and the result is stored in DM0 and DM1.

CR2002 ;<Mnemonics list>


HSP
R004 LD CR2002
Always HSP R004
turned ON HSP R005
HSP LD R000
R005 FCNT #0 #2 #10 DM0

R000 FCNT 0
#2 #10 DM0

- KV Nano Series(terminal block type) User’s Manual - 5-159


5-5 Frequency Counter

Rotation Uses a high-speed counter to


RCNT RCNT
speed measure the rotation speed of
CPU BUILT-IN FUNCTIONS

measurement the pulse input

Ladder program Entry mode


Execution condition RCNT n
S1 S2 D R C N T n S1 S2 D

Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand

5 R
MR
DR LR T
DM
C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z
B W
Frequency Counter

n - - - - - - - - - - - - - -  - - - -
S1 - - - - - - - - - - - - - -  - - - -
S2  -  - - -     - - -   -   
D  -  - - -     - - -  - -   

Operand Description
n Specifies the number of the high-speed counter to use (0 to 3).*2, 4
Specifies the pulse input mode. If this value is out side of the range, only the lower two bits are used.*1
S1 0 = single phase w/o direction; 1 = single phase w/ direction; 2 = phase difference 1x; 3 = 2-pulse
"Count Input Settings" (page 5-116)

Specifies the leading device in which the parameters will be stored. When you specify a bit device, 48
continuous bits will be occupied. When you specify a word device, 3 words will be occupied.*2
S2 + 0..Measurement mode (0: measured from the pulse interval; 1: measured from the time per
S2
rotation)
S2 + 1..Number of pulses per rotation
• When measurements are being performed from the pulse interval: 1 to 65535
• When measurements are being performed from the time per rotation: 1 to 32767
S2 + 2..Number of scans (0 to 65535); if you specify "0," the average of 100 scans will be used.

Specifies the leading device in which the measured results (rpm) will be stored. When you specify a bit
D
device, 32 continuous bits will be occupied. When you specify a word device, 2 words will be occupied.*3

*1 You cannot use "$" to specify the device.


*2 The numbers of the high-speed counters that you can use vary depending on the base unit that you are
using.
KV-N14** and KV-N24**: 0 and 1
KV-N40**: 0 to 2
KV-N60**: 0 to 3
*3 When you specify a bit device, if you specify a relay other than the channel's leading relay (such as
R106 and R1012), the next channel will also be used to provide the necessary bits.
*4 n : If a number that cannot be specified by the unit is entered in this operand, the instruction will
not be executed.

5-160 - KV Nano Series(terminal block type) User’s Manual -


5-5 Frequency Counter

Operation Description

CPU BUILT-IN FUNCTIONS


On the rising edge of the execution condition, the S1 S2 settings are read. This is performed
during each scan while the execution condition is turned ON. The value (measured result) stored in the
device specified by [ D and D + 1] is updated once per scan in which the number of scans is
specified by S2 + 2. The number of the high-speed counter to use is specified with n .

 Measuring the rotation speed from the pulse interval (when S2 + 0 is 0)


When the execution condition is turned ON, the time between external input pulses is measured
continuously, and the rotation speed is calculated during END processing from the time between pulses
and the pulses per rotation specified by S2 + 1.
Rotation speed (rpm) = 60/(time between pulses × pulses per rotation)
S2 + 2: The average value of the scans whose number is specified by this parameter and constant is 5
the rotation speed's measured result and is stored in the device specified with [ D and D + 1].

Frequency Counter
The update period will not be less than or equal to the value given by the scan time × (the number of
scans specified by S2 + 2).
When the execution condition is turned OFF, measurement will be stopped.

 Measuring the rotation speed from the time per rotation (when S2 + 0 is 1)
When the execution condition is turned ON, the number of external input pulses are counted, the time
required to reach the number of pulses specified by S2 + 1 (the time per rotation) is calculated
continuously, and the rotation speed is calculated during END processing from the time between the
specified number of pulses.
Rotation speed (rpm) = 60/(the time per rotation)
S2 + 2: The average value of the scans whose number is specified by this parameter and constant is
the rotation speed's measured result and is stored in the device specified with [ D and D + 1].
The update period will not be less than or equal to the value given by the scan time × (the number of
scans specified by S2 + 2).
When the execution condition is turned OFF, measurement will be stopped.

• You cannot execute two or more RCNT instructions that use the same high-
Point
speed counter (specified by its number) at the same time.
• n : The high-speed counter whose number is specified by this parameter
can only be used by one function or instruction at a time, so other functions or
instructions that use it cannot be executed at the same time.
• The measured result is updated after enough pulses for at least one rotation
have been applied after the execution condition is turned ON.
• When you want to use this instruction, use the HSP instruction and control
relays to set the input time constant to 10 µs. "5-2Motor (Positioning) Control"
(page 5-4)
• n : Do not change the control relays (CR) or control memory entries (CM),
other than those listed above, that are related to the high-speed counter whose
number is specified by this parameter.
• Measurements are started and stopped when a scan is completed. (Not when
the instruction is executed.)
• When measurements are being performed from the pulse interval, if the pulse
interval becomes 1 second or more, the rotation speed will be set to 0 (rpm).
• When measurements are being performed from the time per rotation, if the time
per rotation becomes 1.5 seconds or more, the rotation speed will be set to 0
(rpm).
• S1 and S2 : When you change these parameters, switch the execution
condition from OFF to ON.
• You cannot use this function in interrupt programs and initialization modules.

- KV Nano Series(terminal block type) User’s Manual - 5-161


5-5 Frequency Counter

Operation flags
CPU BUILT-IN FUNCTIONS

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
CR2012 • S2 : When a value is specified for this parameter that is outside of the range.
• When the indirect specification or index modification range is incorrect.
* If CR2012 is turned ON, the instruction will not be executed. An error will be displayed in KV STUDIO
or in the access window. In addition, the detailed error information will be stored in CM2250 to
CM2276.

5 "Error log" (page 4-64)

Sample Program
Frequency Counter

Using CTH0, the rotation speed (rpm) of encoder inputs R004 (A-phase) and R005 (B-phase) are
measured, and the result is stored in DM0 and DM1.

CR2002 HSP ;<Mnemonics list>


R004 LD CR2002
Always HSP R004
turned ON HSP R005
HSP LD R000
R005 MOV #1 DM100
MOV #2500 DM101
R000 MOV MOV #10 DM102
#1 DM100 RCNT #0 #2 DM100 DM0

MOV
#2500 DM101

MOV
#10 DM102

RCNT 0
#2 DM100 DM0

5-162 - KV Nano Series(terminal block type) User’s Manual -


5-6 Cam Switch
You can convert the values from an encoder to angles and perform simulated cam operations.

CPU BUILT-IN FUNCTIONS


Cam Switch Function Overview

The function compares the multiple ranges that you have set in advance with the current values from
an encoder or a similar instrument.
The function detects which range the current value is within, and then turns ON the output destination
device that corresponds to this range.
・Encoder Range setting Output destination
・CPU internal device device
OFF Value ON Value Range to turn ON

Comparison (1) OFF Value (1) ON Value


(2) OFF Value (2) ON Value
(1)
(2)
(1) ON ≤ (current value) < (1) OFF
(2) ON ≤ (current value) < (2) OFF
5

Cam Switch
Current
value
(31) OFF Value (31) ON Value (31) ON ≤ (current value) < (31) OFF
(32) OFF Value (32) ON Value (32) ON ≤ (current value) < (32) OFF

Various dedicated instructions are available depending on the input mode.

Cam switch instructions


External input
External input
Bit 5 to bit 15
General input ABSENC instruction
Absolute value type
encoder
High-speed
counter input INCENC instruction Output
External pulse input
Incremental type KV-N14** or KV-N24**
encoder (The values in parentheses are for the KV-N24**.)
(CTH0) A-phase R004 B-phase R005 Z-phase R002 (R010)
(CTH1) A-phase R006 B-phase R007 Z-phase R003 (R011) CPU internal MCMP instruction
KV-N40** or KV-N60** device
(CTH0) A-phase R008 B-phase R009 Z-phase R104
(CTH1) A-phase R010 B-phase R011 Z-phase R105
(CTH2) A-phase R012 B-phase R013 Z-phase R106
(CTH3) * A-phase R014 B-phase R015 Z-phase R107

* CTH3 cannot be used with the KV-N40**.

If you are using an incremental encoder, because a high-speed counter must be


Point
used, other functions or instructions that use the same high-speed counter
(specified by its number) cannot be used at the same time.

Cam Switch Instructions

There are the following three types of cam switch instructions.


Instruction Mnemonic Operation Overview Page
Multi-stage comparator MCMP Performs multi-stage comparator operations 5-164

Absolute encoder ABSENC Performs cam operations using an absolute encoder 5-168

Incremental encoder INCENC Performs cam operations using an incremental encoder 5-172

- KV Nano Series(terminal block type) User’s Manual - 5-163


5-6 Cam Switch

MCMP

MCMP Multi-stage Performs multi-stage


CPU BUILT-IN FUNCTIONS

comparator comparator operations

Ladder program Entry mode


Execution condition MCMP
S1 S2 D M C M P S1 S2 D n

Available Devices

5 Bit Devices Word Devices


Local
Index
Const Ind Spec Device Modify
Operand
Cam Switch

MR DM
R DR LR T C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z
B W
S1  -  - - - -  - - - - -  - -   
S2  -  - - -          -   
D  -  - - -   - - - - -  - -   
n  -  - - -          -   

Operand Description
S1 Specifies the leading device of the data block that will be compared *1
S2 Specifies the device that will be compared *2,
D Specifies the leading device in which the comparison results will be stored *3
Specifies the amount of data that will be compared or the device in which the data that will be compared
n
is stored (1 to 32) *4, 5

*1 When you specify a bit device, the n × 32 consecutive bits from the start of the channel will be
used. When you specify a word device, n × 2 words will be used.
*2 When you specify a bit device, 16 continuous bits will be used.
If you specify a relay other than the channel's leading relay (such as R002, R106, and R1012), the next
channel will also be used to provide the 16 necessary bits.
*3 When you specify a bit device, n bits will be occupied.
When you specify a word device, the result is stored in the lowest bit of the word device. The bits other
than the lowest bit will not be changed.
*4 "$" cannot be used.
*5 When you specify a bit device, 16 continuous bits will be occupied.
When you specify a word device, 1 word will be occupied.

5-164 - KV Nano Series(terminal block type) User’s Manual -


5-6 Cam Switch

Operation Description

CPU BUILT-IN FUNCTIONS


When the execution condition is turned ON, starting from S1 , the first n sets of 32-bit data
(each comprised of two sets of 16-bit, unsigned BIN data indicating the OFF value and ON value) are
compared with the 16-bit, unsigned BIN data stored in the device specified with S2 , and the results
are stored in the bit devices starting from D .
OFF value ON value Comparison Result
bit bit bit bit
31 16 15 0
S1 +1 30 12 S1 D OFF
n sets S1 +3 40 30 S1 +2 bit bit
D +1 ON
15 0
S1 +5 30 80 S1 +4 D +2 OFF
n x
(  
2 words) S1 +2(  
n -2)+1 10 30 S1 +2(  
n -2)
S2 30

D +  
n +2 ON
5
S1 +2(  
n -1)+1 30 30 S1 +2(  
n -1) D +  
n +1 OFF

Cam Switch
If the OFF value is greater than the ON value
When OFF value > S2 ≥ the range of the ON value, D is turned ON.
If the OFF value is less than the ON value
When OFF value > S2 or S2 ≥ the range of the ON value, D is turned ON.
If the OFF value equals the ON value
The operand D is always turned OFF.

Even if the execution condition is turned OFF, there will be no change to the
Point
output.

Operation flags

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
• n : When a value is specified for this parameter that is outside of the range.
• S1 : When you use this parameter to specify a bit device, if you specify a relay other than
CR2012 the channel's leading relay.
• When the range specified for indirect specification or index modification is incorrect.
• S1 and D : When you use these parameters to specify a timer or counter with indirect
specification.

* If CR2012 is turned ON, the instruction will not be executed. When CR2012 is turned ON, the detailed
error information is stored in CM2250 to CM2276.
"Error log" (page 4-64)

Sample Program

The value of data memory entry DM0 is compared with the set value, and the output relays are turned
ON according to the following conditions.
When DM0 is greater than or equal to #100 and is less than #200, R1500 is turned ON.
When DM0 is greater than or equal to #300 and is less than #400, R1501 is turned ON.
When DM0 is greater than or equal to #500 and is less than #600, R1502 is turned ON.
When DM0 is greater than or equal to #700 and is less than #800, R1503 is turned ON.
When DM0 is greater than or equal to #900 and is less than #1000, R1504 is turned ON.

- KV Nano Series(terminal block type) User’s Manual - 5-165


5-6 Cam Switch

When DM0 is greater than or equal to #1100 and is less than #1200, R1505 is turned ON.
;<Mnemonics list>
CR2008 MOV
CPU BUILT-IN FUNCTIONS

#100 DM10 LD CR2008


Turns ON for one scan MOV #100 DM10
after operations start MOV #200 DM11
MOV MOV #300 DM12
#200 DM11 MOV #400 DM13
MOV #500 DM14
MOV MOV #600 DM15
#300 DM12 MOV #700 DM16
MOV #800 DM17
MOV #900 DM18
MOV MOV #1000 DM19
#400 DM13 MOV #1100 DM20
MOV #1200 DM21
LD R000
MOV
5 #500 DM14
MCMP DM10 DM0 R1500 #6

MOV
Cam Switch

#600 DM15

MOV
#700 DM16

MOV
#800 DM17

MOV
#900 DM18

MOV
#1000 DM19

MOV
#1100 DM20

MOV
#1200 DM21

R000 MCMP
DM10 DM0 R1500

#6

5-166 - KV Nano Series(terminal block type) User’s Manual -


5-6 Cam Switch

MEMO

CPU BUILT-IN FUNCTIONS


5

Cam Switch

- KV Nano Series(terminal block type) User’s Manual - 5-167


5-6 Cam Switch

ABSENC Performs cam switch


ABSENC Absolute
operations using an
CPU BUILT-IN FUNCTIONS

encoder
absolute encoder

Ladder program Entry mode


Execution condition ABSENC
S1 S2 D1 A B S E N C S1 S2
D2 D1 D2

Available Devices
5 Bit Devices Word Devices
Local
Index
Const Ind Spec Device Modify
Operand
Cam Switch

MR DM
R DR LR T C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z
B W
S1  -  - - - -  - - - - -  - -   
S2  -  - - -         - -   
D1  -  - - -   - - - - -  - -   
D2  -  - - -   - - - - -  - -   

Operand Description
Specifies the leading device of the data block in which the angle value to compare (0 to 3599, in units of
S1
0.1°) is stored *1
S2 Specifies the device in which the absolute encoder value is stored *2
D1 Specifies the leading device in which the comparison results will be stored *3
D2 Specifies the leading device in which parameters are stored *4

*1 When you specify a bit device, the [ D2 + 0] × 32 consecutive bits from the start of the channel will be
used.
When you specify a word device, [ D2 + 0] × 2 words will be used.
*2 When you specify a bit device, 16 continuous bits will be used. If you specify a relay other than the
channel's leading relay (such as R002, R106, and R1012), the next channel will also be used to provide
the necessary 16 bits.
*3 When you specify a bit device, [ D2 + 0] bits will be occupied.
When you specify a word device, the result is stored in the lowest bit of the word device. The bits other
than the lowest bit will not be changed.
*4 When you specify a bit device, 128 consecutive bits from the start of the channel will be occupied.
When you specify a word device, 8 words will be occupied.

5-168 - KV Nano Series(terminal block type) User’s Manual -


5-6 Cam Switch

Operation Description

CPU BUILT-IN FUNCTIONS


Parameters

Device Details
Amount of data
D2 +0 Sets the amount of data to compare (1 to 32)
to compare
D2 +1 Resolution Sets the encoder resolution (32 to 32768)
Sets the residual gray code (0 to 16384)
Residual (Example) 32, 64, 128, 256, 512, 1024,
Resolution 36 360 720
D2 +2 2048, 4096, 8192, 16384, 32768
gray code
Residual
gray code 0 14 76 152

D2 +3
Zero degree
Sets the value to specify as zero degrees (0 to resolution - 1)
5
value

Cam Switch
Stores the current angle after compensation (0 to 3599)
Current angle • S2 - [ D2 + 2] ≥ [ D2 + 3]:
D2 +4 (in units of (3600/[ D2 + 1]) × ( S2 - [ D2 + 2] - [ D2 + 3])
0.1°) • S2 - [ D2 + 2] < [ D2 + 3]:
(3600/[ D2 + 1]) × ([ D2 + 1] + S2 - [ D2 + 2] - [ D2 + 3])

Device Details

D2 + 5 D1 D2 +4
Bit 0: Output response error
Conditions
If, within a scan period, the ON and OFF values differ between
two or more output destination devices that are changed or if
there are differences between the ON values or OFF values,
an error will occur. No
Change
No error will occur in the following cases. change
D2 +5 Operation error • When the ON values and OFF values of the outputs that are
changed at the same time are the same.
• When the ON values of the outputs that are changed at the
same time are the same and when the OFF values of the
outputs that are changed at the same time are the same.
Bit 1: Input value out of range error
No
When the encoder's input value is outside of the setting range, No change
change
this will be turned ON.
Use a ladder program to reset the data.
D2 +6
Work area (This cannot be used by the user.)
D2 +7
When the execution condition is turned ON, starting from S1 , the first [ D2 + 0] sets of 32-bit data
(each comprised of two sets of 16-bit, unsigned BIN data indicating the OFF value and ON value) are
compared with the current angle value stored in the device specified with [ D2 + 4], and the results
are stored in the bit devices starting from D1 .

OFF value ON value Comparison Result


bit bit bit bit
31 16 15 0
S1 +1 30 12 S1 D2 +4 D1 OFF
D2 +0] sets
[   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

If the OFF value is greater than the ON value


When OFF value > [ D2 + 4] ≥ the range of the ON value, D1 is turned ON.
If the OFF value is less than the ON value
When OFF value > [ D2 + 4] or [ D2 + 4] ≥ the range of the ON value, D1 is turned ON.
If the OFF value equals the ON value
The operand D1 is always turned OFF.

- KV Nano Series(terminal block type) User’s Manual - 5-169


5-6 Cam Switch

 Output response error ( D2 + 5, Bit 0)


D2 +5 bit0 OFF OFF OFF OFF ON (error) <Cases in which an error does not occur>
A .. When one output destination device is changed within the
CPU BUILT-IN FUNCTIONS

One scan scan period.


B .. When the ON values and OFF values of two or more output
ON OFF destination devices that are changed within the scan period
Output are the same.
destination (1)
A C • OFF value of output destination device (1) equals ON value
Output of output destination device (2)
C .. When the ON values of two or more output destination devices
destination (2) B that are changed within the scan period are the same or when
Output the OFF values of two or more output destination devices that
destination (3) D are changed within the scan period are the same.
Output • OFF value of output destination device (2) equals OFF
value of output destination device (3)
destination (4) C A • ON value of output destination device (3) equals ON value
Output of output destination device (4)
destination (5) <Cases in which an error occurs>
If the ON values and OFF values of two or more output destination
5 devices that are changed within the scan period are different.
Alternatively, if the ON values are different or the OFF values are
different.
Example) D ... The ON values and OFF values of two or more output
Cam Switch

destination devices that are changed within the scan


period are different.
OFF value of output destination device (4) does not
equal ON value of output destination device (5).

• If you change the values during operation, the change will immediately be
Point reflected in the output. If you do not want to reflect the changes in the output,
turn the execution condition OFF.
• Do not use the CR2002 (normally turned ON) control relay as the execution
condition.
• Even if the execution condition is turned OFF, there will be no change to the
output.
• You cannot use this function in interrupt programs and initialization modules.

Operation flags

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
• If a value is specified for the encoder, the parameters, or the angle that is outside of the
corresponding range.
• S1 and D2 : When you use these parameters to specify a bit device, if you specify a
CR2012 relay other than the channel's leading relay.
• When the range specified for indirect specification or index modification is incorrect.
• S1 , D1 , and D2 : When you use these parameters to specify a timer or counter with
indirect specification.

* If CR2012 is turned ON, the instruction will not be executed. When CR2012 is turned ON, the detailed
error information is stored in CM2250 to CM2276.
"Error log" (page 4-64)

Sample Program

The input values R000 to R007 from the absolute encoder are stored in DM0 and are compared with
the set value. Output relays are then turned ON according to the following specifications.
Resolution: 256/rotation. Residual gray code: 0. Zero-degree teaching value: 12.

R000
Absolute value type to
encoder R007
KV Nano Series

5-170 - KV Nano Series(terminal block type) User’s Manual -


5-6 Cam Switch

When DM0 is greater than or equal to 10.0° and is less than 20.0°, R30001 is turned ON.
When DM0 is greater than or equal to 30.0° and is less than 40.0°, R30001 is turned ON.
When DM0 is greater than or equal to 50.0° and is less than 60.0°, R30002 is turned ON.

CPU BUILT-IN FUNCTIONS


When DM0 is greater than or equal to 70.0° and is less than 80.0°, R30003 is turned ON.
When DM0 is greater than or equal to 90.0° and is less than 100.0°, R30004 is turned ON.
When DM0 is greater than or equal to 110.0° and is less than 120.0°, R30005 is turned ON.

CR2008 MOV ;<Mnemonics list>


#6 DM110 LD CR2008
Turns ON for one scan MOV #6 DM110
after operations start MOV #256 DM111
MOV
MOV #0 DM112
#256 DM111 MOV #12 DM113
LD CR2002
MOV
#0 DM112
LDA R000
CON 5
ANDA $FF
CON

Cam Switch
MOV STA DM0
#12 DM113 LD CR2002
MOV #100 DM10
MOV #200 DM11
CR2002 R000 $FF DM0 MOV #300 DM12
LDA ANDA STA MOV #400 DM13
Always turned ON MOV #500 DM14
CR2002 MOV MOV #600 DM15
#100 DM10 MOV #700 DM16
Always turned ON MOV #800 DM17
MOV #900 DM18
MOV MOV #1000 DM19
#200 DM11 MOV #1100 DM20
MOV #1200 DM21
MOV LD MR000
#300 DM12 ABSENC DM10 DM0 R1500 DM110

MOV
#400 DM13

MOV
#500 DM14

MOV
#600 DM15

MOV
#700 DM16

MOV
#800 DM17

MOV
#900 DM18

MOV
#1000 DM19

MOV
#1100 DM20

MOV
#1200 DM21

MR000 ABSENC
DM10 DM0 R1500

DM110

- KV Nano Series(terminal block type) User’s Manual - 5-171


5-6 Cam Switch

INCENC Performs cam switch


INCENC Incremental
operations using an
CPU BUILT-IN FUNCTIONS

encoder
incremental encoder

Ladder program Entry mode


Execution condition INCENC
S1 S2 S3 I N C E N C S1 S2 S3

D1 D2 D1 D2

Available Devices

5
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand
MR DM
Cam Switch

R DR LR T C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z


B W
S1  -  - - - -  - - - - -  - -   
S2 - - - - - - - - - - - - - -  - - - -
S3 - - - - - - - - - - - - - -  - - - -
D1  -  - - -   - - - - -  - -   
D2  -  - - -   - - - - -  - -   

Operand Description
Specifies the leading device of the data block in which the angle value to compare (0 to 3599, in units of
S1
0.1°) is stored *1
S2 Specifies the number of the high-speed counter to use (0 to 3) *2, 5, 6
Specifies the encoder count input mode (0 to 5)
0 = single phase w/o direction; 1 = single phase w/ direction; 2 = phase difference 1x;
S3
3 = phase difference 2x; 4 = phase difference 4x; 5 = 2-pulse
"Count Input Settings" (page 5-116)

D1 Specifies the leading device in which the comparison results will be stored *3
D2 Specifies the leading device in which parameters are stored *4

*1 When you specify a bit device, the [ D2 + 0] × 32 consecutive bits from the start of the channel will
be used. When you specify a word device, [ D2 + 0] × 2 words will be used.
*2 You cannot use "$."
*3 When you specify a bit device, [ D2 + 0] bits will be occupied.
When you specify a word device, the result is stored in the lowest bit of the word device. The bits other
than the lowest bit will not be changed.
*4 When you specify a bit device, 80 consecutive bits from the start of the channel will be occupied.
When you specify a word device, 5 words will be occupied.
*5 The numbers that can be specified vary depending on the unit.
KV-N14** and KV-N24**: 0 and 1
KV-N40**: 0 to 2
KV-N60**: 0 to 3
*6 S2 : If the number of a high-speed counter that cannot be specified by the unit is entered in this
operand, the instruction will not be executed.

5-172 - KV Nano Series(terminal block type) User’s Manual -


5-6 Cam Switch

Operation Description

CPU BUILT-IN FUNCTIONS


Parameters
Device Details
Amount of data
D2 +0 Sets the amount of data to compare (1 to 32)
to compare
D2 +1 Resolution Sets the encoder resolution (32 to 32768)
Zero degree
D2 +2 Sets the value to specify as zero degrees (0 to resolution - 1)
value
Stores the current angle after compensation (0 to 3599)
Current angle
5
• [ S2 ] ≥ [ D2 + 2]:
D2 +3 (in units of (3600/[ D2 + 1]) × ( S2 - [ D2 + 2])
0.1°) • [ S2 ] < [ D2 + 2]:
(3600/[ D2 + 1]) × ([ D2 + 1] + S2 - [ D2 + 2])

Cam Switch
Device Details

D2 +4 D1 D2 +3
Bit 0: Output response error
Conditions
If, within a scan period, the ON and OFF values differ between
two or more output destination devices that are changed or if
there are differences between the ON values or OFF values,
an error will occur. No
Change
No error will occur in the following cases. change
D2 +4 Operation error • When the ON values and OFF values of the outputs that are
changed at the same time are the same.
• When the ON values of the outputs that are changed at the
same time are the same and when the OFF values of the
outputs that are changed at the same time are the same.
Bit 1: Input value out of range error No
No change
When the encoder's input value is outside of the setting range. change
Use a ladder program to reset the data.

When the execution condition is turned ON, starting from S1 , the first [ D2 + 0] sets of 32-bit data
(each comprised of two sets of 16-bit, unsigned BIN data indicating the OFF value and ON value) are
compared with the current angle value stored in the device specified with [ D2 + 3], and the results
are stored in the bit devices starting from D1 .

OFF value ON value Comparison Result


bit bit bit bit
31 16 15 0
S1 +1 30 12 S1 D2 +3 D1 OFF
D2 +0] sets
[   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]×
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

If the OFF value is greater than the ON value


When OFF value > [ D2 + 3] ≥ the range of the ON value, D1 is turned ON.
If the OFF value is less than the ON value
When OFF value > [ D2 + 3] or [ D2 + 3] ≥ the range of the ON value, D1 is turned ON.
If the OFF value equals the ON value
The operand D1 is always turned OFF.

- KV Nano Series(terminal block type) User’s Manual - 5-173


5-6 Cam Switch

 Output response error ( D2 + 4, Bit 0)


D2 +4 bit0 OFF OFF OFF OFF ON (error) Cases in which an error does not occur
A .. When one output destination device is changed within the
CPU BUILT-IN FUNCTIONS

One scan scan period.


B .. When the ON values and OFF values of two or more output
ON OFF destination devices that are changed within the scan period
Output are the same.
destination (1) • OFF value of output destination device (1) equals ON value
A C
Output of output destination device (2)
C .. When the ON values or OFF values of two or more output
destination (2)
B destination devices are the same within the scan period.
Output • OFF value of output destination device (2) equals OFF
destination (3) D value of output destination device (3)
Output • ON value of output destination device (3) equals ON value
destination (4) of output destination device (4)
C A <Cases in which an error occurs>
Output If the ON values and OFF values of two or more output destination
destination (5) devices that are changed within the scan period are different.
Alternatively, if the ON values are different or the OFF values are

5 different.
Example) D ...The ON values and OFF values of two or more output
destination devices that are changed within the scan
period are different.
OFF value of output destination device (4) does not
Cam Switch

equal ON value of output destination device (5).

• If you change the values during operation, the change will immediately be
Point
reflected in the output. If you do not want to reflect the changes in the output,
turn the execution condition OFF.
• When the high-speed counter is reset (RES instruction or Z-phase external
input) during operation, an error may occur according to the output response
error condition ([ D2 + 4], bit 0).
• Do not use the CR2002 (normally turned ON) control relay as the execution
condition.
• Even if the execution condition is turned OFF, there will be no change to the
output. The count value is held.
• S2 : Other functions or instructions that use the same high-speed counter as
that specified by this parameter cannot be used at the same time.
• INCENC instructions that use the same S2 cannot be used.
• Before you use the INCENC instruction, use the HSP instruction and the control
relays to set the input time constant to 10 µs.
"Input Time Constant Setting" (page 5-198)
• Because this instruction uses the high-speed counter function, do not use
ladder programs or similar methods to directly change the control relays,
control memory entries, CTH, and CTC related to the high-speed counter.
• The value of the high-speed counter is held when the power is turned off. To
clear this value, use the RES or CTH instruction.
• You cannot use this function in interrupt programs and initialization modules.
• Be careful when writing data during RUN mode.
"Writing data during RUN mode" (page 4-169)

Operation flags

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
Turned ON when one of the following conditions is met. Otherwise, turned OFF.
• If a value is specified for the encoder, the parameters, or the angle that is outside of the
corresponding range.
• S1 and D2 : When you use these parameters to specify a bit device, if you specify a
CR2012
relay other than the channel's leading relay.
• When the range specified for indirect specification or index modification is incorrect.
• S1 , D1 , and D2 : When you use these parameters to specify a timer or counter with
indirect specification.
* If CR2012 is turned ON, the instruction will not be executed. When CR2012 is turned ON, the detailed
error information is stored in CM2250 to CM2276.
"Error log" (page 4-64)
5-174 - KV Nano Series(terminal block type) User’s Manual -
5-6 Cam Switch

Sample Program

CPU BUILT-IN FUNCTIONS


High-speed counter CTH1 is used to measure the input value from the incremental encoder, and the
measured value is compared with the set value. Output relays are then turned ON according to the
following specifications. The value of high-speed counter CTH1 is cleared when input relay R001 is
turned ON.

High-speed counter ........ CTH1 Resolution.....................................256/rotation


M counting mode............ 2-pulse Zero-degree teaching value..........12

* Instructions such as the HSP instruction are required separately.


"HSP instruction" (page 5-198)
5

Cam Switch
When the CTH1 value is greater than or equal to 10.0 and is less than 20.0, R1500 is turned ON.
When the CTH1 value is greater than or equal to 30.0 and is less than 40.0, R1501 is turned ON.
When the CTH1 value is greater than or equal to 50.0 and is less than 60.0, R1502 is turned ON.
When the CTH1 value is greater than or equal to 70.0 and is less than 80.0, R1503 is turned ON.
When the CTH1 value is greater than or equal to 90.0 and is less than 100.0, R1504 is turned ON.
When the CTH1 value is greater than or equal to 110.0 and is less than 120.0, R1505 is turned ON.

- KV Nano Series(terminal block type) User’s Manual - 5-175


5-6 Cam Switch

CR2008 MOV ;<Mnemonics list>


#6 DM110 LD CR2008
MOV #6 DM110
CPU BUILT-IN FUNCTIONS

Turns ON for one scan


after operations start MOV #256 DM111
MOV
MOV #12 DM112
#256 DM111
LD CR2002
MOV #100 DM10
MOV MOV #200 DM11
#12 DM112 MOV #300 DM12
MOV #400 DM13
MOV #500 DM14
CR2002 MOV MOV #600 DM15
#100 DM10 MOV #700 DM16
Always turned ON MOV #800 DM17
MOV MOV #900 DM18
#200 DM11 MOV #1000 DM19

5
MOV #1100 DM20
MOV #1200 DM21
MOV LD R000
#300 DM12 INCENC DM10 #1 #5 R1500 DM110
Cam Switch

LD R001
MOV RES CTH1
#400 DM13

MOV
#500 DM14

MOV
#600 DM15

MOV
#700 DM16

MOV
#800 DM17

MOV
#900 DM18

MOV
#1000 DM19

MOV
#1100 DM20

MOV
#1200 DM21

R000 INCENC
DM10 #1 #5

R1500 DM110

R001 CTH1
RES

5-176 - KV Nano Series(terminal block type) User’s Manual -


5-7 Tracing

Overview

CPU BUILT-IN FUNCTIONS


 Tracing function
The device status and values are recorded in buffer memory. When files are saved, the specified
amount of data preceding and following the saved file is extracted and recorded in internal memory.
For example, if you set triggers so that files are saved when a device malfunction occurs, the data prior
to and after a malfunction occurs is saved automatically, which is useful when you want to perform
malfunction analysis.

SRAM Internal memory


Time
Date and time
Date and time
DM11
DM11
DM12
DM12
DM13
DM13
Buffer 5

Tracing
Date and time DM11 DM12 DM13
Date and time DM11 DM12 DM13 Data before
Date and time DM11 DM12 DM13 the trigger
Date and time DM11 DM12 DM13
File save
trigger Date and time DM11 DM12 DM13
Date and time DM11 DM12 DM13 Data after
the trigger PC
Date and time DM11 DM12 DM13
Date and time DM11 DM12 DM13 The data saved to the
internal memory can be
Date and time DM11 DM12 DM13
viewed in the KV STUDIO
real-time chart monitor.
Logging is
performed constantly

Tracing starts, LOGE instruction


is executed

Logging trigger

Execution relay

Operation in progress relay

File writing completed


Data before the Data after the
trigger trigger

File save trigger

File save trigger monitor

Data capturing completed

Reference On the KV Nano Series, you cannot use the logging function or the trace function together
with a memory card.

- KV Nano Series(terminal block type) User’s Manual - 5-177


5-7 Tracing

Usage Procedure
CPU BUILT-IN FUNCTIONS

The usage procedure of the tracing function is shown below.

(1) Set the devices and triggers.


Click "Tool" and then "Logging/tracing setting."
"Settings" (page 5-178)

(2) Create the ladder program.


5 Use the "LOGE," "LOGD," and "TRGD" instructions.
"Logging Instructions" (page 5-184)
Tracing

(3) Transfer the program to the <<KV Nano Series>>.


Click "Monitor/Simulator" and then "PLC transfer -> monitor
mode."

(4) Execute tracing.


When you execute the LOGE instruction, tracing execution will
begin. When tracing execution is in progress, apply a trigger.
When a trigger is applied, data is buffered. If you apply a file save
trigger, the data prior to and after the trigger is saved in the buffer,
and the tracing function is stopped. Use the real-time chart
monitor to read the captured tracing data.

Settings

Use KV STUDIO to configure the settings that you need to use the tracing function.
To use the tracing function, you have to set the:
• Device to trace.
• Trigger.
• Tracing details.
You can create up to 10 instances of the tracing function, which are identified by their tracing ID (0 to 9).
Set devices and triggers for each tracing ID.

Reference You can set up to 128 devices per tracing ID.

5-178 - KV Nano Series(terminal block type) User’s Manual -


5-7 Tracing

1 Click the "Tool" menu "Set up logging."


The "Logging/Trace setting list" dialog box is displayed.

CPU BUILT-IN FUNCTIONS


Alternative procedure • Click the button.

Tracing
Item Description
Status Displays the current execution status during monitoring editing.
Function Displays the set function (fixed to the tracing function).
File path preview On the KV Nano Series, this is fixed to indicate the internal memory.
Comment Displays the set file comment.
Click this to display the "Logging/Trace setting" dialog box. You can use this
Setup
dialog box to configure the settings of the selected logging or tracing ID.
Delete Click this to delete the settings of the selected logging or tracing ID.
OK Click this to confirm the changes that you have made and close the dialog box.
Cancel Click this to cancel the changes that you have made and close the dialog box.
Click this to display the built-in function monitor of the selected logging or tracing
Built-in function monitor
ID. This is only available during monitoring.
Click this to start the execution of the selected logging or tracing ID (ladder
Start
programs are given priority). This is only available during monitoring.
Click this to stop the execution of the selected logging or tracing ID (ladder
Stop
programs are given priority). This is only available during monitoring.

2 Select the logging or tracing ID that you want to configure, and then click "Setup."
The "Logging/Trace setting" dialog box is displayed.

Item Description
File path preview On the KV Nano Series, this is fixed to indicate the internal memory.
File comment Set the file comment (up to 64 single-byte characters).
Function Select the function (this is fixed to tracing).*

- KV Nano Series(terminal block type) User’s Manual - 5-179


5-7 Tracing

* You can select a function other than tracing, but when you close the "Logging/Trace setting" dialog box,
the following dialog box will be displayed.
(An error will not occur.)
CPU BUILT-IN FUNCTIONS

5
"Tracing function" (page 5-177)
Tracing

File name

You cannot configure these settings on the KV Nano Series.


* If you do configure these settings, an error will not occur, but a warning dialog box will be displayed when
you close the setup dialog box.

5-180 - KV Nano Series(terminal block type) User’s Manual -


5-7 Tracing

Device

CPU BUILT-IN FUNCTIONS


Use this tab to configure the settings of the devices that you want to save. You can include both bit
devices and word devices in the same group of settings.
You can set up to 128 devices for each logging ID.

Example
(1) Setting all devices to bit devices:
The ON/OFF status (0 or 1) of 128 bit devices will
be logged.
(2) Setting all devices to decimal, 16-bit word devices:
The values of 128 decimal, 16-bit word devices will 5
be logged.

Tracing
(3) Setting all devices to decimal, 32-bit word devices:
The values of 64 decimal, 32-bit word devices will
be logged.

Item Description
Click "Add" to display the "Logging/Trace device setting" dialog box. Add the device that you
Add
want to trace.
Select the device that you want to change and then click "Change" to display the "Logging/
Change Trace device setting" dialog box. Make changes to the settings of the device that you want
to trace.
Click "Delete" to delete the selected device (you can select multiple devices at the same
Delete
time).
Up Click this to move the selected device up in the registered sequence.
Down Click this to move the selected device down in the registered sequence.

Item Description
Set the device that you want to trace.
Target device*1 Press the button to select from the device comments.

Select the data format from "DEC 16BIT," "DEC 32BIT," "±DEC 16BIT," "±DEC 32BIT,"
Data format "HEX 16BIT," "HEX 32BIT," "ASCII 16BIT," and "FLOAT."
* To save data in SJIS format, select "ASCII 16BIT."
Only set this value when "Data format" is set to "ASCII 16BIT."
Word number
Setting range: 1 to 16
Set the target device as the leading device, and set how many devices that follow this
Cont. number
device consecutively will be logged or traced.

*1 The destination device can be set as shown below.


Bit devices: R, MR, LR, B, CR, T (contact), C (contact), and CTC (contact)
Word devices: DM, W, CM, TM, TC (timer current value), CC (counter current value), and CTH
- KV Nano Series(terminal block type) User’s Manual - 5-181
5-7 Tracing

Trigger
CPU BUILT-IN FUNCTIONS

Use this tab to set the timing with which to start the tracing of the recorded devices.

5
Tracing

Item Description
Select the trigger type from "Bit device," "Cycle," and "Logging instructions
Type*1
(TRGD)."
Set a bit device.
Bit device Press the button to select from the device comments.

Period Set the period (1 to 86400000) in units of ms.


Cycle Start trigger when
Select this checkbox to generate triggers when tracing starts.
starting logging
Triggers are generated when the TRGD instruction is executed.
Logging instructions
"TRGD Instructions" (page 5-188)

*1 When you are using the bit device trigger type


Tracing is executed when the specified bit devices are turned ON.
Because the status of the bit devices references the status at the point in time that END processing is
performed, trigger input is not recognized when bit devices are turned ON and OFF during scans.
The device values at the point in time during END processing when triggers are detected are saved.
When a bit device is turned ON, the device value is saved during END processing of each scan.

When you are using the cycle trigger type


Tracing is executed at the specified time interval using the built-in timer of the KV Nano Series.
The device values at the point in time during END processing when triggers are detected are saved.
If you specify a time that is shorter than the scan time, tracing is executed once per scan.
The time interval is calculated from the point in time when tracing execution is started.
If you switch to PROG mode, the time interval calculation is reset.

After a trigger occurs, the values of devices that are specified during END
Point
processing are acquired. Therefore, a maximum delay of one scan interval
may occur between a trigger occurring and the device values being saved.

When you are using the TRGD instruction


You can use this instruction to avoid waiting for END processing and instead acquire the values of the
devices at the point in time that the TRGD instruction is executed.
You can record up to 8 values per ID in a program.
You can also record these values in interrupt programs.

5-182 - KV Nano Series(terminal block type) User’s Manual -


5-7 Tracing

Option

CPU BUILT-IN FUNCTIONS


You cannot configure these settings on the KV Nano Series.
* If you do configure these settings, an error will not occur, but a warning dialog box will be displayed when
you close the setup dialog box.

Trace detail setting

You can only configure the settings on this tab when you select the tracing function.
Use this tab to set the trigger that is used to save files and the file saving mode.

Tracing
Item Description
File saving Set a bitdevice.*3
Device Press the button to select from the device comments.
trigger
Trigger data quantity Set the amount of data after the trigger as a percentage. You can also
Trigger (%) use the slider to set the value.
position Trigger data quantity The amount of data after the trigger that you have set as a percentage
(Point)*1 is displayed as a number of points.
Select the file save destination from "Memory card" and "Internal
Saving location*2 memory."
Note that this setting is fixed to "Internal memory."

- KV Nano Series(terminal block type) User’s Manual - 5-183


5-7 Tracing

*1 To set the amount of data to save, from the workspace, open the "CPU system setting" dialog box, and
then click "System setting," "CPU unit buffer capacity."
CPU BUILT-IN FUNCTIONS

5
Tracing

If you increase the capacity of the ID that you are using, the amount of data that can be saved
(the number of samples) will be increased.
When configuring these settings, do not exceed a total capacity of 320 kB.
*2 Use the real-time chart monitor to read the data.
See "Real-time Chart Monitor" in the "KV STUDIO User's Manual."
Data saved in internal memory will be lost when the power is turned off.
You can also save the read data as .CSV files.
"KV STUDIO User's Manual"
*3 When you set the trigger type to "TRGD instruction" the file save trigger status is only confirmed when
the TRGD instruction and function are executed.

Logging Instructions
To execute logging, create a program that uses the logging instructions.
Instruction Mnemonic Operation Overview Page
Logging and tracing
enable LOGE 5-186
Enable and disable the execution of the logging and
Logging and tracing tracing functions of the specified ID
LOGD 5-186
disable
Logging data capture TRGD Captures the logging data of the specified ID 5-188

5-184 - KV Nano Series(terminal block type) User’s Manual -


5-7 Tracing

MEMO

CPU BUILT-IN FUNCTIONS


5

Tracing

- KV Nano Series(terminal block type) User’s Manual - 5-185


5-7 Tracing

LOGE LOGE
Logging and tracing
enable
Enable and disable the
execution of the logging and
CPU BUILT-IN FUNCTIONS

tracing functions of the


LOGD LOGD
Logging and tracing
disable specified ID

Ladder program Entry mode


Execution condition n
LOGE L O G E n

Execution condition n
LOGD L O G D n

5 Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Tracing

Operand
MR DM
R DR LR T C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z
B W
n  -  - - -        *1 - -   

Operand Description
n Specifies the logging or tracing ID (0 to 9) *1, 2

*1 You cannot use "$" to specify the device.


*2 n : When you use this parameter to specify a bit device, 16 continuous bits will be occupied.
When you specify a word device, 1 word will be occupied.

Operation Description

LOGE When the execution condition is turned ON, tracing of the ID specified with n is
enabled.
After the instruction is executed, the CPU unit buffer of the specified ID is cleared, and the
logging and tracing execution relays are set. When a trigger occurs, tracing is executed.
Regardless of the status of the execution condition of the LOGE instruction, the execution
enabled status continues until a file save trigger is applied or the LOGD instruction is
executed.
You can use the same execution condition to enable the execution of tracing for all logging
IDs.

LOGD When the execution condition is turned ON, tracing of the ID specified with n is disabled.
After the instruction is executed, the logging and tracing execution relays are reset for each
ID, and tracing is then stopped. Until tracing is stopped, the tracing contents are stored in
buffer memory.
Logging ID Logging Execution Relay
0 CR000
1 CR100
2 CR200
3 CR300
4 CR400
5 CR500
6 CR600
7 CR700
8 CR800
9 CR900

5-186 - KV Nano Series(terminal block type) User’s Manual -


5-7 Tracing

Timing chart of logging and tracing


Scan

CPU BUILT-IN FUNCTIONS


Logging and tracing
execution relay

Trigger
(bit device)

Executing
Executing

Executing
Logging or tracing Executing
execution

Scan

5
Logging and tracing
execution relay

Trigger (period)

Tracing
Executing

Executing

Executing

Executing
Logging or tracing
execution

Operation flags

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
n : When a device is specified with this parameter and if the number specified is 10 or higher
or when the range specified for indirect specification or index modification is incorrect, this
CR2012
operation flag is turned ON. Otherwise, it is turned OFF. n : When a constant is specified for
this parameter, there is no change to the operation flag.

* If CR2012 is turned ON, the instruction will not be executed.


When CR2012 is turned ON, the detailed error information is stored in CM2250 to CM2276.
"Error log" (page 4-64)

Sample Program

ID5's tracing execution is enabled on the rising edge of input R000.


;<Mnemonics list>
R000 #5
LOGE LDP R000
LOGE #5

ID5's tracing execution is disabled on the rising edge of input R001.


;<Mnemonics list>
R001 #5
LOGD LDP R001
LOGD #5

- KV Nano Series(terminal block type) User’s Manual - 5-187


5-7 Tracing

TRGD TRGD Logging data capture


Captures the logging data of the
specified ID
CPU BUILT-IN FUNCTIONS

Ladder program Entry mode


Execution condition n
TRGD T R G D n

Available Devices
Index
Local
Bit Devices Word Devices Const Ind Spec Device Modify
Operand

5 R
MR
DR LR T
DM
C CTC CR TM T C CTH CTC Z CM #/$ #TM * @ :#/:Z
B W
Tracing

n  -  - - -         *2 -   

Operand Description
Specifies the tracing ID whose data you want to capture or the leading device in which the data of the
n
tracing ID is being stored *1, 3

*1 For the logging ID, specify a value between 0 and 10. Specify the value "10" when you are using
instruction triggers during real-time chart monitoring.
*2 You cannot use "$" to specify the device.
*3 n : When you use this parameter to specify a bit device, 16 continuous bits will be occupied.

Operation Description

TRGD When the execution condition is turned ON, the data of the tracing ID specified with n
is captured.
• The data that is present when the TRGD instruction is executed is captured.
When you are using bit devices or periods to trigger tracing, data is captured during END
processing. However, you can capture data at any point during the ladder program by
using the TRGD instruction.

• You can use up to eight TRGD instructions per ID in a single project.


Point
• To use the TRGD instruction to capture data, you have to set the trigger type to
"TRGD instruction" in the "Logging/Trace setting" dialog box in KV STUDIO.
If you are using instruction triggers with the real-time chart monitor, first set the
trigger type to "TRGD instruction" on the "Trigger setting" tab of the real-time
chart monitor. If you do not make this setting, data will not be captured even
when the TRGD instruction is executed.

Operation flags

CR2009 No change in status


CR2010 No change in status
CR2011 No change in status
• This operation flag is turned ON when the value specified by the operand is outside of its range.
• This operation flag is turned ON when the range specified for indirect specification or index
CR2012 modification is incorrect.
In all other situations, this operation flag is turned OFF.
• n : When a constant is specified for this parameter, there is no change to the operation flag.

*1 If CR2012 is turned ON, the instruction will not be executed.


When CR2012 is turned ON, the detailed error information is stored in CM2250 to CM2276.
"Error log" (page 4-64)
5-188 - KV Nano Series(terminal block type) User’s Manual -
5-7 Tracing

Sample Program

CPU BUILT-IN FUNCTIONS


If you write the following ladder program in an interrupt ladder program, logging will be executed each
time that the interrupt ladder program is executed.
;<Mnemonics list>
CR2002 #0
LD CR2002
TRGD
TRGD #0
Always turned ON

"4-7Interrupts" (page 4-76)

List of Devices for Logging and Tracing


5
Control and error information for logging and tracing is assigned to the control relays and control

Tracing
memory entries.

Control relays and control memory entries are updated during END processing,
Point
so even if you access them during ladder operation, the results will not be
reflected until END processing.

 Devices of IDs

Device Numbers for Each Logging and


Attribute
Tracing ID (0 to 9) R: Read only Description
Blank: Read/write
ID0 ID1 ID2 … ID9
CR000 CR100 CR200 … CR900 Logging or tracing execution
Logging or tracing operation in
CR001 CR101 CR201 … CR901 R
progress
CR002 CR102 CR202 … CR902 R Logging or tracing file write complete
CR008 CR108 CR208 … CR908 R Logging or tracing error
CR010 CR110 CR210 … CR910 R Incorrect device or trigger setting
CR011 CR111 CR211 … CR911 R Tracing file save trigger monitor
CR012 CR112 CR212 … CR912 R Tracing data capture complete
CM1660 CM1661 CM1662 … CM1669 R Free buffer space (in units of kB)
CM1680 CM1681 CM1682 … CM1689 R File save counter

Reference With the KV Nano Series, you cannot use the logging and memory card functions.

 Device Details

 Logging and tracing execution relay


This relay enables and disables the execution of tracing. This relay is set when the logging and tracing
enable instruction (LOGE) is executed or when tracing is started from KV STUDIO, so there is normally
no need for you to operate this relay directly.
When this relay is turned ON, the status relay of the same logging and tracing ID is turned OFF.
When an error occurs, this relay is reset.
You can turn this relay OFF by using the logging and tracing disable instruction (LOGD) or by sending
signals from KV STUDIO.

- KV Nano Series(terminal block type) User’s Manual - 5-189


5-7 Tracing

If this relay is turned OFF before the file save trigger occurs, the data remaining in the buffer is all
discarded when the file save trigger occurs.
If this relay is turned OFF after the file save trigger occurs, even if all the data after the file save trigger
CPU BUILT-IN FUNCTIONS

occurred has not been captured, the subsequent data will not be captured, and only the data stored in
the buffer when the file save trigger occurred can be displayed on the real-time chart monitor.

 Logging and tracing operation in progress relay


This relay is turned ON when tracing is actually being executed.

 Logging and tracing file write complete relay


5 This relay is turned ON when data writing to internal memory is completed.
When this relay is turned ON, tracing is finished, and the logging and tracing execution relay will be
turned OFF.
Tracing

The next time that the LOGE instruction is executed, this relay will be turned OFF.

 Logging and tracing error relays


When tracing ends due to an error, this relay is turned ON. Check whether the various error relays are
turned ON. In this situation, the data remaining in the buffer will be discarded. The next time that the
LOGE instruction is executed, the error will be cleared.

 Incorrect device or trigger setting relay


This relay is turned ON when a setting such as the tracing device setting or trigger setting is incorrect.
When the relay is turned ON, tracing will stop. In this situation, the tracing error relay will be turned ON
and the logging and tracing execution relay will be turned OFF.

 Tracing file save trigger monitor relay


If a file save trigger occurs while the tracing function is in use, this relay will be turned ON.
The next time that the LOGE instruction is executed, this relay will be turned OFF.

 Tracing data capture complete relay


While the tracing function is in use, this relay is turned ON when the specified amount of data is
captured after a file save trigger occurs.
The next time that the LOGE instruction is executed, this relay will be turned OFF.

 Free buffer space (in units of kB)


The buffer's free space is written in units of kB.
Before a file save trigger occurs, this indicates the whole capacity of the buffer. After a file save trigger
occurs, this indicates the remaining amount of data to capture until tracing is completed.

 File save counter


This counter is incremented by one each time that a file is saved.
The value is counted between the range of 0 and 65535, and this value is stored even when the power
is turned off.
To reset this counter, write the value "0" to it.

5-190 - KV Nano Series(terminal block type) User’s Manual -


5-7 Tracing

Tracing Function Precautions

CPU BUILT-IN FUNCTIONS


The following are precautions to follow when using the tracing function.

 Saving speed
• During tracing, the scan time may be extended by a maximum of (the number of IDs in use) ms.
• If multiple triggers occur at the same time, it is easy for the scan time to be extended.

 Operation when switching between RUN and PROG mode


The tracing function only operates in RUN mode. When you switch from RUN mode to PROG mode, all
traces will be stopped.
5
The same as when the LOGD instruction is executed, if you switch from RUN mode to PROG mode

Tracing
before a file save trigger occurs, the data remaining in the buffer is all discarded when the file save
trigger occurs.
If you switch from RUN mode to PROG mode after the file save trigger occurs, even if all the data after
the file save trigger occurred has not been captured, the subsequent data will not be captured, and only
the data stored in the buffer when the file save trigger occurs can be displayed on the real-time chart
monitor.
In addition, when you switch from PROG mode to RUN mode, all traces will be stopped, so to start
them again, you have to execute the LOGE instruction.

 Processing at the start of tracing


When tracing starts, the data remaining in the buffer is all discarded.

 Character restrictions
(1) Character strings in CSV files : File comments and device comments
(2) ASCII character strings : When you have set the device's data format to "ASCII character
string"
There are limits to the characters that can be used in these
situations.
Item Description
Character strings in CSV files • You cannot use "," in this situation.
All ASCII codes are saved as is. Control characters, quotation marks, and
ASCII character strings
similar characters are also saved as is.

- KV Nano Series(terminal block type) User’s Manual - 5-191


5-8 USB Communication
You can use the USB port of the base unit to monitor and debug programs from KV STUDIO. You
cannot use the USB port to perform communications such as transmitting commands.
CPU BUILT-IN FUNCTIONS

Reference If you use "KV COM+ for Excel/KV COM+ Library," you can read and write PLC device
values.

How to Connect to a PC

Use a USB cable (OP-35331) to connect the PC and the KV Nano Series.

• Before you connect the KV Nano Series to the PC's USB connector, be sure to install
5 Point
KV STUDIO.
• For a DC power supply type, the USB port's SG is shared with 0 V of the power
USB Communication

supply. A potential difference between the product being connected to and the SG will
lead to damage to the base unit and to the product being connected to.

Installing the USB Driver

You only have to install the USB driver the first time that you connect the device to a Windows 2000 PC.
From the second time that you connect the device, or from the first time that you connect the device to
a Windows 7, Vista, or XP PC, because the device is automatically detected, you do not have to install
the driver.
This section will explain the procedure for performing the installation on Windows 2000.
1 Log on as Administrator or as another user that has access rights to the system settings.

2 Use a USB cable to connect the USB ports on the PC and the KV Nano Series.
The message "Found New Hardware" is displayed, and then the Found New Hardware Wizard is
displayed.

3 Select "Search for a suitable driver for my device," and then click "Next."

4 Select only the "Specify a location" check box, and then click "Next."
Specify the location that KV STUDIO is installed in.
* The default installation location is "C:\Program Files\KEYENCE\KVS7E\KVS."

5 Follow the wizard's instructions to continue the installation.


For a detailed procedure, see the "KV STUDIO User's Manual."

5-192 - KV Nano Series(terminal block type) User’s Manual -


5-9 Serial Communication
You can use the serial port (modular connector) of the KV Nano Series to monitor ladder programs from
KV STUDIO in the same manner as when you use the USB port. In addition, you can communicate with
connected peripherals that have RS-232C interfaces. You can also connect to the KEYENCE VT3

CPU BUILT-IN FUNCTIONS


Series of touch panel displays.
This section gives an overview of the built-in serial port as well as describes how to communicate with
a PC or touch panel. For other functions and details, see the KV Nano Series "Serial
Communication Function User's Manual."

By using extension serial communication cassettes (KV-N10L and KV-N11L), you


Point
can extend the number of serial communication ports.
For information on the extension serial communication cassettes,
see the KV Nano Series "Serial Communication Function User's Manual." 5

Serial Communication
What You Can Do with Serial Communications

Built-In
Function Name Description KV-N10L KV-N11L
Port
This mode is used to perform
communications with the KEYENCE
KV mode (uplink) ○ ○ ○ *1
proprietary protocol. No communication
program is required on the base-unit side.
This mode is used to send and receive
KV mode (send and
data with the STX header and ETX ○ ○ ○
receive text data)
delimiters.
This mode is used to communicate with
KEYENCE products such as the ladder
KV STUDIO mode ○ ○ ○
support software and the V3 Series of
touch panel displays.
This mode is used to freely set the
communication procedure format (header,
delimiter, and data length) to match the
Non-procedural
communication procedure of peripherals ○ ○ ○
mode
and to communicate with the peripherals.
Use ladder programs to configure all
format settings.
This mode is used to control the
Modbus master temperature and perform other operations
mode ○ ○ ○
on the Modbus communication target as
the Modbus master unit.
This mode is used to perform
communications as the slave unit in
Modbus slave mode ○ ○ ○
response to signals from the Modbus
master.
Serial This mode is used to form links between
- - ○ *2
PLC link mode PLCs.
*1 This can only be used with RS-422A/485 (4-wire).
*2 This can only be used with RS-485 (2-wire).

Reference If you will use the device in a mode other than KV STUDIO mode, use the Unit Editor to
configure the settings.
KV Nano Series "Serial Communication Function User's Manual"

- KV Nano Series(terminal block type) User’s Manual - 5-193


5-9 Serial Communication

Communication Specifications When Communicating with a PC or Touch Panel


CPU BUILT-IN FUNCTIONS

Item Specification
Communication standard RS-232C
Communication mode Full-duplex
Isolation mode Not isolated (the 24 V power supply's 0 V and the SG are shared)
Synchronization mode Start-stop synchronization
Operation mode KV STUDIO mode (default value)
Baud rate Automatic
Data bit length 8 bits

5 Parity check
Stop bit length
Even
1 bit
Serial Communication

• Configure the communication specifications to the same settings of the


Point
peripherals that you will connect to. Communications cannot be performed
correctly if the settings are different.
• For details on the settings of the connected peripherals, refer to the
corresponding User's Manuals.

How to Connect to a PC

To connect the KV Nano Series and a PC, use the dedicated connection cable (OP-26487) and a D-
Sub 9-pin connector (OP-26401 or OP-26486).

On DC power supply types, the power supply and internal GND are not isolated,
Point
so connecting to a positively grounded device may damage the KV Nano Series.

KV Nano

OP-26401
OP-26486
USB  RS-232C
conversion
connector
To the modular connector OP-26487 PC
(cable length: 2.5 m)
KV side PC side

RD 3 3 SD
SD 5 2 RD
4 DR
6 ER
7 RS
8 CS
1 2 3 4 5 6 SG 4 5 SG

Pin numbers Modular connector D-sub 9-pin connector


on the KV unit side

Reference SG of the DC power supply type KV Nano Series devices is shared with the 0 V power
supply input terminal.
5-194 - KV Nano Series(terminal block type) User’s Manual -
5-9 Serial Communication

How to Connect to the VT3 Series

CPU BUILT-IN FUNCTIONS


To connect the KV Nano Series and a VT3 Series touch panel display, use a dedicated KV Series
program-controlled port, direct-connect cable (OP-26484: 5 m or OP-35403: 1 m).

 Connecting to PORT2 of a VT3

OP-26484:5 m
OP-35403:1 m

To PORT2 5

Serial Communication
To the modular connector
KV Nano Touch panel display
VT3 Series

 Connecting to PORT3 of a VT3

OP-26401
OP-26486

To PORT3

OP-24025:5 m
To the modular connector OP-24045:1 m
KV Nano Touch panel display
VT3 Series

Reference • You do not have to configure any settings on the KV Nano Series side.
• For details on connecting to a VT3 Handy Series or VT3-W4 Series device,
see the "VT3 PLC Connection Manual."
For details on the settings on the VT3 side, see the "VT3 PLC Connection
Manual."

- KV Nano Series(terminal block type) User’s Manual - 5-195


5-9 Serial Communication

How to Connect to Other Peripherals


CPU BUILT-IN FUNCTIONS

To connect the KV Nano Series to peripherals, see the following diagram for wiring to a PC, and
connect the devices according to the shape of the connector on the peripheral that you are using.

KV side PC side, D-sub 9-pin KV side PC side, D-sub 25-pin


RD 3 3 SD RD 3 2 SD
SD 5 2 RD SD 5 3 RD
5V 1 6 DR +5V 1 6 DR
+5V 2 4 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

5
*3.9kΩ 1/4W *3.9kΩ 1/4W
Pin numbers on the
KV unit side Straight cable OP-26487 Straight cable OP-26487
+ +
On the unit side, pins 1 and D-sub 9-pin connector OP-26486 D-sub 25-pin connector OP-26485
Serial Communication

2 are the 5 V power supply. (cross-over wiring) (cross-over wiring)


On the unit side, pins 4 and
6 are the GND.
KV side PC side, D-sub 9-pin KV side PC side, D-sub 25-pin
RD 3 3 SD RD 3 2 SD
SD 5 2 RD SD 5 3 RD
+5V 1 6 DR +5V 1 6 DR
+5V 2 4 ER +5V 2 20 ER
SG 6 7 RS SG 6 4 RS
SG
   
4 8 CS SG
   
4 5 CS
5 SG 7 SG
8 CD
Straight cable OP-26487 Straight cable OP-26487
+ +
D-sub 9-pin connector OP-26401 D-sub 25-pin connector OP-96369
(cross-over wiring) (cross-over wiring)

Reference When you are connecting a modem, use a cross-over cable such as OP-96607 instead of
OP-26487.

5-196 - KV Nano Series(terminal block type) User’s Manual -


5-10 I/O
The KV Nano Series has built-in I/O. In addition to general I/O, you can use the functions listed below.
KV-N14**: 8 inputs and 6 outputs
KV-N24**: 14 inputs and 10 outputs

CPU BUILT-IN FUNCTIONS


KV-N40**: 24 inputs and 16 outputs
KV-N60**: 36 inputs and 24 outputs

Item See Page


Interrupt input "4-7 Interrupts" (page 4-76)
High-speed counter "5-4 High-Speed Counter" (page 5-98)
Frequency counter "5-5 Frequency Counter" (page 5-156)
Cam switch "5-6 Cam Switch" (page 5-163)
"5-3 Specified Frequency Pulse Output" (page
Specified frequency pulse output

Motor (positioning) control


5-95)
"5-2 Motor (Positioning) Control" (page 5-4)
5

I/O
Input time constant setting "Input Time Constant Setting" (page 5-198)
Input refresh disabling "Input Refresh Disabling" (page 5-199)
Output disabling "Output Disabling" (page 5-200)

General I/O

If the base unit's I/O is not used for interrupt input, for the high-speed counter, for the frequency
counter, for the cam switch, for specified frequency pulse output, or for motor (positioning) control, this
I/O can be used as general I/O.
For terminal numbers of I/O, see "Specifications" (page 2-9).
Useful usage methods when using I/O as general I/O are described below. In addition, these methods
can also be used in the same manner with expansion I/O units.

 I/O Refresh
Normally, during program execution, the status of I/O signals is updated (refreshed) only once per scan
(during END processing). You can use the following methods to update the I/O signals at arbitrary
positions in programs (direct processing).

 Direct I/O (DR)


Use the instruction operand to set the relay number to specify as "DR," not "R."

Example
DR000 DR500

DR can only be used with the built-in I/O of the KV Nano Series.

 I/O refresh instruction (RFSX and RFSY)


Use these instructions to refresh multiple bits of the I/O status at the same time.
For details, see the RFSX and RFSY instructions in the KV-7000/5000/3000/1000 Series and KV Nano Series
"Instruction Reference Manuals."

 Interrupt processing
During interrupt processing, the base unit input relays will be refreshed before the program is executed.
In addition, when the SET or RES instruction is executed, the base unit output relays are refreshed
immediately without waiting for the program's END processing.
"4-7 Interrupts" (page 4-76)
- KV Nano Series(terminal block type) User’s Manual - 5-197
5-10 I/O

Input Time Constant Setting


CPU BUILT-IN FUNCTIONS

The input time constant switching function can set the input time constant as the pulse width that is
accurately acquired as signals from the input contact. If you make the input time constant small, you
can obtain pulses with a narrower width. On the other hand, if you make the input time constant large,
the input time constant can be used as a simple noise filter.
If you connect a non-contact signal in which chattering does not occur or when you are acquiring high-
speed signals from an encoder or similar device, you can handle high-speed signals by reducing the
input time constant.

Reference There are three methods to set the input time constant: using the high-speed instruction

5 (HSP), using a control relay and a control memory entry (CR2305 and CM1620), and
using the Unit Editor. (Expansion I/O units can only be set from the Unit Editor.)
"Chapter 3 UNIT EDITOR" in the "KV STUDIO User's Manual"
I/O

 High-speed instruction (HSP)


You can use the HSP instruction to set the input time constants of the specified input relay (R000 to
R015) to 10 µs.
For details, see the HSP instruction in the KV-7000/5000/3000/1000 Series and KV Nano Series "Instruction
Reference Manuals."

 Control relay and control memory entry (CR2305 and CM1620)


By setting control relay CR2305 and control memory entry CM1620, you can switch the input time
constant of the input relays of the KV Nano Series.
Normally, the input time constant is 10 ms, but if you turn ON control relay CR2305, you can change the
input time constants of all the input relays at once to the value that you set with CM1620.
Control Relay Operation Details
OFF  ON: The value of CM1620 is applied on the rising edge of CR2305.
CR2305
OFF: The input time constant is fixed to 10 ms.

Control Memory Value Input Time Constant


0 10 µs
1 20 µs
2 500 µs
3 1 ms
CM1620 4 2.5 ms
5 5 ms
6 10 ms
7 110 µs
8 or more Do not specify these values.

If the HSP instruction and control relay CR2305 are used at the same time, the HSP instruction is given
priority, so the input time constants of the specified relays will not be set to the value specified with
CM1620.

Example
The input time constant is set to 1 ms.
CR2008 #3 CM1620 CR2305
LDA STA SET

The input time constant is set when the scan is completed. Therefore, changes
Point
that you specify will be enabled starting with the next scan.

5-198 - KV Nano Series(terminal block type) User’s Manual -


5-10 I/O

 Unit Editor
You can use the Unit Editor to change the input time constant of the input relays of the KV Nano Series.

CPU BUILT-IN FUNCTIONS


5

I/O
Input Refresh Disabling

If you disable input refreshing, the input relay (built-in input relays and relays assigned to the expansion
input units) status will not be updated according to the actual input signals. Because the actual input
relay settings can be forcibly turned ON and OFF during monitoring with KV STUDIO, you can use this
function to perform debugging that is not influenced by the connection status of peripherals.

When input refreshing is disabled, the following functions cannot be disabled.


Point
• Interrupt
• High-speed counter (excluding the internal clock)
• Positioning (origin sensor, stop sensor, Z-phase, and limit switch)
• Input indicators on the unit surface

Reference When you are using expansion I/O units, you can perform forced sets and forced resets
from KV STUDIO.
See "Forced Set/reset Register" in the "KV STUDIO User's Manual."

 Using KV STUDIO to disable and enable input refreshing


While using KV STUDIO to perform monitoring, you can use the menu to disable and enable input
refreshing.

1 On the "Debug" menu, click "Inhibited Input refresh."


When input refreshing is disabled, a check mark is displayed next to the menu item, and "input refresh
inhibited" is displayed in the status bar. To enable input refreshing, click the menu item while input
refreshing is disabled.

 Using a control relay (CR2301) to disable and enable input refreshing


You can turn CR2301 ON and OFF to enable and disable input refreshing, respectively.
Control Relay Operation Details
ON: Input refresh processing will be disabled during end processing.
Input relay contents will not be updated.
CR2301 OFF: Input refresh processing will be performed during end processing.
Input relay contents will be updated according to the status of the input
signal.

- KV Nano Series(terminal block type) User’s Manual - 5-199


5-10 I/O

 Using an extension access window cassette to enable input refreshing (the


cassette cannot be used to disable input refreshing)
CPU BUILT-IN FUNCTIONS

If you are using an extension access window cassette with the KV Nano Series, you can enable input
refreshing by operating the extension access window cassette.
See "Debugging" (page 5-239)

Reference • When you use the RUN-PROG selector switch to switch between RUN mode and
PROG mode, input refreshing is enabled (it is not enabled when you switch between
RUN mode and PROG mode from the KV STUDIO monitor).
• When input refreshing is disabled, the RUN LED blinks (it does not blink during PROG
mode).
• The function is also enabled when you turn the power off, clear the RAM, or execute an

5 all clear operation.

Output Disabling
I/O

If you disable output, output is not generated to the output relays (built-in output relays and relays
assigned to the expansion output units) even if you turn the output coil ON and OFF in your program, so
you can debug the program without actually generating output to the peripherals.

• When you turn ON CR2300, all outputs are turned OFF.


Point
For example, if you turn ON CR2300 during positioning pulse output, the pulse
output from the output terminal is stopped (output is turned OFF). However,
because operations continue internally, when you turn OFF CR2300, output
starts again (the pulse output while CR2300 is turned ON is handled as if it were
output).
• Even while output is disabled, if output is turned ON during an interrupt, there
are times when the output is turned ON within one scan.

 Using KV STUDIO to disable and enable output


While using KV STUDIO to perform monitoring, you can use the menu to disable and enable output.

1 On the "Debug" menu, click "Inhibited output."


When output is disabled, a check mark is displayed next to the menu item, and "Output inhibited" is
displayed in the status bar. To enable output, click the menu item while output is disabled.

 Using a control relay (CR2300) to disable and enable output


Use CR2300 to enable and disable the output of the base unit and of the relays assigned to the
expansion output units.
Control Relay Operation Details
ON: Output processing will be disabled (turned OFF) during end processing.
CR2300 OFF: Output processing will be performed during end processing.
The contents of the output coil will be generated during output.

 Using an extension access window cassette to enable output (the cassette


cannot be used to disable output)
If you are using an extension access window cassette with the KV Nano Series, you can enable output
by operating the extension access window cassette.
"Debugging" (page 5-239)

5-200 - KV Nano Series(terminal block type) User’s Manual -


5-10 I/O

Reference • When you use the RUN-PROG selector switch to switch between RUN mode and
PROG mode, output is enabled (it is not enabled when you switch between RUN mode

CPU BUILT-IN FUNCTIONS


and PROG mode from the KV STUDIO monitor).
• When output is disabled, the RUN LED blinks (it does not blink during PROG mode).
• Forced sets and resets are also cleared when you turn the power off, clear the RAM, or
execute an all clear operation.

Forced Set and Reset Registration

You can forcibly set and reset the specified device while ignoring the refresh status and the ladder
program. 5
Because you can even forcibly set and reset the relay numbers that are actually assigned to I/O, this

I/O
enables you to debug problems efficiently.

Reference • You can only specify the R and B devices (excluding local devices).
• You can specify up to 16 devices.
• You can use ladder programs, communications, and similar methods to change the
target device, but it will be overwritten with the value registered to forced sets and
resets during END processing.

When the forced set or reset is cleared on a relay, the relay temporarily returns to
Point
its initially registered state. Therefore, forced set or reset relays that are actually
turned ON may be turned OFF for a moment when the forced set or reset is
cleared.

 Using KV STUDIO to register and clear forced sets and resets


While using KV STUDIO to perform monitoring, you can use the menu to register and clear forced sets
and resets.

1 On the "Debug" menu, click "Forced set/reset register."


When you register a forced set or reset, the corresponding cell in the "Forced set/reset register" dialog
box is displayed in red, and the message "Forced set/reset registration" blinks in the KV STUDIO
toolbar.

 Using an extension access window cassette to clear forced sets and resets (the
cassette cannot be used to perform registrations)
You can use an extension access window cassette to clear forced sets and resets.

Reference • When you use the RUN-PROG selector switch to switch between RUN mode and
PROG mode, forced sets and resets are cleared. (They are not cleared when you
switch between RUN mode and PROG mode from the KV STUDIO monitor.)
• When forced sets or resets are registered, the RUN LED blinks (it does not blink during
PROG mode).
• Forced sets and resets are also cleared when you turn the power off, clear the RAM, or
execute an all clear operation.

- KV Nano Series(terminal block type) User’s Manual - 5-201


5-11 Access Window
This section explains the access window functions that you can use when you have attached an
extension access window cassette (KV-N1AW). These access window functions can be used to easily
monitor and change the data of the base unit.
CPU BUILT-IN FUNCTIONS

What You Can Do with the Access Window

You can install an extension access window cassette (KV-N1AW) in the KV Nano Series.
The KV-N1AW is a compact, two-color, back-lit LCD display.
The LCD is displayed in green in RUN mode and in red in PROG mode (when operations are stopped).

5 ・ロード
Load/Save

Axis1
CPU monitor

・セーブ ポイントNo.  0
Access Window

・プロパティ P     +0
・アキヨウリョウ V     0

・Load Axis1
・Save PointNo.  0
・Properties P     +0
・Data Clear V     0

I/O test User-defined message

CPU 36IN ユーザーメッセージ2


76543210
000________ STOP!!
008________

CPU 36IN Usr Message2


76543210
000________ STOP!!
008________

Alarm history Device display Clock

リレキ 01/31 センサー A 2012/06/14


アツリョクイジョウ OFF 12:34:56
2012/06/14 RLY1 Thu
10:10:10 OFF

Record 01/31 Sensor A 2012/06/14


Temp. Alarm OFF 12:34:56
2012/06/14 RLY1 Thu
10:10:10 OFF

Reference You can install cassettes in the left side and right side of the KV-N40** and KV-N60** base
units. However, you cannot use a base unit when two cassettes are installed in it.

5-202 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

 List of functions
You can attach one extension access window cassette (KV-N1AW) to the KV Nano Series, and by

CPU BUILT-IN FUNCTIONS


doing so, easily change and monitor data. Also, in the rare event that an error occurs, you can use the
access window to check the error code.
The access window has the following functions.

Device mode
This mode can be used to display internal devices and change their settings.
"Device Mode" (page 5-206)

Error clear
This mode can be used to clear serious base unit errors.
"Error Clear" (page 5-214)
5

Access Window
I/O test
This mode can be used to check the I/O status of the base unit or expansion I/O units.
"I/O Test" (page 5-216)

Display and setting of time


This mode can be used to display the CPU's built-in clock and to set the time.
"Clock" (page 5-218)

CPU monitor
This mode can be used to monitor the status of the CPU's positioning and frequency counter functions.
Also, you can check the project names of the programs that are contained in the main unit.
"CPU Monitor" (page 5-221)

Alarm monitor
This mode can be used to monitor alarms and to check the alarm log.
"Alarm" (page 5-227)

Load and save


This mode can be used to perform access window memory operations such as saving and loading files
and displaying the list of files.
"Load and Save" (page 5-230)

Debugging
This mode can be used to clear forced sets and resets that have been registered and to enable input
refreshing and output from the access window.
* You can only register forced sets and resets and disable input refreshing and output from KV STUDIO.
"Debugging" (page 5-239)

Access window setup


This mode can be used to configure access window display settings such as the access window
contrast and display language.
"Contrast" (page 5-241)

- KV Nano Series(terminal block type) User’s Manual - 5-203


5-11 Access Window

RAM clear
This mode can be used to clear device values.
"RAM Clear" (page 5-241)
CPU BUILT-IN FUNCTIONS

All clear
This mode can be used to clear all of the settings.
"All Clear" (page 5-242)

 Menu Structure
Use the menu screen to switch between modes.
Press "M" to display the menu. (If a different unit is selected, press "M" twice.)
5 Press "▼" to display the menu items that are not displayed on the screen. Press "" and "" to move
through the pages of the menu.
Access Window

1.デバイスモード 1.DeviceMode
2.エラークリア 2.ErrorClear
3.LANGUAGE 3.Language
4.I/Oテスト 4.I/O TEST

In the examples shown, Japanese characters are shown on the left and English characters are shown
on the right.

Reference The default language is English. To switch between Japanese and English:
• Use "3.Language" to configure the setting.
"Language" (page 5-215)
• Use the access window initial screen display function.
"Access Window Initial Screen Display Function" (page 5-243)

The menu items are shown below.

Japanese English Japanese English


1.デバイスモード 1.DeviceMode 7.アラーム 7.Alarm
2.エラークリア 2.ErrorClear 8.ロード/セーブ 8.Load/Save
3.LANGUAGE 3.Language 9.デバッグ 9.Debug
4.I/Oテスト 4.I/O TEST 10.コントラスト 10.Contrast
5.トケイ 5.Date/Time 11.RAMクリア 11.RAMClear
6.CPUモニタ 6.CPUMonitor 12.オールクリア 12.All Clear
Reference If a serious error has occurred and has not been cleared, is displayed in the upper right
of the access window.
1.DeviceMod
2.ErrorClear
3.Language
4.I/O TEST

For details on how to clear errors, see "Error Clear" (page 5-214).

5-204 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

The access window menu structure is shown below.

1.DeviceMode

CPU BUILT-IN FUNCTIONS


2.ErrorClear
3.Language
4.I/O TEST
5.Date/Time
6.CPUMonitor ProjectName
AxisControl
FreqCounter
Serial
Volume 5
7.Alarm Monitor

Access Window
Record
ClearRecord
8.Load/Save Load
Save
Properties
Data Clear
Data Lock
9.Debug ForcedSet
Input
Output
10.Contrast

11.RAMClear
12.All Clear

- KV Nano Series(terminal block type) User’s Manual - 5-205


5-11 Access Window

 Names and Functions of Parts


CPU BUILT-IN FUNCTIONS

(1) Access window

(2) Setup operation keys

5
Access Window

(1) Access window.................Displays the current values and set values of each device as well as
error messages.

(2) Setup operation keys........These keys are used to move between modes and to change the
settings of each mode. The functions of the keys differ depending on the
mode. For details, see the operating instructions for each mode.

Unit Monitor

You cannot monitor and configure the settings of expansion units and special units, such as I/O units,
that are connected to the base unit. Use the input indicator of each unit to monitor the units.

Device Mode

This mode can be used to monitor and change the PLC device values.

 Devices That Can Be Displayed and Whose Settings Can Be Changed


The following table lists the devices that can be displayed and whose settings can be changed.

Display Name Display Name


R Relay CM Control memory
MR Internal auxiliary relay TM Temporary data memory
LR Latch relay T Timer
B Link relay C Counter
CR Control relay CTH High-speed counter
DM Data memory CTC High-speed counter comparator
W Link register Z Index register

You cannot monitor the status of the contacts of timers, counters, and high-speed
Point
counter comparators.

5-206 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

 XYM marking
Relays (R), internal auxiliary relays (MR), latch relays (LR), and data memory entries (DM) can be

CPU BUILT-IN FUNCTIONS


displayed with XYM marking.
The marking switches between default marking and XYM marking automatically according to the
project settings (in KV STUDIO, click "Tools," "Options," "Display mode setting," and then "XYM
marking").

Device Number
Device Name Default Marking XYM Marking
during XYM Marking
Input X 0000 to 599F
Relay R Output Y 0000 to 599F
Internal auxiliary R 0000 to 59915
Internal auxiliary relay MR M 00000 to 9599 5
Latch relay LR L 00000 to 3199

Access Window
Data memory DM D 00000 to 32767

 Functions of Setup Operation Keys


The functions of the keys in device mode are shown in the following table.
Setup Operation
General Function When Changing Numerical Values
Key
M Displays the menu. Displays the menu.
Registers and cancels the value being
changed.
Switches to numerical value change
Hold down this key for 1 second or more to
mode.
register the value being changed.
Hold down this key for 1 second or more.
Hold down this key for less than 1 second
to cancel the value being changed.
Increments and decrements the value
 and  Selects the device number.
being changed.
Selects the device.
Selects the digit of the value being
Selects the display attribute.
changed.
Selects the device name notation.

 Operating Instructions

 Switching to device mode

1 Press "M."
A menu is displayed. (If a different unit is selected, press "M" twice.)

2 Select "1.DeviceMode," and then press " ."


The monitor screen is displayed in the device mode.

R0
OFF
R1
OFF

You can use the "" and "" keys to change the number of the device that you are monitoring.

- KV Nano Series(terminal block type) User’s Manual - 5-207


5-11 Access Window

 Changing the type of device that you are monitoring


1 In device mode, press " ."
CPU BUILT-IN FUNCTIONS

R500
ON
R501
OFF

2 A list of device types is displayed.


Use the "" and "" keys to select the type of device that you want to display.
As an example, we will select "TM."

5 ・R
・MR
・LR
Access Window

・B

The device types are displayed in the following order: R  MR  LR  B  CR  DM  W  CM  TM 


T  C  CTH/CTC  Z. If you press "" while Z is selected, the selection will loop back to R.
In the same manner, if you press "" while R is selected, the selection will loop back to Z.

3 "•TM" flashes.
Press " ."
・DM
・W The screen for selecting the number of
・CM the device that you want to display
・TM
appears.
ジャンプ JUMP The current device number blinks on
TM TM
the third line from the top.
0 0
10 10

The numerical value displayed on the fourth line is the amount to change the device number by.
Use the "" and "" keys to change the device number.
In the example shown here, each time you press "," the device number will increase by 10.
Press " " to switch the amount to change the device number by between 1 and 10.
Use the "," "," and " " keys to select the number of the device that you want to display.
Press " " to display the TM of the specified number.
TM53
0
TM54
100

5-208 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

 Changing the Device Value Display Format

1 In device mode, press " ."

CPU BUILT-IN FUNCTIONS


R500
ON
R501
OFF

2 With the list of device types displayed, press " ."

・R
・MR
・LR
・B 5

Access Window
3 The display format selection screen appears.

ヒョウジケイシキ Disp Format

16Bit-BASE10 16Bit-BASE10
フゴウナシ UnSigned

4 Select the display format.


Use the "" and "" keys to select the display format.

ヒョウジケイシキ Disp Format

On/Off On/Off

5 Press " " to apply the selected display format.


The display format selected here is applied to all devices.

R500
ON
R501
OFF

The display formats that you can select are shown in the following table.

Japanese English Display Contents


デフォルト Default Vary depending on device type (see appendix)
On/Off On/Off ON/OFF display
16Bit-BASE10フゴウナシ 16Bit-BASE10 unsigned Data width 16-bit unsigned, decimal display
16Bit-BASE10フゴウツキ 16Bit-BASE10 signed Data width 16-bit signed, decimal display
16Bit-BASE16 16Bit-BASE16 Data width 16-bit, hexadecimal display
16Bit-BASE2 16Bit-BASE2 Data width 16-bit, binary display
32Bit-BASE10フゴウナシ 32Bit-BASE10 unsigned Data width 32-bit unsigned, decimal display
32Bit-BASE10フゴウツキ 32Bit-BASE10 signed Data width 32-bit signed, decimal display
32Bit-BASE16 32Bit-BASE16 Data width 32-bit, hexadecimal display

- KV Nano Series(terminal block type) User’s Manual - 5-209


5-11 Access Window

Displayable formats of devices


DD: Can be displayed (default). D: Can be displayed. N: Cannot be displayed.
CPU BUILT-IN FUNCTIONS

16Bit- 16Bit- 32Bit- 32Bit-


16Bit- 16Bit- 32Bit-
Device Type On/Off BASE10 BASE10 BASE10 BASE10
BASE16 BASE2 BASE16
unsigned signed unsigned signed
R, MR, LR, B, CR DD D D D D N N N
DM, W, CM, TM N DD D D D D D D
T, C, CTH, CTC N N N N N DD D D
Z N N N N N N DD D
The display formats that you can select vary according to the device type. If you select a display format
that cannot be applied, the default display format is applied.

5  Switching between displaying the device name and comments


1
Access Window

In device mode, press " ."

R500
ON
R501
OFF

2 With the list of device types displayed, press " ."

・R
・MR
・LR
・B

3 On the display format selection screen, press " ."

ヒョウジケイシキ Disp Format

Default Default

4 The screen for selecting whether to display the device name or comments appears.
Use the "" and "" keys to select whether to display the device name or comments.
Press "" to display "Comment."

デバイスメイヒョウキ Device Name

コメント Comment

5 Press " " to select the comment display and return to the device mode monitor.
In the example shown in the following screens, the comment "Sensor A" is registered in R0, and no
comment is registered in R1.

センサー A Sensor A
OFF OFF
R1 R1
OFF OFF

5-210 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

Comments that can be displayed in the access window


• Up to 12 single-byte alphanumeric characters can be displayed. Comment text from the 13th
character cannot be displayed.

CPU BUILT-IN FUNCTIONS


• The characters that can be displayed are ASCII codes 20 to 7E and A1 to DF (hexadecimal). If
characters other than these are used, the device name is displayed.
• CTH comments are not displayed. CTC comments are displayed.
• You cannot set comments for Z devices.

 Changing device values


• When the display format is On/Off

1 With the device that you want to change displayed, hold down " " for 1 second or more.
5

Access Window
If two devices are displayed on the screen, the device whose value can be changed is the device
displayed on the higher row. (In this situation, when you press the key, the device on the lower row is
hidden.)

R1000
OFF
R1000
OFF

2 The value of the device blinks.


Press "" and "" to switch the value in the following order: ON  OFF  ON  etc.
(The device value will not be stored at this point in time.)

R1000
OFF

3 Set the device value to the value that you want to store, and then hold down " " for 1 second
or more.
The value stops blinking, and is stored. If you hold down the key for less than 1 second, the value is not
stored, and the screen returns to the monitor display.

R1000
ON

- KV Nano Series(terminal block type) User’s Manual - 5-211


5-11 Access Window

• When the display format is a format other than On/Off (excluding T, C, and CTH/CTC devices)
As an example, the following explains how to change the value of DM1000 from 100 to 201.

1
CPU BUILT-IN FUNCTIONS

With the device that you want to change displayed, hold down " " for 1 second or more.

DM1000
100
DM1001
101

2 The value of the device that you want to change blinks.


The change amount is displayed on the bottom row of the screen.

5 DM1000
100
Access Window

3 Press "."
The change amount is added to the device value. The device value display changes to "101."
(The value will not be stored in the device at this point in time.)

DM1000
101

4 Press " " once.


The digit that the change amount modifies is changed. Each time that you press this key, the digit that
the change amount modifies changes by a single digit.
If you want to change the value's hundreds digit, press this key twice.

DM1000
101

10

5 The change amount value changes to "100."

DM1000
101

100

6 Press "" once.


The change amount of 100 is added to the device value. The device value display changes to "201."
(The value will not be stored in the device at this point in time.)

DM1000
201

100

7 Set the device value to the value that you want to store, and then hold down " " for 1 second
or more.
The value is stored, and the screen returns to the monitor display.

If you hold down the " " key for less than 1 second, the value is not stored, and the screen returns to
the monitor display.

5-212 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

• When the display format is a format other than On/Off (T, C, or CTH/CTC devices)
You can change both the set value and the current value for T, C, and CTH/CTC devices.

CPU BUILT-IN FUNCTIONS


T0 Current value of C50 Current value of
100 the timer 200 the counter
S 5000 S 6000
Set value of the timer Set value of
the counter

CTH0 CTC0 CTH value


300 (high-speed counter)
S 6000
CTC value
(high-speed counter comparator)
C0
-----
If a device is not being used by a ladder program
(the device is not registered), it is displayed as shown
5
S -----

Access Window
in the figure to the left.

<How to change set values>


When you want to change device values, hold down the " " key for 1 second or more to change the
following items.
T: Timer set value
C: Counter set value
CTH/CTC: CTC (high-speed counter comparator)

<How to change current values>


While holding down the " " key, hold down " " for 1 second or more to change the following
items.
T: Timer current value
C: Counter current value
CTH/CTC: CTH (high-speed counter current value)

- KV Nano Series(terminal block type) User’s Manual - 5-213


5-11 Access Window

Error Clear
CPU BUILT-IN FUNCTIONS

This mode can be used to clear serious base unit errors.

Reference If an error occurs on the base unit or on an expansion unit, the detailed information of the
error is displayed automatically. If the error is minor, you can press any key on the access
window to clear the error and return to the previous display. If the error is serious, the
error display will be cleared, but the error itself will not be. The error will be displayed
again if you do not perform any operations on the access window for 30 seconds or when
you switch the RUN PROG selector switch to RUN. Also, " " is displayed in the upper
5 right of the access window screen even during the normal screen display.

1.DeviceMod
Access Window

2.ErrorClear
3.Language
4.I/O TEST

For details about errors, see "Error handling" (page 4-64).

 Functions of setup operation keys


The functions of the keys when you are clearing errors are shown in the following table.

Setup Operation Key Function


M Displays the menu.
Hold down for 1 second or more to clear the error.
Pressing this key has no effect if you hold it down for less than 1 second. Also,
pressing this key has no effect when no error has occurred.
 No effect.
 No effect.
No effect.

 Operating instructions

1 Press "M."
A menu is displayed. (If a different unit is selected, press "M" twice.)

2 Select "2.ErrorClear," and then press " ."


One of the following screens is displayed.

• Screen example when an error has occurred

エラークリア Error Clear


No.40 No.40
ラダーナシ No Ladder

• Screen example when no error has occurred

エラークリア Error Clear

エラーナシ No Error

5-214 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

3 If an error has occurred, hold down " " for 1 second or more.
The displayed serious error is cleared.

CPU BUILT-IN FUNCTIONS


If multiple serious errors have occurred, the other serious errors will be displayed, so hold down " "
for 1 second or more to clear each of the other errors. When all the serious errors have been cleared,
"No Error" is displayed.

Language

You can switch the display language between Japanese and English. For Japanese, text will be
displayed in Katakana.

1 Press "M." 5
A menu is displayed. (If a different unit is selected, press "M" twice.)

Access Window
2 Use the "" and "" keys to select "3.Language," and then press " ."

3 Hold down " " for 1 second or more.

Language Language

Japanese English

4 Use the "" and "" keys to switch between Japanese and English.

Language Language

English Japanese

5 Hold down " " for 1 second or more.


This sets the language.

Reference Even if you change the language to Japanese, the text displayed on the Language menu
will not be displayed in Japanese.
To confirm the language, press "M" to display the menu.

- KV Nano Series(terminal block type) User’s Manual - 5-215


5-11 Access Window

I/O Test
CPU BUILT-IN FUNCTIONS

This mode can be used to check the I/O status of the base unit's built-in I/O and of the expansion I/O
units.

Point This mode can only be executed in PROG mode.

Reference You can even check the I/O status when projects that include the settings of the unit
structure that you configure in KV STUDIO have not been transmitted to the base unit.

 Functions of setup operation keys


5
Setup Operation Key Function
Access Window

M Returns to the unit selection screen


Input unit : No effect
Output unit : Inverts the output status (ON/OFF) at the cursor position
Input unit : Moves the displayed number of points by 16 bits
 and 
Output unit : Moves the displayed number of points by 8 bits
Input unit : No effect
Output unit : Moves the cursor position forward by 1 bit

 Operating instructions
 Switching to I/O test
1 Press "M."
A menu is displayed. (If a different unit is selected, press "M" twice.)

2 Select "4.I/O TEST," and then press " ."


The following screen appears. (If your system only has a base unit, this screen will not be displayed.)

I/Oテスト I/O TEST


ユニット No.ヲ Select
センタクシテクダサイ Unit No.
0(CPU) 0(CPU)

3 Press "" and "" to select the unit, and then press " ."
The I/O status of the selected unit is displayed (to display the status of the base unit, select unit number
0).

No.1 32IN No.1 32IN


76543210 76543210
0 0 _ _ _ _ _■_ _ 0 0 _ _ _ _ _■_ _
08________ 08________

 Input units
The unit's number of points (8 or 16) and "IN" is displayed.

No.1 32IN No.1 32IN


76543210 76543210
0 0 _ _ _ _ _■_ _ 0 0 _ _ _ _ _■_ _
08________ 08________

You can use the "" and "" keys to move the relay position that you want to check. The position is
moved in 16-bit intervals.

5-216 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

 Output units
The unit's number of points (8 or 16) and "OUT" is displayed.

CPU BUILT-IN FUNCTIONS


No.1 16OUT No.1 16OUT
76543210 76543210
00________ 00________
08________ 08________

You can use the "" and "" keys to move the relay position that you want to check. The position is
moved in 8-bit intervals.
You can use the " " key to invert the output status (ON/OFF) at the cursor position.
You can use the " " key to change the cursor position.

Operate this mode after first sufficiently confirming the status of the connected
5
Point
control equipment.

Access Window
 I/O units
The unit's number of points (8 or 16) and "IN" or "OUT" is displayed.

No.1 32IN No.1 32IN


76543210 76543210
0 0 _ _ _ _ _■_ _ 0 0 _ _ _ _ _■_ _
08________ 08________

You can use the "" and "" keys to move the relay position that you want to check. The position is
moved in 8-bit intervals.
You can use the " " key to invert the output status (ON/OFF) at the cursor position.
You can use the " " key to change the cursor position.

Operate this mode after first sufficiently confirming the status of the connected
Point
control equipment.

- KV Nano Series(terminal block type) User’s Manual - 5-217


5-11 Access Window

Clock
CPU BUILT-IN FUNCTIONS

You can display and set the date and time.


The time is displayed in 24-hour format.
The day of the week is displayed as shown below.
S u n : Sunday T h u : Thursday 2012/06/14
12:34:56
M o n : Monday F r i : Friday
Thu
T u e : Tuesday S a t : Saturday
W e d : Wednesday

5 The clock function cannot be used with the KV-N14**. All the information is
Point
displayed as "-."
Access Window

 Functions of setup operation keys


The functions of the keys when you are setting the date and time are shown in the following table.

Setup Operation Key Function


M Displays the menu.
Switches the item that you are setting.
Enables and disables the 0-second adjustment function.
Increments the values of the items by one when you are setting the date and

time.
Decrements the values of the items by one when you are setting the date and

time.
In the date/time display, hold down this key for 1 second or more to set the date
and time.
While you are setting the date and time, hold down this key for 1 second or
more to apply the settings.
During 0-second adjustment, hold down this key for 1 second or more and then
release the key to execute the adjustment.

 Operating instructions
 Switching to the clock
1 Press "M."
A menu is displayed. (If a different unit is selected, press "M" twice.)

2 Select "5.Date/Time," and then press " ."


The following screen appears.

2012/06/14
12:34:56
Thu

5-218 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

 Setting the date and time


1 While the date and time is displayed, hold down " " for 1 second or more.

CPU BUILT-IN FUNCTIONS


The year item blinks.

2012/06/14
12:34:56
Thu

2 Use the " " key to select the item that you want to set.
Each time that you press " ," the item being set switches in the following order: year  month  day
 hour  minute  second  day of the week  year. 5

Access Window
2012/06/14
12:34:56
Thu

3 Use the "" and "" keys to set the selected item.

2012/06/14
12:34:56
Thu

4 Repeat steps 2 and 3. When you are finished configuring the settings, hold down " " for 1
second or more.
"Exec" is displayed on the right side of the bottom row to indicate that the request to change the date
and time settings has been received.
(The settings have not been applied at this point in time.)
Release the " " key to apply the date and time settings and return to the date and time display.

2012/06/14 2012/06/14
12:34:56 12:34:56
Thu Thu
ジッコウ Exec

If you release the " " key before "Exec" is displayed, the date and time settings will not be applied,
and the screen will return to the date and time display.

Set the year, month, day, hour, minute, second, and day of the week accurately.
Point
If the day of the week matches the year, month, day, hour, minute, and second is
not checked.

- KV Nano Series(terminal block type) User’s Manual - 5-219


5-11 Access Window

 0-second adjustment
0-second adjustment is a function for setting the seconds value to 0.
CPU BUILT-IN FUNCTIONS

Current Seconds Value Operation


0 to 29 The seconds value is set to 0 only.
30 to 59 The minutes value is increased by 1, and the seconds value is set to 0.

1 While the date and time is displayed, press " ."

2012/06/14 2012/06/14
15:59:44 15:59:44
Thu Thu
アジャスト Adjust
5 "Adjust" is displayed on the bottom row to indicate that the time can be adjusted.
Access Window

(To cancel time adjustment, press " " again. The string "Adjust" disappears, and the screen returns to
the date and time display.)

2 Hold down " " for 1 second or more.


"Exec" is displayed on the right side of the bottom row. (The time adjustment has not been
applied at this point in time.)
Release the " " key to apply the time adjustment.

2012/06/14 2012/06/14
16:00:00 16:00:00
Thu Thu
アジャスト ジッコウ Adjust Exec

If you release the " " key before "Exec" is displayed, the time adjustment will not be applied, and the
screen will return to the date and time display.

5-220 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

CPU Monitor

CPU BUILT-IN FUNCTIONS


You can use this mode to monitor the built-in functions of the base unit. You can also display the names
of the projects that are stored in the base unit.

 Items that can be monitored


The items that you can use the access window to monitor are shown below.

Japanese English Function


This displays the names of the projects stored in the base
プロジェクトメイ ProjectName
5
unit. (The names are set in KV STUDIO.)
イチギメ AxisControl You can monitor the CPU built-in positioning function.
シュウハスウカウンタ FreqCounter You can monitor the CPU built-in frequency counter.

Access Window
You can monitor the CPU built-in serial function and the
extension serial communication function. You can monitor
the mode, communication conditions, Modbus-related
settings, and PLC link-related settings.*1 The only settings
that you can change are "Baud Rate" in the
シリアル Serial
communication conditions and "Modbus No." (which can
only be changed in PROG mode) and "PLC Link Station
No." in the Modbus-related settings.
See the KV Nano Series "Serial Communication
Function User's Manual."
Turn the analog volume knob on the unit surface to
ボリューム Volume change this value. (You cannot change the value from the
access window.)
*1 When you are using the built-in serial communication port, you cannot perform monitoring.

 Operating instructions
 Switching to the CPU monitor
1 Press "M."
A menu is displayed. (If a different unit is selected, press "M" twice.)

2 Select "6.CPUMonitor," and then press " ."


The CPU monitor menu is displayed.

・プロジェクトメイ ・ProjectName
・イチギメ ・AxisControl
・シュウハスウカウンタ ・FreqCounter
・シリアル ・Serial

- KV Nano Series(terminal block type) User’s Manual - 5-221


5-11 Access Window

 Project name
1 Select "ProjectName" from the CPU monitor menu, and then press " ."
CPU BUILT-IN FUNCTIONS

The project name is displayed.

プロジェクトメイ Project Name

ProjectA ProjectA

Project names that can be displayed in the access window


• Up to 12 single-byte alphanumeric characters can be displayed.
• The characters that can be displayed are ASCII codes 20 to 7E and A1 to DF (hexadecimal).

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


Project names that are entered as access window display comments are stored in CM1757 to CM1763 after data is
Access Window

transmitted.
For details on the access window display comments, see the "KV STUDIO User's Manual."

Reference When you create a ladder program, the project name that you set with KV STUDIO is
stored in CM1740 to CM1756 after data is transmitted.

 Positioning
1 Select "Pos Control" from the CPU monitor menu, and then press " ."
The status of the positioning function is displayed.
The positioning monitor has five monitor functions.
You can switch between these functions by using the "" and "" keys.
The monitored contents are shown below.

• Monitoring the point number being executed, current value, and current speed of axis n (n: 1 to 4)
• During pulse output, an asterisk is displayed.

The axis number is displayed here.


When an error has occurred,
Axis1 Axis1 the error number is displayed here.
ポイントNo. 0 PointNo. 0
P +0 P +0 P Current value
V 0 V 0 V Current speed

• Monitoring the relays (which can be changed) related to axis n (n: 1 to 4)

Axis1 CR8000
76543210
L _ _ ■ _ ■ _ ■■ CR8000
H _ ■_■■ _ _ _ CR8008
CR8015

• Monitoring the relays (which cannot be changed) related to axis n (n: 1 to 4)

Axis1 CR8400
76543210
L _ _ ■_■ _■■ CR8400
H _ ■ _■■ _ _ _ CR8408
CR8415

5-222 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

 Frequency counter
1 Select "Freq Count" from the CPU monitor menu, and then press " ."

CPU BUILT-IN FUNCTIONS


The frequency counter monitor screen is displayed.
The display unit is "Hz" or "rpm" depending on the frequency counter setting.
Display example with the "Hz" unit

シュウハスウカウンタ Freq Counter


CH0 CH0
+12345 +12345
Hz Hz

Display example with the "rpm" unit

シュウハスウカウンタ Freq Counter 5


CH0 CH0

Access Window
+12345 +12345
rpm rpm

The display when you are not using the frequency counter is shown below.

シュウハスウカウンタ Freq Counter


CH0 CH0
_____ _____

You can use the "" and "" keys to change the channel number of the frequency counter that is
displayed.

 Serial
1 Select "Serial" from the CPU monitor menu, and then press " ."
The serial monitor screen is displayed.

2 Select the port number—internal port: 0, extension cassette (left): 1, and extension cassette
(right): 2—and then press " ."

* The figure to the left is an example.


You have to install an extension
access window cassette in the
KV Nano Series to use the access
window operations.

0 1 2

・Port0 ・Port0
・Port1 ・Port1
・Port2 ・Port2

The status of the serial communication function is displayed.


You can use the "▲" and "▼" keys to switch the display.

- KV Nano Series(terminal block type) User’s Manual - 5-223


5-11 Access Window

• Operation mode monitor

シリアル Port0  Serial Port0


CPU BUILT-IN FUNCTIONS

モード Mode
KVSモード KVS Mode

The mode of the serial communication function is displayed.

• Interface monitor

シリアル Port0  Serial Port0


インターフェース Interface
RS-232C RS-232C

5
The communication mode is displayed.
Access Window

• Baud rate setup and monitor

シリアル Port0  Serial Port0


ボーレート Baud Rate
ジドウ 115200
bps

The baud rate setting is displayed.


You can change the setting, but only during PROG mode.
• How to set the value
1. Hold down the " " key for 1 second or more.
The baud rate blinks.
2. Use the "▲" and "▼" keys to select the value.
3. Hold down the " " key for 1 second or more to apply the new value.

• Bit length monitor

シリアル Port0  Serial Port0


ビットチョウ Data Length
8Bit 8Bit

The bit length setting is displayed.

• Start bit monitor

シリアル Port0  Serial Port0


スタートビット Start Bit
1Bit 1Bit

The start bit setting is displayed.

• Stop bit monitor

シリアル Port0  Serial Port0


ストップビット Stop Bit
1Bit 1Bit

The stop bit setting is displayed.

5-224 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

• Parity monitor

シリアル Port0  Serial Port0

CPU BUILT-IN FUNCTIONS


パリティ Parity
グウスウ Even

The parity setting is displayed.

• RS/CS control monitor (* not displayed for the built-in ports)

シリアル Port1  Serial Port1


RS/CS セイギョ RS/CS
シナイ No Control

The RS/CS control setting is displayed.


5
• KV station number monitor (only during KV mode (Host link) and KV STUDIO mode; * not displayed

Access Window
for the built-in ports)

シリアル Port1  Serial Port1


KVキョクバン KV No.
0 0

The station number used during communication is displayed.

• Modbus station number monitor (only during Modbus slave mode)

シリアル Port0  Serial Port0


Modbusキョクバン Modbus No.
0 0

The station number used during Modbus communication is displayed.


If you have configured the settings so that the Modbus station number is set from the Unit Editor, this
setting can only be changed in PROG mode.
• How to set the value
1. Hold down the " " key for 1 second or more.
The baud rate blinks.
2. Use the "▲" and "▼" keys to select the value.
3. Hold down the " " key for 1 second or more to apply the new value.

• PLC link type monitor (only during serial PLC link mode; * not displayed for the built-in ports)

シリアル Port1  Serial Port1


PLCリンク シュベツ PLCLink Mode
マスタ Master

The type of the serial PLC link function is displayed.

• Serial PLC link station number monitor (only during serial PLC link mode; * not displayed for the built-
in ports)

シリアル Port1  Serial Port1


PLCリンクキョクバン PLCLink No.
0 0

The station number used during serial PLC link mode is displayed.

- KV Nano Series(terminal block type) User’s Manual - 5-225


5-11 Access Window

If you have configured the settings so that the serial PLC link station number is set from the Unit
Editor, this setting can only be changed in PROG mode.
• How to set the value
CPU BUILT-IN FUNCTIONS

1. Hold down the " " key for 1 second or more.


The baud rate blinks.
2. Use the "▲" and "▼" keys to select the value.
3. Hold down the " " key for 1 second or more to apply the new value.

• Monitor of the communication status (station number: 0 to 7) of serial PLC link communication (only
during serial PLC link mode; * not displayed for the built-in ports)

5
シリアル Port1 Serial Port1
PLCリンク ツウシン PLCLinkState
76543210 76543210
________ ________
Access Window

The communication status (station number: 0 to 7) of serial PLC link communication is displayed.

• Monitor of the communication status (station number: 8 to F) of serial PLC link communication (only
during serial PLC link mode; * not displayed for the built-in ports)

シリアル Port1 Serial Port1


PLCリンク ツウシン PLCLinkState
FEDCBA98 FEDCBA98
________ ________

The communication status (station number: 8 to F) of serial PLC link communication is displayed.

• Monitor of the error status (station number: 0 to 7) of serial PLC link communication (only during
serial PLC link mode; * not displayed for the built-in ports)

シリアル Port1  Serial Port1


PLCリンク エラー PLCLinkError
76543210 76543210
________ ________

The error status (station number: 0 to 7) of serial PLC link communication is displayed.

• Monitor of the error status (station number: 8 to F) of serial PLC link communication (only during
serial PLC link mode; * not displayed for the built-in ports)

シリアル Port1  Serial Port1


PLCリンク エラー PLCLinkError
FEDCBA98 FEDCBA98
________ ________

The error status (station number: 8 to F) of serial PLC link communication is displayed.

• Monitor of the period of serial PLC link communication (only during serial PLC link mode—master; *
not displayed for the built-in ports)

シリアル Port1 Serial Port1


PLCリンク シュウキ PLCLinkCycle
    5 5
ms ms

The period of serial PLC link communication is displayed.

5-226 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

 Volume
You can monitor the status of the analog volume knob. To change the value, turn the analog volume

CPU BUILT-IN FUNCTIONS


knob on the surface.

Reference • The display value of the analog volume knob is between 0 and 255.
• Even if you do not turn the analog volume knob, the value may change due to causes
such as changes in the temperature.
• When you turn the analog volume knob, the access window display automatically
switches to show the volume. However, the display does not change:
• During saving, loading, and data clearing.
• During all clear and RAM clear operations.
• During device value monitoring. 5
• Operating instructions

Access Window
Switching to the volume display

1 Select "Volume" from the CPU monitor menu, and then press " ."
The volume monitor screen is displayed.
Displays the CM1630 device
comment
Volume0 Volume0 ("Volume0" if no comment is set)
50 50
Volume1 Volume1
100 100
Displays the CM1632 device
comment

Alarm

If you register messages as device comments to the alarm relays (CR3300 to CR3415) in advance,
these messages are automatically displayed in the access window when the alarm relays are turned
ON. In addition, you can also view and clear the log of alarms that have occurred.The alarm can be
checked on the KV STUDIO error monitor.

 Usage method
The devices that you can use with alarms are shown below.

Control Relay R/W Description


These are the 32 alarm relays. Register device comments
CR3300 to CR3415 R/W
to these relays in advance.
Even if one alarm relay is turned ON, CR3500 will be
CR3500 R turned ON. When all the alarms that were turned ON are
turned OFF, CR3500 will be turned OFF automatically.
CR3501 R/W This saves the log of changes from ON to OFF.
The alarm relay log is cleared when this is changed from
CR3502 R/W
OFF to ON.

Be sure to use the SET and RES instructions to operate alarm relays. You can
Point
also use the ARES instruction to reset alarm relays during operation and to clear
all the alarm log entries at the same time.

- KV Nano Series(terminal block type) User’s Manual - 5-227


5-11 Access Window

 Registering alarm messages


Register device comments to alarm relays (CR3300 to CR3415).
CPU BUILT-IN FUNCTIONS

The access window can display messages that are up to 12 single-byte


Point
characters in length. If the message contains characters other than ASCII codes
20 to 7E and A1 to DF (hexadecimal), the alarm relay number is displayed instead
of the device comment. Also, the alarm relay number is displayed when no device
comment has been set.

 Alarm log

5 The base unit can save up to 16 alarm log entries.


If an attempt is made to save more than the 16th log entry, the log entries will be erased starting from
the oldest log entry, and the new log entry will be saved.
Access Window

Each log entry stores the alarm relay number, the time and date (year, month, day, hour, minute, and
second), and the ON/OFF status.
• When the ON  OFF log relay (CR3501) is turned OFF
The log is only saved when alarm relays switch from OFF to ON.
• When the ON  OFF log relay (CR3501) is turned ON
The log is saved when alarm relays switch from OFF to ON and from ON to OFF.
Turn CR3502 ON to clear the alarm relay log. When the clearing operation is finished, CR3502 will be
turned OFF.

 Items That Can Be Operated


The functions that can be operated from the access window are shown below.

Japanese English Setting Details


You can use this to monitor in real time the alarm relays that
モニタ Monitor
have been turned ON.
リレキ Record You can use this to monitor the alarm relay ON/OFF log.
リレキクリア ClearRecord You can use this to clear the alarm relay ON/OFF log.

 Operating Instructions
 Switching to alarms
1 Press "M."
A menu is displayed. (If a different unit is selected, press "M" twice.)

2 Select "7.Alarm," and then press " ."


The alarm menu is displayed.

・モニタ ・Monitor
・リレキ ・Record
・リレキクリア ・ClearRecord

5-228 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

 Monitor
1 Select "Monitor" from the alarm menu, and then press " ."

CPU BUILT-IN FUNCTIONS


The alarm monitor is displayed.
If multiple alarm relays are turned ON, press "" and "" to display the other alarms.


アラーム モニタ Alarm Mon
01/03 01/03
② Work Error Work Error

5
(1) 01/03

Access Window
This indicates the number of the alarm that is currently displayed/the total number of alarms that are
currently occurring.
When several alarms occur, the alarm with the smallest alarm relay number is displayed first.
(2) Work Error
This is the device comment of the device that corresponds to the currently displayed alarm.

Reference • Press any key to make the display stop blinking.


• When a different screen is displayed, if even a single alarm occurs, the screen will be
switched to the alarm monitor display automatically.

 Log display
1 Select "Record" from the alarm menu, and then press " ."
The alarm log will be displayed.
Press "" and "" to display the previous log entry and subsequent log entry, respectively.

リレキ 01/04 ①
② PressureOver
2012/06/14

15:49:39 ↓ ③

(1) 01/04
This indicates the number of the alarm log entry that is currently displayed/the total number of alarm
log entries.
The newest log entry number is "01."
(2) Press Alarm
This is the device comment of the device that corresponds to the currently displayed log entry.
(3) Down arrow
This indicates that the log entry was recorded when the alarm relay switched from ON to OFF. Log
entries that were recorded when alarm relays switched from OFF to ON are indicated by an up
arrow.
(4) 2012/06/14 15:49:39
This indicates the date and time that the log entry was recorded.

- KV Nano Series(terminal block type) User’s Manual - 5-229


5-11 Access Window

 Log clear
1 Select "Clr Record" from the alarm menu, and then press " ."
CPU BUILT-IN FUNCTIONS

A message asking you to confirm that you want to clear the log is displayed.

リレキ クリア Clear Record

クリア OK? Clear OK?

2 Hold down " " for 1 second or more.


When the log clear operation is completed, the following screen is displayed.
5 リレキ クリア Clear Record
Access Window

クリア カンリョウ Clear Done

Press "M" to return to the alarm menu display.

Load and Save

You can perform operations such as saving data to and loading files from the extension access window
cassette.
The operations that you can perform are shown below.

Operation Loading Saving


Execution from an extension access
○ (during PROG mode) ○
window cassette
Execution when the power is turned on ○ (turn the power on while holding down the "M" key) -
Execution using control relays ○ (during PROG mode) ○
Execution from a ladder program - (loading is not possible during RUN mode) ○
"Using control relays to load and save data" (page 5-235)
"When loading data automatically (Loading data at power on)" (page 5-238)

 Items that can be operated


The loading and saving operations that you can perform from the access window are shown below.

Japanese English Setting Details


You can use this to load projects stored on the extension
ロード Load
access window cassette to the base unit.
You can use this to save data from the base unit to the
extension access window cassette. You can save data such
セーブ Save
as ladder programs, device values, device comments, unit
setup information, and logging setup information.
Displays the date and time that the project was saved and the
プロパティ Properties
project's CPU function version.
データクリア Data Clear Deletes the saved projects.
データロック Data Lock Locks the saved projects (makes them read only).

5-230 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

• Loading is only available in PROG mode.


Point
• You can also use control relay operations to load data from and save data to

CPU BUILT-IN FUNCTIONS


extension access window cassettes.
• Do not turn the power off while loading or saving data.

"Using control relays to load and save data" (page 5-235)

 Operating instructions

 Switching to loading or saving


1 Press "M."
A menu is displayed. (If a different unit is selected, press "M" twice.) 5
2 Select "8.Load/Save," and then press " ."

Access Window
The load/save menu is displayed.

・ロード ・Load
・セーブ ・Save
・プロパティ ・Properties
・データクリア ・Data Clear

 Loading
1 Select "Load" from the extension access window cassette menu, and then press " ."
A message asking you to confirm that you want to load data is displayed.

ロード Load
ロード OK? Load OK?
KVS PROJECT KVS PROJECT

2 Hold down " " for 1 second or more to load the data.
During loading, the following screen is displayed.
To cancel loading, press "M" or " " for less than 1 second.

ロード Load
KVS PROJECT KVS PROJECT
プログラム Program
65% 65%

If the data is write-protected, the following screen is displayed.


Point
Hold down " " for 1 second or more to force the loading of the data.
To cancel the loading of the data, press "M" or " " for less than 1 second.

ロード Load
ライトプロテクト Protected
ロード OK? Load OK?
KVS PROJECT KVS PROJECT

- KV Nano Series(terminal block type) User’s Manual - 5-231


5-11 Access Window

3 After loading is finished, the following screen is displayed.

ロード Load
CPU BUILT-IN FUNCTIONS

ロード カンリョウ Load Done

Press "M" to return to the load/save menu.

Reference To load a project stored on an extension access window cassette, you have to perform
operations from the access window or from control relays (CR).

 Saving
5 1 Select "Save" from the extension access window cassette menu, and then press " ."
A message asking you to confirm that you want to save CPU data is displayed.
Access Window

セーブ Save
セーブ OK? Save OK?

2 Hold down " " for 1 second or more to save the data.
While data is being saved, the names of the files currently being saved and the overall progress are
displayed.

セーブ Save

DM .ZDV DM .ZDV
80% 80%

Reference If a project with the same name already exists, a message asking you to confirm that you
want to overwrite the existing project will be displayed.

セーブ Save
ウワガキ OK? OverwriteOK?
KVS PROJECT KVS PROJECT

Point Never turn the power off while data is being saved.

3 "Save Done" is displayed.

セーブ Save

セーブカンリョウ Save Done

Press "M" to return to the load/save menu.

Reference • You can save project data and device values to extension access window cassettes.
• If you have enabled read protection or set passwords in the CPU system settings, you
will be unable to save projects, and instead you will only be able to save device values.
• To save to an extension access window cassette a project whose read protection has
been enabled or whose project password has been set, transfer the project, and then
perform the save operation within 60 seconds.
5-232 - KV Nano Series(terminal block type) User’s Manual -
5-11 Access Window

Reference To save a project to an extension access window cassette, you have to perform
operations from the access window or from control relays (CR).

CPU BUILT-IN FUNCTIONS


 Properties
1 Select "Properties" from the extension access window cassette menu, and then press " ."
The date and time that the projects on the extension access window cassette were saved are
displayed.

KVS PROJECT
KV N24
2012/06/14
12:34:56

5
2 Use the "" and "" keys to display the CPU function version of the project.

Access Window
KVS PROJECT
CPU Function
Version:
v1.0

 Data clear
1 Select "Data Clear."

2 Hold down " " for 1 second or more.


A confirmation message is displayed.
To cancel the operation, press "M" or " " for less than 1 second.

データクリア OK? DataClr OK?


KVS PROJECT KVS PROJECT
2012/06/14 2012/06/14
12:34:56 12:34:56

3 Hold down " " again for 1 second or more to delete the data.
A message indicating that the data is being deleted is displayed.

ヤク 30ビョウ Wait for


オマチクダサイ 30 sec...

4 When the deletion is complete, the screen will return to the file list display.

データクリア Data Clear


クリア カンリョウ Clear Done

- KV Nano Series(terminal block type) User’s Manual - 5-233


5-11 Access Window

 Data lock
1 Select "Data Lock" from the extension access window cassette menu, and then press " ."
CPU BUILT-IN FUNCTIONS

A confirmation message is displayed.


To cancel the operation, press "M" or " " for less than 1 second.

データロック Data Lock


ロック OK? Lock OK?

Reference If the data is already locked, the following screen is displayed.

5 データロック
カイジョ OK?
Data Lock
Unlock OK?
Access Window

2 Hold down " " for 1 second or more.

データロック Data Lock


ロック カンリョウ Lock Done

Reference If the data is already locked, the following screen is displayed.

データロック Data Lock


カイジョ カンリョウ Unlock Done

5-234 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

 Using control relays to load and save data


You can also use control relays to save data to and load files from the extension access window

CPU BUILT-IN FUNCTIONS


cassette.

 Loading
You cannot load programs during RUN mode. Switch to PROG mode, and operate the control relays.

Loading timing chart


(5)
(1)
Project load execution request (3) (7)
(2)

Project load execution completion


(6)
5

Access Window
Project load execution failure

Completion code during


project loading

Project load success


(1) The project load execution request relay is turned ON (monitor, touch panel, or communications).
(2) When the project finishes loading, the project load execution completion relay is turned ON (base
unit).
(3) When the project load execution completion relay is turned ON, the project load execution request
relay is turned OFF (monitor, touch panel, or communications).
The next time that the project execution request relay changes from OFF to ON, the project load
execution completion relay is turned OFF (base unit).
Project load failure
(5) The project load execution request relay is turned ON (monitor, touch panel, or communications).
(6) When the project load operation fails, the project load execution failure relay is turned ON (base
unit).
(7) When the project load execution failure relay is turned ON, the project load execution request relay
is turned OFF (monitor, touch panel, or communications).
The next time that the project execution request relay changes from OFF to ON, the project load
execution completion relay and the project load execution failure relay are turned OFF (base unit).

- KV Nano Series(terminal block type) User’s Manual - 5-235


5-11 Access Window

List of devices

Device Attribute
Description
CPU BUILT-IN FUNCTIONS

R: Read only
Number Blank: Read/write
This is the project load execution request flag. When this changes from
CR3000 OFF to ON, the project is loaded (the project cannot be loaded in RUN
mode).
This is the project load execution completion flag. When a project finishes
CR3004 R loading, this is turned ON. When the project load execution request flag
changes from OFF to ON, this is turned OFF.
This is the project load execution failure flag. When a project fails to load,
CR3005 R this is turned ON. When the project load execution request flag changes
from OFF to ON, this is turned OFF.

5 Reference program
Access Window

Because projects cannot be loaded in RUN mode, there is no reference program.

 Saving
When you are using a ladder program to control the control relays, use the SET or KEEP instructions to
save programs.

Saving timing chart


(5)
(1)
Project save execution request (3) (7)
(2)

Project save execution


completion (6)

Project save execution failure

Completion code during


project saving

Project save success


(1) The project save execution request relay is turned ON (ladder program, monitor, touch panel,
communications, etc.).
(2) When the project finishes saving, the project save execution completion relay is turned ON (base
unit).
(3) When the project save execution completion relay is turned ON, the project save execution request
relay is turned OFF (ladder program, monitor, touch panel, communications, etc.).
The next time that the project execution request relay changes from OFF to ON, the project save
execution completion relay is turned OFF (base unit).
Project save failure
(5) The project save execution request relay is turned ON (ladder program, monitor, touch panel,
communications, etc.).
(6) When the project save operation fails, the project save execution failure relay is turned ON (base
unit).
(7) When the project save execution failure relay is turned ON, the project save execution request relay
is turned OFF (ladder program, monitor, touch panel, communications, etc.).
The next time that the project execution request relay changes from OFF to ON, the project save
execution completion relay and the project save execution failure relay are turned OFF (base unit).

5-236 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

List of devices

Device Attribute
Description

CPU BUILT-IN FUNCTIONS


R: Read only
Number Blank: Read/write
This is the project save execution request flag. When this changes from
CR3002
OFF to ON, the project save operation is executed.
This is the project save execution completion flag. When a project finishes
CR3006 R saving, this is turned ON. When the project save execution request flag
changes from OFF to ON, this is turned OFF.
This is the project save execution failure flag. When a project fails to be
CR3007 R saved, this is turned ON. When the project save execution request flag
changes from OFF to ON, this is turned OFF.

Reference program 5
Use the SET instruction to save a project.

Access Window
<Mnemonics list>
MR200 CR3002 LDP MR200
SET SET CR3002
Project save
execution LD CR3006
request RES CR3002
CR3006 CR3002 LD CR3007
RES SET MR201
Project save Project save
execution completion execution RES CR3002
request
CR3007 MR201
SET
Project save Save failure
execution failure

CR3002
RES
Project save
execution
request

 Error codes during the execution of loading and saving

Occurs
Number Title Cause Remedy
In
Loading at power on was not
1 Not executed Loading
executed.
No project data is saved on the AW Check whether project data is
4 No data Loading
cassette. present.
Loading
5 No AW No AW cassette is present. Connect an AW cassette. and
saving
A program was being transferred or Wait for the program transfer or
Loading
Project access read from a different source, so reading operation to be completed,
6 and
contention loading and saving could not be and then perform the loading or
saving
performed. saving operation.
• Read protection or a project You cannot load projects on which
password has been set, so the read protection or a project
Data Loading
project could not be saved. The password has been set.
7 protection in and
devices have been saved. You cannot load or save projects on
place saving
• Write protection has been set, so which read protection or a project
the project could not be loaded. password has been set.
The project data within the AW On the AW menu, select "8.Load/
8 Data lock cassette is locked, so the data could Save" and then "• Data Lock" to Saving
not be saved. release the AW cassette data lock.

- KV Nano Series(terminal block type) User’s Manual - 5-237


5-11 Access Window

Occurs
Number Title Cause Remedy
In
Base unit The load operation could not be On the AW menu, select "8.Load/
CPU BUILT-IN FUNCTIONS

9 model performed because the models are Save" and then "• Properties" to Loading
discrepancy different. check the model of the base unit.
Loading cannot be performed in Switch to PROG mode, and then
11 RUN mode Loading
RUN mode. load the data.
Loading
AW data The data on the AW cassette is
14 Save data to the AW again. and
abnormality abnormal.
saving
Load the data again.
Loading of the data on the AW If this error occurs frequently,
1000 Load error Loading
cassette failed. contact your KEYENCE

5 representative.
Save the data again.
Saving data to the AW cassette If this error occurs frequently,
Access Window

1001 Saving error Saving


failed. contact your KEYENCE
representative.

 When loading data automatically (Loading data at power on)


You can read projects that have been saved to the extension access window in advance when the
power is turned on.

• You can insert and remove the extension access window cassette up to 200
Point
times.
• If no saved data exists on the extension access window cassette, data cannot
be loaded.
• To save read-protected data on an extension access window cassette, select
the "Clear module/macro in PLC" check box for the base unit, and then transfer
the data. Save the data within 60 seconds of transferring it.

 Operating procedure
1 While holding down the "M" key on the extension access window cassette, turn on the power.

5-238 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

Debugging

CPU BUILT-IN FUNCTIONS


This mode can be used to clear forced sets and resets that have been registered and to enable input
refreshing and output from the access window.

Reference When, because of KV STUDIO or values written to CR and CM, registration is being
performed or when functions are disabled, the access window will automatically indicate
that registration or function disabling is in progress. You can press any key to return to the
previous screen. However, registration will not be cleared and the disabled function will
not be enabled.
5
 Items that can be cleared and enabled

Access Window
Japanese English Description
When forced sets and resets are registered, you can clear them
キョウセイセット ForceSetRegi
at the same time.
ニュウリョク Input You can enable the input refresh function if it has been disabled.
シュツリョク Output You can enable the output if it has been disabled.

 Operating instructions
 Switch to debugging
1 Press "M."
A menu is displayed. (If a different unit is selected, press "M" twice.)

2 Select "9.Debug," and then press " ."


The debug menu is displayed.

・キョウセイセット ・ForceSet
・ニュウリョク ・Input
・シュツリョク ・Output

 Clearing registered forced sets and resets


1 Select "ForceSetRegi" from the debug menu, and then press " ."
A message asking you to confirm that you want to clear all the registered sets and resets is displayed.

キョウセイセットリセット ForceSetRegi
イッセイカイジョ Cancel
OK? OK?

Point This function cannot be executed if no forced set or reset devices are registered.

- KV Nano Series(terminal block type) User’s Manual - 5-239


5-11 Access Window

2 Hold down " " for 1 second or more.


After all the forced sets and resets are cleared, a completion message is displayed.
CPU BUILT-IN FUNCTIONS

キョウセイセットリセット ForceSetRegi
イッセイカイジョ Cancel
カンリョウ Done

 Enabling input refreshing


1 Select "Input" from the debug menu, and then press " ."
A message asking you to confirm that you want to enable input refreshing is displayed.

5 ニュウリョクリフレッシュ
キンシ カイジョ
InputRefresh
Inhibit
OK? Cancel OK?
Access Window

Point This function cannot be executed if input refreshing is not disabled.

2 Hold down " " for 1 second or more.


After the disabled function is enabled, a completion message is displayed.

ニュウリョクリフレッシュ InputRefresh
キンシ カイジョ Inhibit
カンリョウ Cancel Done

 Enabling output
1 Select "Output" from the debug menu, and then press " ."
A message asking you to confirm that you want to enable output is displayed.

シュツリョク キンシ Output


カイジョ Inhibit
OK? Cancel OK?

Point This function cannot be executed if output is not disabled.

2 Hold down " " for 1 second or more.


After the disabled function is enabled, a completion message is displayed.

シュツリョク キンシ Output


カイジョ Inhibit
カンリョウ Cancel Done

5-240 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

Contrast

CPU BUILT-IN FUNCTIONS


Use this mode to adjust the LCD screen's contrast (set it to a value from 1 to 11).

1 Press "M."
A menu is displayed. (If a different unit is selected, press "M" twice.)

2 Use the "" and "" keys to select "10.Contrast," and then press " ."
The access window setup menu is displayed.

コントラスト Contrast

5
6 6

Access Window
Use "" and "" to increase and decrease the contrast value until you have adjusted the
contrast to a level that is easy to see.
You can set the contrast to a value between 1 and 11.

コントラスト Contrast

5 5

RAM Clear

You can use the RAM clear mode to clear the device values, alarm logs, and error logs at the same
time. This mode also returns the language and contrast settings to their default values.
Performing a RAM clear initializes R, MR, LR, B, CR, T/C (current values), CTH, CM, DM, and Z.
Ladder programs, unit setup information, comments, T/C (set values), CTC, and logging setup
information will not disappear.

Point The RAM clear operation can only be executed in PROG mode.

1 Press "M."
A menu is displayed. (If a different unit is selected, press "M" twice.)

2 Use the "" and "" keys to select "11.RAMClear," and then press " ."
A message asking you to confirm that you want to perform the RAM clear operation is displayed.

RAMクリア RAM Clear


クリア OK? Clear OK?

3 While holding down the " " key, hold down " " for 1 second or more.
The confirmation screen is displayed again.

RAMクリア RAM Clear


クリア OK? Clear OK?
クリア OK? Clear OK?

- KV Nano Series(terminal block type) User’s Manual - 5-241


5-11 Access Window

4 When the confirmation screen is displayed for a second time, hold down " " for 1 second or
more to perform the RAM clear operation.
CPU BUILT-IN FUNCTIONS

The following screen will be displayed while the RAM clear operation is being performed. When the
RAM clear operation is finished, the device will automatically restart.

オマチクダサイ... Wait...

If you do not hold down the " " key for 1 second or more, the message "Wait. . ."
Point

5
will not be displayed, and the RAM clear operation will be canceled.
Access Window

All Clear

The all clear mode returns all settings on the base unit to their defaults. (This means that the ladder
program and device values are cleared.)

Point The all clear operation can only be executed in PROG mode.

1 Press "M."
A menu is displayed. (If a different unit is selected, press "M" twice.)

2 Use the "" and "" keys to select "12.All Clear," and then press " ."
A message asking you to confirm that you want to perform the all clear operation is displayed.

オールクリア All Clear


クリア OK? Clear OK?

3 While holding down the " " key, hold down " " for 1 second or more.
The confirmation screen is displayed again.

オールクリア All Clear


クリア OK? Clear OK?
クリア OK? Clear OK?

Press "M" or " " to cancel the all clear operation and return the screen to the menu display.

4 When the confirmation screen is displayed for a second time, hold down " " for 1 second or
more to perform the all clear operation.
The following screen will be displayed while the all clear operation is being performed. When the all
clear operation is finished, the device will automatically restart.

ヤク 30ビョウ Wait for


オマチクダサイ... 30 sec...

5-242 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

If you do not hold down the " " key for 1 second or more, the message "Wait for
Point
30 sec..." will not be displayed, and the all clear operation will be canceled.

CPU BUILT-IN FUNCTIONS


Access Window Initial Screen Display Function

You can use this function to use ladder programs to set the access window screen that is displayed
when the access window is turned on.
If you do not use this function, the page that was in use the last time the power was turned off will be
displayed.
5
 Display method

Access Window
When the access window is on, you can use ladder programs or a similar method to store values in
control memory (CM) entries to specify the initial screen of the access window when it turns on.
To use the access window initial screen display function, store "1" in CM1780 and use CM1781 to
CM1789 to set the screen to display.

Reference On the KV Nano Series, decimal values are represented with "#" and hexadecimal values
with "$."

 List of control memory entries for the access window initial screen display
Device Number Function
Enables and disables the access window initial screen display function
CM1780
(0: disable, 1: enable)
CM1781 Specifies the device type*1
CM1782
Specifies the display screen
CM1783
CM1784
Specifies the device number*1
CM1785
CM1786 Specifies the display format of the device*1
Selects the device name representation*1
CM1787
(0: device number, 1: device comment)
Selects the key lock status
CM1788
(0: key lock disabled, 1: key lock enabled)
Selects the display language
CM1789
(0: Japanese, 1: English)
*1 The display screen type is only valid in device mode.

 Enabling and disabling the access window initial screen display function
The value stored in CM1780 determines whether the function is used.
CM1780 = 1: The screen specified by CM1781 to CM1789 is displayed.
CM1780 = 0: The screen displayed the last time the power was turned off is displayed.

- KV Nano Series(terminal block type) User’s Manual - 5-243


5-11 Access Window

 Device type specification range (only valid when the display screen type is
device mode)
CPU BUILT-IN FUNCTIONS

Use the value stored in CM1781 to specify the type of the device to be displayed.

CM1781 CM1781
Device Type Device Type
(Hexadecimal) (Hexadecimal)
TM $0008 Z $0030
R $0000 MR $0011
CR $0001 LR $0012
T $0002 B $001B
C $0003 W $001C
CTH/CTC $0004

5 DM
CM
$0006
$0007
Access Window

 Type and specification range of the display screen


Use the values stored in CM1782 and CM1783 to specify the type of the display screen.
CM1782 and CM1783 Values
Screen
(Hexadecimal)
Top menu $0000 0000
1.DeviceMode $0100 0000
3.Language $0A20 0000
5.Date/Time $0500 0000
Menu $0600 0000
ProjectName $0610 0000
Point number, current value,
$0620 0000
current speed
Axis 1
Output relay $0620 0010
Input relay $0620 0020
Point number, current value,
$0620 0100
current speed
Axis 2
Output relay $0620 0110
Pos Control

Input relay $0620 0120


Point number, current value,
$0620 0200
6.CPUMonitor current speed
Axis 3
Output relay $0620 0210
Input relay $0620 0220
Point number, current value,
$0620 0300
current speed
Axis 4
Output relay $0620 0310
Input relay $0620 0320
CH0 $0630 0000
CH1 $0630 0100
Frequency counter
CH2 $0630 0200
CH3 $0630 0300
Volume $0640 0000
Menu $0700 0000
Monitor $0710 0000
7.Alarm
Record $0720 0000
Clr Record $0730 0000
8.Load/Save Menu $0800 0000
9.Debug Menu $0900 0000
10.Contrast $0A10 0000
5-244 - KV Nano Series(terminal block type) User’s Manual -
5-11 Access Window

 Device number specification range (only valid when the display screen type is
device mode)

CPU BUILT-IN FUNCTIONS


Use the values stored in CM1784 and CM1785 to specify the number of the device to display.
• For R, MR, LR, and CR, specify numbers continuously across channels.
The calculation is shown below. N: Value stored in CM1784 and CM1785
(decimal numbers)
aaa: Channel number (000 to 999)
aaa: Channel number
aaabb bb: Contact number
bb: Contact number (00 to 15) N = 16 × aaa + bb

Example
Specifying R1000
aaa = 10, bb = 0
5
N = 16 × 10 + 0 = 160

Access Window
MOV.D
#160 CM1784
The value of CM1784 and CM1785 is 160 ($A0).
Specifying R10011
aaa = 100, bb = 11
N = 16 × 100 + 11 = 1611 MOV.D
#1611 CM1784
The value of CM1784 and CM1785 is 1611 ($064B).

• For B and W, use the number (hexadecimal number) of the device that you want to display to specify
the device.
Example
Specifying B1000
MOV.D
The value of CM1784 and CM1785 is 4096 ($1000). $1000 CM1784

Specifying W1FFF
MOV.D
The value of CM1784 and CM1785 is 8191 ($1FFF). $1FFF CM1784

• For T, C, DM, CM, and TM, use the number (decimal number) of the device that you want to display
to specify the device.

Example
Specifying DM1000
MOV.D
The value of CM1784 and CM1785 is 1000 ($3E8). #1000 CM1784

Specifying DM8191
MOV.D
The value of CM1784 and CM1785 is 8191 ($1FFF). #8191 CM1784

- KV Nano Series(terminal block type) User’s Manual - 5-245


5-11 Access Window

 Device display format and specification range


Use the value stored in CM1786 to specify the device display format.
CPU BUILT-IN FUNCTIONS

CM1786 Value CM1786 Value


Display Format Display Format
(Hexadecimal) (Hexadecimal)
Default*1 $0000 16Bit-BASE2 $0005
On/Off $0001 32Bit-BASE10 unsigned $0006
16Bit-BASE10 unsigned $0002 32Bit-BASE10 signed $0007
16Bit-BASE10 signed $0003 32Bit-BASE16 $0008
16Bit-BASE16 $0004
*1 Bit devices are represented by On/Off and word devices are represented by 16Bit-BASE10
unsigned.
5
 Display examples
Access Window

1. Configure the settings so that the top menu is displayed in the access window when it turns on.
Save the following settings in CM entries.

1.デバイスモード CM Value
Device Number Setting Details
2.エラークリア (Hexadecimal)
3.トリマ
AW initial screen display
4.I/Oテスト CM1780 $0001
enabled
CM1781 - -
CM1782
$00000000 Top menu
CM1783
CM1784
- -
CM1785
CM1786 - -
CM1787 - -
CM1788 $0000 Key lock disabled
CM1789 $0000 Japanese
2. Configure the settings so that the On/Off display of R200 is displayed in device mode in the access
window when it turns on.
Save the following settings in CM entries.

R200 CM Value
Device Number Setting Details
ON (Hexadecimal)
R201
AW initial screen display
OFF CM1780 $0001
enabled
CM1781 $0000 R
CM1782
$01000000 Device mode
CM1783
CM1784
$00000020 200
CM1785
CM1786 $0000 Default
CM1787 $0000 Device numbering
CM1788 $0000 Key lock disabled
CM1789 $0000 Japanese

5-246 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

User Messages

CPU BUILT-IN FUNCTIONS


The user message function enables you to use ladder programs to display values and strings of ASCII
characters up to 24 single-byte characters in length in the access window.
There are two user messages: user message 1 and user message 2. User message 1 is used to
display the value stored in CM1720. User message 2 is used to display the character string starting at
CM1721. The string consisting of the first 24 single-byte ASCII characters or the string terminated with
end code NULL (00H) is displayed.

 How to display user messages


Use one of the following two methods to display user messages. 5

Access Window
(1) Using the AWNUM instruction (user message 1) and the AWMSG instruction (user message 2)
You can use the dedicated instructions to easily display user messages without having to worry about
control relays (CR) and control memory (CM) entries.
When user message 1 and user message 2 are both turned ON, user message 1 (the value) is given
priority and is displayed.
For details on these instructions, see "5-14 Access Window Instructions" in the KV-7000/5000/3000/1000
Series and KV Nano Series "Instruction Reference Manuals."

Ladder program Entry method


Execution condition S
AWNUM A W N U M S

Ladder program Entry method


Execution condition S
AWMSG A W M S G S

(2) Create a ladder program using control relays (CR) and control memory (CM) entries.
To display user message 1, store the value to display in CM1720 and turn CR2900 ON.
To display user message 2, store the character string to display (ASCII code) in CM1721 to CM1732
and turn CR2901 ON.
When CR2900 and CR2901 are turned ON at the same time, CR2900 is given priority.
(The value stored in CM1720 is displayed.)

 Display examples

 User Message 1
When CR2900 is turned ON, the value stored in CM1720 is displayed on the screen.
In the screen example, the value of CM1720 is "12345." The entire screen blinks.

ユーザーメッセージ1 UsrMessage1:

12345 12345

The screen will return to the original display in the following cases.
• When you press an access window key. In this situation, CR2900 will be turned OFF.
• When CR2900 is turned OFF.

- KV Nano Series(terminal block type) User’s Manual - 5-247


5-11 Access Window

 User message 2
When CR2901 is turned ON, the character string starting at CM1721, which consists of the first 24 half-
CPU BUILT-IN FUNCTIONS

width ASCII characters or the string terminated with end code NULL (00H), is displayed.

ユーザーメッセージ2 UsrMessage2:

Emergency Emergency
Stop!! Stop!!

CM Number CM Value (Hexadecimal) ASCII Representation


CM1721 $456d Em
CM1722 $6572 er
5 CM1723
CM1724
$6765
$6e63
ge
nc
Access Window

CM1725 $7920 y (space)


CM1726 $2020 (two spaces)
CM1727 $2020 (two spaces)
CM1728 $2020 (two spaces)
CM1729 $5374 St
CM1730 $6f70 op
CM1731 $2021 (space) !
CM1732 $2100 !(00H)

When the message is displayed, the entire screen blinks.


The screen will return to the original display in the following cases.
• When you press an access window key. In this situation, CR2901 will be turned OFF.
• When CR2901 is turned OFF.

Setting Disabled Operations

You can disable the operations of the access window separately according to different functions.
The functions whose operations you can disable and the corresponding items are shown below.

Function Item
Unit monitor Changing settings
Device mode Changing device value
Alarm Clearing the alarm log
Loading and saving Load, save, and delete
Access window setup Change settings
All clear Clearing
RAM clear Clearing

5-248 - KV Nano Series(terminal block type) User’s Manual -


5-11 Access Window

For setting the disabled operations, 1 bit of CM1738 is assigned to each function. When a bit is turned ON, the
operation is disabled.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

CPU BUILT-IN FUNCTIONS


Reserved for the system
CPU monitor (setting changes disabled)
Device mode (device value changes disabled)
Reserved for the system
Alarm (alarm history clearing disabled)
Loading and saving
(loading, saving, clearing, and locking data disabled)
Language and contrast (setting changes disabled)
5

Access Window
All clear and RAM clear
(operation execution disabled)

When an attempt is made to perform a disabled operation, the following screen is displayed.

AWメッセージ AW Message:

ソウサキンシ Key Input


Disabled

Example
Disabling writing in device mode Disabling reading and writing of data
during loading and saving
MOV MOV
$0002 CM1738 $0010 CM1738

If you disable device writing in device mode, you will no longer be able to enable
Point
the operation from the access window.

- KV Nano Series(terminal block type) User’s Manual - 5-249


5-11 Access Window

Key Lock
CPU BUILT-IN FUNCTIONS

The key lock function enables you to disable the key operations of the access window. Use this function
when you want to prevent changes to the settings or when you want to fix the screen that is displayed.

 Operating instructions
To set or release the key lock, while holding down the " "key, hold down "M" for 3 seconds or more.

 If the keys are not locked


5 The following screen is displayed, and the keys are locked.

AWメッセージ AW Message
Access Window

キーロック Key Lock

While the keys are locked, the above screen is displayed when you perform any operations other than
releasing the key lock.

 If the keys are locked


The following screen is displayed, and the key lock is released.

AWメッセージ AW Message

キーロック カイジョ Key UnLock

Point You cannot lock the keys during I/O tests.

5-250 - KV Nano Series(terminal block type) User’s Manual -


5-12 Clock Function
On the KV Nano Series, the year, month, day, hour, minute, second, and day of the week are all
managed by the built-in clock IC.
This is used to record the time and date of errors, the log of the power turning on and off, and the

CPU BUILT-IN FUNCTIONS


tracing function.
The clock accuracy at room temperature (+25°C) is ±60 s/month.

Point The KV-N14** does not have a clock function.

Reference • Large-capacity capacitors are used to maintain the built-in clock, so if the device
remains off for two weeks or more (at +25°C), the clock data will be cleared and then
set to January 1, 2000. 5
• If clock data lost errors occur when the clock data is cleared, use the setting for the

Clock Function
operation when an error occurs in the CPU system settings to set the time error CPU
operation to continuation (minor error). (The default setting is continuation, that is, the
error is ignored.)
• When the clock data is cleared, CR2311 is turned ON. It is turned OFF when the clock
data is written.

 Reading clock data


Clock data is stored in control memory entries CM700 to CM706.
The format of the clock data is shown below.
bit bit
15 0

CM700 Year 0 to 99 The year indicates the last two digits of the year, assuming that "00"
indicates "2000."
CM701 Month 1 to 12
CM702 Day 1 to 31
CM703 Hour 0 to 23 All data is written in 16-bit binary data format.
CM704 Minute 0 to 59
CM705 Second 0 to 59
CM706 Day of the week 0 to 6 The numbers correspond to the days of the week as follows:
0 indicates Sunday, 1 indicates Monday, 2 indicates Tuesday,
3 indicates Wednesday, 4 indicates Thursday, 5 indicates Friday,
and 6 indicates Saturday.

• This data can be read directly by ladder programs (the data is read-only.)

 Writing clock data (Setting the time and date)

 Using an access window to configure settings


You can display the clock data in the access window and use the access window to set the time and
date.
"Clock" (page 5-218)

 Using ladder programs to configure settings


You can use the WTIME instruction to set the time and date. In addition, you can use the AJST
instruction to perform 0-second adjustment.
For details, see the clock processing instructions in the KV-7000/5000/3000/1000 Series and KV Nano Series
"Instruction Reference Manuals."

- KV Nano Series(terminal block type) User’s Manual - 5-251


5-12 Clock Function

 Using KV STUDIO to configure settings


While using KV STUDIO to perform monitoring, on the "Debug" menu, click "Setup calendar timer."
CPU BUILT-IN FUNCTIONS

See "Calendar Timer Setting" in the "KV STUDIO User's Manual."

5  Using a touch panel (VT3 Series) to configure settings


If you use the PLC time and date synchronization function of the KEYENCE VT3 Series of touch
Clock Function

panels, you can synchronize the date and time of the KV Nano Series with the date and time of the VT3
Series.

For details, see the "VT STUDIO Reference Manual."

Reference Versions 4.6 and later of VT STUDIO have a function for restoring the time and date.
If the clock data of the connected base unit is cleared, the time and date will automatically
be synchronized to the time and date of the touch panel.

5-252 - KV Nano Series(terminal block type) User’s Manual -


APPENDICES
APPENDICES
The appendices include lists of the KV Nano Series control relays (CR) and
control memory entries (CM), an error list, and a list of the instructions used in
this manual.

1 List of PLC Unit Errors ................................................. A-2


2 Lists of CR and CM Devices........................................ A-8
3 ASCII Code Table ...................................................... A-28
4 List of Instructions...................................................... A-29
5 List of Unusable Instructions...................................... A-32
6 List of Abbreviated Mnemonics.................................. A-33
7 List of Shortcut Keys.................................................. A-35
8 List of Characters That Cannot Be Used ................... A-45
9 Precautions When Changing from One KV Nano Series
Model to Another ....................................................... A-47
10 Precautions When Changing between a KV-5000/3000
Series Model and a KV Nano Series Model .............. A-49
11 Precautions When Changing from a KV-10/16/24/40 Model
to a KV Nano Series Model ....................................... A-64
12 Index .......................................................................... A-68

- KV Nano Series(terminal block type) User’s Manual - A-1


1 List of PLC Unit Errors
This appendix describes the errors that can occur on the KV Nano main unit.
You can use the following items to check for errors. (For items that have an asterisk, you cannot check
the error number.)
• ERROR LED (serious error or minor error)*
• POWER LED (lights in orange when an excessive current consumption error occurs)*
• Extension access window cassette
• KV STUDIO's error monitor

Whether an error is a serious error or a minor error is determined by the error's group.
Serious errors Scan time over errors, system errors, and setting errors
Minor errors Time errors, calculation errors, and unit errors
APPENDICES

Number Group Message Cause Remedy


CALLネスト Errors that occur during ladder
execution will not occur during KV
The subroutine nesting limit has STUDIO conversion. Modify the
10 Setting error
CALL Nest been exceeded. ladder program, paying close
attention to the proper usage of
subroutines.
FORネスト Errors that occur during ladder
execution will not occur during KV
The nesting limit of FOR to NEXT STUDIO conversion. Modify the
11 Setting error
FOR Nest instructions has been exceeded. ladder program, paying close
List of PLC Unit Errors

attention to the proper usage of


FOR and NEXT instructions.
コンバート If you use KV STUDIO to convert a
project read from the main unit, you
can check the cause of the
15 Setting error The conversion operation failed. conversion failure. After you
Convert eliminate the cause of the failure,
transfer the ladder program to the
main unit.
マクロネスト The number of macros nested in
Reduce the number of macro
22 Setting error multiple interrupts has exceeded the
MACRO Nest instructions in the interrupt program.
limit.
スキャンタイム Modify the ladder program,
オーバー checking to see if the scan time has
been exceeded because there are:
• Repeatedly executed instructions
such as FOR to NEXT
instructions.
• Instructions that cause
Scan time over The scan time has met or exceeded processing to jump such as CJ or
30
the set time. NCJ to LABEL.
Scan Time Over • Instructions that call programs
such as CALL and MCALL.
• Instructions with long processing
times such as FMOV, WSR, and
MAX.
• Interrupt programs that are
executed frequently.
ラダーナシ Transfer ladder programs to the
40 Setting error There is no program.
No Ladder Program main unit before starting operation.
ユニットチェックサ
The expansion unit settings are Transfer the unit setting information
50 Setting error ム
corrupt. to the main unit.
Unit Checksum
ユニットセッテイ
ジョウホウ The unit setting information has not Transfer the unit setting information
51 Setting error
Unit Setting been configured. to the main unit.
Information
ユニットミセツゾク Expansion units that should be
Turn the power off, and then
present according to the unit setting
52 Setting error connect all the expansion units that
No Unit Connected information are not actually
have been set in the Unit Editor.
connected.
カクチョウバスユ If a noise source (for example, a
ニットタイムアウト cable in which a large current flows
such as a motor cable) is close to
The bus communication may have the units, distance the units from the
53 System error
stopped due to noise. noise source.
Unit Timeout If this error occurs frequently,
contact your KEYENCE
representative.

A-2 - KV Nano Series(terminal block type) User’s Manual -


1 List of PLC Unit Errors

Number Group Message Cause Remedy


ユニットダイスウ The number of expansion units set
Turn the power off, and then
in the Unit Editor and the number of
54 Setting error connect all the expansion units that
Number Of Units expansion units actually connected
have been set in the Unit Editor.
are different.
ユニットシュベツ The type of expansion units set in
Turn the power off, and then
the Unit Editor and the types of
55 Setting error connect all the expansion units that
Unit Type expansion units actually connected
have been set in the Unit Editor.
are different.
カクチョウバスツウ If a noise source (for example, a
シン cable in which a large current flows
such as a motor cable) is close to
The bus communication may have the units, distance the units from the
56 System error
ExpansionBus stopped due to noise. noise source.

APPENDICES
Comm Error If this error occurs frequently,
contact your KEYENCE
representative.
カクチョウ
バスレンジ Contact your KEYENCE
58 System error A system error has occurred.
ExpansionBus representative.
Comm range
ユニットバージョン An attempt was made to connect an
Turn the power off, and then
expansion unit, which cannot be
59 Setting error connect all the expansion units that
Unit Version connected to the base unit, to the
have been set in the Unit Editor.
base unit.

List of PLC Unit Errors


I/Oテンスウチョウカ Reduce the total number of I/O
The number of connectable I/O points of the expansion I/O units so
60 Setting error
Excessive I/O Points points has been exceeded. that the total is within the limit of the
base unit.
ワリツケデバイス Use the Unit Editor to change the
チョウフク expansion unit device assignments
A device assigned to an expansion or change the "Local Rsv nums"
61 Setting error unit overlaps the local device settings on the "Entire assignment
Assign Device assignment area. setting of local devices" screen in
Overlap the "CPU system setting" dialog
box.
FLASH ROM
Contact your KEYENCE
80 System error イジョウ A flash ROM error has occurred.
representative.
Flash ROM Failure
RAMイジョウ Contact your KEYENCE
81 System error A system error has occurred.
RAM Failure representative.
AWデータイジョウ Execute the previous attempt to
write data to the extension access
window cassette again.
Extension access window cassette
If you do not want to use the data on
data is corrupt. The previous
the extension access window
attempt to write data to the
82 Other error cassette, clear the data from the
AW Data Failure extension access window cassette
"Load/Save" menu to stop the error
may have failed. Alternatively,
from occurring.
hardware is malfunctioning.
If this error occurs frequently,
contact your KEYENCE
representative.
トケイデータショウ If necessary, reset the clock.
シツ The clock data has been lost To retain the clock data, you have to
because of a drop in the voltage of turn the product on to charge the
85 Time error the built-in backup capacitors. The built-in backup capacitors.
Clock Data Lost product was not turned on for a long If this error occurs frequently,
time or hardware is malfunctioning. contact your KEYENCE
representative.
RTCイジョウ If this error occurs frequently,
86 System error The clock is malfunctioning. contact your KEYENCE
RTC Failure representative.
AWカセット Turn the power off, and then
イジョウ connect the extension access
An error occurred during
window cassette again.
92 Other error communication with the extension
If this error occurs frequently,
AW Cassette Failure access window cassette.
contact your KEYENCE
representative.
ファイルアクセス Functions that cannot be processed
チュウ at the same time were executed.
While data is being transferred to
the PLC, data is being loaded or
95 Other error Execute the function again.
saved, and all data is being cleared,
File Access Busy you cannot switch from PROG
mode to RUN mode, execute I/O
tests, or clear all data.

- KV Nano Series(terminal block type) User’s Manual - A-3


1 List of PLC Unit Errors

Number Group Message Cause Remedy


ゾウセツイジョウ Turn the power off, and then
connect the extension unit again.
A connection error or malfunction
96 System error Extension Unit If this error occurs frequently,
has occurred with an extension unit.
Failure contact your KEYENCE
representative.
ゾウセツシュベツ The extension units set in the Unit Turn the power off, and then
97 Setting error Editor and the extension units connect all the extension units that
Extension Unit Type actually connected are different. have been set in the Unit Editor.
ゾウセツヒタイオウ An extension unit that is not
Check the versions of the base unit
98 Setting error supported by the base unit has been
Unsupported Ext.Unit connected. and the extension unit.

カッセンソウバツ If you hot swap units, the hardware


may malfunction.
APPENDICES

99 System error Hot Plugged/ An extension unit was hot swapped. Turn the power off before you
Unplugged connect or disconnect an extension
unit.
ゾウセツバージョン A built-in function or extension unit
Check the versions of the base unit
101 Setting error Extension Unit function that isn't supported by the
and the extension unit.
Version base unit has been set.
POWER OFF エラー If a noise source (for example, a
cable in which a large current flows
such as a motor cable) is close to
the units, distance the units from the
The data save process could not noise source.
List of PLC Unit Errors

finish correctly when the power was To clear the RAM:


102 System error
POWER OFF Error turned off. The base unit may be • Clear the PLC from KV STUDIO.
malfunctioning. • Use an extension access window
cassette.
If this error occurs frequently,
contact your KEYENCE
representative.
デンダンショリ
Contact your KEYENCE
103 System error チョウカ A system error has occurred.
representative.
Shutdown Timeout
ショウヒデンリュウ Check whether the total current
チョウカ consumption of the units connected
to the service power supply and the
expansion units has exceeded the
system's rated value.
The current consumption has If the rated value has been
exceeded the rated value. exceeded, reduce the number of
104 System error
Excess Power (This error may also occur when the units that are connected to the
Consumption supplied AC power is unstable.) service power supply or reduce the
number of expansion units that are
connected.
If the rated value has not been
exceeded, contact your KEYENCE
representative.
テイデンホジ The format of data held when a Execute an all clear or RAM clear
フォーマット power outage occurs is abnormal. operation. To do so:
105 System error The power may have been turned • Clear the PLC from KV STUDIO.
Power-off Hold off during an all clear or RAM clear • Use an extension access window
Format operation. cassette.
リセットイジョウ If a noise source (for example, a
cable in which a large current flows
such as a motor cable) is close to
the units, distance the units from the
The data save process could not noise source.
start correctly when the power was To clear the RAM:
106 System error
Abnormal Reset turned off. The base unit may be • Clear the PLC from KV STUDIO.
malfunctioning. • Use an extension access window
cassette.
If this error occurs frequently,
contact your KEYENCE
representative.
システムエラー The system can continue operating,
but this may lead to a serious error
occurring.
107 Other error A system error has occurred.
System Error If this error occurs frequently,
contact your KEYENCE
representative.
フセイナデンソウ Turn the power on again.
データ If this error occurs frequently,
118 System error A system error has occurred.
contact your KEYENCE
Invalid Data representative.

A-4 - KV Nano Series(terminal block type) User’s Manual -


1 List of PLC Unit Errors

Number Group Message Cause Remedy


ウォッチドッグ Turn the power on again.
タイマ If this error occurs frequently,
120 System error A system error has occurred.
contact your KEYENCE
Watchdog Timer representative.
システムエラー Turn the power on again.
If this error occurs frequently,
122 System error A system error has occurred.
System Error contact your KEYENCE
representative.
デバイスハンイ Turn the power on again.
If this error occurs frequently,
123 System error A system error has occurred.
Invalid Device contact your KEYENCE
representative.
エラーバッファ

APPENDICES
The number of system errors that
125 Other error オーバーフロー Clear the errors.
have occurred exceeds the limit.
ErrorBuffer Overflow
オートローディング Data cannot be loaded when no
シッパイ data is present or when the data is
from a different model PLC.
The automatic loading function
The automatic loading operation cannot be used when the projects
127 Setting error
failed. stored on the PLC are write
Auto Loading Failed protected.
In situations other than those
described above, check the
automatic loading completion code.

List of PLC Unit Errors


ラダーエンザン A calculation error (an error that Check the ladder program, and
128 Calculation error turns CR2012 ON) has occurred. correct the cause of the calculation
Ladder Calc error.
ユニットエラー A unit error (an error that causes an
129 Unit error expansion unit ERROR LED to light) See the manuals of the units.
Unit Error has occurred.
FLASH ROM Perform an all clear operation, and
The format of the flash ROM is
フォーマット then transfer the project to the PLC
abnormal. The power may have
again.
131 System error been turned off during an all clear
If this error occurs frequently,
FLASH ROM Format operation. Alternatively, hardware is contact your KEYENCE
malfunctioning.
representative.
ラダーファイル Perform an all clear operation, and
A ladder program saved in the flash
フセイ then transfer the project to the PLC
ROM is abnormal. The power may
again.
132 System error have been turned off during an all
If this error occurs frequently,
Invalid Ladder File clear operation. Alternatively,
contact your KEYENCE
hardware is malfunctioning.
representative.
AWデータカキコミ Do not turn the power off while data
チュウオフ is being written to the extension
The power was turned off while data
access window cassette.
140 Other error was being written to the extension
AW Writing Power The extension access window
access window cassette.
OFF cassette data may be abnormal, so
perform the same operation again.
AccessWindow E250 Turn the power off, and then
Connection Error connect the extension access
window cassette again.
The extension access window Check that two extension access
250 * cassette could not be recognized by window cassettes are not
AccessWindow E250 the base unit. connected.
Connection Error If this error occurs frequently,
contact your KEYENCE
representative.
AccessWindow E251 Turn the power off, and then
Connection Error An error occurred during connect the extension access
communication between the window cassette again.
251 *
AccessWindow E251 extension access window cassette If this error occurs frequently,
Connection Error and the base unit. contact your KEYENCE
representative.

* This error is not logged.

- KV Nano Series(terminal block type) User’s Manual - A-5


1 List of PLC Unit Errors

• Error number 128 (calculation error)


Detailed Information,
Piece n Description

Detailed Error details


information, piece 1 0 (Not used.)
1 Incorrect indirect specification.
2 The indirectly specified target is T/C.
3 Incorrect simple indirect specification.
4 Outside of operand range.
5 Floating-point real number overflow.
6 Incorrect device specification.
APPENDICES

7 The ROOT instruction operand is negative.


8 No bits turned ON with the ENCO instruction.
9 Floating-point real number format error.
10 Incorrect trigonometric function instruction operand.
11 Data could not be converted.
12 Incorrect table specification.
13 Incorrect time comparison instruction operand.
14 Incorrect cam switch operand.
15 Incorrect frequency counter instruction operand.
List of PLC Unit Errors

16 Divide by zero.
17 Illegal logging ID.
18 Direct processing error.
19 Unit on which direct processing cannot be performed.
20 Jump destination subroutine does not exist.
21 Data being written during RUN mode, so instruction cannot be
executed.
22 Error for expansion unit-dedicated instructions (unit number).
23 Reserved for the system.
24 PIDAT, outside of operation setting range.
25 PIDAT, outside of sampling period range.
26 PIDAT, outside of comparison constant range.
27 PIDAT, outside of integral constant range.
28 PIDAT, outside of differential constant range.
29 PIDAT comparison constant, two-degree freedom parameters outside
of range.
30 PIDAT integral constant, two-degree freedom parameters outside of
range.
31 PIDAT differential constant, two-degree freedom parameters outside of
range.
32 PIDAT, outside of operation quantity upper limit or lower limit range.
33 PIDAT, outside of operation quantity change width limit range.
34 PIDAT, outside of measured value change width range.
35 PIDAT, AT state transition error.
36 PIDAT, outside of operation control flag range.
37 Operation period exceeded.
38 PIDAT, outside of AT adjustment parameter range.
39 PIDAT, outside of AT hysteresis range.
40 PIDAT, outside of AT timeout range.
41 PIDAT, outside of AT calculation control mode setting range.
42 PIDAT, AT timeout.
43 PIDAT, AT comparison constant exceeded.
44 PIDAT, AT integral constant exceeded.
45 PIDAT, AT differential constant exceeded.
46 Root of negative number cannot be calculated.
47 Incorrect ABS instruction operand.
48 Calculation overflow.
49 UR, UM, or UV unit not connected.
50 Unit device (R) not assigned.
51 Unit device (DM) not assigned.
A-6 - KV Nano Series(terminal block type) User’s Manual -
1 List of PLC Unit Errors

Detailed Information, Piece n Description


Detailed information, piece 2 Fixed to 00H.
Detailed information, piece 3 Upper bits of the step number at which the error occurred.
Detailed information, piece 4 Lower bits of the step number at which the error occurred.
Detailed information, pieces 5 to 20 The module name is saved in SJIS format (any parts not occupied with
the module name are "00H").

• Error numbers 50, 53, 55, 56, 58, and 59 (unit number errors)
Detailed Information, Piece n Description
Unit number (the unit number will not be stored if it cannot be
Detailed information, piece 1
determined according to the occurrence conditions of the error)

APPENDICES
Detailed information, pieces 2 to 20 Fixed to 00H
• Error number 54 (number of units error)
Detailed Information, Piece n Description
Detailed information, piece 1 The number of units as specified in the unit setup information
Detailed information, piece 2 The number of units that are actually connected
Detailed information, pieces 3 to 20 Fixed to 00H
• Error number 60 (number of expansion I/O points error)

List of PLC Unit Errors


Detailed Information, Piece n Description
Detailed information, piece 1 Upper limit of the number of base unit expansion I/O points
Detailed information, piece 2 Actually connected number of expansion I/O points
Detailed information, pieces 3 to 20 Fixed to 00H
• Error number 61 (assigned device overlap error)
Detailed Information, Piece n Description
Unit number of the expansion unit whose assignment is being
Detailed information, piece 1
overlapped
Detailed information, piece 2 Type of device that is being overlapped (R—relay: 1, DM: 2)
Number of the device that is being overlapped
Detailed information, piece 3 (channel number when the device type is R—relay, example: R1000 
10)
Detailed information, pieces 4 to 20 Fixed to 00H
• Error numbers 96, 97, 98, 99, and 101 (extension cassette error)
Detailed Information, Piece n Description
Extension cassette number (left: 1, right: 2)
Detailed information, piece 1
(0 is stored when the slot cannot be determined)
Detailed information, piece 2 Reserved for the system
Detailed information, pieces 3 to 20 Fixed to 00H
• Error number 127 (auto loading failure error)
Detailed Information, Piece n Description
Error details
Detailed information, piece 1 For details, see 「Error codes during the execution of loading and
saving」 5-237ページ.
Detailed information, pieces 2 to 20 Fixed to 00H
• Error number 129 (unit error)
Expansion Information, Piece n Description
Expansion information, piece 1 Unit number
Expansion information, piece 2 Error number of each unit
Detailed information, pieces 3 to 20 Fixed to 00H
• Error numbers other than those listed above
Expansion Information, Piece n Description
Detailed information, pieces 1 to 20 Fixed to 00H
- KV Nano Series(terminal block type) User’s Manual - A-7
2 Lists of CR and CM Devices

Control Relays (CR)

Control relays (CR0000 to CR8915) can be used to perform operations such as checking the operation
status of the base unit and setting and monitoring the built-in functions.
Control relays reserved for the system cannot be used.
Attribute
CR R: Read only Function
Blank: Read/write
Logging and tracing execution (ON: enabled, OFF:
CR0000
disabled)
APPENDICES

CR0001 R Logging or tracing operation in progress


CR0002 R Logging or tracing file writing completion
CR0003 R Logging buffer less than 50% warning
CR0004 R Logging buffer overflow
CR0005 R Data to be written in RUN mode during logging present
CR0006
and − Reserved for the system
CR0007 Logging or tracing function (ID0)
Lists of CR and CM Devices

CR0008 R Logging or tracing error


CR0009 R Logging or tracing insufficient memory card capacity error
CR0010 R Logging or tracing device or trigger setting error
CR0011 R Tracing file save trigger monitor
CR0012 R Tracing data capture completion
CR0013 R Logging or tracing setting to be written present
CR0014
and − Reserved for the system
CR0015
CR0100 to Logging or tracing function (ID1 to
(The same as CR0000 to CR0015)
CR0915 ID9)
CR1000 to
Real-time chart monitor (ID10) (The same as CR0000 to CR0015)
CR1015
CR1100 to
− Reserved for the system
CR2001
CR2002 R Always turned ON
CR2003 R Always turned OFF
CR2004 R 10 ms clock pulse (duty cycle: 50%)
CR2005 R 100 ms clock pulse (duty cycle: 50%)
CR2006 R 1 s clock pulse (duty cycle: 50%)
CR2007 R Turned OFF for just one scan when operation starts
CR2008 R Turned ON for just one scan when operation starts
CR2009 Turned ON when the calculation result is negative or when an overflow occurs
CR2010 R Turned ON when the calculation result is zero
CR2011 R Turned ON when the calculation result is positive
CR2012 R Turned ON when a calculation execution error occurs
CR2013 to
− Reserved for the system
CR2100
CR2101 R Indicates the presence of extension unit 1 (ON: connected, OFF: not connected)
CR2102 R Indicates the presence of extension unit 2 (ON: connected, OFF: not connected)
CR2103 to
− Reserved for the system
CR2200
CR2201 R Indicates the presence of expansion unit 1 (ON: connected, OFF: not connected)
CR2202 R Indicates the presence of expansion unit 2 (ON: connected, OFF: not connected)
CR2203 R Indicates the presence of expansion unit 3 (ON: connected, OFF: not connected)
CR2204 R Indicates the presence of expansion unit 4 (ON: connected, OFF: not connected)
CR2205 R Indicates the presence of expansion unit 5 (ON: connected, OFF: not connected)
CR2206 R Indicates the presence of expansion unit 6 (ON: connected, OFF: not connected)
CR2207 R Indicates the presence of expansion unit 7 (ON: connected, OFF: not connected)
CR2208 R Indicates the presence of expansion unit 8 (ON: connected, OFF: not connected)

A-8 - KV Nano Series(terminal block type) User’s Manual -


2 Lists of CR and CM Devices

Attribute
CR R: Read only Function
Blank: Read/write
CR2209 to
− Reserved for the system
CR2215
CR2300 External output disabled (ON: execute, OFF: do not execute)
CR2301 External input refresh disabled (ON: execute, OFF: do not execute)
CR2302 − Reserved for the system
CR2303 Fixed scan time operation (ON: enabled, OFF: disabled)
Turned ON for just one scan when the scan time setting (the fixed scan time operation and END
CR2304 R
processing time settings) is exceeded
Sets the input time constant of all inputs of the base unit
CR2305

APPENDICES
(ON: the value is set according to CM1620, OFF: the value is not set)
CR2306 − Reserved for the system
CR2307 Clears the minimum and maximum scan time values
Sets the END processing time (ON: enabled, OFF: disabled; if CR2303 is turned ON at the same
CR2308
time, CR2303 is given priority)
CR2309 Reserved for the system
CR2310 R Indicates the presence of a calendar timer (ON: present, OFF: not present)
CR2311 R This is turned ON when a clock data lost error occurs (it is turned OFF when the clock data is written)
CR2312 Reserved for the system

Lists of CR and CM Devices


CR2313 Forces switch of the VT sensor application screen (ON: switch, OFF: do not switch)
Project password authentication status (ON: authentication disabled, OFF: authentication
CR2314
enabled)
CR2315 to
− Reserved for the system
CR2515
INT0 interrupt polarity
CR2600 Rising Edge Falling Edge Both Rising and Falling Edges
and
CR2600 OFF ON OFF ON
CR2601
CR2601 OFF OFF ON ON

INT1 interrupt polarity


CR2602 Rising Edge Falling Edge Both Rising and Falling Edges
and CR2602 OFF ON OFF ON
CR2603
CR2603 OFF OFF ON ON

INT2 interrupt polarity


CR2604 Rising Edge Falling Edge Both Rising and Falling Edges
and
CR2604 OFF ON OFF ON
CR2605
CR2605 OFF OFF ON ON

INT3 interrupt polarity


CR2606 Rising Edge Falling Edge Both Rising and Falling Edges
and
CR2606 OFF ON OFF ON
CR2607
CR2607 OFF OFF ON ON

CR2608 to
Reserved for the system
CR2813
Zero suppression during execution of DASC and FASC instructions (all suffixes; ON: execute,
CR2814
OFF: do not execute)
Omission of "+" during execution of DASC.S, DASC.L, and FASC instructions (ON: execute,
CR2815
OFF: do not execute)
User message display 1
CR2900
(ON: displayed, OFF: hidden)
Access window
User message display 2
CR2901
(ON: displayed, OFF: hidden)
CR2902 to
− Reserved for the system
CR2914
CR2915 R Indicates the presence of an access window cassette (ON: connected, OFF: not connected)
CR3000 Project load execution request
CR3001 − Reserved for the system
CR3002 Project save execution request

- KV Nano Series(terminal block type) User’s Manual - A-9


2 Lists of CR and CM Devices

Attribute
CR R: Read only Function
Blank: Read/write
CR3003 − Reserved for the system
CR3004 Project load execution completion
CR3005 Project load execution failure
CR3006 Project save execution completion
CR3007 Project save execution failure
CR3008 to
− Reserved for the system
CR3215
CR3300 to
− Alarm relays
CR3415
APPENDICES

CR3500 R Alarm operation relay (ON: one of CR3300 to CR3415 is turned ON)
Record an entry in the log when an alarm relay switches from ON to OFF (ON: record, OFF: do
CR3501
not record)
CR3502 The alarm relay log is cleared when this switches from OFF to ON
CR3503 to
Reserved for the system
CR3513
CR3514 Disables multiple keys
HKEY instruction
CR3515 R Scan completion
CR3600 to
Lists of CR and CM Devices

R HKEY information storage area


CR3615
CR3700 F1 customize switch 1
CR3701 F2 customize switch 2
CR3702 F3 customize switch 3
CR3703 F4 customize switch 4
CR3704 LED1 customize indicator 1
CR3705 LED2 customize indicator 2
CR3706 LED3 customize indicator 3
CR3707 LED4 customize indicator 4
CR3708 Green back light (lights when this is turned ON)
CR3709 Red back light (lights when this is turned ON)
Operator panel KV-D30 System message display language (ON: Japanese, OFF:
CR3710
English)
CR3711 Buzzer ON
Screen display setting (ON: positive display, OFF:
CR3712
negative display)
CR3713 Alarm interrupt enable (ON: enabled, OFF: disabled)
Page switching (switches to the page indicated by the
CR3714
value of CM0401 on a rising edge; forced OFF)

CR3715 Disables page switching using the "▲" and "▼" keys
(ON: disabled, OFF: enabled)
CR3800 Sets external output 0 to ON when this is turned ON
CR3801 Sets external output 1 to ON when this is turned ON
CR3802 to
− Reserved for the system
CR3815
CR3900 The serious error log is cleared when this switches from OFF to ON
CR3901 The minor error log is cleared when this switches from OFF to ON
CR3902 R Indicates that the serious error log is full
CR3903 R Indicates that the minor error log is full
CR3904 R RUN-PROG selector switch status (ON: RUN, OFF: PROG)
CR3905 R A serious error has occurred
CR3906 R A minor error has occurred
CR3907 The power on log is cleared when this switches from OFF to ON
CR3908 The power off log is cleared when this switches from OFF to ON
CR3909 Clears the current error
CR3910 to
− Reserved for the system
CR4115
CR4200 R CTH0 dedicated internal clock (50 ns)
CR4201 R CTH0 dedicated internal clock (1 µs)
CR4202 R CTH0 dedicated internal clock (10 µs)

A-10 - KV Nano Series(terminal block type) User’s Manual -


2 Lists of CR and CM Devices

Attribute
CR R: Read only Function
Blank: Read/write
CR4203 R CTH0 dedicated internal clock (100 µs)
CR4204 − Reserved for the system
CR4205 R Indicates the presence of CTH0 (ON: present, OFF: not present)
CR4206 Detects overflows and underflows of CTH0 (ON: detected, OFF: not detected)
CR4207 R Indicates the change direction of CTH0 (ON: down counting, OFF: up counting)
CTH0 external signal preset
CR4208 Not Used Rising Edge Falling Edge Level
and
CR4208 OFF ON OFF ON
CR4209

APPENDICES
CR4209 OFF OFF ON ON

CR4210 CTH0 count mode selection (ON: ring, OFF: linear)


CR4211 CTH0 preset disabled (ON: execute, OFF: do not execute)
CR4212 CTH0 internal enable relay (ON: counting enabled, OFF: counting disabled)
CR4213 to
− Reserved for the system
CR4302
Automatic reset of CTH0 (ON: execute, OFF: do not
CR4303
execute)
Comparator matching output disabled when comparator

Lists of CR and CM Devices


CR4304
CTC0 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output turned OFF when
CR4305 Action when high-speed counter comparator CTC0 is turned ON (ON: execute, OFF: do
comparator CTC0 is turned ON not execute)
Comparator matching output turned ON when comparator
CR4306
CTC0 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output inversion (ON/OFF) each
CR4307 time that comparator CTC0 is turned ON (ON: execute,
OFF: do not execute)
Comparator matching output disabled when comparator
CR4308
CTC1 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output turned OFF when
CR4309 comparator CTC1 is turned ON (ON: execute, OFF: do
not execute)
Action when high-speed counter Comparator matching output turned ON when comparator
CR4310
comparator CTC1 is turned ON CTC1 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output inversion (ON/OFF) each
CR4311 time that comparator CTC1 is turned ON (ON: execute,
OFF: do not execute)
Automatic reset of CTH0 (ON: execute, OFF: do not
CR4312
execute)
High-speed counter CTH0 count input mode selection
Single Phase
1x 2x 4x 2-Pulse
CR4313 to W/O Direction W/ Direction
CR4315 CR4313 OFF ON OFF ON OFF ON
CR4314 OFF OFF ON ON OFF OFF
CR4315 OFF OFF OFF OFF ON ON

CR4400 R CTH1 dedicated internal clock (50 ns)


CR4401 R CTH1 dedicated internal clock (1 µs)
CR4402 R CTH1 dedicated internal clock (10 µs)
CR4403 R CTH1 dedicated internal clock (100 µs)
CR4404 - Reserved for the system
CR4405 R Indicates the presence of CTH1 (ON: present, OFF: not present)
CR4406 Detects overflows and underflows of CTH1 (ON: detected, OFF: not detected)
CR4407 R Indicates the change direction of CTH1 (ON: down counting, OFF: up counting)
CTH1 external signal preset
CR4408 Not Used Rising Edge Falling Edge Level
and
CR4408 OFF ON OFF ON
CR4409
CR4409 OFF OFF ON ON

CR4410 CTH1 count mode selection (ON: ring, OFF: linear)

- KV Nano Series(terminal block type) User’s Manual - A-11


2 Lists of CR and CM Devices

Attribute
CR R: Read only Function
Blank: Read/write
CR4411 CTH1 preset disabled (ON: execute, OFF: do not execute)
CR4412 CTH1 internal enable relay (ON: counting enabled, OFF: counting disabled)
CR4413 to
− Reserved for the system
CR4502
Automatic reset of CTH1 (ON: execute, OFF: do not
CR4503
execute)
Comparator matching output disabled when comparator
CR4504
CTC2 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output turned OFF when
APPENDICES

CR4505 Action when high-speed counter comparator CTC2 is turned ON (ON: execute, OFF: do
comparator CTC2 is turned ON not execute)
Comparator matching output turned ON when comparator
CR4506
CTC2 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output inversion (ON/OFF) each
CR4507 time that comparator CTC2 is turned ON (ON: execute,
OFF: do not execute)
Comparator matching output disabled when comparator
CR4508
CTC3 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output turned OFF when
Lists of CR and CM Devices

CR4509 comparator CTC3 is turned ON (ON: execute, OFF: do


not execute)
Action when high-speed counter Comparator matching output turned ON when comparator
CR4510
comparator CTC3 is turned ON CTC3 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output inversion (ON/OFF) each
CR4511 time that comparator CTC3 is turned ON (ON: execute,
OFF: do not execute)
Automatic reset of CTH1 (ON: execute, OFF: do not
CR4512
execute)
CTH1 count input mode selection
Single Phase
1x 2x 4x 2-Pulse
CR4513 to W/O Direction W/ Direction
CR4515 CR4513 OFF ON OFF ON OFF ON
CR4514 OFF OFF ON ON OFF OFF
CR4515 OFF OFF OFF OFF ON ON

CR4600 R CTH2 dedicated internal clock (50 ns)


CR4601 R CTH2 dedicated internal clock (1 µs)
CR4602 R CTH2 dedicated internal clock (10 µs)
CR4603 R CTH2 dedicated internal clock (100 µs)
CR4604 - Reserved for the system
CR4605 R Indicates the presence of CTH2 (ON: present, OFF: not present)
CR4606 Detects overflows and underflows of CTH2 (ON: detected, OFF: not detected)
CR4607 R Indicates the change direction of CTH2 (ON: down counting, OFF: up counting)
CTH2 external signal preset
CR4608 Not Used Rising Edge Falling Edge Level
and
CR4608 OFF ON OFF ON
CR4609
CR4609 OFF OFF ON ON

CR4610 CTH2 count mode selection (ON: ring, OFF: linear)


CR4611 CTH2 preset disabled (ON: execute, OFF: do not execute)
CR4612 CTH2 internal enable relay (ON: counting enabled, OFF: counting disabled)
CR4613 to
− Reserved for the system
CR4702

A-12 - KV Nano Series(terminal block type) User’s Manual -


2 Lists of CR and CM Devices

Attribute
CR R: Read only Function
Blank: Read/write
Automatic reset of CTH2 (ON: execute, OFF: do not
CR4703
execute)
Comparator matching output disabled when comparator
CR4704
CTC4 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output turned OFF when
CR4705 Action when high-speed counter comparator CTC4 is turned ON (ON: execute, OFF: do
comparator CTC4 is turned ON not execute)
Comparator matching output turned ON when comparator
CR4706
CTC4 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output inversion (ON/OFF) each

APPENDICES
CR4707 time that comparator CTC4 is turned ON (ON: execute,
OFF: do not execute)
Comparator matching output disabled when comparator
CR4708
CTC5 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output turned OFF when
CR4709 comparator CTC5 is turned ON (ON: execute, OFF: do
not execute)
Action when high-speed counter Comparator matching output turned ON when comparator
CR4710
comparator CTC5 is turned ON CTC5 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output inversion (ON/OFF) each

Lists of CR and CM Devices


CR4711 time that comparator CTC5 is turned ON (ON: execute,
OFF: do not execute)
Automatic reset of CTH2 (ON: execute, OFF: do not
CR4712
execute)
CTH2 count input mode selection
Single Phase
1x 2x 4x 2-Pulse
CR4713 to W/O Direction W/ Direction
CR4715 CR4713 OFF ON OFF ON OFF ON
CR4714 OFF OFF ON ON OFF OFF
CR4715 OFF OFF OFF OFF ON ON

CR4800 R CTH3 dedicated internal clock (50 ns)


CR4801 R CTH3 dedicated internal clock (1 µs)
CR4802 R CTH3 dedicated internal clock (10 µs)
CR4803 R CTH3 dedicated internal clock (100 µs)
CR4804 − Reserved for the system
CR4805 R Indicates the presence of CTH3 (ON: present, OFF: not present)
CR4806 Detects overflows and underflows of CTH3 (ON: detected, OFF: not detected)
CR4807 R Indicates the change direction of CTH3 (ON: down counting, OFF: up counting)
CTH3 external signal preset
CR4808 Not Used Rising Edge Falling Edge Level
and
CR4808 OFF ON OFF ON
CR4809
CR4809 OFF OFF ON ON

CR4810 CTH3 count mode selection (ON: ring, OFF: linear)


CR4811 CTH3 preset disabled (ON: execute, OFF: do not execute)
CR4812 CTH3 internal enable relay (ON: counting enabled, OFF: counting disabled)
CR4813 to
− Reserved for the system
CR4902
CR4903 Automatic reset of CTH3 (ON: execute, OFF: do not execute)
Comparator matching output disabled when comparator
CR4904
CTC6 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output turned OFF when comparator
CR4905
Action when high-speed counter CTC6 is turned ON (ON: execute, OFF: do not execute)
comparator CTC6 is turned ON Comparator matching output turned ON when comparator
CR4906
CTC6 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output inversion (ON/OFF) each
CR4907 time that comparator CTC6 is turned ON (ON: execute,
OFF: do not execute)

- KV Nano Series(terminal block type) User’s Manual - A-13


2 Lists of CR and CM Devices

Attribute
CR R: Read only Function
Blank: Read/write
Comparator matching output disabled when comparator
CR4908
CTC7 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output turned OFF when
CR4909 comparator CTC7 is turned ON (ON: execute, OFF: do
not execute)
Action when high-speed counter Comparator matching output turned ON when comparator
CR4910
comparator CTC7 is turned ON CTC7 is turned ON (ON: execute, OFF: do not execute)
Comparator matching output inversion (ON/OFF) each
CR4911 time that comparator CTC7 is turned ON (ON: execute,
OFF: do not execute)
APPENDICES

Automatic reset of CTH3 (ON: execute, OFF: do not


CR4912
execute)
Multiplication mode selection of CTH3

Single Phase
1x 2x 4x 2-Pulse
CR4913 to W/O Direction W/ Direction
CR4915 CR4913 OFF ON OFF ON OFF ON
CR4914 OFF OFF ON ON OFF OFF
CR4915 OFF OFF OFF OFF ON ON
Lists of CR and CM Devices

CR5000 to
− Reserved for the system
CR5315
CR5400 Start operation (ON: execute, OFF: do not execute)
CTH0 input source setting
Single Phase Double
CR5401 W/O W/ Phase 2-Pulse
and Direction Direction 1x
CR5402
CR5401 OFF ON OFF ON
Frequency counter (CTH0)
CR5402 OFF OFF ON ON

CR5403 Switches between Hz and rpm (ON: rpm, OFF: Hz)


Function in which one rotation is performed to update the
CR5404
rotation speed (ON: use, OFF: do not use)
Input source switching function (ON: use, OFF: do not
CR5405
use)
CR5406
and - Reserved for the system
CR5407
CR5408 Specified frequency pulse output (CTH0; ON: execute, OFF: do not execute)
CR5409 Specified frequency pulse output (CTH0) error
CR5410 to
- Reserved for the system
CR5415
CR5500 Start operation (ON: execute, OFF: do not execute)
CTH1 input source setting
Single Phase Double
CR5501 W/O W/ Phase 2-Pulse
and Direction Direction 1x
CR5502
CR5501 OFF ON OFF ON
Frequency counter (CH1)
CR5502 OFF OFF ON ON

CR5503 Switches between Hz and rpm (ON: rpm, OFF: Hz)


Function in which one rotation is performed to update the
CR5504
rotation speed (ON: use, OFF: do not use)
Input source switching function (ON: use, OFF: do not
CR5505
use)
CR5506
and − Reserved for the system
CR5507
CR5508 Specified frequency pulse output (CTH1; ON: execute, OFF: do not execute)
CR5509 Specified frequency pulse output (CTH1) error
CR5510 to
− Reserved for the system
CR5515

A-14 - KV Nano Series(terminal block type) User’s Manual -


2 Lists of CR and CM Devices

Attribute
CR R: Read only Function
Blank: Read/write
CR5600 Start operation (ON: execute, OFF: do not execute)
CTH2 input source setting
Single Phase Double
CR5601 W/O W/ Phase 2-Pulse
and Direction Direction 1x
CR5602
CR5601 OFF ON OFF ON
Frequency counter (CH2)
CR5602 OFF OFF ON ON

CR5603 Switches between Hz and rpm (ON: rpm, OFF: Hz)

APPENDICES
Function in which one rotation is performed to update the
CR5604
rotation speed (ON: use, OFF: do not use)
Input source switching function (ON: use, OFF: do not
CR5605
use)
CR5606
and − Reserved for the system
CR5607
CR5608 Specified frequency pulse output (CTH2; ON: execute, OFF: do not execute)
CR5609 Specified frequency pulse output (CTH2) error

Lists of CR and CM Devices


CR5610 to
− Reserved for the system
CR5615
CR5700 Start operation (ON: execute, OFF: do not execute)
CTH3 input source setting
Single Phase Double
CR5701 Phase 2-Pulse
W/O W/
and 1x
Direction Direction
CR5702
CR5701 OFF ON OFF ON
Frequency counter (CTH3)
CR5702 OFF OFF ON ON

CR5703 Switches between Hz and rpm (ON: rpm, OFF: Hz)


Function in which one rotation is performed to update the
CR5704
rotation speed (ON: use, OFF: do not use)
Input source switching function (ON: use, OFF: do not
CR5705
use)
CR5706
and − Reserved for the system
CR5707
CR5708 Specified frequency pulse output (CTH3; ON: execute, OFF: do not execute)
CR5709 Specified frequency pulse output (CTH3) error
CR5710 to
− Reserved for the system
CR5715
CR5800 to
− Reserved for the system
CR5915
CR6000 to
For built-in serial assignment
CR6515
CR6600 to
For extension function assignment 1
CR7115
CR7200 to
For extension function assignment 2
CR7715
CR7800 to
− Reserved for the system
CR7915

- KV Nano Series(terminal block type) User’s Manual - A-15


2 Lists of CR and CM Devices

Attribute
CR R: Read only Function
Blank: Read/write
CR8000 Forced stop
CR8001 Deceleration stop
CR8002 Error clear
CR8003 Warning clear
CR8004 Current coordinate change request (level detection)
CR8005 Operating speed change request (level detection)
CR8006 CPU positioning function, axis 1 Target coordinate change request (level detection)
CR8007 to
− Reserved for the system
CR8011
APPENDICES

CR8012 Limit switch CW direction input


CR8013 Limit switch CCW direction input
CR8014 Origin sensor input
CR8015 Stop sensor input
CR8100 Forced stop
CR8101 Deceleration stop
CR8102 Error clear
CR8103 Warning clear
Lists of CR and CM Devices

CR8104 Current coordinate change request (level detection)


CR8105 Operating speed change request (level detection)
CR8106 CPU positioning function, axis 2 Target coordinate change request (level detection)
CR8107 to
− Reserved for the system
CR8111
CR8112 Limit switch CW direction input
CR8113 Limit switch CCW direction input
CR8114 Origin sensor input
CR8115 Stop sensor input
CR8200 Forced stop
CR8201 Deceleration stop
CR8202 Error clear
CR8203 Warning clear
CR8204 Current coordinate change request (level detection)
CR8205 Operating speed change request (level detection)
CR8206 CPU positioning function, axis 3 Target coordinate change request (level detection)
CR8207 to
Reserved for the system
CR8211
CR8212 Limit switch CW direction input
CR8213 Limit switch CCW direction input
CR8214 Origin sensor input
CR8215 Stop sensor input
CR8300 Forced stop
CR8301 Deceleration stop
CR8302 Error clear
CR8303 Warning clear
CR8304 Current coordinate change request (level detection)
CR8305 Operating speed change request (level detection)
CR8306 CPU positioning function, axis 4 Target coordinate change request (level detection)
CR8307 to
Reserved for the system
CR8311
CR8312 Limit switch CW direction input
CR8313 Limit switch CCW direction input
CR8314 Origin sensor input
CR8315 Stop sensor input

A-16 - KV Nano Series(terminal block type) User’s Manual -


2 Lists of CR and CM Devices

Attribute
CR R: Read only Function
Blank: Read/write
CR8400 R Turned ON during pulse output
CR8401 R Positioning complete relay
CR8402 R Error
CR8403 R Warning
CR8404 R Origin returning operation in progress
CR8405 R CPU positioning function, axis 1 Origin returning operation complete
CR8406 to
− Reserved for the system
CR8413
Indicates the presence of axis 1 (ON: present, OFF: not

APPENDICES
CR8414 R
present)
CR8415 R Comparator 2 matching relay
CR8500 R Turned ON during pulse output
CR8501 R Positioning complete relay
CR8502 R Error
CR8503 R Warning
CR8504 R Origin returning operation in progress
CR8505 R CPU positioning function, axis 2 Origin returning operation complete

Lists of CR and CM Devices


CR8506 to
− Reserved for the system
CR8513
Indicates the presence of axis 2 (ON: present, OFF: not
CR8514 R
present)
CR8515 R Comparator 2 matching relay
CR8600 R Turned ON during pulse output
CR8601 R Positioning complete relay
CR8602 R Error
CR8603 R Warning
CR8604 R Origin returning operation in progress
CR8605 R CPU positioning function, axis 3 Origin returning operation complete
CR8606 to
− Reserved for the system
CR8613
Indicates the presence of axis 3 (ON: present, OFF: not
CR8614 R
present)
CR8615 R Comparator 2 matching relay
CR8700 R Turned ON during pulse output
CR8701 R Positioning complete relay
CR8702 R Error
CR8703 R Warning
CR8704 R Origin returning operation in progress
CR8705 R CPU positioning function, axis 4 Origin returning operation complete
CR8706 to
R Reserved for the system
CR8713
Indicates the presence of axis 4 (ON: present, OFF: not
CR8714 R
present)
CR8715 R Comparator 2 matching relay
CR8800 to
− Reserved for the system
CR8915

- KV Nano Series(terminal block type) User’s Manual - A-17


2 Lists of CR and CM Devices

Control Memory Entries CM

Control memory entries (CM0000 to CM8999) can be used to perform operations such as checking the
operation status of the base unit and setting and monitoring the built-in functions.
Control memory entries reserved for the system cannot be used.
Attribute Hold
CM R: Read only Function ○: Hold
Blank: Read/write Set: Holding can be set
CM0000
APPENDICES

and Device setting displayed on the first line Set


CM0001
CM0002
and Device setting displayed on the second line Set
CM0003
CM0004
Operator panel KV-D30
and Device setting displayed on the third line Set
Page 0
CM0005
CM0006
and Device setting displayed on the fourth line Set
CM0007
Lists of CR and CM Devices

CM0008
and Reserved for the system Set
CM0009
CM0010 to
Page 1 to 19 (the same as CM0000 to CM0009) Set
CM0199
CM0200
and Attribute setting displayed on the first line Set
CM0201
CM0202
and Attribute setting displayed on the second line Set
CM0203
CM0204 Operator panel KV-D30
and Page 0 Attribute setting displayed on the third line Set
CM0205
CM0206
and Attribute setting displayed on the fourth line Set
CM0207
CM0208 Template 1 setting Set
CM0209 Template 2 setting Set
CM0210 to
Page 1 to 19 (the same as CM0200 to CM0209) Set
CM0399
CM0400 For enabling and disabling transitions Set
CM0401 For the page switching setting Set
CM0402 Current page displayed Set
CM0403 to
Operator panel KV-D30 Reserved for the system Set
CM409
CM0410 to
Direct access function Set
CM415
CM0416 to
Reserved for the system Set
CM0499
CM0500 to
− Reserved for the system
CM699
CM0700*1 R Read from RTC (year)
CM0701*1 R Read from RTC (month)
CM0702*1 R Read from RTC (day)
CM0703*1 R Read from RTC (hour)
CM0704*1 R Read from RTC (minute)
CM0705*1 R Read from RTC (second)
CM0706*1 R Read from RTC (day of the week)
CM0707 − Reserved for the system

*1 This cannot be used on the KV-N14**.

A-18 - KV Nano Series(terminal block type) User’s Manual -


2 Lists of CR and CM Devices

Attribute Hold
CM R: Read only Function ○: Hold
Blank: Read/write Set: Holding can be set
CM0708
R 32-bit, 1 ms, free-run counter
and CM709
CM0710 Reserved for the system
CM0711 R CPU function version
CM0712 to
− Reserved for the system
CM719
CM0720 R Scan time measured value (in units of 10 µs)
CM0721 Set value during fixed scan time operation (in units of 10 µs)
Scan time (in units of 10 µs) when the scan time setting (the fixed scan time
CM0722 R

APPENDICES
operation and END processing time settings) is exceeded
CM0723 R END processing time measured value (in units of 10 µs)
CM0724
− Reserved for the system
and CM725
CM0726 R Minimum scan time value (in units of 10 µs)
CM0727 R Maximum scan time value (in units of 10 µs)
CM0728 END processing time set value (in units of 10 µs)
END processing time (in units of 10 µs) when the scan time setting (the fixed
CM0729 R
scan time operation and END processing time settings) is exceeded
CM0730 to

Lists of CR and CM Devices


− Reserved for the system
CM1599
CM1600
and R Input capture when INT0 occurs
CM1601
CM1602
and R Input capture when INT1 occurs
CM1603
CM1604
and R Input capture when INT2 occurs
CM1605
CM1606
and R Input capture when INT3 occurs
CM1607
CM1608 to
− Reserved for the system
CM1619
CM1620 Input time constant setting ○
CM1621 to
− Reserved for the system
CM1629
CM1630
and R Analog volume 0
CM1631
CM1632
and R Analog volume 1
CM1633
CM1634 to
− Reserved for the system
CM1649
CM1650 Number of sensor setting instruction executions
CM1651 to
− Reserved for the system
CM1657
CM1658 R Number of consecutive project password authentication failures ○
CM1659 R Total number of project password authentication failures ○
CM1660 to
R Free space in the logging or tracing ring buffer (in units of kB; ID0 to ID10)
CM1669
CM1670 to
− Reserved for the system
CM1679
CM1680 R Logging or tracing file save counter ○
CM1681 R Logging or tracing file save counter ○
CM1682 R Logging or tracing file save counter ○
CM1683 R Logging or tracing file save counter ○
CM1684 R Logging or tracing file save counter ○
CM1685 R Logging or tracing file save counter ○
CM1686 R Logging or tracing file save counter ○
CM1687 R Logging or tracing file save counter ○

- KV Nano Series(terminal block type) User’s Manual - A-19


2 Lists of CR and CM Devices

Attribute Hold
CM R: Read only Function ○: Hold
Blank: Read/write Set: Holding can be set
CM1688 R Logging or tracing file save counter ○
CM1689 R Logging or tracing file save counter ○
CM1690 to
− Reserved for the system
CM1709
CM1710 R Completion code of automatic loading when power is turned on ○
CM1711 to
Reserved for the system
CM1713
CM1714 R Completion code during project loading ○
CM1715 Reserved for the system
APPENDICES

CM1716 R Completion code during project saving ○


CM1717 Reserved for the system
CM1718
and − Reserved for the system
CM1719
CM1720 User message 1 ○
CM1721 to User message 2
CM1737 (up to 24 characters + end code (00H)) ○
CM1738 Access window operation disabled setting ○
CM1739 Reserved for the system
Lists of CR and CM Devices

CM1740 to Ladder project name


CM1756 (up to 32 characters + end code (00H))
CM1757 to Project name to be displayed in the access window
CM1763 (up to 12 characters + end code (00H))
CM1764 to
Reserved for the system
CM1779
CM1780 Access window initial screen setting, enabled ○
CM1781 Access window Access window initial screen setting, device type ○
CM1782 Access window initial screen setting, screen ID ○
CM1783 Access window initial screen setting, screen ID ○
CM1784 Access window initial screen setting, device number ○
CM1785 Access window initial screen setting, device number ○
CM1786 Access window initial screen setting, display format ○
Access window initial screen setting, device name
CM1787 ○
representation
CM1788 Access window initial screen setting, key lock status ○
CM1789 Access window initial screen setting, display language ○
CM1790 to
− Reserved for the system
CM2199
CM2200 Year and month ○
CM2201 Day ○
CM2202 Hour ○
CM2203 Minute ○
CM2204 Seconds ○
CM2205 Detailed information of Number ○
CM2206 the latest serious error, 1 Detailed information, number of valid pieces of data ○
unit
CM2207 Detailed information, piece 01 ○
CM2208 Detailed information, piece 02 ○
: ○
CM2226 Detailed information, piece 20 ○
CM2227 to
Reserved for the system
CM2249

A-20 - KV Nano Series(terminal block type) User’s Manual -


2 Lists of CR and CM Devices

Attribute Hold
CM R: Read only Function ○: Hold
Blank: Read/write Set: Holding can be set
CM2250 Year and month ○
CM2251 Day ○
CM2252 Hour ○
CM2253 Minute ○
CM2254 Detailed information of Seconds ○
CM2255 the latest minor error, 1 Number ○
CM2256 unit*1 Detailed information, number of valid pieces of data ○
CM2257 Detailed information, piece 01 ○
CM2258 Detailed information, piece 02

APPENDICES

: ○
CM2276 Detailed information, piece 20 ○
CM2277 to
− Reserved for the system
CM2388
CM2389 R Number of connected expansion units
CM2390 R Error code for memory card instructions
CM2391 to
− Reserved for the system
CM2395
CM2396 to

Lists of CR and CM Devices


− Reserved for the system
CM2399
CM2400 to Number of interrupts (INT0 to INT3, CTC0 to CTC7, and positioning axis 1 to
CM2415 axis 4)
CM2416 to
− Reserved for the system
CM4799
CM4800 Constant when rotation direction is detected ○
CM4801 Enable, clear, and sign setting ○
CM4802
and Ring counter lower limit ○
CM4803
CM4804
and High-speed counter Ring counter upper limit ○
CM4805 function (CTH0)
CM4806
and Preset input ○
CM4807
CM4808
and − Reserved for the system
CM4809
CM4810 Constant when rotation direction is detected ○
CM4811 Enable, clear, and sign setting ○
CM4812
and Ring counter lower limit ○
CM4813
CM4814
and High-speed counter Ring counter upper limit ○
CM4815 function (CTH1)
CM4816
and Preset input ○
CM4817
CM4818
and − Reserved for the system
CM4819

*1 This cannot be used on the KV-N14**.

- KV Nano Series(terminal block type) User’s Manual - A-21


2 Lists of CR and CM Devices

Attribute Hold
CM R: Read only Function ○: Hold
Blank: Read/write Set: Holding can be set
CM4820 Constant when rotation direction is detected ○
CM4821 Enable, clear, and sign setting ○
CM4822
and Ring counter lower limit ○
CM4823
CM4824
and High-speed counter Ring counter upper limit ○
CM4825 function (CTH2)
CM4826
and Preset input ○
APPENDICES

CM4827
CM4828
and − Reserved for the system
CM4829
CM4830 Constant when rotation direction is detected ○
CM4831 Enable, clear, and sign setting ○
CM4832
and Ring counter lower limit ○
CM4833
CM4834
Lists of CR and CM Devices

and High-speed counter Ring counter upper limit ○


CM4835 function (CTH3)
CM4836
and Preset input ○
CM4837
CM4838
and − Reserved for the system
CM4839
CM4840 to
− Reserved for the system
CM4899
CM4900
and R Frequency measured result (Hz or rpm)
CM4901
CM4902 Frequency counter Number of pulses per rotation ○
function (CTH0)
CM4903 Number of scans ○
CM4904 External input source ○
CM4905 − Reserved for the system
CM4906 Set frequency (Hz) ○
Specified frequency pulse
CM4908 Duty cycle (0 to 100%) ○
output function (CH0)
CM4909 − Reserved for the system
CM4910
and R Frequency measured result (Hz or rpm)
CM4911
CM4912 Frequency counter Number of pulses per rotation ○
function (CTH1)
CM4913 Number of scans ○
CM4914 External input source ○
CM4915 − Reserved for the system
CM4916 Set frequency (Hz) ○
Specified frequency pulse
CM4918 Duty cycle (0 to 100%) ○
output function (CH1)
CM4919 − Reserved for the system
CM4920
and R Frequency measured result (Hz or rpm)
CM4921
CM4922 Frequency counter Number of pulses per rotation ○
function (CTH2)
CM4923 Number of scans ○
CM4924 External input source ○
CM4925 − Reserved for the system
CM4926 Set frequency (Hz) ○
Specified frequency pulse
CM4928 Duty cycle (0 to 100%) ○
output function (CH2)
CM4929 − Reserved for the system

A-22 - KV Nano Series(terminal block type) User’s Manual -


2 Lists of CR and CM Devices

Attribute Hold
CM R: Read only Function ○: Hold
Blank: Read/write Set: Holding can be set
CM4930
and R Frequency measured result (Hz or rpm)
CM4931
CM4932 Frequency counter Number of pulses per rotation ○
function (CTH3)
CM4933 Number of scans ○
CM4934 External input source ○
CM4935 − Reserved for the system
CM4936 Set frequency (Hz) ○
Specified frequency pulse
CM4938 Duty cycle (0 to 100%) ○
output function (CH3)

APPENDICES
CM4939 Reserved for the system
CM4940 to
− Reserved for the system
CM4999
CM5000 to
For built-in serial assignment
CM5999
CM6000 to
For extension function assignment 1
CM6999
CM7000 to
For extension function assignment 2
CM7999
CM8000

Lists of CR and CM Devices


and Target value or travel Set
CM8001
CM8002 Acceleration rate Set
CM8003 Deceleration rate Set
CM8004 CPU positioning function,
and axis 1 Operation frequency Set
CM8005 Point parameter 1
CM8006 Operation mode Set
CM8007 Reserved for the system Set
CM8008 Travel after stop sensor input Set
CM8009 − Reserved for the system
CM8010 to CPU positioning function, Point parameters 2 to 20
Set
CM8199 axis 1 (the same as CM8000 to CM8009)
CM8200
and Target value or travel Set
CM8201
CM8202 Acceleration rate Set
CM8203 Deceleration rate Set
CM8204 CPU positioning function,
and axis 2 Operation frequency Set
CM8205 Point parameter 1
CM8206 Operation mode Set
CM8207 Reserved for the system Set
CM8208 Travel after stop sensor input Set
CM8209 − Reserved for the system
CM8210 to CPU positioning function, Point parameters 2 to 20
Set
CM8399 axis 2 (the same as CM8200 to CM8209)
CM8400
and Target value or travel Set
CM8401
CM8402 Acceleration rate Set
CM8403 Deceleration rate Set
CM8404 CPU positioning function,
and axis 3 Operation frequency Set
CM8405 Point parameter 1
CM8406 Operation mode Set
CM8407 Reserved for the system Set
CM8408 Travel after stop sensor input Set
CM8409 − Reserved for the system
CM8410 to CPU positioning function, Point parameters 2 to 20
Set
CM8599 axis 3 (the same as CM8400 to CM8409)

- KV Nano Series(terminal block type) User’s Manual - A-23


2 Lists of CR and CM Devices

Attribute Hold
CM R: Read only Function ○: Hold
Blank: Read/write Set: Holding can be set
CM8600
and Target value or travel Set
CM8601
CM8602 Acceleration rate Set
CM8603 Deceleration rate Set
CM8604 CPU positioning function,
and axis 4 Operation frequency Set
CM8605 Point parameter 1
CM8606 Operation mode Set
CM8607 Reserved for the system Set
APPENDICES

CM8608 Travel after stop sensor input Set


CM8609 − Reserved for the system
CM8610 to CPU positioning function, Point parameters 2 to 20
Set
CM8799 axis 4 (the same as CM8600 to CM8609)
CM8800 I/O setting Set
CM8801 Sensor enable
CM8802
and Comparator 0, current value Set
CM8803
Lists of CR and CM Devices

CM8804
and Comparator 1, current value Set
CM8805
CM8806
and Comparator 2, positioning Set
CM8807
CM8808 Starting speed Set
CM8809 Origin returning operation: starting frequency Set
CM8810 Origin returning operation: acceleration rate Set
CM8811 Origin returning operation: deceleration rate Set
CM8812
and Origin returning operation: operation frequency Set
CM8813
CM8814 Origin returning operation: detailed settings Set
CM8815 JOG operation: starting frequency Set
CM8816 JOG operation: acceleration rate Set
CM8817 JOG operation: deceleration rate Set
CM8818
and CPU positioning function, JOG operation: operation frequency Set
CM8819 axis 1
CM8820
and Home position Set
CM8821
CM8822
and − Reserved for the system
CM8823
CM8824
and Current coordinate change value Set
CM8825
CM8826
Operation speed change value during speed
and Set
control mode
CM8827
CM8828
and Target coordinate change value Set
CM8829
CM8830
and R Output pulse, current coordinate Set
CM8831
CM8832
and R Output frequency, current value Set
CM8833
CM8834 R Error code Set
CM8835 R Execution point number Set
CM8836 to
− Reserved for the system
CM8839

A-24 - KV Nano Series(terminal block type) User’s Manual -


2 Lists of CR and CM Devices

Attribute Hold
CM R: Read only Function ○: Hold
Blank: Read/write Set: Holding can be set
CM8840 I/O setting Set
CM8841 Sensor enable Set
CM8842
and Comparator 0, current value Set
CM8843
CM8844
and Comparator 1, current value Set
CM8845
CM8846
and Comparator 2, positioning Set

APPENDICES
CM8847
CM8848 Starting speed Set
CM8849 Origin returning operation: starting frequency Set
CM8850 Origin returning operation: acceleration rate Set
CM8851 Origin returning operation: deceleration rate Set
CM8852
and Origin returning operation: operation frequency Set
CM8853
CM8854 Origin returning operation: detailed settings Set

Lists of CR and CM Devices


CM8855 JOG operation: starting frequency Set
CM8856 JOG operation: acceleration rate Set
CM8857 JOG operation: deceleration rate Set
CM8858
and CPU positioning function, JOG operation: operation frequency Set
CM8859 axis 2
CM8860
and Home position Set
CM8861
CM8862
and − Reserved for the system
CM8863
CM8864
and Current coordinate change value Set
CM8865
CM8866
Operation speed change value during speed
and Set
control mode
CM8867
CM8868
and Target coordinate change value Set
CM8869
CM8870
and R Output pulse, current coordinate Set
CM8871
CM8872
and R Output frequency, current value Set
CM8873
CM8874 R Error code Set
CM8875 R Execution point number Set
CM8876 to
− Reserved for the system
CM8879

- KV Nano Series(terminal block type) User’s Manual - A-25


2 Lists of CR and CM Devices

Attribute Hold
CM R: Read only Function ○: Hold
Blank: Read/write Set: Holding can be set
CM8880 I/O setting Set
CM8881 Sensor enable Set
CM8882
and Comparator 0, current value Set
CM8883
CM8884
and Comparator 1, current value Set
CM8885
CM8886
and Comparator 2, positioning Set
APPENDICES

CM8887
CM8888 Starting speed Set
CM8889 Origin returning operation: starting frequency Set
CM8890 Origin returning operation: acceleration rate Set
CM8891 Origin returning operation: deceleration rate Set
CM8892
and Origin returning operation: operation frequency Set
CM8893
CM8894 Origin returning operation: detailed settings Set
Lists of CR and CM Devices

CM8895 JOG operation: starting frequency Set


CM8896 JOG operation: acceleration rate Set
CM8897 JOG operation: deceleration rate Set
CM8898
and CPU positioning function, JOG operation: operation frequency Set
CM8898 axis 3
CM8900
and Home position Set
CM8901
CM8902
and Reserved for the system
CM8903
CM8904
and Current coordinate change value Set
CM8905
CM8906
Operation speed change value during speed
and Set
control mode
CM8907
CM8908
and Target coordinate change value Set
CM8909
CM8910
and R Output pulse, current coordinate Set
CM8911
CM8912
and R Output frequency, current value Set
CM8913
CM8914 R Error code Set
CM8915 R Execution point number Set
CM8916 to
Reserved for the system
CM8919

A-26 - KV Nano Series(terminal block type) User’s Manual -


2 Lists of CR and CM Devices

Attribute Hold
CM R: Read only Function ○: Hold
Blank: Read/write Set: Holding can be set
CM8920 I/O setting Set
CM8921 Sensor enable Set
CM8922
and Comparator 0, current value Set
CM8923
CM8924
and Comparator 1, current value Set
CM8925
CM8926
and Comparator 2, positioning Set

APPENDICES
CM8927
CM8928 Starting speed Set
CM8929 Origin returning operation: starting frequency Set
CM8930 Origin returning operation: acceleration rate Set
CM8931 Origin returning operation: deceleration rate Set
CM8932
and Origin returning operation: operation frequency Set
CM8933
CM8934 Origin returning operation: detailed settings Set

Lists of CR and CM Devices


CM8935 JOG operation: starting frequency Set
CM8936 JOG operation: acceleration rate Set
CM8937 JOG operation: deceleration rate Set
CM8938
and CPU positioning function, JOG operation: operation frequency Set
CM8939 axis 4
CM8940
and Home position Set
CM8941
CM8942
and Reserved for the system
CM8943
CM8944
and Current coordinate change value Set
CM8945
CM8946
Operation speed change value during speed
and Set
control mode
CM8947
CM8948
and Target coordinate change value Set
CM8949
CM8950
and R Output pulse, current coordinate Set
CM8951
CM8952
and R Output frequency, current value Set
CM8953
CM8954 R Error code Set
CM8955 R Execution point number Set
CM8956 to
Reserved for the system
CM8959

- KV Nano Series(terminal block type) User’s Manual - A-27


3 ASCII Code Table

ASCII Code Table

Upper four bits

0 1 2 3 4 5 6 7 8 9 A B C D E F
N D S
0 U
L
L
E P 0 @ P ` p ー タ ミ
S D
1 O C ! 1 A Q a q 。 ア チ ム
APPENDICES

H 1
S D
2 T
X
C
2 ” 2 B R b r 「 イ ツ メ
E D
3 T
X
C
3 # 3 C S c s 」 ウ テ モ
E D
4 O
T
C
4 $ 4 D T d t 、 エ ト ヤ
E N
5 N A % 5 E U e u ・ オ ナ ユ
Q K
ASCII Code Table

A S
6 Y & 6 F V f v ヲ カ ニ ヨ
Lower four bits

C
K N
B E
7 B ’ 7 G W g w ァ キ ヌ ラ
E T
L
B CA
8 S N( 8 H X h x ィ ク ネ リ
9 HT EM ) 9 I Y i y ゥ ケ ノ ル
A LF UB * : J
S
Z j z ェ コ ハ レ
B VT SC + ; K [
E
k { ォ サ ヒ ロ
C FF → , < L \ l | ャ シ フ ワ
D CR ← ー = M ] m } ュ ス ヘ ン
E SO ↑ . > N ^ n ~ ョ セ ホ ゛
D
F SI ↓ / ? O _ o E
L ッ ソ マ °

A-28 - KV Nano Series(terminal block type) User’s Manual -


4 List of Instructions
This section gives a list of instructions and the processing outlines of those instructions. For details, see
the pages noted for each instruction.
The following execution condition symbols are used: " " indicates execution during each scan, " "
indicates execution for only one scan when a rising edge occurs, and " " indicates execution for only
one scan when a falling edge occurs.
Classification

Description
Execution
Condition

Page
Mnemonic Symbol Processing Outline

APPENDICES
Logging instructions

n Enables the execution of logging for the specified


LOGE 5-186
LOGE logging ID
Logging

n Disables the execution of logging for the specified


LOGD 5-186
LOGD logging ID

n
TRGD Captures the logging data of the specified ID 5-188

List of Instructions
TRGD

High-speed processing instructions


.D CTH n Performs up counting and down counting operations
CTH S with the following response frequency:
High-speed counter

.L
single-phase: 100 kHz; phase difference: 50 kHz 5-132
.D and at 32 bits (0 to 4294967295 or
CTC S
.L CTC n -2147483648 to 2147483647)

RFSCTH Updates the current value of the high-speed counter


RFSCTH n 5-136
to the most recent value

Frequency counter instructions

FCNT n Uses a high-speed counter to measure the pulse


FCNT 5-158
Counter

S1 S2 D
input frequency

RCNT n Uses a high-speed counter to measure the pulse


RCNT 5-160
S1 S2 D input rotation speed
Cam switch instructions
MCMP
S1 S2
MCMP D
Performs multi-stage comparator operations 5-164
n
Cam switch

ABSENC
ABSENC S1 S2 D1 Performs cam operations using an absolute encoder 5-168
D2

INCENC
Performs cam operations using an incremental
INCENC S1 S2 S3 5-172
D1 D2
encoder

Specified frequency pulse output instruction

S Uses a high-speed counter to generate pulses at the


output
Pulse

PLSOUT PLSOUT n1 5-96


specified frequency
n2

- KV Nano Series(terminal block type) User’s Manual - A-29


4 List of Instructions

Classification

Description
Execution
Condition

Page
Mnemonic Symbol Processing Outline

Positioning instructions
Trapezoidal
control

PSTRT
PSTRT n1 n2 n3 Starts trapezoidal control 5-46
APPENDICES

JOG
operation

CW
n1
JOG

JOG CCW Executes the JOG operation 5-50


n2
HIGH
Origin returning
operation

ORG
ORG n1 n2 Starts the origin returning operation 5-54
List of Instructions

home position Teaching

TCH Captures the current position, and sets the target


TCH n1 n2 5-58
n3
coordinate to this value
Travel to

HOME
HOME n1 n2 Starts the travel to home position operation 5-60
Current value Target coordinate Operating
speed

CHGSP
CHGSP n1 n2 S Changes the operating speed 5-62
change

CHGTGT
CHGTGT n1 n2 S Changes the target coordinate 5-66
update

RFSPS Updates the current value and current speed to the


RFSPS n1 n2 5-68
most recent values

A-30 - KV Nano Series(terminal block type) User’s Manual -


4 List of Instructions

Classification

Description
Execution
Condition

Page
Mnemonic Symbol Processing Outline

High-speed processing instructions


Input time
constant

HSP Reduces the input relay time constant to make the


HSP D 4-92
input response faster

DI DI Disables the execution of interrupt programs 4-94

APPENDICES
EI EI Enables the execution of interrupt programs 4-94

D
DIC Sets the interrupt disabled range 4-96
Interrupts

DIC

INT Executes the interrupt program from this instruction to


INT S − 4-98
the RETI instruction

List of Instructions
RETI
RETI Indicates the end of the interrupt program − 4-98

Module instructions
MDSTRT
MDSTRT S Starts the execution of the specified module
Modules

4-110
MDSTOP
MDSTOP S Stops the execution of the specified module

Macro instructions

MCALL
MCALL Varies depending on the macro to be executed Executes the specified subroutine macro
Macros

MSTRT
MSTRT Varies depending on the macro to be executed Executes the specified self-hold macro 4-126

MEND
MEND Stops execution of the self-hold macro

- KV Nano Series(terminal block type) User’s Manual - A-31


5 List of Unusable Instructions
This section describes the instructions that cannot be used in initialize modules, interrupt programs,
macros, and subroutine programs.

 Initialize modules and interrupt programs


Instruction Type Instruction
Common @XXXX instruction Differential execution type
LDP and LDF Load pulse and load pulse fall
ANP and ANF AND pulse and AND pulse fall
ORP and ORF OR pulse and OR pulse fall
Contact instructions
LDPB and LDFB Load pulse bar and load pulse fall bar
ANPB and ANFB AND pulse bar and AND pulse fall bar
APPENDICES

ORPB and ORFB OR pulse bar and OR pulse fall bar


DIFU and DIFD Differential up and differential down
ONDL and OFDL On delay and off delay
Base instructions

Output instructions SHOT One shot


FLIK Flicker
ALT Alternate
TMR, TMH, TMS, and Timer, high-speed timer, 1 ms high-speed timer, and 10
TMU µs high-speed timer
List of Unusable Instructions

C Counter
Timer and counter OUTC Out counter
instructions
ITVL Interval timer
UDC Up/down counter
UDT Up/down timer
Connection/end
MEP and MEF Mep and mef
instruction
Shift instruction SFT Shift
instructions
Application

STG, JMP, and


Stage, jump, and end stage
Stage processing ENDS
instructions W-ON and W-OFF Wait on and wait off
W-UE and W-DE Wait rising edge and wait falling edge
instructions
Calculation

Data control RAMP, TPOUT, and Ramp signal, time division proportion output, and
instructions LLFLT advancement delay filter

Data processing
HKEY and SORTN Hexadecimal key input and binary data division sort
instructions
Cam switch ABSENC and
Absolute encoder and incremental encoder
instructions
Expansion

instructions INCENC
Frequency counter
FCNT and RCNT Frequency and rotation speed measurements
instructions
PID instructions PID and PIDAT PID and PID with automatic tuning
Access window AWNUM and
User message 1 and user message 2
instructions AWMSG
 Macros
Instruction Type Instruction
Application
Macro instructions MCALL and MSTRT Macro call and macro start
instructions
* Write the MEND (macro end) instruction in self-hold macros. This instruction cannot be used in modules
and subroutine macros.
 Subroutine programs
Instruction Type Instruction
Application Stage processing STG, JMP, and Stage, jump, and end stage
instructions instructions ENDS
High-speed processing
Expansion instructions INT and RETI Interrupt and interrupt return
instructions

A-32 - KV Nano Series(terminal block type) User’s Manual -


6 List of Abbreviated Mnemonics
This section describes the instructions and devices that can be abbreviated or that have representative
input when entering mnemonics with KV STUDIO.

 Instructions

Instruction Abbreviation
LD and AND A and X
LDB and ANB B, LDI, LDNOT, ANI, ANDNOT, and /*3
Contact instructions ORB ORI and ORNOT

APPENDICES
LDP and ANP P
LDF and ANF F
BLD and BAND BA
Bit contact instructions
BLDB and BANB BB
LD= and AND= =
LD< and AND< <
LD> and AND> >
Comparison instructions

List of Abbreviated Mnemonics


LD<= and AND<= <=
LD>= and AND>= >=
LD<> and AND<> <>
OUT O and Y
OUB OB
SET S
Output instructions
RES R and RST
DIFU U and PLS
DIFD D and PLF
BOUT BO
BOUB BOB
Bit output instructions
BSET BS
BRES BR
TMR T, TIM, and OUTT
TMH TH, TIMH, and OUTH
Timer and counter TMS TS, TIMHH, and OUTS
instructions*1 TMU TU, TMUH, and OUTH
C CNT
UDC CNTR
Connection and end END E and FEND
instructions ENDH H
W-ON WON
W-OFF WOFF
Stage instructions
W-UE WU and WUE
W-DE WD and WDE
MC IL
Flow instructions
MCR ILC
UREAD FROM
Buffer memory instructions
UWRIT TO
INC ++
Arithmetic and comparison
DEC --
instructions
ROOT SQRT

- KV Nano Series(terminal block type) User’s Manual - A-33


6 List of Abbreviated Mnemonics

Instruction Abbreviation
Logic calculation EORA XOR and XORA
instructions ENRA XNORA
Data control instructions APR SCL
DFLOAT FLTD, DFLTD, DBL, and DBLL
DINTG INTD, DINTD, FIXD, and FIXLD
Floating-point instructions
FTODF ECON
DFTOF EDCON
DASC DSTR
APPENDICES

RDASC DVAL
Text processing HASC HSTR
instructions RHASC HVAL
FASC FSTR
RFASC FVAL
CAL+ +
CAL- -* 2
List of Abbreviated Mnemonics

CAL* *
CAL/ / *3
Simple calculation CAL& & and WAND
instructions CAL| | and WOR
CAL~ ~ and WXOR
CAL^ ^, NOT, and CML
CAL>> >> and SFR
CAL<< << and SFL
High-speed processing INT I
instructions RETI IRET

*1 You can enter timer and counter instructions without a space between the instruction and the
device number.
(Example) TMR 0002 DM00001  T2 D1
*2 If you enter "-" directly in the ladder editing window, a horizontal connecting line will be inserted.
If you enter "-" in the direct entry dialog box ( Esc ), "CAL-instruction" will be inserted.
*3 If you enter "/" directly in the ladder editing window, the "LDB" instruction will be inserted.
If you enter "/" in the direct entry dialog box ( Esc ), "CAL/instruction" will be inserted.

 Device names

Device Name Abbreviated Input


R None (numbers only)
MR M
LR L
DM D

 Device numbers and constants


You can use zero suppression.

A-34 - KV Nano Series(terminal block type) User’s Manual -


7 List of Shortcut Keys
This section gives a list of the shortcut keys that are used to execute the various functions.

Shortcut Keys That Are Valid in the Unit Editor

 File  Operations in the unit configuration


Import Ctrl + I area
Close Alt + F4 Move cursor ← • → •↑ • ↓
Move cursor to start of
 Edit

APPENDICES
Home
rung
Cut Ctrl + X Move cursor to end of
Copy Ctrl + C rung
End
Paste Ctrl + V Delete configured units Delete
Delete Delete Shift +
Multi select
Unit comments Ctrl + Shift + U ← • → •↑ • ↓
Block comment Ctrl + Shift + B
 Operations in unit selection window

List of Shortcut Keys


System comments Ctrl + Shift + S
Unit preset Move cursor ← • → •↑ • ↓
Ctrl + R
Batch input relay No. Add selected unit
Ctrl + A

 Convert  Operations in unit setup window

Jump to error rung Move cursor ↑ • ↓


F4
Auto-assign relay/DM F5 Ctrl +
Move displayed unit
Device check ← • → •↑ • ↓
F6
Input Tab
 View Input/confirm
Display unit setting Cancel Esc
Built-in Function Monitor Ctrl + Alt + U
 Operations in message area
Custom Monitor Ctrl + Alt + M
Move cursor ↑ • ↓
Buffer memory monitor Ctrl + Alt + R

 Window
Unit configuration area Alt + U
Select unit Alt + 1
Setup unit Alt + 2
Refresh setting Alt + 3
Message area Alt + 4

 Help
How to use Unit Editor F1

- KV Nano Series(terminal block type) User’s Manual - A-35


7 List of Shortcut Keys

Shortcut Keys That Are Valid in KV STUDIO

Items that are indicated with a "" can be assigned to other shortcut key sequences.

Shortcut keys that are valid on the initial screen

 File  Monitor/Simulator
New project Ctrl + N PLC monitor Ctrl + F1
Open project Ctrl + O Read from PLC Ctrl + F5
APPENDICES

 View
Workspace Alt + 1
Output window Alt + 2

Shortcut keys that are valid in editor mode


List of Shortcut Keys

 File Prev. changed


block Ctrl + Alt + ←
New project Jump
Ctrl + N Next changed
block Ctrl + Alt + →
Open project Ctrl + O
Cell Ins
Save project Ctrl + S
Print Ctrl + P Shift + /
Rung
Shift + Ins
Insert
 Edit Rung comment Ctrl +

Undo Ctrl + Z Ctrl + Shift +


Loopback ladder
Redo
F8
Ctrl + Y
Delete rung Shift + Delete
Cut Ctrl + X
Disable rung, Setup Ctrl + Q
Copy Ctrl + C
Disable rung, Cancel Ctrl + W
Paste Ctrl + V
Multi paste
Ctrl + Shift +
Ctrl + Shift + V Insert
Ins
Search Ctrl + F
Bookmark Set Ctrl + Shift +
Replace operand Ctrl + H
Ctrl + Shift +
New cross reference (space) Remove
Delete
Cross reference,
Create rung cmnts list Ctrl + L
Ctrl + →
Cross reference, Previous Shift + F3 Rung selection ( Shift + ← )*1
Cross reference, Next F3 ( Shift + → )*2
Rung or rung Ctrl + Shift +
step number Ctrl + Shift + G Ladder arrangement
F
Top Ctrl + Home
Edit list Ctrl + D
Bottom Ctrl + End
Change operand
Previous block Ctrl + ↑
Change device cmnt Ctrl + M
Jump Next block Ctrl + ↓
Enter vert.
Previous symbol connection line F8
Shift + Tab
Next symbol Edit Enter horiz.
Tab connection connection line F9 ( − )
Home line
Home Horizontal ( Ctrl +
Alt +
connection line
End End Tab )
to end of rung

A-36 - KV Nano Series(terminal block type) User’s Manual -


7 List of Shortcut Keys

Delete vert. Switch between NO contact


connection line Shift + F8 and NC contact, change /
suffix, enter NC contact
Delete horiz.
connection line Shift + F9 Switch between rising edge
Edit and falling edge Ctrl + /
connection Enter/delete Alt + ↑ /
line vert. connection ↑ Switch between direct input
line Alt + and current value F2
Enter/delete Alt + ← / Ctrl + Shift +
horiz. connection Next pane
*
line Alt + ← Alt + F11
Display cross references of Ctrl + Shift +
the device at the cursor Previous pane
(space) *
Alt + F12

APPENDICES
position
Delete instruction to the left Increment device number Ctrl + Shift + ↑
of cursor position Backspace ↑
Decrement device number Ctrl + Shift +
Delete instruction at cursor
position Delete * This is only valid when the display of the ladder editing
window is split.
Directly enter instruction at
cursor position Esc  View
Move symbol at the cursor Workspace
position to the right Ins Alt + 1

List of Shortcut Keys


 Output window Alt + 2
Enter NO contact F5
Enter NC contact Shift + Ctrl + P
Shift + F5 Instruction/macro palette
 ( )*
Enter NO contact OR F4
Comment editing window Ctrl + F7
Enter NC contact OR Shift + F4
Device use list Ctrl + E
Enter NO contact coil F7
Zoom in Ctrl + PageUp
Enter NC contact coil Shift + F7
Ctrl +
SET Alt + F1 Zoom out
PageDown
RES Alt + F2
Ctrl +
TMR Alt + F3 Display label
Backspace
TMS Alt + F5
Display cmnts Ctrl + (space)
C Alt + 0
Display unit device Shift + (space)
DIFU Alt + F8 Switch between editing
DIFD windows Alt + F6
Alt + F9
MOV Alt + F10 * This is only valid when there is no instruction in the
 selected cell.
LDA Alt + F11
STA
 Script
Alt + F12
 Insert area script Ctrl + R
LDP Alt + F7
Insert box script Ctrl + B
Alt + Shift +
LDF Convert selected script
F7 Ctrl + T
Display/hide converted
Alt + Shift + ladder Ctrl + G
ORP
F8 Script function list Ctrl + (space)
Alt + Shift +
ORF Ctrl + Shift +
F9 Script function tip
(space)
Alt + Shift +
MEP
F5  Convert
Alt + Ctrl + Convert Ctrl + F9
MEF
F5 Convert individual modules/
macros Ctrl + F10
Alt + Ctrl +
INV
*1 This is only valid when the cursor is in the far-left position (the
F10
first column).
*2 This is only valid when the cursor is in the far-right position (the
tenth column).
- KV Nano Series(terminal block type) User’s Manual - A-37
7 List of Shortcut Keys

 Monitor/Simulator  Tool
Ctrl + Shift + Unit Editor Ctrl + U
Monitor mode
F3
 Help
PLC transfer  monitor
mode Ctrl + F8 Instruction help F1
PLC read  monitor mode Ctrl + F1 Instruction Reference
Manual Ctrl + 1
PLC read Ctrl + F5
Start Online Edit F10
Simulator Ctrl + F2
APPENDICES

Shortcut keys that are valid in monitor mode

 Edit  View
Search Ctrl + F or Workspace Alt + 1
Rung or rung Output window Alt + 2
step number Ctrl + Shift + G
Zoom in Ctrl + PageUp
List of Shortcut Keys

Top Ctrl + Home


Zoom out Ctrl + PageDown
Bottom Ctrl + End
Display label Ctrl + Backspace
Previous block Ctrl + ↑
Display cmnts Ctrl + (space)
Next block Ctrl + ↓
Display unit device Shift + (space)
Previous
Jump symbol Shift + Tab
Change device value F2
Next symbol Tab Switch between editing
windows Alt + F6
Home Home
End End  Monitor/Simulator
Prev. changed
block Ctrl + Alt + ← Return to Editor Ctrl + F1
Next changed Start Monitor F4
block Ctrl + Alt + →
Stop Monitor Shift + F4
Contact/Coil F12
Start Online
New cross reference (space) Edit F10
Online
Editing Setup Online
Cross reference, Previous Shift + F3
Edit F12
Cross reference, Next F3 Simulator Ctrl + F2
Cross reference,
Create rung cmnts list Ctrl + L Display/hide watch window Alt + 3
Rung selection Ctrl + →
Switching contact between  Debugging
ON and OFF /
Execute 1 scan F9
Register set Ctrl + Shift + J
Execute 1 step F8
Register reset Ctrl + Shift + K
Cancel Ctrl + Shift + L
 Help
Instruction help F1
Instruction Reference
Manual Ctrl + 1

A-38 - KV Nano Series(terminal block type) User’s Manual -


7 List of Shortcut Keys

Shortcut keys that are valid in simulator mode

 Edit  View
Search Ctrl + F ( ) Workspace Alt + 1
Rung selection Ctrl + → Output window Alt + 2
Top Ctrl + Home Zoom in on ladder display Ctrl + PageUp
Bottom Ctrl + End Zoom out from ladder
display Ctrl + PageDown
Previous block Ctrl + ↑ Display label Ctrl + Backspace

APPENDICES
Next block Ctrl + ↓ Display cmnts Ctrl + (space)
Previous symbol Shift + Tab
Display unit device Shift + (space)
Next symbol Tab
Jump Change device value F2
Home Home
End End
 Monitor/Simulator
Prev. changed
block Ctrl + Alt + ← Return to Editor Ctrl + F1

List of Shortcut Keys


Next changed
Ctrl + Alt + → Ctrl + Shift +
block Monitor mode
F3
Contact/Coil F12
Start Online Edit F10
New cross reference (space)
Cross reference, Previous Shift + F3  Help
Cross reference, Next F3 Instruction help F1
Cross reference,
Create rung cmnts list Ctrl + L Instruction Reference
Manual Ctrl + 1
Switching contact between
ON and OFF /

Shortcut keys that are valid during online editing

 Edit Rung or rung Ctrl + Shift + G


step number
Undo Ctrl + Z Top Ctrl + Home
Redo Ctrl + Y Bottom Ctrl + End
Cut Ctrl + X Previous block Ctrl + ↑
Copy Ctrl + C Next block Ctrl + ↓
Paste Ctrl + V Previous Shift + Tab
Multi paste symbol
Ctrl + Shift + V Jump
Search Next symbol Tab
Ctrl + F
Replace operand Home Home
Ctrl + H
End End
Prev. changed Ctrl + Alt + ←
block
Next changed Ctrl + Alt + →
block
Contact/Coil F12
New cross reference (space)
Cross reference, Previous Shift + F3
Cross reference, Next F3
Cross reference, Ctrl + L
Create rung cmnts list
Insert cell Ins

- KV Nano Series(terminal block type) User’s Manual - A-39


7 List of Shortcut Keys

Shift + or Alt + Shift +


Insert empty rung LDF
Shift + Ins F7
Delete rung Shift + Delete Alt + Shift +
ORP
Insert rung comment Ctrl + F8
Disable rung, Setup Ctrl + Q Alt + Shift +
ORF
Disable rung, Cancel Ctrl + W F9
Insert Ctrl + Shift + Ins MOV Alt + F10
Set Ctrl + Shift + LDA Alt + F11
Bookmark
Ctrl + Shift + STA Alt + F12
Remove
APPENDICES

Delete Alt + Shift +


MEP
Rung selection Ctrl + → F5
Enter vert. F8 MEF Alt + Ctrl + F5
connection
line INV Alt + Ctrl + F10
Enter horiz. F9 ( − ) Switch between NO contact /
connection and NC contact, change
Edit line suffix, enter NC contact
connection
line Horizontal Alt + Switch between rising edge Ctrl + /
connection line and falling edge
List of Shortcut Keys

to end of rung ( Ctrl + Tab )


Switch between direct input F2
Delete vert. Shift + F8 and current value
connection
line Register set Ctrl + Shift + J
Delete horiz. Shift + F9 ( − ) Register reset Ctrl + Shift + K
connection
line Cancel Ctrl + Shift + L
Edit Enter/delete Alt + ↑ /
connection vert. connection ↑  View
line line Alt +
Enter/delete Workspace Alt + 1
Alt + ← /
horiz. Output window
connection line Alt + ← Alt + 2
Insert loopback ladder Shift + Ctrl + P
Ctrl + Shift + F8 Instruction/macro palette
( )*
Ladder arrangement Ctrl + Shift + F
Comment editing window Ctrl + F7
Edit list Alt + D
Device use list Ctrl + E
Change operand
Zoom in Ctrl + PageUp
Change device cmnt Alt + M
Zoom out Ctrl + PageDown
Delete instruction to the left Backspace
of Display label
cursor position Ctrl + Backspace
Display cmnts Ctrl + (space)
Delete instruction at cursor Delete
position Display unit device Shift + (space)
Directly enter instruction at Esc
cursor position * This is only valid when there is no instruction in the
selected cell.
Enter NO contact F5
Enter NC contact 
Shift + F5
 Script
Enter NO contact OR F4 Insert area script Ctrl + R
Enter NC contact OR Shift + F4 Insert box script Ctrl + B
Enter NO contact coil F7 Convert selected script Ctrl + T
Enter NC contact coil Shift + F7
SET Alt + F1
RES Alt + F2
TMR Alt + F3
TMS Alt + F5
C Alt + 0
LDP Alt + F7
DIFU Alt + F8
DIFD Alt + F9
A-40 - KV Nano Series(terminal block type) User’s Manual -
7 List of Shortcut Keys

 Monitor/Simulator  Help

Return to Editor Ctrl + F1 Instruction help F1
Ctrl + Shift + Instruction Reference
Monitor mode Manual Ctrl + 1
F3
Online edit transfer F11
Simulator Ctrl + F2
Display/hide watch window Alt + 3

APPENDICES
List of GPPQ and GPPA Format Shortcut Keys

You can change the key assignments of each shortcut.

Enter NO contact Draw and erase


F5 connecting line Alt + ←
GPPQ format F6 (left)
Enter NC contact
GPPA format Draw and erase ↑
Shift + F5

List of Shortcut Keys


connecting line Alt +
GPPQ format Shift + F5 (down)
Enter NO contact
OR GPPA format Draw and erase
F6 connecting line Alt + ↑
Enter NC contact (up)
OR Shift + F6
Convert Ctrl + Alt + F4
Enter coil F7 Convert individual
Enter NC contact modules/macros F4
Not assigned
coil
GPPQ format Shift + F9 Switch between
Enter vert.
connection line
direct input and Not assigned
GPPA format F10 current value
Delete vert. Cross reference,
connection line Ctrl + F10 Previous
Not assigned

Enter horiz. Cross reference,


connection line F9 Next
Not assigned

Delete horiz. PLC transfer ->


connection line Ctrl + F9 monitor mode F3

SET Not assigned PLC read Not assigned


RES Not assigned Start Online Edit Shift + F3
TMR Not assigned Return to Editor F2
TMS Not assigned Ctrl + Shift + Alt +
Next pane
C Not assigned F11
LDP Shift + F7 Ctrl + Shift + Alt +
Previous pane
LDF Shift + F8 F12
ORP Alt + F7 Monitor mode F3
ORF Alt + F8 Display cmnts Ctrl + F5
DIFU Not assigned Instruction/macro
palette Ctrl + Shift + P
DIFD Not assigned
MOV Not assigned
LDA Not assigned
STA Not assigned
MEP Alt + F5
Draw and erase
connecting line Alt + ←
(right)

- KV Nano Series(terminal block type) User’s Manual - A-41


7 List of Shortcut Keys

List of CX Format Shortcut Keys

You can change the key assignments of each shortcut.

Enter NO contact C Return to Editor F2


Enter NC contact Not assigned Ctrl + Shift + Alt +
Next pane
Enter NO contact F11
OR W
Enter NC contact Ctrl + Shift + Alt +
X Previous pane
OR F12
APPENDICES

Enter coil O Monitor mode Ctrl + Shift + F3


Enter NC contact
Q Display cmnts Alt + Y
coil
SET
Instruction/
Shift + F8 macro pallet Ctrl + Shift + P
RES Shift + F9
TMR Ctrl + Alt + O
TMS Not assigned
C Not assigned
List of Shortcut Keys

LDP Not assigned


LDF Not assigned
ORP Not assigned
ORF Not assigned
DIFU Not assigned
DIFD Not assigned
MOV Not assigned
LDA Not assigned
STA Not assigned
MEP Shift + Alt + F5
Draw and erase
connecting line H
(right)
Draw and erase
connecting line Not assigned
(left)
Draw and erase
connecting line V
(down)
Draw and erase
connecting line U
(up)
Convert F7
Convert individual
modules/macros Alt + F7
Switch between
direct input and I
current value
Cross reference,
Previous B
Cross reference,
Next N
PLC transfer 
monitor mode F3

PLC read Ctrl + F5


Start Online Edit F10

A-42 - KV Nano Series(terminal block type) User’s Manual -


7 List of Shortcut Keys

How to Use the / Key

 When you press / , the setting at the cursor position changes.


The values that you can select are shown below.
• (1) NO contact or NC contact and (2) rising edge or falling edge

Ctrl + / (slash)

APPENDICES
Ctrl + / (slash) Ctrl + / (slash)

/ (slash) / (slash) / (slash)

List of Shortcut Keys


Ctrl + / (slash) Ctrl + / (slash)

Ctrl + / (slash)

Point Press Ctrl + / to change the values as shown below.

Ctrl + / (slash)

Ctrl + / (slash) Ctrl + / (slash)

• SET and RES

/ (slash)

- KV Nano Series(terminal block type) User’s Manual - A-43


7 List of Shortcut Keys

• Suffix
/ (slash)

/ (slash) / (slash)
APPENDICES
List of Shortcut Keys

/ (slash)

/ (slash)

/ (slash)

 If you press this key when a cell with no instruction is selected, an NC contact
will be entered.

/ (slash)

*This can only be entered in the direct entry dialog box.

A-44 - KV Nano Series(terminal block type) User’s Manual -


8 List of Characters That Cannot Be Used
This section describes the characters that cannot be used in project names, module names, macro
names, labels, and device comments.

 Characters that cannot be used in project names


When the supported model is the KV-5500/5000/3000 or KV Nano Series

Characters that cannot be used


(space)

When the supported model is the KV-1000

APPENDICES
Characters that cannot be used
(space)
Characters that cannot be used as the
first character
Character and character strings that cannot
be used as the last character or characters
Character string that cannot be used Global

List of Characters That Cannot Be Used


When the supported model is the KV-700/700+M, KV-P16, KV-10 (16), or KV-24 (40)
Characters that cannot be used

 Characters that cannot be used in module and macro names


When the supported model is the KV-7000/5000/3000/1000 or KV Nano Series

Characters that cannot be used


(space)
Characters that cannot be used as the
first character
Character and character strings that cannot
be used as the last character or characters
Character string that cannot be used Global
When the supported model is the KV-700/700+M, KV-P16, KV-10 (16), or KV-24 (40)
Characters that cannot be used

 Characters that cannot be used in labels

Characters that cannot be used


(space)
Characters that cannot be used as the
first character*
Global *
The same names as instructions
Device names
• (1) One alphabet character + or (2) + a number
Character strings that cannot be used • One alphabet character + a number
• +( to )
• +( to )
• The following keywords, which are prescribed in KV script
• IF, THEN, ELSE, END, SELECT, CASE, IS, TO, MC, MCR, FOR,
NEXT, WHILE, DO, UNTIL, TYPE

- KV Nano Series(terminal block type) User’s Manual - A-45


8 List of Characters That Cannot Be Used

• The following keywords, which are prescribed in IEC61131-3


TRUE, FALSE,
TIME, DATE,TIME_OF_DAY, TOD, DATE_AND_TIME, DT,
BOOL, SINT, INT, DINT, LINT, USINT, UINT, UDINT, ULINT,
REAL, LREAL, STRING, WSTRING, BYTE, WORD,
DWORD, LWORD,
ANY, ANY_DERIVED, ANY_ELEMENTARY, ANY_MAGNITUDE,
ANY_NUM, ANY_REAL, ANY_INT, ANY_BIT, ANY_STRING,
ANY_DATE,
ACTION, END_ACTION,
APPENDICES

ARRAY, OF,
AT,
CASE, END_CASE,
CONFIGURATION, END_CONFIGURATION,
CONSTANT,
EN, ENO,
EXIT,
• F_EDGE,
List of Characters That Cannot Be Used

FOR, TO, BY, DO, END_FOR,


FUNCTION, END_FUNCTION,
FUNCTION_BLOCK, END_FUNCTION_BLOCK,
IF, THEN, ELSIF, ELSE, END_IF,
Character strings that cannot be used
INITIAL_STEP, END_STEP,
NOT, MOD, AND, XOR, OR,
PROGRAM, WITH, END_PROGRAM, R_EDGE,
READ_ONLY, READ_WRITE,
REPEAT, UNTIL, END_REPEAT,
RESOURCE, END_RESOURCE,
RETAIN, NON_RETAIN,
RETURN,
STEP,
STRUCT, END_STRUCT,
TASK,
TRANSITION, FROM, END_TRANSITION,
TYPE, END_TYPE,
VAR,VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT,
VAR_TEMP, VAR_EXTERNAL, VAR_ACCESS,
VAR_CONFIG,VAR_GLOBAL,
END_VAR,
WHILE, DO, END_WHILE
• Other character strings (see the IEC61131-3 specifications)
• A label name cannot have two or more consecutive underscore
characters.
The string "a_b_c" is acceptable, but "a__bc" cannot be used.
* When the supported model is the KV-1000, KV-700/700+M, KV-10 (16), or KV-24 (40), some of these
characters and this character string can be used.

 Character that cannot be used in device comments


Character that cannot be used

A-46 - KV Nano Series(terminal block type) User’s Manual -


9 Precautions When Changing from One KV Nano Series Model to Another

Differences Related to Functions Such as CPU Special Hardware Functions

KV-N14** KV-N24** KV-N40** KV-N60A* KV-NC32T


Base number of inputs 8 14 24 36 16
Base number of outputs 6 10 16 24 16
Program capacity 8 k steps 16 k steps 32 k steps
Base Device comment
specifications capacity 10,000 20,000
External wiring method Terminal block Connector

APPENDICES
Yes, (SDHC
Memory card -
compatible)
Base unit CTH 2 3 4 3
devices CTC 4 6 8 6
Number Yes, 100 kHz, Yes, 100 kHz, Yes, 100 kHz,
Positioning*2 Yes, 100 kHz, 2 axes
of axes 3 axes 4 axes 3 axes
Number Yes, 100 kHz, Yes, 100 kHz, Yes, 100 kHz,
Yes, 100 kHz, 2 channels
of CH 3 channels 4 channels 3 channels
A-phase:

Precautions When Changing from One KV Nano Series Model to Another


A-phase: R008,R010, A-phase:
R008, R010 R012 and R010,R012,
Input A-phase: R004 and R006 and R012 R014 R014
relay B-phase: R005 and R007 B-phase: B-phase: B-phase:
High-speed R009, R011 R009,R011, R011,R013,
counter and R013 R013 and R015
R015
R104, R105,
Preset R000 and R008 and R104, R105 R007,R008,
R106 and
input R001 R009 and R106 R009
R107
Comparator R500, R501,
Base unit R500, R501 R500,R501,
matching R500 and R501 R502 and
functions*1 and R502 R502
output R503
R008, R010,
Frequency Input R008, R010 R010,R012,
R004 and R006 R012 and
counter relay and R012 R014
R014
Specified R500, R501,
Output R500, R501 R500,R501,
frequency R500 and R501 R502 and
relay and R502 R502
pulse output R503
CTH0:
CTH0: R008,R009 CTH0:
CTH0: R008,R009 CTH1: R010,R011
Incremental R004,R005 CTH1: R010,R011 CTH1:
Cam switch
encoder CTH1: R010,R011 CTH2: R012,R013
R006,R007 CTH2: R012,R013 CTH2:
R012,R013 CTH3: R014,R015
R014,R015
Calendar timer (RTC) No Yes
Number of units
Yes, up to 1 on
connected to function Yes, up to 1 on the front panel Yes, up to 2 on the front panel
the left panel
Extension extension slots
cassette/ Function extension Yes, up to 1 port Yes, up to 2 ports
adapter (serial) (115.2 kbps max.) (115.2 kbps max.)
Function extension
Yes, up to 1 on the front panel Yes, up to 2 on the front panel No
(access window)
Yes, up to 3
Number of connected
on the right Yes, up to 8 on the right side
Expansion expansion units
side
unit
Yes, up to
Expansion (I/O) Yes, up to 256
128

- KV Nano Series(terminal block type) User’s Manual - A-47


9 Precautions When Changing from One KV Nano Series Model to Another

*1 You can use the following control relays (CR) to determine whether the functions can be used.
You can improve program reuse by performing logical AND on these control relays and the
execution conditions of the related programs.
• CR2310 (calendar timer present)
• CR4205, CR4405, CR4605, and CR4805 (CTH n present)
• CR8414, CR8514, CR8614, and CR8714 (axis n present)
*2 This cannot be used on relay type models.

• If you use an instruction in which an unspecifiable positioning axis number, high-


Reference
speed counter channel, or similar value is specified as an operand (for example,
specifying axis 3 in a PSTRT instruction sent to a KV-N14*T), a warning will be
displayed when conversion is performed by KV STUDIO. In addition, on the KV-
APPENDICES

N14*T, an error will not be generated when the ladder program is executed, but
operation will be stopped.
The instructions that may not operate on execution are listed below.
INT, CTH, CTC, RFSCTH, INCENC, FCNT, RCNT, PLSOUT, HSP, PSTRT, JOG,
ORG, TCH, HOME, CHGSP, CHGTGT, and RFSPS
• If you are using instructions related to calendar timers with the KV-N14** (for
example, the LDWK instruction), a warning will be displayed when conversion is
performed by KV STUDIO, and the instructions will not operate when the ladder
program is executed (for contact instructions, the same operation as when the
Precautions When Changing from One KV Nano Series Model to Another

contact is turned OFF will be performed).


The instructions that will not operate on the KV-N14** are listed below.
LDWK, LDWKB, ANDWK, ANDWKB, ORWK, ORWKB, LDCAL, LDCALB,
ANDCAL, ANDCALB, ORCAL, ORCALB, WTIME, and AJST
• If you used instructions which specified a function which cannot be used with the
model (for example, a memory card instruction on the KV-N60AT), a warning will be
displayed when conversion is performed by KV STUDIO, the instructions will not
operate when the ladder program is executed, and no error will occur.
The instructions that may not operate when executed are listed below.
MWRIT, MREAD, MFREE, MMKDIR, MRMDIR, MDEL, MPRINT, MREADL,
MCOPY, MMOV, MREN, MFREEK, MSTAT, LOGE, LOGD, TRGD, AWNUM,
and AWMSG

A-48 - KV Nano Series(terminal block type) User’s Manual -


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model
The replacements that must be made when changing from a KV-5000/3000 Series model to a KV Nano
Series model or when changing from a KV Nano Series model to a KV-5000/3000 Series model are
shown below.

Item Description
You cannot make replacements.
Functions that cannot be used by the model are deleted or initialized when you
Hardware functions change the model. After you change the model, check the specifications, and
use the model within the specified range.
"Differences Related to Functions Such as CPU Special Hardware Functions"

APPENDICES
Devices other than control relays (CR) and control memory (CM) entries cannot
be automatically replaced. To replace devices, use the function for replacing
devices in KV STUDIO.
"Device Range Comparison Table"
Devices See the information on device replacement in the "KV STUDIO User's
Manual."
Automatic replacement of control relays and control memory entries can only
be performed on devices that can be replaced.
"Differences between Control Relays and Control Memory Entries"

Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model
You cannot make replacements. However, between units that have the same
Extension cassettes functions, you can import and export some settings to make replacements.
"Software Settings That Can Be Imported"
You cannot make replacements.
You can reuse ladder programs by changing the assigned leading device.
(To replace the output relays of I/O units, use the function for replacing devices
Expansion I/O units in KV STUDIO.)
"Expansion I/O Unit Differences"
"Model Replacement Procedure"
Depending on the instructions:
• Labels may be converted to unregistered labels.
• Instructions and operands may be changed to the appropriate values
Instructions automatically.
• Changes will not be made, but operations may not be performed on
execution.
"Instructions That Have Differences"
When you change models, the software functions are deleted.
Software functions You can export and import the settings of some functions.
"Software Settings That Can Be Imported"

Model Replacement Procedure

 When expansion units are not being used

 Replacing the KV-5000/3000 Series with the KV Nano Series

1 Use the function for replacing devices in KV STUDIO to replace the devices that cannot be
used with the KV Nano Series.

- KV Nano Series(terminal block type) User’s Manual - A-49


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

2 In KV STUDIO, on the "File" menu, click "Change model" to execute the model change.

Reference The results of changing the model are saved as the "conversion result text." View the
"conversion result text" to check whether problems such as labels being changed to
unregistered labels have occurred.
APPENDICES

 Replacing the KV Nano Series with the KV-5000/3000 Series


Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

1 In KV STUDIO, on the "File" menu, click "Change model" to execute the model change.

Reference The results of changing the model are saved as the "conversion result text." View the
"conversion result text" to check whether problems such as labels being changed to
unregistered labels have occurred.

 When expansion units are being used

 Replacing the KV-5000/3000 Series with the KV Nano Series

1 Use the function for replacing devices in KV STUDIO to replace the devices that cannot be
used with the KV Nano Series.

A-50 - KV Nano Series(terminal block type) User’s Manual -


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

2 If there are software settings that can be imported, use the setting dialog boxes to save the
settings.

APPENDICES
Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model
3 In the Unit Editor options, set the device assignment format to the KV Nano Series format,
and then change the device assignments.

Reference • On the KV Nano Series, devices are assigned starting from R1000 (this is the default
value).
By changing the KV-5000/3000 Series device assignments, the devices will be
assigned automatically after the changes are completed, which enables you to
perform operations.
• When changing from the KV-5000/3000 Series I/O unit (KV-B8XTD) to the KV Nano
Series I/O unit (KV-N8EXT), you have to change device assignments.
The KV-B8XTD output relay is assigned to the leading device number + 100.
The KV-N8EXT output relay is assigned to the leading device number + 500, so after
you change the model, use the function for replacing devices in KV STUDIO to
replace the output relay.

- KV Nano Series(terminal block type) User’s Manual - A-51


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

4 In KV STUDIO, on the "File" menu, click "Change model" to execute the model change.

5 Open the Unit Editor, and configure the expansion unit settings.
APPENDICES
Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

6 The results of changing the model are saved as the "conversion result text." View the
"conversion result text" to check whether problems such as labels being changed to
unregistered labels have occurred.

Reference • Expansion units are configured as dummy units. Delete these, and then configure the
correct expansion units.
• You can easily configure expansion unit settings, Serial PLC Link settings, and other
similar settings by starting two instances of KV STUDIO and using them to visually
compare the settings.
• When you have changed the device assignments in step 3, if the number of
expansion I/O unit points is consistent, you can perform operations without
configuring expansion unit settings.
• After changing models, you have to import (read the settings of) the files that you
saved in step 2.

A-52 - KV Nano Series(terminal block type) User’s Manual -


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

 Replacing the KV Nano Series with the KV-5000/3000 Series

1 If there are software settings that can be imported, use the setting dialog boxes to save the
settings.

APPENDICES
Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model
2 In the Unit Editor options, set the device assignment format to the KV-5000/3000 Series
format, and then change the device assignments.

Reference On the KV-5000/3000 Series, devices are assigned starting from R30000 (this is the
default value).
The KV Nano Series I/O unit (KV-N8EXT) output relay is assigned to the leading device
number + 500. When you change to the KV-5000/3000 I/O unit (KV-B8XTD), the output
relay changes to the leading device number + 100, so after you change the model, use
the function for replacing devices in KV STUDIO to replace the output relay.

- KV Nano Series(terminal block type) User’s Manual - A-53


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

3 In KV STUDIO, on the "File" menu, click "Change model" to execute the model change.

4 Open the Unit Editor, and configure the expansion unit settings.
APPENDICES
Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

5 The results of changing the model are saved as the "conversion result text." View the
"conversion result text," and check any locations in which the conversion was not
successful.

Reference • You can easily configure expansion unit settings, CPU positioning settings, and other
similar settings by starting two instances of KV STUDIO and using them to visually
compare the settings.
• After changing models, you have to import (read the settings of) the files that you
saved in step 2.

A-54 - KV Nano Series(terminal block type) User’s Manual -


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

Differences Related to Functions Such as CPU Special Hardware Functions

KV-5500/
KV-N60A* KV-N40** KV-N24** KV-N14**
5000/3000
24 VDC
100 to 240 100 to 240 24 VDC (KV-N**D*)
Power supply
VAC VAC 100 to 240 VAC (KV-N**A*)
(KV-U7)
Access window Present Extension cassette (KV-N1AW) required

APPENDICES
Battery Present Not present
Base
Yes
communication Yes
(KV-3000 only)
port (RS-232)
Analog volume No 2 channels
260 k steps
Base Program (160 k steps
specifications 16 k steps 8 k steps
capacity on the
KV-3000)

Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model
Base
10 ns 50 ns
instructions
Device 96000
comment (30000 on the 20,000 10,000
capacity KV-3000)
SRAM backup
Power failure
using the Backup of 3072 words using nonvolatile RAM
holding
battery
Fixed-period
1 No
modules
16
(line driver
Inputs 36 24 14 8
input
supported)
24 16 10 6
Outputs (relays) No
(KV-N60AR) (KV-N40*R) (KV-N24*R) (KV-N14*R)
I/O Outputs 24 16 10 6
8
(transistors) (KV-N60AT(P)) (KV-N40*T(P)) (KV-N24*T(P)) (KV-N14*T(P))
Screw terminal
Screw terminal block
Connector MIL connector block (not
(removable)
removable)
Service power
+5 V +24 V (AC power supply type only)
supply output
Access window Present Extension cassette required
The following devices are not present.
Access Device mode No
EM, FM, ZF, and TRM
window
Default
Japanese English
language

- KV Nano Series(terminal block type) User’s Manual - A-55


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

KV-5500/
KV-N60A* KV-N40** KV-N24** KV-N14**
5000/3000
Interrupt 10
4
conditions (input (R000 to
(R000 to R003)
relays) R009)
Interrupt
conditions 4 8 6
4
(high-speed (CTC0 to CTC (CTC0 to (CTC0 to
(CTC0 to CTC3)
counter 3) CTC7) CTC5)
Interrupts
comparators)
16 36 24 14 8
APPENDICES

Direct inputs (R000 to (R000 to (R000 to (R000 to (R000 to


R015) R203) R107) R013) R007)
8 24 16 10 6
Direct outputs (R500 to (R500 to (R500 to (R500 to (R500 to
R507) R607) R515) R509) R505)
Yes
No
Hardware (SDHC
(Projects can be saved to extension access window cassettes.)
supported)
Possible
Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

Memory card Access from


(memory card Impossible
ladder programs
instruction)
Logging and Tracing function only (files can only be saved to internal
Can be used
tracing functions memory)
A-phase:
A-phase: R008, R010, A-phase:
R010 and R012, and R008, R010,
R011 R014 and R012 A-phase: R004 and R006
Input relays
B-phase: B-phase: B-phase: B-phase: R005 and R007
High-speed R012 and R009, R011, R009, R011,
counter and R013 R013, and and R013
high-speed R015
counter
R104, R105,
comparator R014 and R104, R105, R008 and R000 and
Preset inputs R106, and
R015 and R106 R009 R001
R107
Comparator R500 (R504) R500, R501,
R500, R501,
matching and R502, and R500 and R501
and R502
outputs R501 (R505) R503
R008, R010,
Frequency R010 and R008, R010,
Input relays R012, and R004 and R006
counter R011 and R012
R014
Specified R500 (R504) R500, R501,
R500, R501,
frequency Output relays and R502, and R500 and R501
and R502
pulse output R501 (R505) R503
CTH0: R008
and R009 CTH0: R008
CTH0: R010 CTH1: R010 and R009
Cam switch Incremental and R012 and R011 CTH1: R010 CTH0: R004 and R005
function encoder CTH1: R011 CTH2: R012 and R011 CTH1: R006 and R007
and R013 and R013 CTH2: R012
CTH3: R014 and R013
and R015

A-56 - KV Nano Series(terminal block type) User’s Manual -


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

KV-5500/
KV-N60A* KV-N40** KV-N24** KV-N14**
5000/3000
4 3 2
Number of axes 2
No (the relay output type is not supported)
• Origin
sensor rising
• Origin sensor rising edge
edge
• Origin sensor middle point
• Origin
Origin returning • Origin sensor and Z-phase
sensor
operation • Dog type (Z-phase not used)
middle point
• Dog type (Z-phase used)
• Origin
• Dog type (press-against)

APPENDICES
sensor and
Motor Z-phase
(positioning) Changing the
control target
No CHGTGT instruction
coordinate
during operation
Error and The same
Separate relays
error clear relays
Immediate

Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model
Limit stop Deceleration stop
stop
32 points
Point (shared 20 points
parameters between 2 (each axis)
axes)
PLSX and
PLXY,
ORGX and
ORGY, PSTRT,
JOGX and ORG,
JOGY, JOG,
HOMEX and HOME,
Instructions
HOMEY, TCH,
TCHX and CHGSP,
TCHY, CHGTGT, and
CHGSPX and RFSPS
CHGSPY, and
Motor RFSPSX and
(positioning) RFSPSY
control Minimum
operating 50 Hz 1 Hz
speed
Deceleration Time
Rate specification
unit specification
Turned OFF
Rotation
with normal
direction output Turned ON with normal direction rotation
direction
in 1-pulse mode
rotation
Power off
holding
Parameters Power off holding settings required
settings not
required
KV mode (host link)
KV mode
KV mode (text transmission)
(host link)
KV STUDIO mode
Serial KV mode (text
Operation mode Non-procedural mode
communication transmission)
Modbus master mode
KV STUDIO
Modbus slave mode
mode
Serial PLC Link mode (only when using a KV-N11L)
Saving and reading project data Memory card Extension access window cassette
- KV Nano Series(terminal block type) User’s Manual - A-57
10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

KV-5500/
KV-N60A* KV-N40** KV-N24** KV-N14**
5000/3000
Module
No Up to 32 characters
passwords
Macro Up to 6
Password Up to 32 characters
passwords characters
Project Up to 6
Up to 32 characters
passwords characters
During
Break monitoring and Only during simulating
simulating
APPENDICES

Other Yes Yes (backup capacitors used to hold the


functions Calendar timer (battery used values)
No
(RTC) to hold the * For the detailed hold time, see
values) "Maintenance" (Page3-20).
Digital trimmer 8 channels No
Number of
Up to 48 on Up to 3 on the
connected Up to 8 on the right side
the right side right side
expansion units
Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

Number of units
connected to Up to 1 on the
Up to 2 on the front panel Up to 1 on the front panel
function left side
extension slots
Expansion unit
Function Yes, Yes,
extension No up to 2 ports up to 1 port
(serial) (115.2 kbps max.) (115.2 kbps max.)
Function
extension Yes,
No
(access up to 1 unit
window)

A-58 - KV Nano Series(terminal block type) User’s Manual -


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

Device Range Comparison Table

KV-5500/
KV-N60A* KV-N40A** KV-N24** KV-N14**
5000/3000
CPU input
R000 to R015 R000 to R203 R000 to R107 R000 to R013 R000 to R007
relays
CPU input
relays and R500 to R507 R500 to R603 R500 to R515 R500 to R509 R500 to R505
output relays

APPENDICES
R01000 to
R01000 to R59915
Internal auxiliary R99915
relays MR00000 to
MR00000 to MR59915
MR99915
LR00000 to
Latch relays LR00000 to LR19915
LR99915
Control relays CR0000 to
CR0000 to CR8915
CR3915

Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model
T0000 to
Timers T000 to T511
T3999
C0000 to
Counters C000 to C255
C3999
Data memory DM00000 to
DM00000 to DM32767
entries DM65534
EM00000 to
Base unit −
EM65534
devices FM00000 to
Expansion data
memory entries FM32767 (×
4) −
(ZF00000 to
ZF131171)
Temporary data
TM000 to TM511
memory entries
Control memory CM0000 to
CM0000 to CM8999
entries CM5999
High-speed CTH0 and
CTH0 to CTH3 CTH0 to CTH2 CTH0 and CTH1
counters CTH1
High-speed
counter CTC0 to CTC3 CTC0 to CTC7 CTC0 to CTC5 CTC0 to CTC3
comparators
B0000 to
Link relays B0000 to B1FFF
B3FFF
Link data
W0000 to W3FFF
memory entries
Index registers Z01 to Z12
TRM0 to
Digital trimmers −
TRM7

- KV Nano Series(terminal block type) User’s Manual - A-59


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

Instructions That Have Differences

 Replacing the KV-5000/3000 Series with the KV Nano Series

When the Model Is When the KV STUDIO


Instruction When Executed
Changed Conversion Is Performed
MWRIT,
MREAD,
MFREE,
MMKDIR,
APPENDICES

MRMDIR,
MDEL,
MPRINT,
Operations will not be
Memory card MREADL, A warning will be
− performed.
instructions MCOPY, displayed.
An error will not occur.
MMOV,
MREN,
MFREEK,
MSTAT,
LOGE,
Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

LOGD, and
TRGD
When using the KV-
N1AW,
operations will be
performed normally.
Access AWNUM, and A warning will be
− When not using the
window instructions AWMSG displayed.
KV-N1AW,
operations will not be
performed (an error
will not occur).
PSTRT #1
PLSX Operations will be
Replaced with points −
Points #0 to #19 performed normally.
#1 to #20
PSTRT #1
PLSX
Converted to An error will occur. −
Points #20 to #31
unregistered labels
PSTRT #2
PLSY Operations will be
Replaced with points −
Points #0 to #19 performed normally.
#1 to #20
PSTRT #2
PLSY
Converted to An error will occur. −
Points #20 to #31
unregistered labels
Operations will be
JOGX Converted to JOG #1 −
performed normally.
Operations will be
JOGY Converted to JOG #2 −
Positioning performed normally.
instructions Operations will be
ORGX Converted to ORG #1 −
performed normally.
Operations will be
ORGY Converted to ORG #2 −
performed normally.
Converted to HOME Operations will be
HOMEX −
#1 performed normally.
Converted to HOME Operations will be
HOMEY −
#2 performed normally.
Converted to CHGSP Operations will be
CHGSPX −
#1 performed normally.
Converted to CHGSP Operations will be
CHGSPY −
#2 performed normally.
Operations will be
RFSX Converted to RFS #1 −
performed normally.
Converted to RFSPS Operations will be
RFSPSY −
#2 performed normally.

A-60 - KV Nano Series(terminal block type) User’s Manual -


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

When the Model Is When the KV STUDIO


Instruction When Executed
Changed Conversion Is Performed
Counter input device
converted according
High-speed counter to "Differences Operations will be
CTH
instruction Related to Functions − performed normally.
Such as CPU Special
Hardware Functions"
INT Converted to
Interrupt instruction An error will occur. −
(R004 to R009) unregistered labels
KV-N14**
Operations will not be

APPENDICES
performed (an error
Clock processing WTIME and A warning will be will not occur).
instructions AJST − displayed. A unit other than the
KV-N14**
Operations will be
performed normally.
KV-N14**
LDWK,
Operations will not be
LDWKB,
performed.
Weekly contact ANDWK, A warning will be
− A unit other than the
instructions ANDWKB, displayed.

Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model
KV-N14**
ORWK, and
Operations will be
ORWKB
performed normally.
KV-N14**
LDCAL,
Operations will not be
LDCALB,
performed.
Calendar timer ANDCAL, A warning will be
− A unit other than the
instructions ANDCALB, displayed.
KV-N14**
ORCAL, and
Operations will be
ORCALB
performed normally.
FRSET,
File register Converted to
FRSTM, and An error will occur. −
instructions unregistered labels
FRLDM
Digital trimmer Converted to an
TMIN An error will occur. −
instruction unregistered label
If the device is not
supported
A warning will be
DR* − Operations will not be
displayed.
performed (an error
will not occur).
If the device is not
Direct supported
RFSX* and A warning will be
refresh instructions RFSY* − Operations will not be
displayed.
performed (an error
will not occur).
UREAD and Unit number
An error will occur. −
UWRIT converted to "???"
Unit-specific Converted to
An error will occur. −
instructions unregistered labels
Devices, such as
Converted to
Other instructions EM, that cannot be An error will occur. −
unregistered labels
used
* If the conversion destination device does not support direct I/O
(There are no precautions if direct I/O is supported.)

- KV Nano Series(terminal block type) User’s Manual - A-61


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

 Replacing the KV Nano Series with the KV-5000/3000 Series

When the Model Is When the KV STUDIO


Instruction When Executed
Changed Conversion Is Performed
#1
PLSX
Replaced with
points #0 to #19 #1 and #2
#2 A warning will be
PSTRT Operations will be
PLSY displayed.
Points #1 to #20 performed normally.
Replaced with #3 and #4
points #0 to #19 An error will occur.
APPENDICES

#3 and #4
Converted to
unregistered labels
#1
JOGX #1 and #2 #1 and #2
#2 A warning will be Operations will be
JOG JOGY displayed. performed normally.
#3 and #4 #3 and #4 #3 and #4
Converted to An error will occur.
Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model


unregistered labels
#1
ORGX #1 and #2 #1 and #2
#2 A warning will be Operations will be
ORG ORGY displayed. performed normally.
#3 and #4 #3 and #4 #3 and #4
Converted to An error will occur. −
unregistered labels
#1
HOMEX #1 and #2 #1 and #2
Positioning
#2 A warning will be Operations will be
instructions
HOME HOMEY displayed. performed normally.
#3 and #4 #3 and #4 #3 and #4
Converted to An error will occur. −
unregistered labels
#1
TCHX #1 and #2 #1 and #2
#2 A warning will be Operations will be
TCH TCHY displayed. performed normally.
#3 and #4 #3 and #4 #3 and #4
Converted to An error will occur. −
unregistered labels
#1
CHGSPX #1 and #2 #1 and #2
#2 A warning will be Operations will be
CHGSP CHGSPY displayed. performed normally.
#3 and #4 #3 and #4 #3 and #4
Converted to An error will occur. −
unregistered labels
#1
RFSPSX #1 and #2 #1 and #2
#2 A warning will be Operations will be
RFSPS RFSPSY displayed. performed normally.
#3 and #4 #3 and #4 #3 and #4
Converted to An error will occur. −
unregistered labels
Converted to
CHGTGT An error will occur. −
unregistered labels

A-62 - KV Nano Series(terminal block type) User’s Manual -


10 Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model

When the Model Is When the KV STUDIO


Instruction When Executed
Changed Conversion Is Performed
Counter input device
CTH converted according
When the high- to "Differences Operations will be
speed counter Related to Functions − performed normally.
High-speed
number is #0 and #1 Such as CPU Special
counter
Hardware Functions"
instruction
CTH
INST_CTH
When the high- A conversion error will
Converted to −
speed counter occur.
unregistered labels
number is #2 and #3

APPENDICES
ADRSET
Other Converted to
(when a CM device is An error will occur. −
instruction unregistered labels
used in an operand)

Differences between Control Relays and Control Memory Entries

For details on the difference between CR (control relays) and CM (control memory entries), in KV

Precautions When Changing between a KV-5000/3000 Series Model and a KV Nano Series Model
STUDIO, on the "Help" menu click "Handy-Nav(reference programs/tech materials)," and then see
"CR_CM_ConvertTableInChangeModel.xls."

Software Settings That Can Be Imported

The settings of the following function can be exported and imported between KV-5000/3000 Series and
KV Nano Series expansion units and extension cassettes that have the same functions.
Function KV-5000/3000 Series Function KV Nano Series Function
High-speed multi-link unit Extension serial communication
Serial PLC Link function
KV-LM21V cassette KV-N11L

Device Assignment Differences

The assignment methods used for each expansion unit vary between the KV-5000/3000 Series and the
KV Nano Series.
Function KV-5000/3000 Series KV Nano Series
KV-N14** Inputs: R000 to R007
Outputs: R500 to R505
KV-N24** Inputs: R000 to R013
Inputs: R000 to R015 Outputs: R500 to R509
Built-in I/O
Outputs: R500 to R507 KV-N40** Inputs: R000 to R107
Outputs: R500 to R515
KV-N60** Inputs: R000 to R203
Outputs: R500 to R607
Assigned per 10 channels starting from
R1000
Expansion unit automatic Assigned per 10 channels starting from
assignment (default value) R30000 Input: (Unit number) × 1000 + 000
Output: (Unit number) × 1000 + 500
Special: (Unit number) × 1000 + 000
Input and output are assigned with no
I/O unit assignment space between them. The input and output are assigned with
(* Changes ladder Input: Leading device + 000 500 blank entries between them.
programs automatically Output: Leading device + 100 (200)* Input: Leading device + 000
when changing models) *The value in parentheses is for the Output: Leading device + 500
KV-C32XTD.

- KV Nano Series(terminal block type) User’s Manual - A-63


11 Precautions When Changing from a KV-10/16/24/40 Model to a KV Nano Series Model
The replacements that must be made when changing from a KV-10/16/24/40 model to a KV Nano
Series model are shown below.
Name KV-10/16/24/40 KV Nano Series
Positioning control function Relay handshaking PSTRT instruction
Control relays Internal relays CR
Digital trimmers Yes No
Backed up using capacitors
Nonvolatile RAM
Device backup (For 2 months, or 20 days in the case
(3072 words max.)
of the KV-10**, at 25°C)
Power failure holding MEMSW instruction CPU system settings
APPENDICES

Yes (with an extension access window


Access window Yes
cassette)
Remote I/O Yes (KL Link) No
Programming console Yes (KZ-P3) No
*
You cannot change the model from the KV Nano Series to a KV-10/16/24/40 model.

Model Replacement Procedure


Precautions When Changing from a KV-10/16/24/40 Model to a KV Nano Series Model

Replacing the KV-10/16/24/40 with the KV Nano Series

1 In KV STUDIO, on the "File" menu, click "Change model."


The results of changing the model are saved as the "model change result text." View the "model
change result text," and check any locations in which the conversion was not successful.

Device Range Comparison Table

When you replace the KV-10/16/24/40 with the KV Nano Series, only some devices can be replaced
automatically. R and DM devices which are not replaced are converted to a disabled operand. TM
devices which are not replaced are changed to unregistered labels.
To replace the other devices, use the function for replacing devices in KV STUDIO while referring to the
following table.
KV-10/16/24/40 KV Nano Series
TM2 and TM3 TM102 and TM103
The scan time when the set
TM28 −
value is exceeded.
The set value of fixed scan time
TM29 −
operation
CTH1 value (when an INT3
TM30 −
interrupt has occurred)
TM31 Scan time measured value CM720 Scan time measured value
#TM102 and
#TM2 and #TM3
#TM103
#TM28 and #TM29 −
DM1000 to DM1199 Devices related to port A −
DM1200 to DM1399 Devices related to port B −
Devices related to cam
DM1400 to DM1469 −
switches
Devices related to trapezoidal
DM1480 to DM1486 −
operation
DM1500 to DM1577 Devices related to QL −
DM1580 to DM1599 Devices related to the KV-D20 −
DM1600 to DM1663 Devices related to KL −

A-64 - KV Nano Series(terminal block type) User’s Manual -


11 Precautions When Changing from a KV-10/16/24/40 Model to a KV Nano Series Model

KV-10/16/24/40 KV Nano Series


DM1676 to DM1699 Devices related to the KV-D20 −
DM1700 to DM1763 Devices related to KL −
DM1780 to DM1799 Devices related to KV-D30 −
DM1800 to DM1805 Devices related to KL −
DM1810 to DM1899 Devices related to KL −
Devices related to high-speed
DM1900 to DM1923 −
counters
DM1924 and CM4806 and
CTH0 preset input CTH0 preset value
DM1925 CM4807

APPENDICES
DM1926 and CM4816 and
CTH1 preset input CTH1 preset value
DM1927 CM4817
DM1928 to DM1935 Input capture CM1600 to CM1607 INT R00000 input capture
DM1936 Frequency pulse set value −
Expansion unit connection
DM1937 −
information
DM1938 and
Digital trimmers −
DM1939

Precautions When Changing from a KV-10/16/24/40 Model to a KV Nano Series Model


DM1940 Input time constant setting CM1620 Input time constant setting
DM1944 Separation conversion setting −
DM1950 User message number CM1720 User message 1
R10 to R415 −
R504 to R915 −
CR2000 and
R2000 and R2001
CR2001
R2002 Always ON CR2002 Always ON
R2003 Always OFF CR2003 Always OFF
R2004 10 ms clock pulse CR2004 10 ms clock pulse
R2005 100 ms clock pulse CR2005 100 ms clock pulse
R2006 1 s clock pulse CR2006 1 s clock pulse
Turned OFF for 1 scan when Turned OFF for 1 scan when
R2007 CR2007
operations start operations start
Turned ON for 1 scan when Turned ON for 1 scan when
R2008 CR2008
operations start operations start
R2009 Calculation result is negative CR2009 Calculation result is negative
R2010 Calculation result is 0 CR2010 Calculation result is 0
R2011 Calculation result is positive CR2011 Calculation result is positive
R2012 Calculation execution error CR2012 Calculation execution error
R2013 to R2015 CR2013 to CR2015
R2100 CTH0 clock, 1 µs CR4201 Internal clock for CTH0, 1 µs
R2101 CTH0 clock, 10 µs CR4202 Internal clock for CTH0, 10 µs
R2102 CTH0 clock, 100 µs CR4203 Internal clock for CTH0, 100 µs
Automatic clearing of counter Automatic reset of CTH0 when
R2103 CR4303
CTC0 CTC0 turns ON
Disabling of CTC0 comparator
R2104 Disabling of CTC0 output CR4304
matching output
Turns CTC0 comparator
R2105 Turns CTC0 output OFF CR4305
matching output OFF
Turns CTC0 comparator
R2106 Turns CTC0 output ON CR4306
matching output ON
Inverting (ON/OFF) of CTC0
R2107 Inverting of CTC0 output CR4307
comparator matching output
Disabling of CTC1 comparator
R2108 Disabling of CTC1 output CR4308
matching output

- KV Nano Series(terminal block type) User’s Manual - A-65


11 Precautions When Changing from a KV-10/16/24/40 Model to a KV Nano Series Model

KV-10/16/24/40 KV Nano Series


Turns CTC1 comparator
R2109 Turns CTC1 output OFF CR4309
matching output OFF
Turns CTC1 comparator
R2110 Turns CTC1 output ON CR4310
matching output ON
Inverting (ON/OFF) of CTC1
R2111 Inverting of CTC1 output CR4311
comparator matching output
Automatic clearing of counter Automatic reset of CTH0 when
R2112 CR4312
CTC1 CTC1 turns ON
CTH0 multiplication mode
R2113 and R2114 −
selection
APPENDICES

R2200 CTH1 clock, 1 µs CR4401 Internal clock for CTH1, 1 µs


R2201 CTH1 clock, 10 µs CR4402 Internal clock for CTH1, 10 µs
R2202 CTH1 clock, 100 µs CR4403 Internal clock for CTH1, 100 µs
Automatic clearing of counter Automatic reset of CTH1 when
R2203 CR4503
CTC2 CTC2 turns ON
Disabling of CTC2 comparator
R2204 Disabling of CTC2 output CR4504
matching output
Turns CTC2 comparator
Precautions When Changing from a KV-10/16/24/40 Model to a KV Nano Series Model

R2205 Turns CTC2 output OFF CR4505


matching output OFF
Turns CTC2 comparator
R2206 Turns CTC2 output ON CR4506
matching output ON
Inverting (ON/OFF) of CTC2
R2207 Inverting of CTC2 output CR4507
comparator matching output
Disabling of CTC3 comparator
R2208 Disabling of CTC3 output CR4508
matching output
Turns CTC3 comparator
R2209 Turns CTC3 output OFF CR4509
matching output OFF
Turns CTC3 comparator
R2210 Turns CTC3 output ON CR4510
matching output ON
Inverting (ON/OFF) of CTC3
R2211 Inverting of CTC3 output CR4511
comparator matching output
Automatic clearing of counter Automatic reset of CTH1 when
R2212 CR4512
CTC3 CTC3 turns ON
CTH1 multiplication mode
R2213 −
selection
CTH1 multiplication mode
R2214 −
selection
R2300 Disabling of external output CR2300 Disabling of external output
R2301 Input refresh disabling CR2301 External input refresh disabling
R2303 Fixed scan time operation CR2303 Fixed scan time operation
Turns ON for 1 scan when the
R2304 Fixed scan time setting error CR2304 fixed scan time set value is
exceeded
R2305 Frequency; counter start −
R2306 Frequency; pulse output −
R2307 Frequency; pulse error −
R2308 Motor driver stop −
R2309 Emergency stop −
R2310 Motor operation start −
R2314 Cam switch start −
R2315 Cam switch error −
CTH0 external preset input
R2400 CTH0 external preset CR4208
setting
CTH0 external preset input
R2401 CTH0 external preset CR4209
setting

A-66 - KV Nano Series(terminal block type) User’s Manual -


11 Precautions When Changing from a KV-10/16/24/40 Model to a KV Nano Series Model

KV-10/16/24/40 KV Nano Series


R2402 INT0 interrupt polarity CR2600 INT R00000 interrupt polarity
R2403 INT0 interrupt polarity CR2601 INT R00000 interrupt polarity
R2404 INT1 interrupt polarity CR2602 INT R00001 interrupt polarity
R2405 INT1 interrupt polarity CR2603 INT R00001 interrupt polarity
R2406 CTH0 ring counter CR4210 CTH0 counter mode selection
R2407 CTH0, ignore B-phase −
CTH1 external preset input
R2408 CTH1 external preset CR4408
setting
CTH1 external preset input
R2409 CTH1 external preset CR4409

APPENDICES
setting
R2410 INT2 interrupt polarity CR2604 INT R00002 interrupt polarity
R2411 INT2 interrupt polarity CR2605 INT R00002 interrupt polarity
R2412 INT3 interrupt polarity CR2606 INT R00003 interrupt polarity
R2413 INT3 interrupt polarity CR2607 INT R00003 interrupt polarity
R2414 CTH1 ring counter CR4410 CTH1 counter mode selection
R2415 CTH1, ignore B-phase −
R2500 to R2513 Devices related to the KV-D30 −

Precautions When Changing from a KV-10/16/24/40 Model to a KV Nano Series Model


R2515 User message display CR2900 User message display 1
Devices related to expansion
R2609 to R2613 −
units
R2700 to R2707 Devices related to KL −
R2708 to R2712 Devices related to QL −
R2714 Use high-speed input correction −
Cam switch function in
R2715 −
operation
R2800 to R2804 Devices related to port A −
R2805 to R2809 Devices related to port B −
R2812 Backup battery abnormal −
Base unit input time constant
R2813 Base unit time constant CR2305
setting
HKEY, disabling of multiple HKEY instruction, disabling of
R2814 CR3514
keys multiple keys
HKEY instruction, scan
R2815 HKEY, scan complete CR3515
complete
HKEY instruction, information
R2900 to R2915 HKEY, information storage area CR3600 to CR3615
storage area

- KV Nano Series(terminal block type) User’s Manual - A-67


12 Index
An index of definitions used in this manual. They are arranged in the alphabetical sequence.

Changes to values when the value is greater than


Numerical Value the maximum value or smaller than the minimum
value .............................................................4-59
16-Bit Binary Data ........................................... 4-54 Changing the current value and
32-Bit Binary Data ........................................... 4-54 status of devices ........................................4-173
Character Codes ..............................................4-60
Characters that cannot be used in module and
A macro names .............................................. A-45
Characters that cannot be used in
APPENDICES

ABSENC instruction ...................................... 5-168 project names .............................................. A-45


Access Window ............................................. 5-202 CHGSP instruction ...........................................5-62
List of modes .............................................. 5-203 CHGTGT instruction ........................................5-66
Names and Functions of Parts ................... 5-206 Combining Units ........................................ 3-3, 3-6
What You Can Do with Condition control ................................................4-4
the Access Window ................................ 5-202 Configuration by processes ...........................4-107
Access Window Initial Connecting line editing ..................................4-146
Screen Display Function ............................ 5-243 Connecting Units ...............................................3-2
All Clear ......................................................... 5-242 Constants ............................................... 4-25, 4-49
Index

Applications ................................................... 4-133 Contact protection ............................................3-16


Argument devices .......................................... 4-120 Contrast .........................................................5-241
Arguments ..................................................... 4-120 Control memory ....................................... 2-3, 4-41
ASCII code ...................................................... 4-60 Control Memory CM .........................................4-41
Attaching Cassettes ........................................... 3-8 Control relay (contact) CR ...............................4-36
Convert result .................................................. 4-11
Correct device value window .........................4-173
B Correlations between Value Notations .............4-57
Counter ........................................... 2-3, 4-34, 4-39
Base Unit Model Number .................................. 2-5 Counter maximum counting speed ..................4-35
Battery ............................................................. 3-20 CPU Monitor ..................................................5-221
Binary BIN ....................................................... 4-55 CPU Positioning Parameter
Binary Coded Decimal BCD ............................ 4-56 Comparator 2 Interrupts ...............................4-80
Binary Data ...................................................... 4-54 CPU unit
Bit device ON/OFF ........................................ 4-173 Input specifications .........................................2-9
Bit device processing of word devices ............. 4-48 Names and Functions of Parts .......................2-6
Bit Devices ....................................................... 4-27 Output specifications .................................... 2-11
Bit that is turned OFF for only one scan when macro CTC instruction ..............................................5-132
execution starts, "@CR2007" .................... 4-122 CTH instruction ..............................................5-132
Bit that is turned OFF for only one scan when
module execution starts, "@CR2007" ........ 4-108
Bit that is turned ON during execution ...4-108, 4-123 D
Bit that is turned ON during macro execution .........
.........................................................4-122, 4-123 Data memory .....................................................2-3
Bit that is turned ON for only one scan when macro Debugging .....................................................5-239
execution starts, "@CR2008" .................... 4-122 Decimal Constants ...........................................4-49
Bit that is turned ON for only one scan when module Decimal DEC ...................................................4-55
execution starts, "@CR2008" .................... 4-108 Default status of differential execution
Built-In Functions ............................................... 5-2 instructions .................................................4-132
Byte size .......................................................... 4-11 Device Comments .........................................4-154
Device Mode ..................................................5-206
Changing device values
C (T, C, or CTH/CTC devices) ....................5-213
Changing device values (when the device
C .............................................................4-34, 4-39 value is a numerical value) .....................5-212
Callable position ............................................ 4-131 Changing device values
Candidate instruction ..................................... 4-143 (When the display format is On/Off) ....... 5-211

A-68 - KV Nano Series(terminal block type) User’s Manual -


12 Index

Changing the Device Value Extension Serial Communication Cassette


Display Format ....................................... 5-209 Names and Functions of Parts .....................2-60
Changing the type of device that you are Outline Drawings ..........................................2-64
monitoring ............................................... 5-208 Specifications ...............................................2-61
Devices That Can Be Displayed and Whose Wiring and Internal Circuit Diagrams ...........2-63
Settings Can Be Changed ...................... 5-206 External Input Interrupts ..................................4-79
Functions of Setup Operation Keys ........... 5-207
Operating Instructions ................................ 5-207
Switching between displaying the device name F
and comments ........................................ 5-210
Switching to device mode .......................... 5-207 FCNT instruction ............................................5-158

APPENDICES
Device notation for relay (R) units ................... 4-28 Feedback control ...............................................4-2
Device orientation ............................................ 3-12 Fixed character strings ....................................4-51
DI instruction .................................................... 4-94
DIC instruction ................................................. 4-96
Differences between Macros and G
Subroutines ................................................ 4-130
Direct Clock Pulse Output ............................. 5-145 General Specifications .......................................2-2
Direct output .................................................... 4-74 Global device .................................................4-134
Global device notation ...................................4-134

Index
Disconnecting Units ........................................... 3-6
Display and setting of time .................5-218, 5-251 Grounding precautions ....................................3-14
0-second adjustment .................................. 5-220
Clock .......................................................... 5-218
Functions of setup operation keys ............. 5-218 H
Operating instructions ................................ 5-218
Setting the date and time ........................... 5-219 HEX .................................................................4-55
Switching to the clock ................................ 5-218 Hexadecimal ....................................................4-55
Display Language .......................................... 5-215 Hexadecimal Constants ...................................4-50
Double precision floating-point constants ........ 4-51 High-Speed Counter .............................. 4-40, 5-98
Double precision floating-point real numbers Acquiring the Current Value Based on Input
DOUBLE-FLOAT .......................................... 4-57 Capture ...................................................5-130
Comparator Matching Output .....................5-128
Enabling and Disabling Counting (Counter
E Enable Function) ....................................5-126
High-Speed Counter Specifications .............5-98
Edit list ............................................................... 4-7 Preset Function ..........................................5-124
EI instruction .................................................... 4-94 Reading and changing the current value and
Entry assistance ............................................ 4-143 changing the set value ............................5-133
Every-scan execution type ............................ 4-102 Reading the Current Value’s
Expansion I/O Unit Change Direction ....................................5-129
Names and Functions of Parts ..................... 2-56 Reset Mode ................................................5-121
Specifications ............................................... 2-57 High-speed counter (current value) CTH .........4-40
Wiring and Internal Circuit Diagrams ........... 2-58 High-speed counter comparator ..... 2-3, 4-35, 4-40
Expansion Input Unit High-speed counter comparator CTC .... 4-35, 4-40
Names and Functions of Parts ..................... 2-47 High-Speed Counter Comparator Interrupts ....4-80
Outline Drawings .......................................... 2-50 HOME instruction .............................................5-60
Specifications ............................................... 2-48 How to handle the set value and
Wiring and Internal Circuit Diagrams ........... 2-49 current value of a counter ............................4-35
Expansion Output Unit How to handle the set value and
Names and Functions of Parts ..................... 2-51 current value of a timer ................................4-33
Outline Drawings .......................................... 2-55 How to program counter operations ................4-34
Specifications ............................................... 2-52 How to program Timer operations ...................4-32
Wiring and Internal Circuit Diagrams ......2-53, 2-54 How to search for rung comments .................4-157
Extension Access Window Cassette How to set the bit that Is turned ON
Names and Functions of Parts ..................... 2-65 during execution .........................................4-123
Outline Drawings .................................2-66, 2-67 HSP instruction ................................................4-92
Specifications ............................................... 2-65

- KV Nano Series(terminal block type) User’s Manual - A-69


12 Index

List of Abbreviated Mnemonics ....................... A-33


I List of Characters That Cannot Be Used ........ A-45
Character that cannot be used in device
I/O unit wiring precautions ............................... 3-14 comments ................................................ A-46
ID No. ............................................................ 4-123 Characters that cannot be used in labels .... A-45
INCENC instruction ....................................... 5-172 Characters that cannot be used in module
Index constants ............................................... 4-42 and macro names .................................... A-45
Index Modification .................................4-41, 4-167 List of Devices for High-Speed Counters .......5-137
Index register .................................. 2-3, 4-40, 4-41 List of PLC Unit Errors ...................................... A-2
Indirect Specification ............................4-43, 4-167 List of Shortcut Keys ....................................... A-35
Infinity .............................................................. 4-60 How to Use / Key ........................................ A-43
APPENDICES

Initialize module ................................... 4-102, A-32 List of CX Format Shortcut Keys ................. A-42
Input relay .................................................2-3, 4-27 List of GPPQ and GPPA Format
Inspection ........................................................ 3-20 Shortcut Keys .......................................... A-41
Installation Position .......................................... 3-12 Shortcut Keys That Are Valid in
Installing Units Directly in an Industrial KV STUDIO ............................................. A-36
Control Panel ............................................... 3-11 Shortcut Keys That Are Valid in the
Installing Units on DIN Rails ............................ 3-10 Unit Editor ................................................ A-35
Instruction list display .................................... 4-143 List of Unusable Instructions ........................... A-32
Index

Instruction operand simple Lists of CR and CM Devices ............................. A-8


explanation display .................................... 4-143 Lists of Devices
Instructions ..................................................... A-33 Bit devices ....................................................4-17
INT instruction ................................................. 4-98 Word devices ...............................................4-18
Internal auxiliary relay ...............................2-3, 4-29 Load and Save ...............................................5-230
Internal registers .....................................4-25, 4-52 LOGD instruction ...........................................5-186
Internal work consumption ............................... 4-12 LOGE instruction ...........................................5-186
Interrupt programs ........................................... 4-73 LR (Latch relay) ...............................................4-30
Interrupts ......................................................... 4-76
CPU Positioning Parameter
Comparator 2 Interrupts ........................... 4-80 M
External Input Interrupts ............................... 4-79
High-Speed Counter Macro management ....................................... 4-112
Comparator Interrupts .............................. 4-80 Macro Passwords ..........................................4-125
Input capturing ............................................. 4-80 Macro System Devices ..................................4-122
Instructions That Cannot Be Used in Macro Type .................................................... 4-115
Interrupt Programs ................................... 4-82 Macros ............................................................ A-32
Setting the polarity of external Main routine program .......................................4-72
input interrupts .......................................... 4-79 Maintenance ....................................................3-20
Maximum number of connected units ................3-2
Maximum number of I/O points ..........................2-3
J MCALL instruction .........................................4-126
MCMP instruction ..........................................5-164
JOG instruction ................................................ 5-50 MDSTOP instruction ...................................... 4-110
MDSTRT instruction ...................................... 4-110
MEND instruction ...........................................4-126
K Mnemonics ........................................................4-7
Module Configuration Examples ....................4-106
Key Lock ........................................................ 5-250 Module Execution Sequence .........................4-105
KV-N11L Module System Devices ................................4-108
Cables .......................................................... 3-17 Module Type ..................................................4-102
Terminal specifications ................................. 3-17 Monitoring CPU Built-In Functions .................4-176
Monitoring expansion units ............................4-177
Monitoring instructions ...................................4-176
L Monitoring rising and falling edges
of devices ...................................................4-176
Latch relay ................................................2-3, 4-30 Monitoring the execution time in units of modules,
Link register W ................................................. 4-38 macros, and interrupt programs
Link relay B ...................................................... 4-28 (Performance monitor) ...............................4-177
A-70 - KV Nano Series(terminal block type) User’s Manual -
12 Index

Motor (Positioning) Control ................................ 5-4 How to set clock data


MR ................................................................... 4-30 (excluding the KV-N14**) ..........................3-21
MSTRT instruction ......................................... 4-126 Restoring .........................................................4-74
RETI instruction ...............................................4-98
RFSCTH instruction .......................................5-136
N RFSPS instruction ...........................................5-68
Rung comments .............................................4-156
Names and Functions of Parts .......................... 2-6 RUN-PROG Selector Switch and
Nesting ............................................................ 4-73 Error Clear Switch ........................................2-13

O S

APPENDICES
Object creation .............................................. 4-130 Saving ..............................................................4-74
Online editing ................................................. 4-171 Self-hold macros ............................................ 4-116
Operation during Power Outages ...................... 2-4 Sequence control ...............................................4-4
Operation when the execution condition is turned Serial Communication ....................................5-193
OFF ............................................................ 4-132 Series Common Specifications ..........................2-2
Operation when the program is called between the Set display mode ...........................................4-175
MC (master control) and MCR Setting Disabled Operations ..........................5-248

Index
(master control reset) instructions .............. 4-132 Setting the polarity of external input interrupts ........4-79
Option ............................................................ 5-183 Shift JIS code ...................................................4-60
ORG instruction ............................................... 5-54 Shortcut keys that are valid during
Output relay ..............................................2-3, 4-27 online editing ............................................... A-39
Edit .............................................................. A-39
Help ............................................................. A-41
P Monitor/Simulator ........................................ A-41
Script ........................................................... A-40
Package Contents ............................................. 2-5 View ............................................................ A-40
Password ......................................................... 4-15 Shortcut keys that are valid in editor mode ..... A-36
Performance Specifications ............................... 2-3 Convert ........................................................ A-37
PLSOUT instruction ......................................... 5-96 Edit .............................................................. A-36
Precautions When Connecting Units ..........3-2, 3-8 File .............................................................. A-36
Precautions When Using the USB Port or Help ............................................................. A-38
Serial Communication Port to Communicate Monitor/Simulator ........................................ A-38
with a PC or Other Peripheral ...................... 3-19 Script ........................................................... A-37
Precautions when using Timer instructions ..... 4-32 Tool .............................................................. A-38
Processing Bit Devices in Units of Words ....... 4-47 View ............................................................ A-37
Processing bit devices in units of words .......... 4-47 Shortcut keys that are valid in monitor mode ....... A-38
Program capacity ............................................. 4-11 Debugging ................................................... A-38
Programming without considering modules ... 4-107 Edit .............................................................. A-38
Project property ............................................... 4-15 Help ............................................................. A-38
PSTRT instruction ........................................... 5-46 Monitor/Simulator ........................................ A-38
View ............................................................ A-38
Shortcut keys that are valid in
R simulator mode ............................................ A-39
Edit .............................................................. A-39
R .............................................................4-27, 4-29 Help ............................................................. A-39
RAM Clear ..................................................... 5-241 Monitor/Simulator ........................................ A-39
RCNT instruction ........................................... 5-160 View ............................................................ A-39
Read protection ............................................... 4-15 Shortcut Keys That Are Valid in the
Register and batch monitors .......................... 4-174 Unit Editor ................................................... A-35
Removing the cassette ...................................... 3-9 Convert ........................................................ A-35
Removing the Terminal Block ..........................3-18 Edit .............................................................. A-35
Reserved area ............................................... 4-136 File .............................................................. A-35
Restoration Method Help ............................................................. A-35
How to clear errors .......................................3-22 Operations in message area ....................... A-35
How to clear the PLC status ........................ 3-22 Operations in the unit configuration area .... A-35
- KV Nano Series(terminal block type) User’s Manual - A-71
12 Index

Operations in unit selection window ............ A-35


Operations in unit setup window ................. A-35 U
View ............................................................ A-35
Window ....................................................... A-35 Unit I/O Assignments .........................................1-8
Shortcut keys that are valid on the Unit Installation ................................................3-12
initial screen ................................................ A-36 Unit Monitor ...................................................5-206
File .............................................................. A-36 Operating Instructions (I/O Unit) ................5-206
Monitor/Simulator ........................................ A-36 Unit Wiring Precautions ...................................3-14
View ............................................................ A-36 Usage example together with index
Signed ............................................................. 4-55 modification ..................................................4-45
Simple indirect specification #TM .................... 4-46 Usage Procedure ........................................... 4-114
APPENDICES

Single precision floating-point constants ......... 4-50 USB Communication .....................................5-192


Single precision floating-point User Messages ..............................................5-247
real numbers FLOAT .................................... 4-56 Display examples .......................................5-247
Space surrounding the device ......................... 3-13 How to display user messages ..................5-247
Specifications .................................................... 2-9 User Message 1 .........................................5-247
Specified Frequency Pulse Output .................. 5-95 User Message 2 .........................................5-248
Split ................................................................ 4-150
Standby module ............................................. 4-103
V
Index

Subroutine macros ........................................ 4-115


Subroutine programs .................. 4-72, 4-130, A-32
Suffixes .............................................................. 4-8 Value Notation .................................................4-55
System Configuration ........................................ 1-2
System Configuration Overview ........................ 1-2
W
T What You Can Do with the Built-In Functions ....5-2
Wiring ...............................................................2-14
T .............................................................4-31, 4-39 Wiring and Internal Circuit Diagrams
TCH instruction ................................................ 5-58 14-Point Base Unit
Temporary data memory ...........................2-3, 4-39 (KV-N14AR/AT/DR/DT) ............................2-15
Terminal block unit wiring ................................ 3-16 24-Point Base Unit
Tile ................................................................. 4-150 (KV-N24AR/AT/DR/DT) ............................2-22
Time limit control ............................................... 4-4 40-Point Base Unit
Timer .............................................. 2-3, 4-31, 4-39 (KV-N40AR/AT/DR/DT) ............................2-29
Timer error ....................................................... 4-32 60-Point Base Unit
Total steps ....................................................... 4-12 (KV-N60AR/AT) ........................................2-37
Tracing ........................................................... 5-177 Word Devices ..................................................4-36
TRGD instruction ........................................... 5-188 Writing clock data
(Setting the time and date) .........................5-251

Zero Suppression ............................................4-27

A-72 - KV Nano Series(terminal block type) User’s Manual -


12 Index

APPENDICES
Index

- KV Nano Series(terminal block type) User’s Manual - A-73


Revision History
Printing Date Version Details of Revision

Oct 2012 1st version Official release


Nov 2012 2nd version
Jun 2013 3rd version
Sep 2013 4th version
Jun 2014 5th version
Dec 2017 1st revision
1st version

- KV Nano Series(terminal block type) User’s Manual -


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) 2017 KEYENCE CORPORATION. All rights reserved. 084490E 1127-1 717GB Printed in Japan

You might also like