Kvshard PDF
Kvshard PDF
Programmable Controller
KV-1000 Series
User's Manual
Preface
The HI-SPEED VISUAL PLC KV-1000 Series is equipped with a hyper access window. This access
window allows you to check at a glance the I/O information and error information of Expansion Units
that has not been possible up till now unless a tool was connected. This Series is also provided with a
Memory Card slot. This enables exchanging programs using the auto-load feature, logging of
production information, and other extensive functions.
Store this manual in a safe place so that you can retrieve it whenever necessary.
See to it that this manual reaches the last person who is going to use the KV-1000 Series.
Store this manual in a safe place so that you can retrieve it whenever necessary.
See to it that this manual reaches the last person who is going to use the KV-1000 Series.
DANGER Failure to follow these instructions may lead to death or serious injury.
CAUTION Failure to follow these instructions may lead to physical damage (product
malfunction, etc.).
Important
This heading is used to indicate precautions and restrictions that must be followed
when operating the product.
Note
This heading is used to indicate cautions relating to device operation where operator
error is likely.
Tip Indicates useful information or information that aids understanding of text descriptions.
Indicates a reference item or page to be referred to in this manual and a separate manual.
051GB 1
General Precautions
• Verify that this device is operating normally in terms of functionality and performance before the start
of work and when operating the device.
• Provide a safety circuit that does not pass via the programmable controller to enable failsafe
operation of the entire system in the event that the programmable controller fails.
• Output circuit or internal circuit malfunctions sometimes prevent control from being performed
normally. Be sure to provide a safety circuit in control systems where circuit malfunction may lead to
fire or other serious accidents.
• Proceed with care when modifying the KV-1000/700 Series, or when using it in a manner that falls
outside of the ranges indicated in its specifications, since KEYENCE is unable to guarantee device
functionality or performance in such situations.
• Use this product in combination with other devices only after careful consideration, since the KV-
1000/700 Series may fail to satisfy its functionality and performance capabilities as a result of the
conditions and environment in which it is used.
• Do not use this product for the purpose to protect a human body or part of a human body.
• This product is not intended for use as an explosion-proof product. Do not use this product in a
hazardous location and/or potentially explosive atmosphere.
2
CE Marking
Keyence Corporation has confirmed that this product complies with the essential requirements of the
applicable EC Directive, based on the following specifications. Be sure to consider the following
specifications when using this product inthe Member States of European Union.
Notes on compatibility
<The industrial control panel>
• If seams exist within the top or bottom plate of the industrial control panel, strip the coating to
maintain electric potential.
• When grounding the industrial control panel, use a thick grounding wire to create low impedance
even at high frequencies.
<Grounding shielded cables>
• Ground shielded cables near the expansion unit, otherwise, the grounded cables will receive
electromagnetic induction from cables that were present before grounding was implemented.
• After removing and exposing a section of the outer covering for the shielded cable, connect this part
to the industrial control panel in a wide area. (When using clamp brackets or other such tools, be
sure to strip the paint from the contact)
• Do not ground electrical wires by soldering them to shielded wires, as this method will increase
high-frequency impedance and nullify the shield effect.
3
• When using a Keyence KV-U7 as the power supply of the KV-1000/700 Series, be sure to connect
the protective earthing terminal located on the power supply input terminal to the protective earthing
conductor in the building installation because the KV-U7 is designed as a Class I equipment.
• When installing the KV-1000/700 Series, it must be installed in an enclosure (industrial control
panel) with IP54 or higher.
• The rated relay load of the KV-B16RA is 8A per common. In other words, when all eight channels
are used, the maximum load per channel is 1A, and when four channels are used, the maximum
load per channel is 2A.
UL Certificate
The KV-1000/700 Series is an UL Listed Product.
UL-certified products display the UL mark on the label found on the side of each product.
Be sure to consider the following specifications when using this product as an UL Listed product.
• When installing the KV-1000/700 Series, it must be installed in an enclosure (Industrial control panel)
with IP54 or higher.
• Supply power to the KV-1000/700 Series using either the exclusive Keyence KV-U7 power supply, or
a power supply that provides Class 2 output defined in NFPA 70 (NEC: National Electrical Code).
• When using a Keyence KV-U7 as the power supply of the KV-1000/700 Series, be sure to connect
the protective earthing terminal located on the input terminal to the protective earthing conductor in
the building installation wiring as the KV-U7 is designed as a Class I equipment.
• Use stranded copper wire having a gage of AWG#14 to #22 and temperature rating of 105°C or
higher as the lead for wiring to the terminal block on the KV-U7. The tightening torque is 0.6 N·m.
• For wiring to the power supply terminal block on KV-1000/700, use stranded copper wire having a
gage of AWG#20 and temperature rating of 60°C or higher. The tightening torque is 0.5 N·m (4.4
lbin).
• For wiring to the terminal block on the special units except for the KV-DN20 or I/O units, use
stranded copper wire having a gage of AWG#16 to #22 and temperature rating of 60°C or higher
(105°C or higher for the KV-B16RA). The tightening torque is 0.56 N·m (4.94 lb-in).
• For wiring to the functional grounding terminal on the KV-DN20, use stranded copper wire having a
gage of AWG#12 to #22 and temperature rating of 60°C or higher. The tightening torque is 1.8 N·m.
• For wiring to the DeviceNet connector on the KV-DN20, use stranded copper wire having a gage of
AWG#12 to #30 and temperature rating of 60°C or higher. The tightening torque is 0.6N·m.
• The KV-1000/700 (CPU Unit) has a built-in replaceable lithium battery. When replacing the lithium
battery, be sure to use the Replacement Lithium Battery (OP-51604 for KV-1000, OP-42139 for
KV-700) specified in this manual. The lithium battery may explode if mistreated. Explosion hazard.
Never charge, dismantle or throw the battery into fire.
4
How This Manual Is Organized
Chapter 1 THE
CONFIGURATION OF
KV-1000 SERIES
This chapter describes the configuration of the KV-1000 Series system,
names and functions of parts on units, and specifications.
1
& SPECIFICATIONS
2
Chapter 2 ACCESS WINDOW This chapter describes the access window that allows the user to change
data and easily perform monitoring.
3
4
Chapter 3 MEMORY CARD This chapter describes the Memory Card. 5
6
The interrupt processing function executes an interrupt program when there
Chapter 4 INTERRUPTS is a request (an interrupt cause is generated) from an external input or a
high-speed comparator during operation of the KV-1000. This chapter
7
describes the types of interrupt causes and I/O during interrupt processing.
8
This chapter describes high-speed counters and high-speed counter
Chapter 5 HIGH-SPEED
COUNTERS
comparators that enable high-speed pulse measurement and pulse output
independent of scan time.
9
10
Three types of output (frequency measurement, speed of rotation
Chapter 6 FREQUENCY
COUNTERS
measurement, specified frequency pulse output) can be selected using
high-speed counter functions.
A
Chapter 7 CAM SWITCHES Values input from an encoder can be converted to angle to enable virtual
execution of cam operation.
MOTOR CONTROL
Chapter 8 (POSITIONING
CONTROL)
This chapter describes functions for outputting pulses to a stepping motor
or a servo motor, and for controlling positioning.
Chapter 10 VARIOUS
FUNCTIONS
CPU Unit such as functions for setting and checking PLC operation, and
handy functions when debugging programs and performing adjustments
with external devices.
These appendices present tables for the relays, timers, counters, memory
APPENDICES Nos., and control relays/control memories on the KV-1000 Series.
Refer to these appendices when using the KV-1000.
5
Contents
8
Logging Function Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-45
About Logging Data (CSV file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-46
3-9 Memory Card Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-49
Memory Card Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-49
List of Memory Card Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-49
MWRIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-50
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-50
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-58
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-59
MREAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-62
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-63
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-69
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-69
MFREE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-70
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-70
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-72
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-72
MMKDIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-74
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-74
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-76
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-76
3-10 List of Devices for Memory Cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-77
List of Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-77
Control memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-77
Chapter 4 INTERRUPTS
4-1 Interrupt Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
What Is "Interrupt Processing?". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-2
Interrupt Program Execution Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-4
Externally Input Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-5
Interrupts from High-speed Counter Comparators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-6
Interrupts from CPU positioning parameter comparator 2 . . . . . . . . . . . . . . . . . . . . . . . . . .4-6
Precautions in Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-6
Instructions Not Allowed in Interrupt Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-7
4-2 Direct Input/Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8
Direct Input Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-8
Direct Output Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-10
4-3 Input Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12
Input Capture Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-12
4-4 Sample Interrupt Programs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-13
9
About Current Value and Setting Value of High-speed Counters . . . . . . . . . . . . . . . . . . .5-12
Reset Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-16
Preset Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-19
Counter Enable Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-21
Comparator Match Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-23
Interrupts from High-speed Counter Comparators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-24
Acquiring the Current Value by Input Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-24
Extended functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-25
Restrictions Applied to Combined Use of Extended Functions . . . . . . . . . . . . . . . . . . . . .5-25
5-2 List of Devices for High-speed Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26
Control Relays for CTH0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-26
Control Memories for CTH0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-27
Control Relays for CTH1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-28
Control Memories for CTH1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-29
5-3 Direct Clock Pulse Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-30
Outline of Direct Clock Pulse Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5-30
Setting Pulse Output by High-speed Counter Comparator . . . . . . . . . . . . . . . . . . . . . . . .5-31
Example of Direct Clock Pulse Output (ON/OFF ratio 1:1) . . . . . . . . . . . . . . . . . . . . . . . .5-36
Example of Output of Variable Clock Pulse ON/OFF Ratio. . . . . . . . . . . . . . . . . . . . . . . .5-40
Example of Stopping the Clock Pulse at a Specified Number of Pulses . . . . . . . . . . . . . .5-44
10
Chapter 7 CAM SWITCHES
7-1 Cam Switch Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Cam Switch Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-2
Multi-stage Comparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-2
Absolute Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-2
Incremental encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-2
7-2 Cam Switch Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
List of Cam Switch Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-3
Restrictions Applied to Combined Use of Cam Switch Functions . . . . . . . . . . . . . . . . . . . .7-3
MCMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-4
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-5
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-5
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-6
ABSENC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-8
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-8
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-10
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-11
INCENC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-12
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-13
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-15
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-16
11
JOGY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-38
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-38
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-39
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-39
ORGX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-40
ORGY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-40
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-40
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-41
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-41
Zero Return Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-41
TCHX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-42
TCHY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-42
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-42
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-43
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-43
HOMEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-44
HOMEY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-44
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-44
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-45
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-45
CHGSPX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-46
CHGSPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-46
Description of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-46
Instruction Execution Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-48
Sample Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-48
8-6 Positioning Control Reference Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-49
Positioning Control Reference Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-49
Continuous Position Control Reference Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-52
High-speed Execution Reference Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-53
Reference Example of Changing Speed during Operation (1) . . . . . . . . . . . . . . . . . . . . .8-54
Reference Example of Changing Speed during Operation (2) . . . . . . . . . . . . . . . . . . . . .8-56
Compatibility with KV-10/16/24/40. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-58
Positioning Control Exceeding 32 Points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-59
8-7 List Devices for Positioning & List of Error Codes . . . . . . . . . . . . . . . . . . . . . 8-60
List of System Parameters and Statuses. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-60
List of Point Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-64
List of Control Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-64
List of Error Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8-65
12
Baud rate setting [SP] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-9
Model query [?K] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-10
Operation mode confirmation [ ?M ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-10
Error No. confirmation [ ?E ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11
Change mode [ Mn ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11
Clear error [ ER ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-12
Date/time setting [ WRT ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-12
Forced set/reset [ ST/RS ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-13
Continuous forced set/reset [ STS/RSS ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-13
Read [ RD ]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-14
Continuous read [ RDS ]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-16
Write [ WR ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-18
Continuous write [ WRS ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-18
Write setting value [ WS ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-19
Write continuous setting values [ WSS ]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-20
Register monitor [ MBS ]/[ MWS ]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-20
Read monitor [ MBR ]/[ MWR ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-22
Read comment [ RDC ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-23
Response during an error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-24
9-5 Sending/Receiving Text Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-25
Receiving Text Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-25
Sending Text Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9-27
9-6 ASCII Code Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-29
13
APPENDICES
1 Device No. Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
Relays, Timers, Counters, Memory Nos.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2
KV-1000 Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
2 Error Message Lists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-12
PLC Unit Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-12
3 Differences between the KV-1000 Series & KV-700 Series . . . . . . . . . . . . . . . A-15
Differences Relating to CPU Hardware and Special Functions. . . . . . . . . . . . . . . . . . . . A-15
Comparison of Device Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-18
Differences between Control Relays and Control Memories . . . . . . . . . . . . . . . . . . . . . . A-19
4 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-23
14
Conventions Used In This Manual
The following shows how pages in this manual are configured, and the symbols and terminology used
in this manual.
Headline
Indicates the
3-2 To Enable Use of Memory Cards
Mid-heading
main content Indicates the content that
This section describes the procedure up to enabling use of Memory Cards.
of the chapter. follows after a section is broken
Thumbnail index Loading and Removing a Memory Card from the KV-1000 down into smaller units.
Indicates the chapter. 3 Loading a Memory Card Sub-heading
1 Slide the lock on the Memory Card slot cover upwards to
Memory Card
Method of Operation
Indicates the page or Name of product
To check the menu configuration of the access window on the KV-1000, see "Access Window
manual to refer to. Menu Tree."
The page or manual "Access Window Menu Tree" page 2-4
3-4
* This page was made for the purpose of explaining page components, and differs from an actual page.
Terminology
15
MEMO
16
1
1-1
1-1 Checking the Contents of the Package
1
Checking the Contents of the Package
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS
The package contains the following equipment and accessories. Before you start using KV-1000,
make sure that the package contains everything that it is supposed to contain.
Battery
(provided with CPU)
User's Manual
KEYENCE
KV-1000
User's Manual
Every effort has been made in preparing this package. If, however, some of the parts are defective
or broken, contact your dealer.
1-2
1-1 Checking the Contents of the Package
1
Before You Turn the Power ON for the First Time
Even after inserting the battery (battery case), [error 84] that indicates that SRAM data was lost
for the period that the battery was not inserted is displayed on the access window.
Be sure to follow the procedure below to initialize SRAM before using the KV-1000.
■ Initialization procedure
1 Press the "M" key. In the menu, use the "T" and "S" keys to select "9.ALL CLEAR", and
press " ".
2 The all clear confirmation message is displayed. With this message displayed, hold down
the " "key for at least one second with the " " key held down.
3 With the same message displayed for the second time, hold down the " " key for at least
one second. This executes the all clear, and the message meaning "SYSTEM INITIALIZED"
is displayed to indicate that SRAM was initialized.
When this message is appeared, the CPU unit is in the state of the factory shipment.
1-3
1-2 Basic System Configuration
This section describes the types of units, generation specifications and the configuration of the
1 basic KV-1000 Series system.
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS
System Configuration
KV-U7
OC
24 V OUT
24 VDC
1.8 A
0V
N
INPUT
100-240 V
AC
50/60 Hz
0.98 A
L
Start Unit
(provided with CPU)
SD Memory Card
KV-M1G Ladder Support Software
KV STUDIO
1-4
1-2 Basic System Configuration
Cable
(1 m)
(OP-42142)
Cable
(2 m)
(OP-42141)
Other...
Special Unit
Multi-communication A/D Conversion D/A Conversion Remote Link Positioning High-speed
Unit Unit Unit Unit Unit
KV-L20R KV-AD40 KV-DA40 KL-N20V KV-H20/H20G/H20S/H40S
RS-232C/RS-422A Analog input 4 ch Analog output 4 ch
High-speed Counter Unit Ethernet Unit Multi-input PID Temperature Control Unit FL-net Unit
KV-SC20 KV-LE20 KV-TF40 KV-FL20
1-5
1-2 Basic System Configuration
The following tables show the generation specifications and the performance specifications of the KV-
1000 Series.
General specifications
Item Specification
Power voltage 24 VDC (±10%)
CPU Unit KV-1000: 320 mA or less
Internal current
KV-C64XA: 25 mA or more KV-C32XA: 15 mA or less
consumption Expansion Input Unit
KV-B16XA: 15 mA or less
(excluding
current for Expansion Output KV-C64TA: 100 mA or more KV-C32TA: 55 mA or less
Unit KV-B16RA: 120 mA or more KV-B16TA: 35 mA or less
input circuit
drive) Extension KV-EB1S: 15 mA or less
Unit KV-EB1R: 25 mA or less
Operating ambient environment 0 to +50°C (freezing not allowed)*1, *2
Storage temperature -20 to +70°C*1
Operating ambient humidity 35 to 85% (condensation not allowed)*1
1500 VAC (1 min.) across power terminal and I/O terminals, and across all
Withstand voltage
external terminals and case
1500 V peak-to-peak or more, pulse width 1 µs, 50 ns (by noise simulator)
Noise resistance
IEC standard compliancy (IEC61000-4-2/3/4/6)
Number of
When intermittent vibration is present
sweeps
Frequency Acceleration Amplitude
JIS B 3502 10 to 57 Hz — 0.075 mm
X, Y, Z
Vibration resistance IEC61131-2 57 to 150 Hz 9.8 m/s2 — in each
compliant When continuous vibration is present direction
Frequency Acceleration Amplitude 10 times
10 to 57 Hz — 0.035 mm (for 80 mins.)
57 to 150 Hz 4.9 m/s2 —
50 MΩ (across power terminal and I/O terminals, and all external terminals and
Insulation resistance
case by 500 VDC megger)
Operating atmosphere Excessive dirt, dust or corrosive gases not allowed
Overvoltage category II (when KV-U7 is used)
Pollution class 2
KV-1000: Approx. 290 g
CPU Unit
End unit 30 g Start unit 30 g
KV-C64XA: Approx. 140 g KV-C32XA: Approx. 110 g
Expansion Input Unit
KV-B16XA: Approx. 120 g
Weight Expansion Output KV-C64TA: Aprox. 140 g KV-C32TA: Aprox. 100 g
Unit KV-B16TA: Aprox. 130 g KV-B16RA: Approx. 190 g
Extension
KV-EB1S: Approx. 90 g KV-EB1R: Approx. 115 g
Unit
Power Unit KV-U7: Approx. 190 g
*1 Assured range as a system
*2 Specified by the temperature on the bottom side of the unit in a control panel
1-6
1-2 Basic System Configuration
■ Performance specifications 1
Item Specification
1-7
1-2 Basic System Configuration
Automatic restore
• When the power voltage is restored, operation is automatically resumed.
Notification of momentary stop
• Operation is continued on the KV-U7 if the momentary stop is less than 10 ms and on a DC
power supply if the momentary stop is less than 2 ms.
1-8
1-3 CPU Unit KV-1000
This section describes the names and functions of parts on the KV-1000 CPU, and specifications.
1
1-9
1-3 CPU Unit
1
No. Name Function
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS
Note
• Communications is sometimes disrupted, for example, causes unstable USB
communications. If this happens, disconnect the USB cable then re-connect it.
• In situations (environments subject to excessive noise) where communica-
tions is extremely unstable, insert a ferrite core on the cable for PC protection
as well. (Looping the cable one turn proves more effective in countering
noise.)
CAUTION Do not connect the USB cable to the serial port. Doing so might damage
the unit.
1-10
1-3 CPU Unit
Specifications 1
1-11
1-3 CPU Unit
1-phase 100 kHz Duty 50% Phase difference 50 kHz Duty 50%
(line driver input) (line driver input)
*The interval between the start (end) points of change of the
A/B phases must be 2.5 µs or more.
20.0 µs or more
10.0 µs or more ON
A phase, 50%
5.0 µs or more 5.0 µs or more
OFF
ON ON
OFF OFF
T1 T2 T3 T4
T1, T2, T3, T4:2.5 µs or more
* When the impedance of the connection wire is large, pay attention to whether the above waveform is satisfied.
33.3 µs or more
16.6 µs or more ON
A phase, 50%
8.3 µs or more 8.3 µs or more
OFF
ON ON
OFF OFF
3 µs or less 3 µs or less T1 T2 T3 T4
* When the impedance of the connection wire is large, pay attention to whether the above waveform is satisfied.
ON
50%
OFF
ON
50%
OFF
40˚C 45˚C
100
80
60
50%
26.4 V input
40 40%
24 V input
20
0
0 10 20 30 40 50
Peripheral temperature(˚C)
1-13
1-3 CPU Unit
1 ■ Output specifications
R00500 to R00503 (high-speed output 4 points)
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS
Item Specification
Output mode Transistor NPN output
Rated load 30 VDC 0.1 A
Peak load current 0.2 A
Max. OFF voltage 30 VDC
OFF leakage current 100 µA
ON residual voltage 0.6 V DC or less
Common mode 8 points/1 common
OFFJON : 1 µs or less
ON/OFF response time*1
ONJOFF : 5µs or less
Output frequency 100 kHz (at 5 to 100 mA)
"I/O circuit diagrams" page 1-19
*1 The delay time is the response+internal processing time (scan time).
Output waveform
High-speed output
Output frequency 100 kHz (load current when Duty 50% is set: 5 to 100 mA)
2.0 µs or more 4.0 µs or more
OFF90%
10%
ON
* The load of the above output waveform is a resistive load, and influence of connected leads is not taken into consideration.
Note that the ON-OFF width becomes smaller than the above when the impedance of the connected wide is large.
■ +5 V power output
S+5 V (insulated 5 V service power supply)
Use this power supply when connecting to a 5 V interface device such as a motor driver.
Item Specification
Voltage 5 VDC ±10%
Current Max. 100 mA
"Positioning Control Reference Examples" page 8-49
1-14
1-3 CPU Unit
■ External dimensions 1
Front view Side view
27.3
90 35.9
80
3.5 84
72
96.5
(130)
12.1
Bottom view
12.6
12
Unit: mm
90 90
8 9 8 80 Unit: mm
1-15
1-3 CPU Unit
The KV-1000 CPU Unit has two modes, the RUN mode and the
PROG mode.
Each of these modes is switched by the RUN-PROG selector
switch shown in the figure on the right.
■ CPU Unit
Connector wiring diagram
Connector terminal No.
1 21
2 22
3 23
4 24
5 25
6 26
7 27
8 28
9 29
10 30
11 31
Modular connector I/O connector 12 32
13 33
14 34
15 35
16 36
17 37
18 38
19 39
20 40
1 2 3 4 5 6
Modular connector
Terminal No. Direction Signal Name
1 +5 V power output
2 +5 V power output
3 Input RD
4 — SG
5 Output SD
6 GND
(terminal undefined)
SG and GND are connected internally.
1-16
1-3 CPU Unit
I/O connector
1
Terminal Line Driver Signal Name
Direction Type Relay
1-17
1-3 CPU Unit
7,27 A (+24 V)
8,28 A (+5 V)
9,29 A (-COM)
Note
• When terminal A (+24 V) is used, be sure to leave terminal A (+5 V) open. Like-
wise, when terminal A (+5 V) is used, be sure to leave terminal A (+24 V) open.
• The same applies to phases B and Z.
• When extended wiring to the input terminal is left open, note that noise
becomes a fatigue antenna, which may result in erroneous inputs.
1-18
1-3 CPU Unit
IN
Internal circuit
4.3 kΩ
5 V, 24 V
switching circuit
COM0
3.3 kΩ
A(+24 V)/B(+24 V)
Photocoupler insulation
110 Ω
Internal circuit
A(+5 V)/B(+5 V)
910 Ω
A-COM/B-COM
100 Ω
6.2 kΩ
Z(+24 V)
1.2 kΩ Photocoupler insulation
Z(+5 V) Internal circuit
1 kΩ
Z(-COM)
COM1
R00504 to R00507
L
COM1
1-19
1-3 CPU Unit
● Example of input wiring of an external device (when input R00010 to R00013 is used)
1 Ex: 1 When the external device is an open collector output
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS
+5 V
External device
A phase/
-COM B phase
External device
+5 V
-COM -
● Example of input wiring of an external device (when input R00014 to R00015 is used)
Ex: 3 When the external device is an open collector output
External
device
-COM Z-phase
-COM -
CAUTION • During connections, do not mistake the polarity of the load power on the
output side. Connecting the load power with polarities reversed may dam-
age the KV-1000 Series.
• When a long cable is used, the input waveform may become distorted. Pay
attention to this during wiring.
1-20
1-4 AC Power Unit KV-U7
This section describes the names and functions of parts on the KV-U7AC Power Unit, and specifi-
cations.
1
(6)Lock lever
KV-U7
(1)Output bar LED
OC
(2)Terminal block
cover
24 V OUT
(4)PE terminal
N
INPUT
terminal L
0.98 A
(6)Lock lever
(7)KV-1000/EB1R connector
Current used has little margin with respect to power capacity when LED
No.5 (yellow) is lit. Use a separate power supply, for example.
(2) Terminal block cover Cover
24 VDC power terminal for service power supply. (M4 screws) Total 1.8
(3) 24 VDC output
A including main power supply
Protective conductor terminal for connecting to the protective earth lead
(4) PE terminal
of buildings, etc. (M4 screws)
(5) Power input terminal Connected to 100 to 240 VAC (50/60 Hz). (M4 screws)
(6) Lock lever Locks the unit coupling.
(7) KV-1000, EB1R connector Connector for the KV-1000/EB1R connector
1-21
1-4 AC Power Unit
1
CAUTION • During an overcurrent (LED No.6 lit (red)), turn the unit OFF and remove the
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS
Note
• Be sure to connect the KV-U7 immediately to the left of the KV-1000 or Exten-
sion Unit. Also, when the KV-U7 is used, 24 V is not output to the power termi-
nal on the KV-1000.
• When using the KV-U7, limit the total current consumption of the unit to 70%
(LED No.4 lit (green), approx. 1.3 A) of the KV-U7’s output capacity to prevent
defective startup caused by rush current on the unit.
Specifications
■ Specification
Item KV-U7
Input power voltage 100 to 240 VAC ±10% (50/60 Hz)
Output voltage 24 VDC±10%
Output capacity 1.8 A (total of power supply to each unit and service power supply)
Power consumption 135 VA or less
Instantaneous power interruption 10 ms or less
Startup time Max. 2 s or less
■ External dimensions
2.8
KV-U7
OC 27.3
24 V OUT
24 VDC
1.8 A
0V 90 35.9
N
INPUT
100-240 V
AC
50/60 Hz
0.98 A
L
3.5 80
35 5.2 93.2 Unit: mm
1-22
1-4 AC Power Unit
KV-U7
KV-U7
OC
24 V OUT
24 VDC
1.8 A
0V
such as sensor L
50/60 Hz
0.98 A
Class D earthing
Insulated transformer
noise filter, etc.
Note
• To reduce line noise, connect an insulated transformer or noise filter in a 1:1
configuration.
• To reduce dielectric influence, user twisted cables.
• When connecting the Power Unit, be sure to connect to a protective ground.
1-23
1-5 Expansion Input Unit KV-B16XA/C32XA/C64XA
This section describes the names and functions of parts on the KV-B16XA/C32XA/C64XA Expan-
1 sion Input Unit, and specifications.
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS
24 V 24 V
5V 5V
L H
(4)Input terminal block (1)Input voltage selector switch (2)I/O connector (5)Lock lever
Note
The terminal blocks on the KV-B16XA, KV-B16RA, KV-B16TA, KV-AD40, KV-
DA40, and KV-TF40 can be removed.
"Removing the Terminal Block" page 1-52
KV-AD40/DA40 User’s Manual KV-TF40 User’s Manual
1-24
1-5 Expansion Input Unit
Specification 1
CAUTION • The unit may become damaged when the number of inputs that simulta-
neously turn ON exceeds the specification range.
• With the KV-C64XA Unit, 2-lead wire unsupported terminals can be turned
ON 100% regardless of the ambient temperature.
• With the KV-C64XA Unit, the relationship between the ambient temperature
and the continuous simultaneous ON rate on 2-lead wire supported termi-
nals is shown by the following graph:
KV-C32XA derating KV-C64XA derating
Continuous simultaneous ON rate(%)
80 80
75%
60 60
20 20 20%
0 0
0 10 20 30 40 50 0 10 20 30 40 50
Peripheral temperature(˚C) Peripheral temperature(˚C)
1-25
1-5 Expansion Input Unit
1 ■ External dimensions
KV-B16XA
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS
2.8
27.3
90 35.9
3.5 80
9 29 3 (96.5) Unit: mm
KV-C32XA
2.8
27.3
90 35.9
3.5 80
9 23 3 96.3
(125) Unit: mm
KV-C64XA
2.8
27.3
90 35.9
3.5 80
9 29 3 96.3
( 125) Unit: mm
1-26
1-5 Expansion Input Unit
Terminal No.
Internal circuit
0 IN
3
2 5 V, 24 V
5 switching
circuit
4 COM0
7
6 Photocoupler insulation
C0 COM1
8 Input power
9 supply
10
11
12
13
14
15
C1
24 DC/5 V
* COM is shorted internally.
1-27
1-5 Expansion Input Unit
1 18
2 19
000 to 015
3 20 100 to 115 4.3 kΩ
Internal circuit
4 21 IN
5V. 24V
5 22 switching
circuit
6 23 COM0
7 24 Photocoupler insulation
COM1
8 25 Input power
supply
9 26
10 27
11 28
12 29
13 30
14 31
15 32
16 33
17 34
Pin No. Direction Signal Name Pin No. Direction Signal Name
1 Input 000 18 Input 100
2 Input 001 19 Input 101
3 Input 002 20 Input 102
4 Input 003 21 Input 103
5 Input 004 22 Input 104
6 Input 005 23 Input 105
7 Input 006 24 Input 106
8 Input 007 25 Input 107
9 Input 008 26 Input 108
10 Input 009 27 Input 109
11 Input 010 28 Input 110
12 Input 011 29 Input 111
13 Input 012 30 Input 112
14 Input 013 31 Input 113
15 Input 014 32 Input 114
16 Input 015 33 Input 115
17 Input COM0 34 Input COM1
24 DC/5 V 24 DC/5 V
CAUTION Prevent the input simultaneous continuous ON rate from exceeding the
specification range. Otherwise, the unit might become damaged.
“KV-C32XA derating precautions” page 1-25
1-28
1-5 Expansion Input Unit
24 VDC 24 VDC
1-29
1-5 Expansion Input Unit
108 to 115
300 to 315 4.3 kΩ
Internal circuit
IN
330 Ω
COM0 to 3
Photocoupler insulation
Input power
supply
15 kΩ
Internal circuit
IN
2.7 kΩ
COM0 to 3
Photocoupler insulation
Input power
supply
CAUTION Restrictions are applied on the 2-lead wire supported input simultaneous
continuous ON rate. Prevent the input simultaneous continuous ON rate
from exceeding the specification range. Otherwise, the unit might become
damaged.
“KV-C64XA derating precautions” page 1-25
Note
Use the OP-42224 connector (34-pin) for the 64-input units. The OP-23139 cannot
be used.
1-30
1-6 Expansion Output Unit KV-B16RA/B16TA/C32TA/C64TA
This section describes the names and functions of parts on the KV-B16RA/B16TA/C32TA/C64TA
Expansion Output Unit, and specifications.
1
Note
The terminal blocks on the KV-B16XA, KV-B16RA, KV-B16TA, KV-AD40, KV-
DA40, and KV-TF40 can be removed.
"Removing the Terminal Block" page 1-52
KV-AD40/DA40 User’s Manual KV-TF40 User’s Manual
1-31
1-6 Expansion Output Unit
1 Specifications
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS
■ Specifications
Item KV-B16RA (16 points) KV-B16TA (16 points) KV-C32TA (32 points) KV-C64TA (64 points)
External connection Removable terminal Removable terminal *1
Connector Connector *1
method block block
Output mode Relay Transistor (NPN) Transistor (NPN) Transistor (NPN)
250 VAC/30 VDC 2A
Rated load 30 VDC 0.2 mA 30 VDC 0.2 mA 30 VDC 0.2 mA
(8A/1 common)
OFF leakage current — 100 µA or less 100 µA or less 100 µA or less
ON residual voltage — 0.5 V or less 0.5 V or less 0.5 V or less
ON resistance 50 mΩ or less — — —
8 points/1 common (2 16-points/2 32-points/2 64-points/4
Common mode
points) common*2 common*2 common*3
Response OFFJON 10 µs or less 10 µs or less 10 µs or less
10 ms or less
time ONJOFF 100 µs or less 100 µs or less 100 µs or less
Internal current
120 mA or less 30 mA or less 45 mA or less 100 mA or less
consumption
Weight Approx. 190 g Approx. 130 g Approx. 100 g Approx. 140 g
Electrical: 100,000
operations or more
(at 20 operations/
Relay life minute) — — —
Mechanical: 20
million operations or
more
Relay replacement Not possible — — —
*1 MIL-C-83503 compliant
*2 Two COMs are provided for the KV-C32TA and KV-B16TA, and are common internally.
*3 Four COMs are provided for the KV-C64TA, and are common internally.
"KV-C32TA internal circuit diagram" page 1-36 "KV-B16RA internal circuit diagram" page 1-34
"KZ-C16TA internal circuit diagram" page 1-35 "KV-C64TA internal circuit diagram" page 1-37
Note
The current is 1.6 A per common on the KV-C32TA and C64TA.
0
0 10 20 30 50
Peripheral temperature(˚C)
1-32
1-6 Expansion Output Unit
■ External dimensions 1
KV-B16RA/B16TA
27.3
90 35.9
3.5 80
9 29 3 (96.5) Unit: mm
KV-C32TA
2.8
27.3
90 35.9
3.5 80
9 23 3 96.3
(125) Unit: mm
KV-C64TA
2.8
27.3
90 35.9
3.5 80
9 29 3 96.3
( 125) Unit: mm
1-33
1-6 Expansion Output Unit
Terminal No.
000 to 007
(008 to 015)
1 OUT
Internal circuit
0 Load
3
2
5
4 COM0
7
6 (COM1)
C0
8
9
10 Load power supply
11
12
13
14
15
C1
1 Output 001 L
2 Output 002 L
3 Output 003 L
4 Output 004 L
5 Output 005 L
6 Output 006 L
7 Output 007 L
C0 Output COM
8 Output 008 L
9 Output 009 L
10 Output 010 L
11 Output 011 L
12 Output 012 L
13 Output 013 L
14 Output 014 L
15 Output 015 L
C1 Output COM
1-34
1-6 Expansion Output Unit
Internal circuit
7 OUT
6 Load
C0
8
9
10
11
12 Photocoupler COM0
13 insulation
14
15 COM1
C1 Load power supply
1 Output 001 L
2 Output 002 L
3 Output 003 L
4 Output 004 L
5 Output 005 L
6 Output 006 L
7 Output 007 L
C0 Output COM0
8 Output 008 L DC
9 Output 009 L
10 Output 010 L
11 Output 011 L
12 Output 012 L
13 Output 013 L
14 Output 014 L
15 Output 015 L
C1 Output COM1
DC
1-35
1-6 Expansion Output Unit
1 18
2 19
3 20
4 21 Insulated
power supply
5 22
6 23
7 24 000 to 015
100 to115
8 25
Internal circuit
OUT
9 26 Load
10 27
11 28
12 29 Photocoupler COM0
insulation
13 30
14 31 COM1
Load power supply
15 32
16 33
17 34
Pin No. Direction Signal Name Pin No. Direction Signal Name
1 Output 000 L 18 Output 100 L
1-36
1-6 Expansion Output Unit
Internal circuit
8 25 8 25 Load
9 26 9 26 COM0
10 27 10 27 COM1
Photocoupler COM2
11 28 11 28 insulation
12 29 12 29
COM3
13 30 13 30 Load power supply
14 31 14 31
15 32 15 32
16 33 16 33
17 34 17 34
Note
Use the OP-42224 connector (34-pin) for 64-point units.
The OP-23139 cannot be used.
1-37
1-7 Extension Unit KV-EB1S/KV-EB1R
This section describes the names and functions of parts on the KV-EB1S/KV-EB1R Extension
1 Unit, and specifications.
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS
KV-EB1S KV-EB1R
(1)Power monitor LED
(6)OP cable
Note
Before switching the power supply selector switch, be sure to turn the power
OFF.
1-38
1-7 Extension Unit
Specifications 1
60 mm or more
Vertical
■ About connection
• When extension cable 1 m (OP-42142) is used
Up to 3 vertical levels (max. 48 units can be connected)
• When extension cable 2 m (OP-42141) is used
Up to 2 vertical levels (max. 32 units can be connected)
■ About installation
When the Extension Unit is used, allow 60 mm or more of space between the upper and lower
level units to allow heat to escape.
If the temperature inside the panel (temperature at the bottom of the unit) exceeds the operating
ambient temperature of the unit, lower the temperature, for example, by forced air cooling or by
providing more space between mounted units and the surrounding area to improve ventilation.
• Power supply wiring methods
"Wire the same power supply to levels 1, 2 and 3 when a separate power supply is used on the
same system. If the power supply is turned OFF on the 1st level during operation when sepa-
rate power supplies are used for the 1st level, and for the 2nd and 3rd levels, operation of the
units on the 2nd and 3rd levels will enter the state when instructions are executed with the
power supply OFF. Pay sufficient attention to operation when the power supply is OFF."
• Noise countermeasures
"When EB1 is used, and three levels are added on, and a DC power supply is used as each
power supply, loop the power cable twice through the ferrite core (Kitagawa Kogyo: RFC-10),
and when U7 is used, adopt noise countermeasures such as grounding of the FG."
1-39
1-7 Extension Unit
CAUTION Pay attention to the following points when supplying power from separate
power supplies from the KV-EB1R.
• At power ON: Supply power from the KV-EB1R first.
• At power OFF: Turn the power from the KV-1000 side OFF first.
(When an error occurs, press the " " key on the KV-1000 to clear the
error, and change the mode from Prog to Run to start operations.)
■ External dimensions
KV-EB1S
2.8
27.3
35.9
90
9 29 3.5 80
(130)
KV-EB1R
27.3
35.9
90
3.5 80
29 3 (105)
(130)
Unit: mm
1-40
1-8 Installation Environment
This section describes cautions for the environments in which each of the units are installed, and
mounting positions in the panel.
1
Locations subject to condensation Locations subject to corrosive and Locations subject to large amounts of dirt
caused by sudden temperature change flammable gases and dust, salt, iron, and oil smoke
Locations directly subject to Locations that may be splashed Locations where strong magnetic
vibration and shock with water, oil or chemical mist and electrical fields are generated
Magnetic
Chemicals Electrical
field
Oil field
Mounting Position
■ Mounting orientation
When mounting the KV-1000 inside a panel, make sure that the KV-1000 CPU Unit is mounted so
that the front panel and I/O connectors are facing the front.
CK
LO
24 V
24
V
5V
5
V
KV- LO
B16 CK
XA
KV-
C32
XA
24
V
5V
LOCK
1-41
1-8 Installation Environment
30 mm
30 mm
Respective unit Bottom
Allow 30 mm of space
to allow you to put in your
30 mm finger to remove unit.
Top left
Allow 30 mm of space to allow heat to escape.
Note
If the temperature inside the panel (temperature at the bottom of the unit)
exceeds the operating ambient temperature of the unit, lower the temperature,
for example, by forced air cooling or by providing more space between mounted
units and the surrounding area to improve ventilation.
When the Extension Unit is used, allow 60 mm or more of space between the
upper and lower level units to allow heat to escape.
1-42
1-9 Connecting Units
This section describes how to assemble each unit and how to mount each unit on the DIN rail.
1
or
KV-U7
Power Unit
KV-U7
CC
24 V OUT
24 VDC
1.8 A
0V
N
INPUT
100-240 VAC
50/60 Hz
0.98 A
When two Extension Units are used, up to 48 units can be connected to the CPU Unit.
With some special units, 48 units cannot be connected to the CPU Unit.
Refer to the manual for each unit.
Note
• Be sure to connect units with the power turned OFF.
• Before the KV-1000 CPU Unit is shipped from the factory, its battery is
removed to prevent power capacity from failing. When using the KV-1000 CPU
Unit for the first time, connect the battery, and be sure to perform an all clear in
the access window.
1-43
1-9 Connecting Units
The following describes an example of how to assemble the KV-1000 CPU Unit and KV-B16XA
Expansion Input Unit.
KV
-B1
6X
A
Note
Assemble units with the Power Unit disassembled.
1-44
1-9 Connecting Units
■ Mounting units
1 Hook the groove at the top of the DIN rail
onto the DIN rail mounting claw at the top
LO
CK
of the unit.
Upper claw
DIN track
LO
C
K
• The black claw at the bottom is designed
to move by means of a spring. Press in
this claw until you hear it click into place.
• In difficult mounting locations, remove all
locks, mount the unit on the DIN rail, and
then lock.
Locked Unlocked
■ Removing units
1 Pull down the lower DIN rail mounting
claw.
Note
Do not pull down the claw for
the backup battery.
Loose
2 Remove the DIN rail from the units fol-
lowing the procedure in reverse to the
mounting procedure.
1-45
1-10 Wiring Units
This section describes how to assemble connectors, wiring of each unit, internal circuits, and how
1 to wire each unit.
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS
The following describes the precautions to follow when wiring I/O devices and I/O units. Be sure
to read these precautions before starting wiring.
Input
RL
Output
Be sure to separate connecting leads for the Extension Unit away from power leads.
■ Grounding precautions
• Provide a class D earth (maximum resistance of 100 Ω) individually for each of the devices.
• If a separate ground is not possible, ground using a shared grounding point. Note, however,
that in this case the leads must be of the same length.
B
A B A
1-46
1-10 Wiring Units
L Contact L
a b
L L
Zener diode
Varistor
• When the power voltage is 24 to 48 V, install at point b.
When the power voltage is 100 to 200 V,
install at point a.
Compatible dimensions
B : 6 mm min.
L
Dimensions of Y-shaped terminal
L : 13 mm min.
B : Distance between prong outsides
d1 : Diameter of lead insert section d2 : 3.2 mm max.
d2 : Distance between prong insides
(screw fit section) width
L : Total length d1
1-47
1-10 Wiring Units
To connect devices to each unit, you must wire the electrical leads from each device to the con-
nectors (female) to connect to on the unit side.
CAUTION The unit is made of synthetic resin, and may melt if it comes in contact
with acetone, trichlene, benzene, and other solvents with strong dissolv-
ing power. Also, note that the unit may be damaged if excessive force is
applied during fastening.
Note
Use the OP-42224 connector (34-pin) for the 64-input units.
The OP-23139 cannot be used.
Note
The lead must be soldered if you do not have the Exclusive Pressure-contact
Tool.
Names of parts
Exclusive Press-contact Tool: Model No. OP-21734
Handle
Press-fastener punch
Body
1-48
1-10 Wiring Units
Housing
Hood cover vertical cover Hood cover slanted cover
OP-23139 (34-pin) OP-42224 (34-pin)
OP-22184 (40-pin) OP-51404 (40-pin)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Down
40-pin connector: Model No.: OP-22184, OP-51404
Mark Up
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Down
1-49
1-10 Wiring Units
Carrier
2 Insert the contact straight into the contact holder of the Exclusive Pressure-contact Tool.
(Figure A)
3 Insert the lead wire straight in as far as possible along the crimping groove of the contact.
(Figure B)
Press-fastener punch
Fig.A Fig.B
Crimping groove
Cover
Electrical lead
Guide
Contact
View from side
Press-fastener
Handle punch
Press-fastener punch
Cover
Body
Electrical Guide
lead
Contract extractor pin
Guide Contact holder Cover
Electrical lead
1-50
1-10 Wiring Units
7 Attach the housing in which contacts are Screw in these two screws.
inserted to the connector, and attach the
covers.
Housing
To remove contacts
Remove contacts from the connector as follows.
1-51
1-10 Wiring Units
Note
Be sure to turn the power OFF before you remove the terminal block.
A
6X
-B1
KV
V
24
5V
A
6X
-B1
KV
V
24
5V
A
6X
-B1
KV
V
24
5V
1-52
1-11 Maintenance
This section describes how to inspect and perform daily care on units, and how to replace batter-
ies and relays.
1
■ Inspection
When the KV-1000 or units are used for a long time, the connecting sections of the connectors
become loose or the battery is worn down. Continued use of the KV-1000 in this state may cause
trouble during operation.
For this reason, periodically inspect the body and wired sections of the KV-1000 and each of the
KV-1000 Series units.
The following shows the main inspection items.
• Are the locks on the connections of each unit loose or disconnected?
• Are the connector connections loose or disconnected?
• Are the screws on the terminal block loose?
• Is the battery worn?
• Are the wiring cables between units and other equipment damaged?
■ Daily care
Dirt adheres to the CPU Unit or each of the units when they are used for a long time.
Clean off any dirt from the KV-1000 using a clean, dry cloth.
Dust and dirt on fine components can be removed with a cotton wool bud after first removing the
connector.
1-53
1-11 Maintenance
1
CAUTION • The battery life is five years at an ambient temperature of +25°C. Note that
CONFIGURATION OF THE KV-1000 SERIES & SPECIFICATIONS
use of the unit in an environment that exceeds this temperature will reduce
the battery's service life.
• When the unit is used under a high-temperature environment (ambient tem-
perature: +40°C or more), replace the battery within the total unit operation
time of two years.
• When the unit is stored under a high-temperature environment (ambient
temperature: +50°C or more) without it being energized, replace the battery
within one year.
• Data is sometimes lost if the battery is not energized for 10 minutes or more
before it is replaced. Limit the battery replacement time to within ten min-
utes.
• Do not throw the battery used in the KV-1000 into fire or disassemble it. This
battery is not rechargeable. Do not recharge it. Doing so might cause an
explosion.
• Use only the specified battery (OP-51604). Use of a different type of battery
may cause fire or an explosion.
2 Unscrew the backup battery screw, and remove the old battery.
• Complete the battery replacement within ten min-
utes.
5 Turn the unit ON, and make sure that the battery error is
not displayed on the access window.
1-54
2
ACCESS WINDOW
ACCESS WINDOW
This chapter describes the access window that allows the user to change data
and easily perform monitoring.
2-1
2-1 Outline
This chapter describes an outline of the access window and examples of how to use the access
window.
2
What is the "Access Window?"
ACCESS WINDOW
The KV-1000 is provided with a compact LCD display with 2-color backlight.
The LCD is displayed green in the Run mode and red in the Prog mode.
2-2
2-1 Outline
The KV-1000 body is equipped with the access window for easily changing and monitoring data. 2
The access window also allows the user to check error codes that may occur.
ACCESS WINDOW
The access window is provided with the following ten modes.
Device mode
In this mode, internal devices can be displayed and their settings changed.
"2-3 Device Mode" page 2-8
Clock mode
In this mode, the CPU internal clock can be displayed and the time set.
"2-5 Displaying and Setting the Date/Time" page 2-19
Alarm mode
In this mode, the alarm monitor and alarm record can be checked.
"2-8 Alarm Monitor" page 2-27
2-3
2-1 Outline
DM
EM
FM
CM
TM
T
C
CTH/CTC
TRM
Z
RLY
MR
LR
CR
2. Trimmer Trimmer display
3. Date Date display Date/time setting adjustment
4. CPU Mon Positioning X-axis current value
X-axis relay
Y-axis current value
Y-axis relay
X-/Y-axis current value
Frequency counter
Project name
5. Alarm Monitor
Record
Clear record
6. Memory Card Load
Save
File List Delete file
Free Space
7. AW Setting Contrast (3 to 9)
Language (English/Japanese)
8. S-RAM Clr Execute/cancel clear
9. All Clr Execute/cancel clear
2-4
2-1 Outline
ACCESS WINDOW
(1)Display window
(2)Setting/operation
(1) Display window ... This window displays the current values and setting values of each device,
and error messages.
The information of each unit is displayed by pressing the direct access switch on the respec-
tive unit.
(2) Setting/operation keys ... These keys are used for moving between modes and changing the
settings of each mode. Key functions differ according to each mode. For details, refer to the
description of operations for the respective mode.
Menu items
Pressing the "M" key displays the menu.
If all of the menu items do not fit in the screen, press the "T" key to display the rest of the menu.
Press the "S" and "T" keys scrolls the menu up and down.
When screens are displayed in a language other than English, re-select the display language.
The following table shows the CPU menu items.
CPU Menu CPU Menu
1.DeviceMode 6.MemoryCard
2.Trimmer 7.AW Setting
3.Date 8. S-RAM Clr
4. CPU Mon 9. All Clr
5. Alarm
2-5
2-2 Monitoring Units
Units can be monitored and set on the access window by pressing the direct access switch on
special units or Expansion Units such as the I/O Unit connected to the CPU.
To return to the original screen from the Expansion Unit or special unit screen, press the direct
2 access switch of the unit currently displayed on the access window.
ACCESS WINDOW
For details on monitor items and settings for each unit, refer to the User's Manual for the respec-
tive unit.
The following table summarizes key functions when monitoring or setting up units.
Setting/ Display When Changing Numerical
Regular Function
operation Key Values
M Menu display Menu display
Changes the digit whose value is to be
Not used
incremented/decremented.
Switches pages, and changes options when
S Increments the current set value.
changing settings.
Switches pages, and changes options when
T Decrements the current set value.
changing settings.
Holding this key down for at least one Holding this key down for at least one
second applies changes to settings. second applies changes to settings.
■ KV-C32XA (example)
1 Press the direct access switch on the unit.
The direct access switch on the selected unit flashes.
Direct access
switch
2-6
2-2 Monitoring Units
2 The relay No. and relay ON/OFF state assigned to the unit is displayed.
The LED indication changes as follows according to the currently selected unit.
ACCESS WINDOW
0 0
1
2
1
2
On the two 16-LED rows (left row: +0 to 15, right row:
3 3 +100 to +115), for example, the leading No. of relays
4 4
5 5 occupied by C32XA are displayed.
6 6
7 7 In the figure on the left, the top left of the LED indicates
8 8
9 9 relay 30000, and the bottom right indicates relay 30115.
10 10
11 11
12 12
13 13
14 14
15 15
3 Press the "M" key with the direct access switch on the unit flashing (selected).
The menu for the unit is displayed.
4 Select the time constant using the up/down keys, and then press the " " key.
The currently set time constant state can be checked.
5 Hold down the " " key for at least one second in this state.
The setting value flashes, and the unit enters the change mode. (This operation is not possible in
the Run mode. Values can be changed only in the Prog mode.)
6 Change the setting value using the up/down keys, and hold down the " " key for at least
one second.
The setting value stops flashing, and is set. (Holding down the key for less than one second can-
cels the newly set value.)
2-7
2-3 Device Mode
In this mode, PLC device values can be monitored and changed.
The following table summarizes devices that can be displayed and whose settings can be
changed.
Display Name Display Name
RLY Relays CM Control memory
MR Internal auxiliary relays TM Temporary data memory
LR Latch relays T Timers
CR Control relays C Counters
DM Data memory CTH High-speed counters
EM Data memory CTC High-speed counter comparators
FM Data memory TRM Digital trimmers
Z Index registers
Note
The states of timers, counters, and high-speed counter comparators cannot be
monitored.
2-8
2-3 Device Mode
To check the menu configuration of the access window, see "Access Window Menu Tree." 2
"Access Window Menu Tree" page 2-4
ACCESS WINDOW
■ Moving to the Device mode
1 Press the "M" key.
Pressing the "M" key displays the menu screen. (If other units are selected, press the "M" key
twice.)
When the menu screen is displayed, [1. DeviceMode] is displayed flashing.
2-9
2-3 Device Mode
2-10
2-3 Device Mode
Press the " " key. This displays the TM of the specified
No.
ACCESS WINDOW
■ Changing the monitor value display format
1 In the monitor display state, press the " " key.
2 Press the " " key with the list of device types displayed.
5 Press the " " key. This displays the monitor value in the selected display format.
The display format selected here is applied to all devices.
2-11
2-3 Device Mode
Example
2
ACCESS WINDOW
The display format that can be selected varies according to the device type. When a display for-
mat that cannot be applied is selected, the default display format is selected.
2 Press the " " key with the list of device types displayed.
2-12
2-3 Device Mode
4 Press the " " key in the display format selection screen.
ACCESS WINDOW
5 The screen for selecting device names/comment displays is displayed.
Select whether to display the device name or comment using the "S" and "T" keys.
Pressing the "S" key displays the comment.
6 Press the " " key. This selects the comment display, and the display returns to the
Device mode.
The following screen shows comment "SensorA" registered to RLY0, and no comment registered
to RLY1.
2-13
2-3 Device Mode
no longer displayed.)
3 Set the desired device value to write, and hold down the " " key for at least one second.
Flashing stops and writing of the entered device value is executed. If the key is released within
one second, writing is not executed, and the screen returns to the monitor display.
1 Hold down the " " key for at least one second with the device to change displayed.
2-14
2-3 Device Mode
ACCESS WINDOW
4 Press the " " key once.
This changes the "change increment" digit. Each press of the key changes the digit one digit at a
time.
To change the 100's digit, press the key twice.
7 After you have set the new value to write as the device value, hold down the " " key for at
least one second.
This writes the values, and the screen returns to the monitor display.
To cancel writing midway, release the " " key within one second.
This returns to the monitor display without executing writing of the device value.
2-15
2-3 Device Mode
To change device values, hold down the " " key for at least one second. Items change as fol-
lows:
T: Timer setting value
C: Counter setting value
CTH/CTC: CTC (high-speed counter comparator)
TRM: Trimmer
CTC value
(high-speed counter) Trimmer value
2-16
2-4 Digital Trimmer Mode
Trimmer values can be changed more easily than in the Device mode.
Trimmer values are loaded by the TMIN instruction.
2
Names and Functions of Setting/Operation Keys
ACCESS WINDOW
The following table summarizes key operations when changing the trimmer values.
Setting/
Function
operation Key
M Menu display
Changes the No. of the trimmer to display.
Each press increments the device No.
S Increments the trimmer value.
T Decrements the trimmer value.
Changes the digit whose value is to be incremented/decremented. Each press of the key
increments the digit one digit at a time. (When the 10th digit is exceeded, the 1st digit is
returned to.)
Changing trimmer values in this mode differs from changing values in the Device mode. In the
Digital Trimmer mode, changes to values are reflected directly as they are without pressing the
" " key.
To check the menu configuration of the access window, see "Access Window Menu Tree."
"Access Window Menu Tree" page 2-4
The value of the 3rd row indicates the trimmer upper limit value. When the upper
limit value setting is not used, nothing is displayed. For details on use and selec-
tion of the upper limit value, refer to KV-1000 Instruction Reference Manual,
"MEMSW Instruction."
3 The trimmer No. to be displayed can be changed by the " " key.
Select the trimmer No. to change.
2-17
2-4 Digital Trimmer Mode
2
ACCESS WINDOW
5 Pressing the "S" key increases the trimmer value by the increment amount, and pressing
the "T" key decreases the trimmer value by the decrement amount.
The Digital Trimmer mode differs from the Device mode in that changes to values are reflected
directly as they are without pressing the " " key.
Tip • The upper limit value can be set on the ladder or in the access window Device mode.
• The upper limit value is stored to CM.
• The current trimmer value is loaded by the TMIN instruction.
• To enable the upper limit value, use the MEMSW instruction.
• Even if use of the upper limit value has been set by the MEMSW instruction, the
upper limit value becomes 4294967295 when "0" is entered for the upper limit setting
value.
2-18
2-5 Displaying and Setting the Date/Time
The date/time can be displayed and set.
ACCESS WINDOW
The time display conforms to the 24-hour clock.
The day of the week is displayed as follows:
: Sunday : Thursday
: Monday : Friday
: Tuesday : Saturday
: Wednesday
The following table summarizes key operations when setting the date/time.
Setting/
Function
operation Key
M Menu display
Switches the setting items.
Toggles between adjustment ON/OFF of setting items.
S Increments settings items when setting the date/time.
T Decrements setting items when setting the date/time.
Holding this key down for at least one second in the date/time display sets the date/time.
Holding this key down for at least one second when setting the date/time applies this
setting.
Holding this down for at least one second then releasing the key when adjusting the date/
time applies the newly adjusted time.
Method of Operation
To check the menu configuration of the access window, see "Access Window Menu Tree."
"Access Window Menu Tree" page 2-4
■ Date/time setting
1 Press the "M" key.
The menu is displayed.
2 Press the "T" key twice and then the " " key.
[3. Date] is displayed.
2-19
2-5 Displaying and Setting the Date/Time
3 Hold down the " " key for at least one second.
The date/time display screen is displayed, and the "Year" item flashes.
2
ACCESS WINDOW
6 Repeat steps 4 and 5. When you have finished setting the date/time, hold down the " "
key for at least one second.
[Exec] is displayed at the right of the bottommost row of the display to prompt setting of the date/
time.
(At this stage in the procedure, the date/time has not been set.)
Release the " " key. This executes setting of the date/time, and returns the screen to the date/
time display.
If you release the " " key before [Exec] is displayed, the date/time setting is not executed, and
the screen returns to the date/time display.
Note
Set year, month, day, hour, minutes, seconds, and day of the week accurately.
The day of the week is not checked for the year, month, day, hour, minutes, and
seconds settings.
2-20
2-5 Displaying and Setting the Date/Time
■ Time adjustment
Time adjustment is a function for setting the second value to "0" seconds.
ACCESS WINDOW
0 to 29 The seconds value only is set to "0".
The minute value is incremented, and the seconds
30 to 59
value is set to "0".
2 [Adjust] is displayed on the bottommost row to indicate that the time can be adjusted.
(To cancel time adjustment, press the " " key again. The [Adjust] display disappears, and the
screen returns to the date/time display.)
3 Hold down the " " key for at least one second.
4 [Exec] is displayed at the right of the bottommost row of the display. (At this stage in the
procedure, time adjustment has not been executed.)
Release the " " key. This executes the time adjustment.
If you release the " " key before [Exec] is displayed, the time adjustment is not executed, and
the screen returns to the date/time display.
2-21
2-6 Memory Card Operations
Saving of data to Memory Card and loading of data from Memory Card can be performed on the
access window.
"MEMORY CARD" page 3-1
2
About Memory Card Operation
ACCESS WINDOW
The following shows the functions that user can operate on the Memory Card.
Item Description
Load Loads the file in the specified directory (project folder) to the CPU Unit.
Saves the CPU data to Memory Card. Programs, DM, EM, FM, CM, R, MR, LR, CR,
Save
device comments, unit setup information, and logging setup information are saved.
Displays a list of directories and files on the Memory Card. Files in the list can also be
File List
deleted.
Free Space Displays free space on the Memory Card.
Accessing of the Memory Card is possible only in the Prog mode. Before you use the Memory
Card, switch to the Prog mode.
Only files in the directories one level down in the root directory can be accessed.
In the following example file configuration, files under directory B cannot be viewed by "File List".
File C File E
File D File F
2-22
2-7 CPU Monitor Mode
Special functions mounted on the KV-1000 CPU can be monitored on the access window when
they are in use.
2
CPU Monitor
ACCESS WINDOW
The following table summarizes special functions that can be monitored.
Item Description
Pos Control Monitors CPU Unit positioning functions.
Freq Count Monitors CPU Unit frequencies.
ProjectName Checks the project name of the program currently stored on the CPU Unit.
Positioning Monitor
To check the menu configuration of the access window, see "Access Window Menu Tree."
"Access Window Menu Tree" page 2-4
2 Press the "T" key three times to select [4. CPU Mon], and then the " " key.
The CPU special functions menu is displayed.
3 [Pos Control] is displayed flashing. Press the " " key as it is.
2-23
2-7 CPU Monitor Mode
P current value
V current speed
• Monitoring X-axis related relays
CR3000
to
CR3000
CR3008 CR3015
CR3015
• Monitoring Y-axis M codes, current values, current speed
"*" is displayed during pulse output.
P current value
V current speed
• Monitoring Y-axis related relays
CR3100
to
CR3100
CR3108 CR3115
CR3115
• Monitoring X-axis current value and current speed, and Y-axis current value and current speed
Upper two digits are X-axis. X-axis current value
X-axis current speed
Lower two digits are Y-axis. Y-axis current value
Y-axis current speed
2-24
2-7 CPU Monitor Mode
Frequency Counter
To check the menu configuration of the access window, see "Access Window Menu Tree." 2
"Access Window Menu Tree" page 2-4
ACCESS WINDOW
Displays the frequency counter.
"FREQUENCY COUNTERS" page 6-1
2 Press the "T" key three times to select [4. CPU Mon], and then the " " key.
The CPU special functions menu is displayed.
3 [Pos Control] is displayed flashing. Press the "T" key once to select [Freq Count].
2-25
2-7 CPU Monitor Mode
Project Name
2 To check the menu configuration of the access window, see "Access Window Menu Tree."
"What is the "Access Window?"" page 2-2
ACCESS WINDOW
2 Press the "T" key three times to select [4. CPU Mon], and then the " " key.
The CPU special functions menu is displayed.
3 [Pos Control] is displayed flashing. Press the "T" key twice to select [ProjectName].
Tip The project name set in KV STUIDO is stored to CM01740 to CM01756 after data is
transferred.
2-26
2-8 Alarm Monitor
ACCESS WINDOW
advance to alarm relays (CR3300 to CR3415). The alarm monitor function also allows you to
check a record of alarms that have occurred.
The following table summarizes the alarm functions in the access window.
Function Description
Monitor Monitors ON alarm relays in real time.
Record Monitors the alarm ON/OFF record.
Clear record Clears the alarm ON/OFF record.
Comments are displays as alarm messages if device comments are registered in advance to
alarm relays. This helps the user distinguish alarm details.
If comments have not been set, the No. (CR No.) of the alarm relay is displayed.
The date and time that alarm relays turn ON are automatically recorded to the alarm record. To
also set the date and time that alarm relays turn OFF, set CR3501 to ON.
The maximum number of characters that can be displayed is twelve.
Available display characters are ASCII codes 20 to 7e (Hex) and a1 to df (Hex).
If characters other than these are used, the device name is displayed instead of the comment.
The alarm record can be checked on the access window and KV-D30.
Note
Be sure to manipulate the alarm relays by the SET and RES instructions. Cur-
rently operating alarm relays can be reset and batch-cleared also by the ARES
instruction.
When the ONJOFF record relay (CR3501) is set to ON, a record of when the ON state of the
alarm relay changes to OFF is recorded.
Use the ARES instruction to batch-reset alarm relays, reset alarm actuation relays, and batch-
clear records.
To check the menu configuration of the access window, see "Access Window Menu Tree."
"Access Window Menu Tree" page 2-4
Press the "S" and "T" keys on the access window switches the alarm display.
Monitor mode of current occurring alarm
The second smallest relay No. of the two currently
occurring alarms is displayed.
Currently occurring alarms (comment of alarm relay).
2-28
2-8 Alarm Monitor
ACCESS WINDOW
(hours/minutes/seconds)
that the alarm occurred.
Press the "S" and "T" keys on the access window switches the alarm display.
The entire record and all alarm relays can be reset by the ARES instruction or access window
operations.
To check the menu configuration of the access window, see "Access Window Menu Tree."
The following describes the procedure for monitoring alarms in the access window.
2-29
2-8 Alarm Monitor
4 Select [Monitor] using the "S" and "T" keys, and press the " " key.
The alarm relay monitor is displayed.
In the following screen example, CR3302 is ON, and two of the other alarm relays are ON while
2 the other is OFF.
ACCESS WINDOW
(1)
(2)
(1) [01/03]
[01] indicates that the No. of the alarm relay having the highest priority (smallest No.) among
currently ON alarm relays is displayed.
[03] is the total number of currently ON alarm relays.
(2) [CR3302]
This indicates the currently displayed alarm relay. If a comment is registered to the alarm relay,
the comment is displayed instead of the device name. Only 1-byte alphanumerics can be dis-
played in comments.
(Same as the comment display in the Device mode.)
Pressing the "T" key displays the next alarm relay in order of priority.
When the display changes to the highest priority alarm relay No., the screen flashes, and the
highest priority alarm relay No. is displayed.
(Note, however, that the screen does not change even if the display changes to the highest prior-
ity alarm relay No. in the alarm relay record display or clear alarm relay record display.)
In the above screen example, CR3301 is displayed and the entire screen flashes when CR3301
turns ON.
To stop flashing, press any one of the " ", "S", "T" or " " keys.
Pressing the "M" key returns the screen to the alarm menu display.
When the currently displayed alarm relay turns OFF, the relay having the next highest priority is
displayed.
2-30
2-8 Alarm Monitor
ACCESS WINDOW
2 Press the " " key.
The alarm relay ON/OFF record is displayed.
In this screen example, CR3302, CR3303 and CR3400 turned ON in that order, and then CR3400
turned OFF.
(1)
(2)
(4)
(3)
(1) [01/04]
[01] indicates the newest items in the currently displayed record.
[04] indicates the total number of items in the record.
(2) [CR3400]
This is the device currently targeted for recording. If a comment is registered to the alarm
relay, the comment is displayed instead of the device name. Only 1-byte alphanumerics can
be displayed in comments. (Same as the comment display in the Device mode.)
(3)"L" indicates that the record is for a device whose alarm relay state changed from ON to OFF.
Records for a device whose alarm relay state changed from OFF to ON are indicated by "K".
(4) [2004/02/14 15:49:39]
This indicates the date/time that the record was recorded.
Each press of the "T" key displays the next latest record.
In this screen example, the comment "Power On" is registered to CR3300.
Pressing the "M" key returns the screen to the alarm menu.
• When there are no records
The display is as follows when there are no alarm records.
2-31
2-8 Alarm Monitor
2 1 Press the "S" and "T" keys with the alarm menu displayed to select [Clr Record].
ACCESS WINDOW
3 To execute clearing of the record, hold down the " " key again for at least one second.
Pressing the "M" key cancels clearing of the record and returns the screen to the alarm menu dis-
play.
4 The display changes as follows when clearing of the alarm record is completed.
Pressing the "M" key returns the screen to the alarm menu display.
2-32
2-9 Access Window Setup Mode
ACCESS WINDOW
Contrast Adjusts LCD contrast.
Language Sets the display language. Either Japanese and English can be selected.
Contrast
To check the menu configuration of the access window, refer to "Access Window Menu Tree."
"Access Window Menu Tree" page 2-4
2 Select [7. AW Setting] using the "S" and "T" keys, and press the " " key.
The AW setup menu is displayed.
3 Select [Contrast] using the "S" and "T" keys, and press the " " key.
4 Increment or decrement the contrast using the "S" or "T" key to adjust the LCD to an
easy-to-view contrast.
You can set the contrast within the range 3 to 9.
2-33
2-9 Access Window Setup Mode
Display Language
2 Select [7. AW Setting] using the "S" and "T" keys, and press the " " key.
The AW setup menu is displayed.
3 Select [Language] using the "S" and "T" keys, and press the " " key.
4 Switch between English or Japanese using the "S" and "T" keys.
5 Hold down the " " key for at least one second.
This sets the display language.
2-34
2-10 SRAM Clear Mode
ACCESS WINDOW
restores details set by access window setup to their defaults.
SRAM clear can be executed only in the Prog mode.
Executing this function initializes R, MR, LR, CR, T/C (current values), CTH, CM, DM, EM, FM,
and Z. It does not initialize ladder programs, unit setup information, comments, T/C (setting val-
ues), CTC, and logging setup information.
2 Select [8. S-RAM Clr] using the "S" and "T" keys.
The clear SRAM confirmation message is displayed.
3 Hold down the " " key for at least one second with the " " key held down.
The confirmation message is displayed again.
4 Holding down the " " key for at least one second with the second confirmation message
displayed executes SRAM clear.
The screen changes as follows while SRAM clear is being executed.
When execution of SRAM clear ends after the above message is displayed, the access window is
automatically rebooted. If the [HI-SPEED VISUAL PLC KV-1000] message is displayed, this indi-
cates that SRAM clear is completed.
Note
If the " " key is not held down for at least one second, the [HI-SPEED VISUAL
PLC KV-1000] message is not displayed, and SRAM clear is canceled.
2-35
2-11 All Clear Mode
2 Select [9. All Clr] using the "S" and "T" keys.
The all clear confirmation message is displayed.
3 Hold down the " " key for at least one second with the " " key held down.
The confirmation message is displayed again.
Pressing the "M" or the " " key cancels the all clear and returns the screen to the alarm menu
display.
4 Holding down the " " key for at least one second with the second confirmation message
displayed executes the all clear.
The screen changes as follows while the all clear is being executed. When execution of all clear
ends, the access window is automatically reset and rebooted.
Note
If the " " key is not held down for at least one second, the [HI-SPEED VISUAL
PLC KV-1000] message is not displayed, and the SRAM clear is canceled.
2-36
2-12 User Messages
ACCESS WINDOW
access window from the ladder program.
User messages come in two types, user message 1 and user message 2. User message 1 indi-
cates values currently stored to CM01720. User message 2 indicates an ASCII code of up to 24
1-byte characters or the characters preceding ASCII code "00" stored starting from CM01721.
(1) Using the AWNUM instruction (user message 1) and AWMSG instruction (user message 2)
User messages can be displayed easily without worrying out control relays (CR) and control
memory (CM) by using dedicated instructions.
When user messages 1 and 2 turn ON simultaneously, user message 1 is given priority and dis-
played.
For details on instructions, refer to the KV-1000 Instruction Reference Manual, "5-14 Access Window
Instructions."
(2)Make a ladder program using the control relay (CR) and control memory (CM).
To display user message 1, store the numerical value to display to CM01720 and turn CR2900
ON.
To display user message 2, store the character string (ASCII code) to display to CM01721 to
CM01732 and turn CR2901 ON.
When CR2900 and CR2901 turn ON simultaneously, CR2900 is given priority.
(The user message stored to CM01720 is displayed.)
2-37
2-12 User Messages
2 ■ User message 1
When CR2900 turns ON, the numerical value currently stored to CM01720 is displayed on
ACCESS WINDOW
screen.
In the screen example, the value of CM01720 is set to "12345", and the entire screen flashes.
■ User message 2
When CR2901 turns ON, up to 24 1-byte ASCII code characters or the characters preceding
ASCII code "00" stored starting from CM01721 are displayed.
2-38
2-13 Setting Inhibited Operation
Operations on the access window can be inhibited. This section describes how to set inhibited
operation.
2
Modes in Which Operation Can be Inhibited
ACCESS WINDOW
Operation can be inhibited in the following modes:
• Setting of Expansion Unit • Memory Card mode
• Device mode • AW Setting mode
• Trimmer mode • All Clear mode
• Alarm mode • SRAM Clear mode
Setting of inhibited operation is assigned to single bits in each mode on CM10738. Set the following numerical
values.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
The following screen is displayed when an attempt is made to perform an inhibited operation.
Example
When writing in the Digital Trimmer When writing in the Device mode
mode is inhibited
4 2
DW DW
CM01738 CM01738
Note
When device write inhibit is set in the Device mode, this setting can no longer be
canceled in the access window in subsequent operations.
2-39
2-14 Key Lock
The key lock function inhibits movement to other screens from the currently displayed screen by
key operation.
Though values can be monitored, they cannot be written.
2
How to Set Key Lock
ACCESS WINDOW
1 Hold down the "M" key for at least three seconds with the " " key held down.
The following screen is displayed to indicate that the key lock function is applied.
This screen is displayed even if an operation other than that intended to cancel key lock is per-
formed while the key lock function is applied.
2 To cancel the key lock, hold down the "M" key for at least three seconds with the " " key
held down.
The following screen is displayed to indicate that the key lock function is canceled.
Note
• Direct access switches are not selected even if they are pressed while the key
lock function is applied.
• The key lock function cannot be applied while the unit is monitoring.
2-40
3
MEMORY CARD
MEMORY CARD
This chapter describes the Memory Card.
3-1
3-1 About the Memory Card
This section describes the capabilities of the Memory Card.
3 On the KV-1000 Series, you can exchange ladder programs, comments, and various unit setup
information with a PLC using the Memory Card. You can also transfer ladder programs or save
MEMORY CARD
and load device values by operation on the KV-1000's access window using only the Memory
Card without the need for KV STUDIO.
• Auto-loading function
Files stored to the directory (project folder) named "autoload" are automatically transferred to
the CPU when the KV-1000 is turned ON, "autoload" data is made in KV STUDIO.
• Logging function
Devices to be logged are registered on KV STUDIO, and the data of these devices is stored on
the Memory Card at a trigger pre-determined by the user. As the data is saved in CSV file, it can
be read for further processing and analysis on Microsoft Excel or other spreadsheet software.
3-2
3-1 About the Memory Card
MEMORY CARD
Save to Memory Card Reading ladder
programs from
Memory Card
An exclusive terminal is not required.
• Logging of device values is easy. Data is tabulated from logs to create data sheets with greater
ease.
f
er o Production Totals
mb ts
Nuroduc
P
3-3
3-2 To Enable Use of Memory Cards
This section describes the procedure up to enabling use of Memory Cards.
Tip To make full use of the capabilities of the KV-1000, we recommend using the KV-M128.
3-4
3-2 To Enable Use of Memory Cards
Hardware requirements
The connection method differs according to whether the PC has a PCMCIA slot or a USB port.
MEMORY CARD
Connect the USB card reader/writer to the USB port on the PC. Next, insert the Memory Card into
the card reader/writer.
Note
Only a PC pre-installed with Windows 7/Vista/XP/2000 can be used.
INSERT
PC with PCMCIA
Card Adapter
slot
Memory Card
KV-M1G, OP-42137
PC with USB
interface Card Reader/Writer
3-5
3-2 To Enable Use of Memory Cards
Before connecting the Memory Card, make sure that the PCMCIA card slot is functioning cor-
rectly.
3 1 Make sure that the PCMCIA card slot is functioning correctly.
MEMORY CARD
Eject button
CAUTION Insert the Memory Card into the Memory Card adapter paying attention to
the direction in which it is inserted. Using unnecessary force to insert the
Memory Card in the wrong direction may damage the Memory Card or
Memory Card adapter.
3 Insert the Memory Card adapter into the PCMCIA slot on the laptop PC or card reader/
writer.
When using the Memory Card adapter for the first time, the message "Found New Hardware" is
displayed when using Windows 2000/XP. These messages are not displayed from the second
time onwards.
For details on how to use the Memory Card, refer to the User's Manual provided with the Memory
Card adapter.
Connecting to a laptop PC
CAUTION • For details on the connection method, refer to the User's Manual provided
with the laptop PC or card reader/writer.
• Insert the Memory Card adapter into the PCMCIA slot paying attention to the
direction in which it is inserted. Using unnecessary force to insert the Mem-
ory Card adapter in the wrong direction may damage the Memory Card
adapter or PCMCIA slot.
3-6
3-2 To Enable Use of Memory Cards
Before connecting the Memory Card, make sure that the USB card reader/writer is functioning
correctly.
3
Tip For details on how to install the USB card reader/writer, refer to the User's Manual pro-
MEMORY CARD
vided with the USB card/reader writer.
USB Reader/Writer
CAUTION • Insert the Memory Card into the USB card reader/writer paying attention to
the direction in which it is inserted. Using unnecessary force to insert the
Memory Card in the wrong direction may damage the Memory Card or USB
card reader/writer.
• For details on the connection method, refer to the User's Manual provided
with the USB card reader/writer.
3-7
3-2 To Enable Use of Memory Cards
3 After drawing out the Memory Card, close the Memory Card slot cover until it clicks into
place.
CAUTION Do not use unnecessary force to open the Memory Card slot cover in a
locked state.
3-8
3-2 To Enable Use of Memory Cards
CAUTION • Data saved on a Memory Card may be lost in the following instances. Note
3
that Keyence can accept no liability whatsoever if recorded data is lost.
MEMORY CARD
• When the user or a third party has misused the Memory Card
• When the Memory Card has been subjected to static electricity and elec-
trical noise
• When the Memory Card has been removed or other devices have been
turned OFF while the Memory Card is being accessed (e.g. during saving
or deleting of data)
• We recommend backing up important data on MO disks, floppy disks or
other storage media.
• Never remove the Memory Card or turn the KV-1000 OFF while the Memory
Card access LED on the KV-1000 is lit (indicating that data is being loaded
or written to the Memory Card). Doing so might corrupt the data inside the
Memory Card.
Note
• In environments subject to severe noise, it may take time to access the Mem-
ory Card. (In the worst case, this might damage the card or FAT (File Allocation
Table). ) If this happens, attach a ferrite core onto the power cable before use.
Also, install the KV-1000 away from equipment that emits strong electromag-
netic fields.
• Accessing of the Memory Card is not started with the Memory Card slot cover
open. Be sure to use Memory Cards with the Memory Card slot cover closed.
• When the Memory Card slot cover is opened while the Memory Card is being
accessed, the process that was being performed at that time is continued until
it is completed. However, subsequent processing is no longer accepted on the
Memory Card.
• The SD Memory Card (KV-M1G) is formatted for maximum performance before
it is shipped from the factory. SD Memory Cards formatted in Windows can be
used. However, the performance of the SD Memory Card may not be fully dem-
onstrated (e.g. the data write speed to the SD Memory Card drops). If the Mem-
ory Card must be re-formatted in its initial shipped state, contact your nearest
agent.
3-9
3-3 Data Management on Memory Cards
This section describes how to manage data on Memory Cards.
3 ■ Structure of folders
The folder structure is as follows when the project folder "usr1", for example, is made on the
MEMORY CARD
*1 The drive name differs according to the setting of the Memory Card drive on the PC you are using.
Project folder
(\usr1)
User data is stored to this folder.
usr1.ZLB
usr1.ZCD
usr1.ZCT
usr1.ZLG
DM.ZDV
CM.ZDV
EM.ZDV
FM.ZDV When the folder is created in KV STUDIO
R.ZDV "3-4 Saving/Reading Data to and from
CR.ZDV the Memory Card to KV STUDIO"
MR.ZDV
LR.ZDV
CPUMB.ZSH
PB*.ZSH
MB*.ZSH
MC*.ZSH
MLS*.ZSH
MLC*.ZSH
\KVSAVE00
KVSAVE00.ZLB
KVSAVE00.ZCD
KVSAVE00.ZCT
KVSAVE00.ZLG
When the folder is created in the access window
DM.ZDV
"3-5 Memory Card-related Access
CM.ZDV
Window Operations"
EM.ZDV
FM.ZDV
R.ZDV
CR.ZDV
MR.ZDV
LR.ZDV
3-10
3-3 Data Management on Memory Cards
Tip • When ladder files are saved in the access window on the KV-1000 CPU Unit, the
project folder "KVSAVE**" ("**" stands for any No. within the range 00 to 99) is auto-
matically created each time that a save is executed.
• When the auto-loading function is used on the KV-1000 CPU Unit, name the project
folder "autoload" when saving the data.
For details on the auto-loading function, see "3-6 Transferring Programs." 3
MEMORY CARD
■ File names and project folder names that can be used
The file names and project folder names that can be used on the Memory Card are restricted as
follows for display on the access window.
• Length
8 characters
Tip Files names or project folder names exceeding eight characters are displayed as follows:
• Allowable characters
Only 1-byte alphanumerics. "\", "/", ".", "(space)", "*", "?", ",", """, ":", ";", "<", ">", "=", and "+" are
not allowed.
3-11
3-3 Data Management on Memory Cards
The data currently stored inside the Memory Card differs from the data that is created when
"Overwrite project(S)" or "Save project as(A)" is selected from the KV STUDIO menu to save
data. The same applies when data is saved in PROTOCOL STUDIO, MOTION BUILDER, and
MV LINK STUDIO.
To save data to Memory Card, be sure to select {Memory Card(M)} J {Write(W)} from the menu.
Data that is not saved by selecting {Memory Card(M)} J {Write(W)} from the menu cannot be
read on the access window of the KV-1000 CPU Unit.
3-12
Saving/Reading Data to and from the
3-4 Memory Card to KV STUDIO
Data is saved to or read from the Memory Card using KV STUDIO.
How data is saved or read differs according to the type of data.
Ladder programs, device comments/labels, unit setup information, and logging setup information
3
This data is read and written according to the following procedure.
MEMORY CARD
1 Connect the Memory Card to the personal computer.
“3-2 To Enable Use of Memory Cards”
2
Select the folder to store
data to.
Displays the types
of files saved in the
selected folder.
CAUTION When saving to an existing folder, the data in the selected folder will be
overwritten and previous data will be lost.
3-13
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO
Tip • When saving data to a new folder, click the "New" but-
ton and enter the name of the folder. A project folder
will be created.
• Data on Memory Cards is managed in project folder
3 units.
• When the auto-loading function is used on the KV-1000 CPU Unit, name the project
MEMORY CARD
DM, CM, etc. values, and relay, control relay, etc. ON/OFF states
Save or read data to and from the Memory Card during monitoring or by editing devices offline.
Pay attention to the following points:
• Data on the Memory Card is read from the batch change window.
• Data is saved to Memory Card within the range of devices specified on the batch change win-
dow.
• Only devices displayed on the batch change window are read.
• To read multiple devices, display the batch change window for each device to be loaded.
• Data that can be saved to Memory Card and read from Memory Card are DM, EM, FM, CM, R,
MR, LR, and CR. Also, file names for each of the devices are fixed to DM.ZDV, EM.ZDV, FM.ZDV,
CM.ZDV, R.ZDV, MR.ZDV, LR.ZDV, CR.ZDV, respectively.
3-14
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO
■ Saving/reading device data to and from the Memory Card when online (during
monitoring of) with the KV-1000
During monitoring, save data of devices read from the PLC to Memory Card, or load device data
from the Memory Card and write it to the PLC by the following procedure.
3
1 Connect the Memory Card to the personal computer.
MEMORY CARD
"Connecting the Memory Card"page 3-6, page 3-7
Different
Tip Two or more "Batch Change Windows" cannot be displayed at the same time.
Item Explanation
Device range Specifies the range of devices.
Current value Enter the value here.
Change part Changes the entire content of the currently selected range of devices.
Read file Reads files already saved with device values to the batch change window.
Write file Saves device values on the batch change window to a file.
Write PLC Writes devices in the range-specified section to the PLC.
Read PLC Reads the data of the specified device from the PLC.
Read from Memory
Reads the content of devices saved on Memory Card to the batch change window.
Card
Write to Memory Saves to the Memory Card the content of the devices in the range currently selected on
Card the batch change window.
Device This field is for displaying and entering the type and number of device.
Display format Selects the display format of the current value.
Comment Enter the comment here.
3-15
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO
● To read the content of devices from PLC and save them to Memory Card
Follow the procedure below after performing steps 1 to 3 described above.
5 Enter the range of devices to read from PLC to save to the Memory Card in "Device range" on
the batch change window.
6 Click the "Read PLC" button to read the data from the PLC.
3-16
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO
Tip • When saving data to a new folder, click the "New" but-
ton and enter the name of the folder. A project folder
will be created.
• Data on Memory Cards is managed in project folder
units. 3
• The [Memory Card] dialog box displays the types of files currently saved to the
MEMORY CARD
selected folder. File types are indicated by the following abbreviations:
3-17
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO
■ Saving/reading data to and from the Memory Card when offline (monitoring
OFF) with the KV-1000
Save or read data from the Memory Card offline by the following procedure.
Different
Tip Two or more "Batch Change Windows" cannot be displayed at the same time.
3-18
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO
● To save the content of devices on the batch change window to Memory Card
Follow the procedure below after performing steps 1 to 4 described above.
MEMORY CARD
6 Write the value to save data to "Current value".
7 Enter the range of devices to save to "Device range" on the batch change window.
8 Click the "Wr Mem Card" button on the batch change window.
The [Memory Card] dialog box is displayed.
3-19
3-4 Saving/Reading Data to and from the Memory Card to KV STUDIO
Tip • When saving data to a new folder, click the "New" but-
ton and enter the name of the folder. A project folder
will be created.
• Data on Memory Cards is managed in project folder
3 units.
• The [Memory Card] dialog box displays the types of files currently saved to the
MEMORY CARD
● To read data to the batch change window from the Memory Card
Follow the procedure below after performing steps 1 to 4 described above.
Tip To write the read data to the KV-1000, execute the monitor, establish communications with the
KV-1000, and then click the "Write PLC" button.
For details on starting the monitor, "KV STUDIO User's Manual"
3-20
3-5 Memory Card-related Access Window Operations
This section describes access window operations relating to the Memory Card.
MEMORY CARD
Switches the setting items.
ST Selects the item.
Holding this key down for at least one second applies the setting. The setting is
RET canceled if held down for less than one second, and the screen returns to the previous
menu.
Method of Operation
To check the menu configuration of the access window, see "Access Window Menu Tree."
"Access Window Menu Tree" page 2-4
Note
Memory Card-related operations in the access window can be executed only in the
Prog mode.
■ Load
Before you execute a load, insert the Memory Card into the CPU.
2 Press the "T" key five times and then select [Memory Card].
The letters [MemoryCard] are displayed flashing.
3-21
3-5 Memory Card-related Access Window Operations
3
MEMORY CARD
Tip Press the " " key. The file time stamp can be confirmed.
"Checking the time stamp" page 3-23
5 Select the directory (project folder) to load using the "S" and "T" keys.
Press the " " key.
After selecting the directory (project folder), the load confirmation message is displayed.
6 Hold down the " " key for at least one second. This executes the load.
The screen changes as follows while the load is being executed.
To cancel a load, hold down the "M" key or the " " key for less than one second.
3-22
3-5 Memory Card-related Access Window Operations
MEMORY CARD
■ Save
Before you execute a save, insert the Memory Card into the CPU.
2 Press the "T" key five times and then select [Memory Card].
The letters [MemoryCard] are displayed flashing.
4 [Load] is displayed flashing. Press the "T" key once to select [Save].
3-23
3-5 Memory Card-related Access Window Operations
3
MEMORY CARD
6 Hold down the " " key for at least one second. This executes the save.
The following screen is displayed while the save is executed.
The percentage is displayed while the data is being saved to the file.
To cancel a save, hold down the "M" key or the " " key for less than one second.
This cancels the save, and returns the display to the Memory Card menu.
7 When the save ends, the directory (project folder) in which the data was saved is displayed.
Pressing the "M" key returns the display to the Memory Card menu.
3-24
3-5 Memory Card-related Access Window Operations
MEMORY CARD
File Content File Format
Ladder program KVSAVE**.ZCD (** is the same number as the directory.)
Device comments/labels KVSAVE**.ZCT
Unit setup information KVSAVE**.ZLB
Logging setup information KVSAVE**.ZLG
Files for MOTION BUILDER are not generated. These files are saved together with other CMs as
CM device values.
Data for PROTOCOL STUDIO is saved to file together with other DMs as DM device values.
■ File list
Before you execute file list, insert the Memory Card into the CPU.
2 Press the "T" key five times and then select [Memory Card].
The letters [MemoryCard] are displayed flashing.
3-25
3-5 Memory Card-related Access Window Operations
3
MEMORY CARD
4 [Load] is displayed flashing. Press the "T" key twice to select [File List].
Files in the directory (project folder) are displayed by selecting the directory (project folder) by the
"p" and "q" keys, and pressing the " " key.
3-26
3-5 Memory Card-related Access Window Operations
■ File delete
Delete the directory (project folder) or files selected at [File List].
MEMORY CARD
The message for confirming whether it is OK to execute the delete is displayed.
To cancel a delete, hold down the "M" key or the " " key for less than one second
<File>
Tip .
<Directory>
3 Hold down the " " key for at least one second. This executes the delete.
The "Delete Wait..." message is displayed.
4 When the delete ends, the display returns to the File List display.
Pressing the "M" key returns the display to the Memory Card menu.
Note
If you delete a directory, all of the files under that directory also will be deleted. Be
sure to check the content of a directory before you execute a delete.
3-27
3-5 Memory Card-related Access Window Operations
■ File space
You can check the free space on the Memory Card.
2 Press the "T" key five times and then select [MemoryCard].
The letters [MemoryCard] are displayed flashing.
4 [Load] is displayed flashing. Press the "T" key three times to select [Free Space].
6 After the KV-1000 finishes checking free space, the free space on the Memory Card is displayed.
Pressing the "M" key returns the display to the Memory Card menu.
3-28
3-5 Memory Card-related Access Window Operations
MEMORY CARD
3-29
3-6 Transferring Programs
The Memory Card can be used to save or load program data.
Programs can be transferred on the access window or by KV STUDIO.
2 Select the name of the project folder containing the ladder to be transferred.
(To save data, specify the project folder to save the data to.)
For details on access window operations, “3-5 Memory Card-related Access Window Operations“
Auto-loading Function
Files stored to the directory (project folder) named "autoload" are automatically transferred to the
CPU when the KV-1000 is turned ON. "autoload" data is made in KV STUDIO.
2 Insert the Memory Card into the KV-1000's Memory Card slot, and close the Memory Card
slot cover until it clicks into place.
Note
When the program on the KV-1000 is write-protected by the MEMSW instruction,
an error is generated, and the program does not run.
3-30
3-7 Transferring Device Value Data
Device value data can be transferred between the Memory Card and CPU.
Device value data can be transferred on the access window or by KV STUDIO.
MEMORY CARD
Memory Card. However, only specific data can be transferred to the CPU from the Memory Card
if specific data such as DM data or program data. This is made possible by storing the data
beforehand to a project folder inside the Memory Card.
For example, the KV STUDIO's offline device editing feature can be used to create a Memory
Card (project folder (sub-directory)) containing only DM data.
Also, there are two ways of copying only DMs from another CPU Unit: (i) Upload the device val-
ues on KV STUDIO and then save only the DM values to the Memory Card, or (ii) Save the DM
data to individual program files to the Memory Card from the CPU, delete unwanted program files,
etc. from the project folder on the PC, and create a project folder containing only DM data.
Files in the following format are created when a save is executed in the access window.
Delete unwanted files from these saved files.
"File delete" page 3-27
3-31
3-8 Logging Function
The KV-1000 CPU Unit's logging function enables recording of device states. Records are saved
to the Memory Card.
About Logging
3
"Logging" refers to the recording of what kind of states devices are in at a certain timing.
MEMORY CARD
The information of devices or triggers to be recorded is set on KV STUDIO, and records are
saved to the Memory Card. This logging data is saved in CSV format so it can be imported to
Excel or other spreadsheet software for analysis.
Root
The following shows the flow of the logging function setup procedure.
Detailed operations such as setting up the devices or triggers to log are all made in KV STUDIO.
All there is to do after this is to create a simple ladder program for generating triggers using logging
instructions and then transfer the ladder program and logging setup information to the KV-1000.
Set up logging on KV STUDIO.
(1)Set logging in KV STUDIO.
Set up device to log, and set trigger settings, etc.
"Logging Function Setup Procedure" page 3-32
(3)Transfer the ladder program and Transfer the ladder program and logging setup information to
logging setup information to KV-1000.
KV-1000.
"Transferring Ladder Programs and Logging Setup Information" page 3-44
"KV STUDIO User's Manual"
Insert the Memory Card,
and execute the program. Insert the memory Card into the KV-1000, and start logging.
3-32
3-8 Logging Function
The settings for using the logging functions are made in KV STUDIO.
The following settings are required to use the logging function:
• Setting of the file name 3
• Setting of the device to log
MEMORY CARD
• Setting of the triggers
• Optional settings
Follow the procedure below to make these settings.
Item Explanation
Clicking the "Set" button displays the "Logging settings" dialog box. In this dialog box,
Set
you can set up the currently selected logging ID.
Delete Clicking the "Delete" button deletes the settings of the currently selected logging ID.
Apply Clicking the "Apply" button applies the settings you have made.
Cancel Clicking the "Cancel" button cancels the settings you have made.
Help Pressing the "Help" key displays Help.
3-33
3-8 Logging Function
File Name
3
MEMORY CARD
Item Explanation
File No. Select from "Auto running No./Fixed/Dev val (lower 3 dgts)".
Auto running number*1 The lowest file No. of unused Nos. within the range 0 to 999 is used.
No. limit Sets the upper limit for the file No. within the range 0 to 999.
Action at start Select action at start of logging from "New file/Add to latest file".
Select processing when there are no free Nos. from "From oldest file/
When no free Nos.
Stop logging".
Fixed Specify a fixed value within the range 0 to 999.
File
No. No. Sets the file No. within the range 0 to 999.
Select processing when the same file exists from "Overwrite oldest file/
When same file exists
Add".
Specify by a word device value within the range 0 to 999 when execution
Dev val (lower 3 dgts)
is enabled.
Device Sets the device to store the file No. to.
Select processing when the same file exists from "Overwrite oldest file/
When same file exists
Add".
Text string*2 Sets the character string to append to the file name.
When this checkbox is marked, the creation date/time information is
included in the file name. The date/time information is fixed to the date/
time information of when the new file name was created. So, the file name
is not changed when data is added to an existing file. When an existing file
Date & time*2
is overwritten, the oldest file is deleted. So, a file is created using the file
name of the new date/time information.
Year (00 to 99) Month (01 to 12) Day (01 to 31) Hour (00 to 23)
Minute (00 to 59)
*1 When the search for a free No. is completed, and the file is ready to be written to, the logging in
operation relay turns ON. If a trigger is generated in the mean time, a buffer overflow is likely to
occur. So, be sure to generate the trigger after the logging in operation relay has turned ON.
The higher the No. limit value is set, the longer it takes to search for a free No. As a guideline, 15
seconds is required to search for a free No. when the No. limit is set to 999.
*2 When logging ID4, file No.2, character string "KEYENCE" and date/time information "Year/Month/
Day/hour/Minute" are selected, and a new file is created on 2004, December 13 at 14:15, the file
"log002_KEYENCE0412131415.csv" is created in folder "log4" on the Memory Card root.
File name: log (file No.) _ (character string) (date/time)
3-34
3-8 Logging Function
Note
KV-1000 identifies files by a folder name (logging ID) and file No.
(The character string and date/time are ignored.)
On your PC, do not create two or more files having the same file No. in the same folder
(logging ID) on the Memory Card but with a different character string or date/time.
3
MEMORY CARD
■ About processing at start of logging
If the specified file already exists when the KV-1000 is turned ON and logging is enabled (if there
is no free No. when "Auto running No." is set), operation is as follows.
When the file No. specification method is set to "Auto running No."
• When there is no free No. at "New file":
Processing conforms to "Processing at capacity exceeded".
• When the latest file exceeds the capacity by "Add to latest file":
The file having the next free No. is used. When there are no free Nos., processing conforms to
"Processing at capacity exceeded".
When the file No. specification method is set to "Auto running No."
When the capacity of the last file is exceeded with all file Nos. used
• When "From oldest file" is selected for "When no free Nos.":
The oldest data is deleted, and a new file is created using the same file No.
• When "Stop logging" is selected for "When no free Nos.":
The logging error relay turns ON at start of logging, and logging is stopped.
3-35
3-8 Logging Function
Device
Set up the device to save. A mix of bit devices and word devices can be set.
Up to 128 devices can be set per single logging ID.
3 Example
(1) When bit devices are set for all 128 devices:
MEMORY CARD
Item Explanation
Clicking the "Add" button displays the "Logging device settings" dialog box. Sets the
Add
device to be logged.
Clicking the "Change" button displays the "Logging device settings" dialog box. Changes
Chng
the device to be logged.
Delete Clicking the "Delete" button deletes the currently selected device.
Up Moves the currently selected device upwards.
Down Moves the currently selected device downwards.
Item Explanation
Sets the device to be logged. When the button is clicked, you can select from the
Target device*1 device comments.
*1 Target devices
Bit : R/MR/LR/CR/T (contact)/C (contact)/CTC (contact)
Word : DM/EM/FM/CM/TM/TC (timer current value)/CC (counter current value)/CTH/TRM (trimmer)/Z
3-36
3-8 Logging Function
Triggers
Set the triggers for executing logging. All the logging IDs can be set to the same trigger.
MEMORY CARD
Item Explanation
Type*1 Select the type of trigger from "Bit device/Cycle".
Sets a bit device. When button is clicked, you can select
Bit device Device
from the device comments.
Cycle Sets the cycle (1 to 86400000) in ms units.
Cycle Generate trigger
When this checkbox is marked, the trigger is also generated at
also at start of
the start of logging.
logging
Note
The value of the specified device is captured by END processing immediately after a
trigger is generated. For this reason, a maximum delay of one scan occurs until the
device value is saved after a trigger is generated.
3-37
3-8 Logging Function
Option
3
MEMORY CARD
Item Explanation
Insert file comment to top of When this checkbox is marked, the CSV file is prefixed with a file
CSV file comment.
Append device comment
When this checkbox is marked, a device comment line is inserted.
line*1
Append time stamp to each
When this checkbox is marked, a time stamp is added at each line.
Append line*2
information
When this checkbox is marked, a data No. is added at each line. The data
No. starts from 0 when logging is started. When "Add" is selected for the
file No. setting, the data No. starts from 0 from midway in the file (place
Append data No. to each line
where data starts to be added). If there is a data overflow due to a buffer
overflow, how many data overflowed can be found out by looking at this
data No.
Write to Memory Card at each When this checkbox is marked, data is written to the Memory Card at
trigger*3 each trigger.
Action When this checkbox is marked, the logging data is stored to CPU memory
Auto-restart logging by until the Memory Card is next inserted (if the Memory Card was removed
Memory Card insertion*4 during execution of logging), and logging is automatically restarted when
the Memory Card is inserted.
When this checkbox is marked, the upper limit value of the file size can be
Set file size upper limit
set.
Upper limit value*5 Set the upper limit value in line units or KB units.
*1 A device No. (e.g. DM00000) is entered for devices to which device comments have not been
transferred on the CPU Unit.
*2 The data of the time (Year/Month/Day/Hours/Minutes/Seconds) that logging was performed is
recorded in CSV format to the time stamp.
Example 2004/12/13,14:15:16
*3 With the logging function, files stay open while logging is being executed. When the KV-1000 is
turned OFF with a file open, the logging result is not left on the Memory Card.
When the "Write to Memory Card at each trigger" checkbox is marked, the logging result is left on
the Memory Card also while logging is being executed even if the KV-1000 is turned OFF
provided that writing after generation of the trigger has ended.
Note, however, that there is the danger that the content of the Memory Card will be lost if the KV-
1000 is turned OFF during writing to the Memory Card.
As writing to Memory Card occurs at each trigger, it take time to access the Memory Card. This
makes it more likely for buffer overflows to occur. When a short trigger interval is set, unmark the
"Write to Memory Card at each trigger" checkbox.
3-38
3-8 Logging Function
*4 This function is an "automatic restart" and not an "automatic start." When the Memory Card is not
inserted in the KV-1000 unit when the LOGE instruction is executed, the logging error relay turns
ON, and logging is not started.
"Automatic restart" functions when the Memory Card is inserted and removed while logging is
being executed.
*5 Both file comments and device comments are counted as one line at Number of lines.
The file size includes all file comments and device comments. 3
"Calculating the file size" page 3-48
MEMORY CARD
Logging Instructions
To execute logging, a ladder program that uses logging instructions must be made.
3-39
3-8 Logging Function
3 Ladder program
Execution condition n
Input method
LOGE L O G E n
MEMORY CARD
Execution condition n
LOGD L O G D n
Operand Explanation
n Specify the logging ID (0 to 9) .*1*2
*1 Cannot be specified by "$".
*2 When a bit device has been specified to n , 16 continuous bits are occupied. When a word
device has been specified, one word is occupied.
Description of Operation
LOGE When the execution condition turns ON, execution of logging of the specified logging ID
specified by n is enabled.
After the instruction is executed, the logging execution relay of each logging ID is set, and
logging is executed when the trigger is generated. Enabling of execution continues until
the LOGD instruction is executed regardless of the state of the execution condition for the
LOGE instruction.
Loggings of all the logging IDs can be enabled at the same exection condition.
LOGD When the execution condition turns ON, execution of logging of the specified logging ID
specified by n is disabled.
After the instruction is executed, the logging execution relay of each logging ID is set, and
logging stops.
Logging details up till then are output to the Memory Card.
Logging ID Logging Execution Relay
0 CR0000
1 CR0100
2 CR0200
3 CR0300
4 CR0400
5 CR0500
6 CR0600
7 CR0700
8 CR0800
9 CR0900
3-40
3-8 Logging Function
Scan
Logging
execution relay 3
MEMORY CARD
Trigger
(bit device)
Execute
Execute
Logging execution Execute Execute
Scan
Logging
execution relay
Trigger (cycle)
Execute
Execute
Execute
Execute
Logging execution
Operation flags
Sample Program
3-41
3-8 Logging Function
The control information and error information of logging execution are assigned to control relays
and control memories.
3 There are two types of control relays: individual control relays provided for each logging ID, and
just one control relay provided for the system.
MEMORY CARD
Note
The logging results in the control relays and control memories are reflected by END
processing, so logging results are not reflected until END processing even if an
operation is executed within a ladder program.
Attribute
Device No. R: read-only Description
Blank: R/W
3-42
3-8 Logging Function
MEMORY CARD
• Reducing the number of accesses on the Memory Card
• Reducing the amount of data or lowering the frequency of triggers
• Increasing the scan time
3-43
3-8 Logging Function
To use the logging function, preset logging setup information and a ladder program made using
logging instructions is transferred to the KV-1000.
For details, KV STUDIO User's Manual
2 Select {Monitor/Simulator(N)} J {Convert J Transfer J Monitor (C)} from the menu or select
{Convert J Transfer (W)}.
The "Transfer program" dialog box is displayed.
3 Mark the checkboxes of items to transfer to the KV-1000 such as the logging setup information,
and click the "Execute" button.
3-44
3-8 Logging Function
MEMORY CARD
• The scan time during execution of logging increases by a maximum of "3+6 x number of IDs in
use" ms. The scan time increases as the number of devices to log increases.
• When two or more triggers are generated simultaneously, the access volume on the Memory
Card increases. So, the scan time increases, or buffer overflows are more likely to occur.
3-45
3-8 Logging Function
■ Access window
• The "character string" and "date" of the file name set on KV STUDIO are not displayed on the
access window.
Item Explanation
Text strings in CSV files • "," cannot be used.
• The following characters cannot be used:
• 12 1-byte characters * / < > ? \ | % , : ; "
• 7 2-byte characters
Text strings in file names
• NEC special characters (8740H to 879CH)
• NEC selected IBM extended characters (ED40H to EEFCH)
• IBM selected IBM extended characters (FA40H to FC4BH)
All ASCII codes are saved as they are. Control characters, '"', etc. are saved
ASCII text string
as they are.
The following describes the format of CSV files that are saved by the logging function.
(3) When the data format is ASCII text string, data is filled from the lift. Otherwise, data is filled
from the right.
Item
Number of Characters
in a Column
Example Remarks 3
Length of one line is always 64
MEMORY CARD
characters.
File comment 64 "title"
Number of characters does not
include '"'.
Number of characters does not
Device comments 32 ..., "start relay", ...
include '"'.
Data No. 10 1234567890,
DATE 10 2004/06/11, 2 columns are used for date and
Time stamp
TIME 8 14:20:19, time.
Data format and number of characters in one column (not including commas)
Number of Characters
Data format Example Remarks
in a Column
Bit 1 ...,1,... ON is 1, and OFF is 0.
Not prefixed with "+" when a plus
1-word signed 6 ..., -1234,...
number
1-word unsigned 5 ..., 1234,...
Not prefixed with "+" when a plus
2-word signed 11 ..., 1234567890,...
number
2-word unsigned 10 ..., 123456789,...
Floating point
13 ..., 2.4123E+12, ... Exponent format fixed
exponent
When the text string contains a null,
(number of words) x
ASCII text string ... , "a123" ... , ... subsequent text strings are not
2+2
recorded.
Data line
3-47
3-8 Logging Function
Size of devices
Item Size
Bit devices 2
Unsigned 6
1-word
Signed 7
Unsigned 11
Word devices 2-word
Signed 12
Floating real number 14
ASCII text string (n words) (n x 2) +3
Data No. 11
Time stamp (date + time) 20
CAUTION Though approximate values such as the number of files can be calculated
from the file size found by the above calculation and from the size of the
Memory Card, the number of files, etc. that can be actually saved changes
according to how the disk is being used. Allow sufficient margin during use.
3-48
3-9 Memory Card Instructions
The Memory Card can be accessed from the ladder program when Memory Card instructions are
used.
MEMORY CARD
When the MMKDIR instruction is executed,
the directory is created on the Memory Card.
Example: Makes the directory "\ABC".
For details on instructions, KV-1000 Instruction Reference Manual "5-13 Memory Card Instructions"
3-49
3-9 Memory Card Instructions
MWRIT
MWRIT Memory Card
write
Writes device data to the
Memory Card.
3 Ladder program
Execution condition MWRIT
Input method
MEMORY CARD
S1 S2 n M W R I T S1 S2 n
D1 D2 D1 D2
Operand Explanation
S1 Specifies the name of the file to save data to within 1 to 249 characters (including END code NUL and directory name).*1,*3
S2 Specifies the leading device to save data to.*2, *3
n Specifies the number of data to save.*4
D1 Specifies the leading device to store save format-related parameters and the save state of the data.*3,*6,*7
D2 Specifies the notification bit device.*5, *6
*1 To specify a text string using constants, enclose with " ". The characters "#" and "$" cannot be used.
1-byte characters: ASCII code
2-byte characters: shift JIS code
*2 When saving index register Z and digital trimmer values set in the access window, copy the data
once to a data memory DM, for example, and then set that data memory DM.
*3 For bit devices, specify the leading device of the channel.
*4 When a bit device has been specified, 16 continuous bits are occupied. When a word device has
been specified, one word is occupied.
*5 When a bit device has been specified, 2 continuous bits are occupied. When a word device has
been specified, the lowermost bit of two continuous words is used as the notification bit device.
Bits other than the lowermost bit do not change.
*6 When a device to which indirect specification or index modify has been specified, data is written
to the specified device at the up edge of the execution condition.
*7 When a bit device has been specified to D1 , 96 continuous bits are occupied. When a word
device has been specified, six continuous words are occupied.
Description of Operation
MWRIT This instruction writes n number of data (16-bit/32-bit/ASCII text string) starting from
S2 to Memory Card according to the content of parameters ( D1 to D1 +4) under
the file name specified by S1 at the up edge of the execution condition. The number of
actually saved data is written to D1 +5, the completion notification is written to D2 ,
and the error notification for an abnormal end is written to D2 +1.
3-50
3-9 Memory Card Instructions
Example
16-bit data
bit bit
15 0
S2 +2 34567
Memory
Card
3
...
CSV file S1 .CSV
S2 + n -2 45678
MEMORY CARD
12345, 23456, 34567,..., 45678, 56789
S2 + n -1 56789
32-bit data
bit bit bit bit
31 16 15 0
...
...
n -3 a(611H) b(62H) n -2
n -1 c(63H) d(64H) n
Note
When the setting of save format D1 has been specified in binary data, it is
stored as follows:
16-bit data
bit bit
15 0
12345 3039H
3930A05B
23456 5BA0H
32-bit data
bit bit bit bit
31 16 15 0
1234567890 499602D2H
D20296493538D08B
2345678901 8BD03835H
3-51
3-9 Memory Card Instructions
S1 setting
Specify the name of the file to save data to within 1 to 249 characters (including END code NUL
and directory name).
3 S1 "file name" "directory\file name"
MEMORY CARD
DM00004 NUL(00H)
n setting range
Set the number of data to save. The setting range changes according to the setting value of
D1 .
3-52
3-9 Memory Card Instructions
MEMORY CARD
0: Add mode Example
File name: ABC (data to save) File name: ABC
+
Holds the content of the current file, and overwrites and saves data to a position in the
file specified by the write position ( D1 +3) from the start of the file. An error occurs if
the file does not exist.
1: Write position
specification mode Example
1(offset from start of file) File name: ABC (data to save) File name: ABC
Set line feed specification and fixed digit specification of the data to save.
bit
15
D1 +2 bit
0
Add line feed OFF ON OFF ON
Fixed digit
OFF OFF ON ON
output
Setting value 0 1 2 3
Add line feed (Set end of file processing when outputting as a CSV file.)
OFF: Inserts a comma ($2C).
ON : Inserts a line feed CR+LF ($0D$0A).
Fixed digit output (The number of digits in the data is fixed when outputting
as a .CSV file.)
OFF: Variable (Zero suppression is ON.)
* When "2" or "3" is specified to D1 , fixed digits is set at all times.
ON : The number of digits can be fixed by the following number of digits.
Save format
2 3 4 5 6 7 8 9
D1
3-53
3-9 Memory Card Instructions
File pointer . . . . . . . . . . . . . . . . . Position separated in 1-byte units from the start of the stored file
16-bit binary data
01000C007B00D2043930A05B07876EB2D5DDF F F F
3 TEST1.BIN
16-bit data
1 , 1 2 , 1 2 3 , 1 2 3 4 , 1 2 3 4 5 ,
MEMORY CARD
TEST1.CSV (31H) (2CH) (31H) (32H) (2CH) (31H) (32H) (33H) (2CH) (31H) (32H) (33H) (34H) (2CH) (31H) (32H) (33H) (34H) (35H) (2CH)
ASCII data
A B C D 1 2 3 4 a b c d 1 2 3 4 A B C D
TEST1.CSV (41H) (42H) (43H) (44H) (31H) (32H) (33H) (34H) (61H) (62H) (63H) (64H) (31H) (32H) (33H) (34H) (41H) (42H) (43H) (44H)
File pointer position $00 $01 $02 $03 $04 $05 $06 $07 $08 $09 $0A $0B $0C$0D$0E $0F $10 $11 $12 $13 $14
[ D1 +3 • D1 +4] are enabled only when write position specification mode 1 or 2 is set for the
write mode ( D1 +1).
After write processing to the Memory Card ends, counting is performed from the start of the file,
and the position up to the end of the newly saved data is stored to the write position ([ D1 +3 •
D1 +4]).
Also, data can be written from the specified position by setting a value (offset value) to the write
position ([ D1 +3 • D1 +4]) before the instruction is executed.
The position to write to can be specified in 1-byte units.
Ex: 1 When the write mode ( D1 +1) is "1" . . . . Write position specification mode
(offset from start of file)
File pointer position
$00 $04
$05
$00000005
$00000001
$00 $01
or more
When $00000002 is set $00000006
File name: ABC (data to save) File name: ABC
$06
$00 $02
3-54
3-9 Memory Card Instructions
Ex: 2 When the write mode ( D1 +1) is "2" . . . . After the write position specification mode
(offset from start of file) is executed, the
stored value is $00000000 at all times.
File pointer position
MEMORY CARD
D1 +4] D1 +4]
Data is added to the end of the file.
Example
$00000000 File name: ABC (data to save) File name: ABC
$22222222 $22222226
($00000000)
Data is overwritten at a specified position from the end of the file.
Example When $00000001 is set
File name: ABC (data to save) File name: ABC
$00000000
$22222221 $22222225
$00000001 $22222222
or more
When $00000002 is set
File name: ABC (data to save) File name: ABC
$22222220 $22222224
$22222222
Note
Pay attention to the following when specifying the position to write to.
When specifying the pointer in the data
.Binary format ··· Pointer position
01000C007B00 A05B0787 01 A05B0787 0 0 ··· Corrupted data
.CSV format
1 , 1 2 , 1 2 3 , 1 2 3 4 , 1 , 1 2 3 4 , 3 ,
(31H) (2CH) (31H) (32H) (2CH) (31H) (32H) (33H) (2CH) (31H) (32H) (33H) (34H) (2CH) (31H) (2CH) (31H) (32H) (33H) (34H) (2CH) (33H) (2CH)
3-55
3-9 Memory Card Instructions
The number of actually written data is stored after write processing to the Memory Card ends.
0. 16-bit binary
MEMORY CARD
Example
1. 32-bit binary
2. 16-bit Hex File name: ABC (data to save)
4
3. 32-bit Hex
4. 16-bit File name: ABC
unsigned binary
5. 32-bit
4
unsigned binary
6. 16-bit signed Example File name: ABC (data to save) Size
binary exceeded
2
7. 32-bit signed File name: ABC
binary
9. Floating real
number
Example File name: ABC D1 D1 +39
Free space (for 100 characters) NULL
Text string data of 40 characters + NULL 40
File name: ABC
8. ASCII text 40 characters
40
string
Example File name: ABC D1 D1 +39 Size
Free space (for 30 characters) NULL exceeded
Text string data of 40 characters + NULL 30
File name: ABC
30 characters 10 characters
3-56
3-9 Memory Card Instructions
Item Description
D2
Completion
This device turns OFF when execution of the instruction starts, and turns ON
when write processing to the Memory Card ends. The device turns ON
3
notification
whichever way execution ends, successfully or in error.
MEMORY CARD
Error This device turns OFF when execution ends successfully, and turns ON when
D2 +1
notification execution ends in error.
Note
• Set the save format, write mode and options to appropriate values before exe-
cuting the instruction.
• When setting the write position, set appropriate values before executing the
instruction.
• The result of END processing after execution of the instruction is completed is
written for the write position, number of written data, completion notification,
and error notification.
• When save format 8 (ASCII text string) is set, the text string preceding the end
code (NUL) from S2 is output enclosed by double quotation marks ("").
• When the text string is longer than the number of data (n) to write, only the
number of data (n) characters to write are from the start of the text string are
stored.
• Double quotation marks (") in text strings are converted to two double quota-
tion marks ("").
Example 1 2 " A B " 3 4 5 (NUL) "12""AB""345"
• Files names are automatically appended with an extension according to the
save format setting.
• Several scans are sometimes required for writing to the device. If the value of
the device to write to is changed during write processing to the Memory Card,
the concurrency of each of the written device values cannot be ensured. Use
the completion notification D2 or CR3214 (Memory Card instruction execut-
ing) control relay to perform exclusive control.
• The MWRIT instruction cannot be executed while the Memory Card instruction
executing control relay CR3214 is ON. For this reason, CR3214 must be used
to perform exclusive control as follows.
Example
RXXXXX CR3214 MWRIT
S1 S2 n
D1 D2
3-57
3-9 Memory Card Instructions
Operation flags
• When the text string specified by S1 does not contain the end code (NUL)
• When the text string specified by S1 exceeds 249 characters (including NUL)
• When a timer/counter is specified to S1 by indirect specification
CR2012 • When a device other than the leading device of the channel is specified when a bit device is
specified to S1 , S2 , and D1
• When a value outside of the range is specified to a parameter
• When a value is specified for reservation of a parameter
• When the indirect specification and index modify range is inappropriate
* The instruction is not executed when CR2012 turns ON.
MWRIT This instruction is executed for one scan at the up edge of the execution condition.
Scan
ON
Execution condition
OFF
Write processing
ON
Completion notification ( D2 )
OFF
* Write processing is executed regardless of the program. Accordingly, if the instruction is being
executed once at a certain scan, execution of write processing is continued even if the input
condition is OFF at the next scan. The time until actual completion of write processing is depen-
dent on the size of the data and the file access processing time.
3-58
3-9 Memory Card Instructions
Sample Program
Each time that R01000 turns ON, data memories DM01000 to DM01099 are added to the file
"ABC\DATA". 3
The save format is CSV file format. ON is output to R00500 after writing ends.
MEMORY CARD
CR2008 R01004 The completion notification device is reset to its initial state.
RES
ON for 1 scan
The values of data memories DM01000 to DM01099 are written to the Memory Card in CSV file format.
Each time that R01000 turns ON, the file is written to directory "ABC" with the execution date and
execution time taken as the file name. ON is output to R00500 after writing ends.
CR2008 R01004 The completion notification device is reset to its initial state.
RES
ON for 1 scan
R01000 R01004 CM00700 DM00000 Calendar timer (Year) 00 to 99 is converted to ASCII code
LDA TBCD ASC STA and stored to DM00000.
Calendar timer (year)
3-59
3-9 Memory Card Instructions
The values of data memories DM01000 to DM01099, and then DM02000 to DM02199 are written
to the Memory Card in CSV file format.
Each time that R01000 turns ON, the file is written to directory "ABC" with the execution date
taken as the file name. ON is output to R00500 after writing ends.
3 CR2008 R01004
RES
R01006
RES The completion notification device is reset to its initial state.
ON for 1 scan
MEMORY CARD
R01000 R01004 CM00700 DM00000 Calendar timer (Year) 00 to 99 is converted to ASCII code
LDA TBCD ASC STA and stored to DM00000.
Calendar timer (year)
3-60
3-9 Memory Card Instructions
MEMO
MEMORY CARD
3-61
3-9 Memory Card Instructions
MREAD
MREAD Memory Card
read
Reads device data from
Memory Card.
3 Ladder program
Execution condition MREAD
Input method
MEMORY CARD
S D1 n M R E A D S D1 n
D2 D3 D2 D3
3-62
3-9 Memory Card Instructions
Description of Operation
MREAD n items of data (16-bit/32-bit/ASCII text string) of the content of the parameters
([ D2 to D2 +4]) are saved at the up edge of the execution condition to devices
starting from D1 from the file specified by S . The number of actually read data is
written to D2 +5, the completion notification is written to D3 , and the error
3
notification for an abnormal end is written to D3 +1.
MEMORY CARD
Example
16-bit data
bit bit
15 0
D1 +2 34567
Memory
Card
...
CSV fileޓS .CSV
D1 + n -2 45678
12345, 23456, 34567,..., 45678, 56789
D1 + n -1 56789
32-bit data
bit bit bit bit
31 16 15 0
...
...
CSV file S .CSV
12345678, 123456789, 1234567890,... ..., 2345678901, D1 +2 ( n -2)+1 2345678901 D1 +2 ( n -2)
3456789012 D1 +2 ( n -1)+1 3456789012 D1 +2 ( n -1)
Note
When the setting of read format D2 has been specified in binary data, it is
stored as follows:
16-bit data
bit bit
15 0
12345 3039H
3930A05B
23456 5BA0H
32-bit data
bit bit bit bit
31 16 15 0
1234567890 499602D2H
D20296493538D08B
2345678901 8BD03835H
3-63
3-9 Memory Card Instructions
S setting
Specify the name of the file to read from Memory Card to within 1 to 249 characters (including
END code NUL and directory name).
3 S "file name" "directory name\file name"
MEMORY CARD
DM00004 NUL(00H)
n setting range
Sets the number of data to read. The setting range changes according to the setting value of
D2 .
Sets the read format of the file. (Set the format of the file saved on Memory Card.)
D2
0 1 2 3 4 5 6 7 8 9
setting value
16-bit 32-bit 16-bit 32-bit ASCII Floating
Details 16-bit 32-bit 16-bit 32bit
unsigned unsigned signed signed text real
saved binary binary Hex Hex
binary binary binary binary string number
Extension
appended .BIN .CSV
to S
Save format Binary data Comma-delimited text
3-64
3-9 Memory Card Instructions
MEMORY CARD
Read position
Data is read from a position specified by the read position from the start of the file.
1: Read position
specification mode 1 (offset Example File name: ABC
from start of file) Read position ([ D2 +3 • D2 +4])
Data is read from a position specified by the read position from the end of the file.
2: Read position Example File name: ABC
specification mode 2 (offset
from end of file)
Read position ([ D2 +3 • D2 +4])
Sets "0".
File pointer Position separated in 1-byte units from the start of the stored file
16-bit binary data
01000C007B00D2043930A05B07876EB2D5DDF F F F
TEST1.BIN
16-bit data
1 , 1 2 , 1 2 3 , 1 2 3 4 , 1 2 3 4 5 ,
TEST1.CSV (31H) (2CH) (31H) (32H) (2CH) (31H) (32H) (33H) (2CH) (31H) (32H) (33H) (34H) (2CH) (31H) (32H) (33H) (34H) (35H) (2CH)
ASCII data
A B C D 1 2 3 4 a b c d 1 2 3 4 A B C D
TEST1.CSV (41H) (42H) (43H) (44H) (31H) (32H) (33H) (34H) (61H) (62H) (63H) (64H) (31H) (32H) (33H) (34H) (41H) (42H) (43H) (44H)
File pointer position $00 $01 $02 $03 $04 $05 $06 $07 $08 $09 $0A $0B $0C$0D$0E $0F $10 $11 $12 $13 $14
[ D2 +3 • D2 +4 are enabled only when read position specification mode 1 or 2 is set for the
read mode ( D2 +1).
After read processing from the Memory Card ends, counting is performed from the start of the file,
and the position up to the end of the newly read data is stored to the read position ([ D2 +3 •
D2 +4]).
Also, data can be read from the specified position by setting a value (offset value) to the read
position ([ D2 +3 • D2 +4]) before executing the instruction.
The position to read from can be specified in 8-bit (1-byte) units.
3-65
3-9 Memory Card Instructions
Ex: 1 When the read mode ( D2 +1) is "1" . . . . Read position specification mode
(offset from start of file)
File pointer position
Ex: 2 When the read mode ( D2 +1) is "2" . . . . Read position specification mode
(offset from end of file)
File pointer position
Note
Pay attention to the following when specifying the position to read from.
16-bit binary 01000204 32-bit binary BC004E61 5B0715CD
TEST1.BIN TEST1.BIN
O X O X O O X X X O X X X O
.CSV file 1 , 1 2 , 1 2 3 ,
TEST1.CSV (31H) (2CH) (31H) (32H) (2CH) (31H) (32H) (33H) (2CH)
O: Correctly read position
O X O X X O X X X O X: Incorrectly read position
3-66
3-9 Memory Card Instructions
The number of data actually read from the Memory Card are stored after read processing is com-
pleted.
MEMORY CARD
0. 16-bit binary Example File name: ABC
1. 32-bit binary
D1 D1 +39
2. 16-bit Hex 100 items of data 40
3. 32-bit Hex 40 items of data read
4. 16-bit from file ABC
unsigned binary
5. 32-bit
40
unsigned binary Example File name: ABC D1 D1 +29
6. 16-bit signed
binary 30 items of data 30
7. 32-bit signed 30 items of data read
binary from file ABC
9. Floating real
number
Example File name: ABC D1 D1 +39
100 characters of data NUL 40
40 characters of data +
8. ASCII text NUL read from file ABC
40
string Example File name: ABC D1 D1 +29
30 characters of data NUL 30
30 characters of data +
NUL read from file ABC
Item Description
This device turns OFF when execution of the instruction starts, and turns ON
Completion
D3 when read processing from the Memory Card ends. The device turns ON
notification
whichever way execution ends, successfully or in error.
Error This device turns OFF when execution ends successfully, and turns ON when
D3 +1
notification execution ends in error.
Note
• When the data to read is data outside of the specified format range, an error
occurs, an error code is output to CM02390 to end read processing.
• During a CSV file read, when there are spaces, commas, or line feeds at the file
pointer positions after the data is read, the file pointer to be output to the result
data becomes the data position following the comma or line feed. (Reading of
the space, comma or line feed at the end of the data is skipped).
• During a CSV file read, reading of empty fields (e.g. sections with continuous
commas ",") is skipped, and device data is not stored. The data to be read next
is stored to the next device (not skipped devices). During this operation,
skipped data is counted as the number of data.
3-67
3-9 Memory Card Instructions
• Example " 1 2 " " A B " " 3 4 5 " 1 2 " A B " 3 4 5 (NUL)
• Files names are automatically appended with an extension according to the
read format setting.
Note
• Several scans are sometimes required for reading the device. During execu-
tion of the MREAD instruction, data values read from the Memory Card are
written in order to the start of the specified device. For this reason, do not read
data in a range of devices that have been processed by the MREAD instruction
before the completion notification bit device turns ON. Some data sometimes
is not reflected. To prevent this, use the completion notification D3 or
CR3214 (Memory Card instruction executing) control relay to perform exclu-
sive control.
• The MREAD instruction cannot be executed while the Memory Card instruction
executing control relay CR3214 is ON. For this reason, CR3214 must be used
to perform exclusive control as follows.
RXXXXX CR3214 MREAD
S D1 n
D2 D3
Operation flags
3-68
3-9 Memory Card Instructions
MREAD This instruction is executed for one scan at the up edge of the execution condition.
Scan 3
ON
MEMORY CARD
Execution condition
OFF
Read processing
ON
Completion notification ( D3 )
OFF
* Read processing is executed regardless of the program. Accordingly, if the instruction is being
executed once at a certain scan, execution of read processing is continued even if the input
condition is OFF at the next scan. The time until actual completion of read processing is depen-
dent on the size of the data and the file access processing time.
Sample Program
When R01000 turns ON, the data (100 items) in the file "DATA.CSV" in directory "ABC" on the
Memory Card is read, and is stored to data memories DM01000 to DM01099.
ON is output to R00500 after reading ends.
CR2008 R01004 The completion notification device is reset to its initial state.
RES
ON for 1 scan
3-69
3-9 Memory Card Instructions
D1 D2 M F R E E D1 D2
Operand Explanation
D1 Specifies the leading device to store the Memory Card free space to.*1, *3
D2 Specifies the notification bit device.*2, *3
*1 When a bit device has been specified, 32 continuous bits from the start of the channel are
handled.
*2 When a bit device has been specified, 2 continuous bits are occupied. When a word device has
been specified, each of the lowermost bits of two continuous words is used as the notification bit
device. Bits other than the lowermost bit do not change.
*3 When a device to which indirect specification or index modify has been specified, data is written
to the specified device at the up edge of the execution condition.
Description of Operation
MFREE Free space on the Memory Card is stored in byte units to the device specified by [ D1 •
D1 +1] at the up edge of the execution condition. Also, the completion notification is
written to D2 , and the error notification for an abnormal end is written to D2 +1.
Example
D1 +1 D1
Free space
Memory 32-bit binary data
Card
3-70
3-9 Memory Card Instructions
Item Description
D2
Completion
This device turns OFF when execution of the instruction starts, and turns ON
when acquisition of free space on the Memory Card ends. The device turns ON
3
notification
whichever way execution ends, successfully or in error.
MEMORY CARD
Error This device turns OFF when execution ends successfully, and turns ON when
D2 +1
notification execution ends in error.
Note
• The result of END processing after execution of the instruction is completed is
written for the completion notification and error notification.
• Several scans are sometimes required for acquiring free space.
• The acquired free space sometimes differs from the actual free space when (i)
file operations were being performed via an FTP server function during acqui-
sition processing or (ii) the logging function was being used.
• The MFREE instruction cannot be executed while the Memory Card instruction
executing control relay CR3214 is ON. For this reason, CR3214 must be used
to perform exclusive control as follows.
Operation flags
3-71
3-9 Memory Card Instructions
MFREE This instruction is executed for one scan at the up edge of the execution condition.
Scan
3 Execution condition
ON
OFF
MEMORY CARD
Get processing
ON
Completion notification ( D2 )
OFF
ON
CR3214
(Memory Card executing) OFF
Sample Program
When R01000 turns ON, the free space on the Memory Card is acquired, and is stored to data
memory [DM01000 • DM01001].
Outputs ON to R00500 after completion of storage.
CR2008 R01004 The completion notification device is reset to its initial state.
RES
Acquisition of free space
ON for 1 scan
3-72
3-9 Memory Card Instructions
MEMO
MEMORY CARD
3-73
3-9 Memory Card Instructions
3 Ladder program
Execution condition MMKDIR
Input method
MEMORY CARD
S D M M K D I R S D
Operand Explanation
Specifies the directory to make (1 to 247 characters, including end code NUL) or the leading device to store
S
the directory.*1,*2
D Specifies the notification bit device.*3
*1 To specify a text string using constants, enclose with " ". The characters "#" and "$" cannot be
used.
1-byte characters: ASCII code
2-byte characters: shift JIS code
*2 When a bit device has been specified, specify the leading device of the channel.
*3 When a bit device has been specified, 2 continuous bits are occupied. When a word device has
been specified, each of the lowermost bits of two continuous words is used as the notification bit
device. Bits other than the lowermost bit do not change.
Description of Operation
MMKDIR The directory specified by S in the Memory Card is made at the up edge of the
execution condition. Also, the completion notification is written to D , and the error
notification for an abnormal end is written to D +1.
Example
Directory B
3-74
3-9 Memory Card Instructions
Item Description
D
Completion
This device turns OFF when execution of the instruction starts, and turns ON
when the directory has finished being made.
3
notification
The device turns ON whichever way execution ends, successfully or in error.
MEMORY CARD
Error This device turns OFF when execution ends successfully, and turns ON when
D +1
notification execution ends in error.
Note
• Several scans are sometimes required for making the directory.
• The result of END processing after execution of the instruction is completed is
written for the notification bit devices.
• The store destination when indirect specification or index modify is specified
to a notification bit device becomes the store destination at the up edge of the
execution condition.
• The MMKDIR instruction cannot be executed while the Memory Card instruc-
tion executing control relay CR3214 is ON. For this reason, CR3214 must be
used to perform exclusive control as follows.
Operation flags
3-75
3-9 Memory Card Instructions
MMKDIR This instruction is executed for one scan at the up edge of the execution condition.
3 Scan
ON
MEMORY CARD
Execution condition
OFF
Make processing
ON
Completion notification ( D )
OFF
ON
CR3214
(Memory Card executing) OFF
Sample Program
The directory currently stored to data memory DM01000 is made each time that R01000 turns
ON.
If the directory already exists, the directory is not made and processing is completed. The direc-
tory is output to R00500 after processing is completed.
CR2008 R01004
RES Resets the completion notification device to its initial state.
ON for 1 scan
3-76
3-10 List of Devices for Memory Cards
Device Attribute
No.
R: read-only
Space: R/W
Description ON OFF
3
CR0000 R Logging execution Enabled Disabled
MEMORY CARD
CR0001 R Logging in progress In progress Not in progress
CR0002 R Specified size write end Ended Not ended
CR0004 R Buffer overflow Overflowed Not overflowed
Logging ID0
CR0005 R Write in Run mode during logging execution Yes No
CR0008 R Logging error Yes No
CR0009 R No free space on Memory Card error Yes No
CR0010 R Abnormal device/trigger setting Yes No
CR0100 R Logging execution Enabled Disabled
CR0101 R Logging in progress In progress Not in progress
CR0102 R Specified size write end Ended Not ended
CR0104 R Buffer overflow Overflowed Not overflowed
Logging ID1
CR0105 R Write in Run mode during logging execution Yes No
CR0108 R Logging error Yes No
CR0109 R No free space on Memory Card error Yes No
CR0110 R Abnormal device/trigger setting Yes No
: : : :
(logging ID2 to ID8)
: : : :
CR0900 R Logging execution Enabled Disabled
CR0901 R Logging in progress In progress Not in progress
CR0902 R Specified size write end Ended Not ended
CR0904 R Buffer overflow Overflowed Not overflowed
Logging ID9
CR0905 R Write in Run mode during logging execution Yes No
CR0908 R Logging error Yes No
CR0909 R No free space on Memory Card error Yes No
CR0910 R Abnormal device/trigger setting Yes No
One of ID0 to ID9 in No IDs in
CR3210 R Any logging operation in progress
operation operation
CR3211 R Memory Card in use In use Not in use
CR3212 R Identification of Memory Card completed Completed Not completed
CR3213 R Memory Card inserted Yes No
CR3214 R Memory Card instruction executing Executing Not executing
Not write-
CR3215 R Memory Card write-protected Write-protected
protected
Control memory
Device Attribute
R: read-only Description
No. Space: R/W
CM02390 R Error code for Memory Card instruction
CM02391 Memory Card power OFF error
3-77
3-10 List of Devices for Memory Cards
1
inserted Memory Card slot cover is open. close the Memory Card slot cover.
The file name contains characters that are not
2 Abnormal file name Specify the file name correctly.
allowed.
3 File does not exist The specified file or directory does not exist. Specify the file name correctly.
4 File already exists The specified file or directory already exists. Rename the file or directory.
Check the file system of the Memory
5 File load error The file system of the Memory Card is in error.
Card.*1
• Remove the write protection from the
• The specified file is write-protected. specified file.
• The Memory Card is write-protected. • Remove the write protection from the
6 File write error
• The file system of the Memory Card is in Memory Card.
error. • Check the file system of the Memory
Card.*1
Abnormal file read/ The specified read/write position indicates
7 Correctly specify the read/write position.
write position outside of the file range.
Not enough space The file could not be saved successfully due
8 Delete unwanted files.
on Memory Card to insufficient space on the Memory Card.
Data not conforming to the specified format or
Either correct the content of the file, or
9 Format error out-of-range data was saved when the file
select the correct format.
was read.
1000 Other fatal errors — Contact your dealer.
*1 When checking the file system on the Memory Card, use the chkdsk command from the Win-
dows command prompt.
Abnormalities in the file system sometimes cannot be detected even if there is an abnormality
in Explorer's error check.
3-78
4
INTERRUPTS
INTERRUPTS
The interrupt processing function executes an interrupt program when there is
a request (an interrupt cause is generated) from an external input or a high-
speed comparator during operation of the KV-1000.
This chapter describes the types of interrupt causes and I/O during interrupt
processing.
4-1
4-1 Interrupt Processing
This section describes interrupt processing.
For details on instructions, "Instruction Reference Manual"
If the interrupt processing function is used, processing can be executed at the moment that an
interrupt occurs independently of the scan time.
When an interrupt occurs, program execution is temporarily suspended at that moment in time,
and the interrupt program corresponding to the interrupt cause is executed. When execution of
the interrupt program ends, processing of the suspended program is resumed.
For details on the scan time, "10-1 Fixed Scan Time Operation Functions".
Input processing
Return to instruction
following generation
of interrupt Direct Output Function
(R00500 to R00507)
Output processing
4-2
4-1 Interrupt Processing
MEMORY CARD
Direct input function . . . .An input mode that allows the input stages of input relays R00000 to
R00015 to be captured during execution of the interrupt program
Direct output function . . .An output mode that allows the ON/OFF states of R00500 to R00507 to
be output during execution of the interrupt program
4-3
4-1 Interrupt Processing
The interrupt program is executed when an interrupt is generated. Interrupts are defined between
the INT and RETI instructions.
At start of program running, interrupts are disabled.
To execute the interrupt program, the enable interrupt instruction "EI" must be executed. Also, to
4 temporarily disable interrupts, the disable interrupt instructions "DI" or "DIC" are executed.
When interrupts are disabled, interrupts are not processed even if an interrupt is generated, and
MEMORY CARD
CR2008
EI
HSP
R00000
Main routine program
The interrupt program cannot be executed unless the EI instruction
is programmed.
END Set by setting the input time constant to the HSP instruction (10 µs)
or the value to CM01620 to set CR2305 ON.
INT
R00000
Interrupt program
Enter the interrupt program between "END" and "ENDH".
RETI
ENDH
Note
• Some instructions cannot be used in the interrupt program.
"Instructions Not Allowed in Interrupt Programs" page 4-7
• To shorten the input time constant, the HSP instruction (10 µs) must be exe-
cuted or the input time constant must be set at data memory CM01620, and
CR2305 set to ON. For details on the input time constant,
KV-1000 Instruction Reference Manual, "HSP Instruction"
CR2008
EI
CR2008 #00000 CR2305
EI DW SET or
CM01620 CR2002 HSP
R00000
4-4
4-1 Interrupt Processing
Input relays are used as the interrupt cause. Interrupts are executed by input relays R00000 to
R00009. Set which polarity (up edge or down edge) is to be taken as the interrupt cause by the
control relays.
MEMORY CARD
relays.
The polarity of the interrupts can be changed as follows.
Operation Condition
Interrupt Cause Input Control
INT Instruction Down Both Up/
Relay Relays Up Edge
Edge Down Edge
CR2600 OFF ON OFF ON
INT R00000 R00000
CR2601 OFF OFF ON ON
CR2602 OFF ON OFF ON
INT R00001 R00001
CR2603 OFF OFF ON ON
CR2604 OFF ON OFF ON
INT R00002 R00002
CR2605 OFF OFF ON ON
CR2606 OFF ON OFF ON
INT R00003 R00003
CR2607 OFF OFF ON ON
CR2608 OFF ON OFF ON
INT R00004 R00004
CR2609 OFF OFF ON ON
CR2610 OFF ON OFF ON
INT R00005 R00005
CR2611 OFF OFF ON ON
CR2612 OFF ON OFF ON
INT R00006 R00006
CR2613 OFF OFF ON ON
CR2614 OFF ON OFF ON
INT R00007 R00007
CR2615 OFF OFF ON ON
CR2700 OFF ON OFF ON
INT R00008 R00008
CR2701 OFF OFF ON ON
CR2702 OFF ON OFF ON
INT R00009 R00009
CR2703 OFF OFF ON ON
Note
Set the special auxiliary relays ON/OFF by the SET/RES instructions.
■ Input capture
Of the externally input interrupts, INT R00000 to INT R00003 are provided with an input capture
function. This function is for acquiring to the control memory the current value of a high-speed
counter when an interrupt is generated. The current value of high-speed counters is automatically
transferred to CM01610 to CM01617 when an interrupt is generated even if this function is not
set.
For details, "4-3 Input Capture".
4-5
4-1 Interrupt Processing
High-speed counter comparators are used as the interrupt cause. Interrupt processing is exe-
cuted when the current value of a high-speed counter CTH and the setting value of a high-speed
counter comparator CTC are the same value.
Interrupt Cause
4 INT
Instruction
High-speed Counter Operation Condition
Comparator
MEMORY CARD
INT
*When CTCn exists, the contact of CTCn does not turn ON. (n: 0 to 3)
CPU positioning parameter comparator 2 is used as the interrupt cause. Interrupt processing is
executed when the number of pulses (current value) output during positioning/speed control and
the setting value of comparator 2 are the same value.
For details, "8-2 Setting Up Parameters and Executing Instructions".
Precautions in Interrupts
4-6
4-1 Interrupt Processing
MEMORY CARD
Output instructions SHOT One shot
Basic
FLIK Flicker
instruc-
ALT Alternate
tions
TMR/TMH/TMS Timers/high-speed timers/high-speed 1 ms timers
C Counters
Timer/counter OUTC Out counter
instructions ITVL Interval timer
UDC Up/down counter
UDT Up/down timer
Shift instruction SFT Shift
Applied
STG/JMP/ENDS Stage/jump/end stage
instruc- Stage processing
W-ON/W-OFF Wait ON/wait OFF
tions instruction
W-UE/W-DE Wait up edge/wait down edge
Data processing
HKEY Hex key input
instruction
Cam switch instructions ABSENC/INCENC Absolute encoder/incremental encoder
Extend Frequency counter
FCNT/RCNT Frequency measurement/speed of rotation measurement
ed instructions
instruc- PID instruction PID PID
tions Memory Card MWRIT/MREAD/ Memory Card write/Memory Card read/get Memory Card
instructions MFREE/MMKDIR free space/make Memory Card directory
Access window
AWNUM/AWMSG User message 1/user message 2
instructions
4-7
4-2 Direct Input/Output
This section describes the direct input and direct output functions.
"Direct input function" captures the states of input relays R00000 to R00015 at the start of the
interrupt program. The states of other input relays are also captured by input processing of that
enabled.
Example
Generation of interrupt cause
ON
R00000
OFF
ON
R00001
OFF
ON
R30000
OFF
R00001:OFF R00001:ON
R30000:OFF R30000:ON
R00001:ON
R30000:OFF
OFF ON OFF ON
4-8
4-2 Direct Input/Output
CR2002
EI Interrupt is enabled at power ON.
CR2002 HSP
R00000 The input time constant of input relays R00000
and R00005 is set to 10 µs.
HSP
R00005
R01000 R00500
END
Output relay R00500 is turned ON by internal
auxiliary relay R01000 from interrupt processing. 4
MEMORY CARD
INT
R00000 The interrupt program is executed when
R00005 R01000 input relay R00000 is turned ON.
SET When R00005 turns ON during interrupt
RETI processing, relay R01000 is turned ON.
4-9
4-2 Direct Input/Output
The "direct output function" outputs the state of output relays R00500 to R00507 during execution
of the interrupt program. Interrupt programs do not have output processing. When a program is
executed, the program outputs to the outside immediately without waiting for output processing.
Output relays other than direct outputs output to the outside by output processing of the main rou-
4 tine program after the end of the interrupt program.
Program direct output by the SET and RES instructions. When direct output has been pro-
MEMORY CARD
grammed by an instruction other than the SET and RES instructions, the program outputs to the
outside by output processing of the main routine program.
Input
processing (1) (2) (3) (4)
CR2002 R00500
(1) SET
CR2002 R00501
(2)
CR2002 R00502
(3) SET
CR2002 R30500
(4) SET
4-10
4-2 Direct Input/Output
Note
• Direct output is performed only when the SET/RES instructions are used in the
interrupt program. Note, however, that the output destination device must be
specified directly by the SET/RES instructions.
• Direct output is not performed in the following instances even if it is specified
in the interrupt program. Output is performed to output processing by that
scan after the end of the interrupt.
• (1) When the output destination was specified by an instruction other than the 4
SET/RES instructions
MEMORY CARD
• (2) When direct output was specified to SET/RES instruction devices using
relays other than R00500 to R00507, or by indirect specification or index mod-
ify
• (3) When a macro called up from within the interrupt program or the SET/RES
instructions are executed in the sub-routine
END
INT
R00000 The interrupt program is executed when
CR2002 R00500
input relay R00000 is turned ON.
SET Direct output relay R00500 is turned ON.
RETI
INT
R00001 The interrupt program is executed when
CR2002 R00501
input relay R00001 is turned ON.
SET Direct output relay R00501 is turned ON.
RETI
ENDH
4-11
4-3 Input Capture
This section describes the input capture function.
The "input capture function" is for acquiring to the data memory the current value of a high-speed
counter when an interrupt cause is generated. Input capture functions when the interrupt cause is
an external input (only R00000 to R00003 can be used ). No special settings are required for
4 using this function.
Acquired values are stored to control memories CM01610 to CM01617.
MEMORY CARD
Note
The timing that input capture is executed is dependent on the polarity setting of
the interrupt set in control relays CR2600 to CR2607.
■ About the difference between the input capture function and the current value of the high-speed
counter in and during execution of the interrupt program
• Input capture function
... This is the value captured momentarily when an interrupt cause is generated.
• Current value of high-speed counter during execution of the interrupt program
... This is the value obtained by acquiring the current value of the high-speed counter by input
processing of the interrupt program using the LDA or MOV instruction during execution of the
interrupt program.
An error occurs in the acquired value in the following instances:
High-speed counter
CTH0 current value .... 10 11 12 .... 99 100 101 ............................. 999 1000 1001
(1) (2)
100 1000
(1) As the input capture function acquires the value at the moment that an interrupt cause is gen-
erated, the current value of high-speed CTH0 becomes #00100.
(2) As the value to be acquired by the interrupt program is the value acquired by input processing
of the interrupt program, the current value of high-speed counter CTH0 to be acquired
becomes #01000.
As shown above, an error occurs in the current value of the high-speed counter to be acquired when a
time lag occurs after generation of the interrupt cause up to execution of the interrupt program.
Tip The current value (CTH) of the high-speed counter also becomes the value acquired by
input processing of the interrupt program after the interrupt program ends.
4-12
4-4 Sample Interrupt Programs
Sample Program
MEMORY CARD
Scan
ON
ON
CR2002 HSP
R00000 The input time constant of input relay
R00000 is set to 10 µs.
END
INT
Output R00500 is turned ON when input
R00000
relay R00000 is turned ON.
CR2002 R00500
SET
RETI
ENDH
4-13
4-4 Sample Interrupt Programs
OFF.
Scan
ON
ON
ON
R00000 R00500
When input relay R00000 turns ON, output
RES
relay R00500 is turned OFF.
END
RETI
ENDH
4-14
4-4 Sample Interrupt Programs
Pulse width
MEMORY CARD
• The input capture value ([CM01610 • CM01611]) when input relay R00000 is ON is stored to
data memory [DM00010 • DM00011].
The value of [DM00010 • DM00011] is subtracted from the input capture value when R00000 is
OFF. This value becomes the pulse width.
• The measured value is stored to [DM00000 • DM00001] in µs units.
CR2008
EI Interrupt is enabled at power ON.
END
INT
R00000 Interrupts are executed by input relay R00000.
First of all, the interrupt polarity is changed to the
CR2601 CM01610 DM00010 KEEP down edge by executing the interrupt at the up
LDA.D STA.D SET
edge of R00000, storing the current value
CR2601
([CM01610 · CM01611]) of CTH0 at that time to
CR2601 CM01610 DM00010 DM00000
LDA.D SUB.D STA.D RES [DM00010 · DM00011], and turning CR2601 ON.
4-15
4-4 Sample Interrupt Programs
■ Example of application for measuring the time taken to pass between two
points
In this example, the time is takes to pass between two
input relays is measured.
Sensor 1 ON
Sensor 1
Input relay R00002
OFF
Sensor 2
4 Sensor 2
Input relay R00003
ON
OFF
Pass time (µs)
MEMORY CARD
• The time it takes to pass from input relay R00002 to input relay R00003 is measured.
• The measured value is stored to data memory [DM00000 • DM00001] in 1 µs units.
HSP
R00003 The input time constant of R00003 is set to 10 µs.
4-16
5
HIGH-SPEED COUNTERS
HIGH-SPEED COUNTERS
This chapter describes high-speed counters and high-speed counter
comparators that enable high-speed pulse measurement and pulse
output independent of scan time.
5-1
5-1 High-speed Counters
This section briefly describes and presents the specifications of the high-speed counters and
high-speed counter comparators provided on the KV-1000.
can operate at high speed independent of the scan as they are processed in the hardware.
(internal wiring)
(internal wiring)
MEMSW 2(bit1)
Internal clock OFF R00501
CR2200 (1.0 µs) Control circuit ON R00505
(comparator match output)*2
CR2201 (10.0 µs)
CR2202 (100.0 µs)
CTH1 setting value
External input High-speed counter comparator Interrupt function
A phase R00011
R00011 CTC2
(B phase R00013) (R00013) INT CTC2
CTC3 INT CTC3
5-2
5-1 High-speed Counters
HIGH-SPEED COUNTERS
connected.
• High-precision time measurement, up till now not possible with C (counter) and other instruc-
tions, is now made possible by inputting 1 µs, 10 µs and 100 µs cycle internal clock signals.
• High-speed counters are provided on two channels. This means that one of the high-speed
counters can capture comparator match output, that uses the other high-speed counter, as the
high-speed counter input.
Preset function
Current values can be changed to preset setting values at any timing when an external preset
function is used.
Enable function
Count operation enable/disable can be controlled, or the current values of the counters reset at
any timing by using the external enable input and internal enable relay.
5-3
5-1 High-speed Counters
■ Specifications
Count method Linear counter Ring counter
Input Line driver input Single phase: 100 kHz Phase different: 50 kHz
response Open collector
Single phase: 60 kHz Phase difference: 30 kHz
frequency input
• Single-phase (w/out direction, w/ direction)
External input • Phase difference (1X/2X/4X)
5 Pulse input
method
• 2-pulse
• Internal clock input
Internal input
HIGH-SPEED COUNTERS
5-4
5-1 High-speed Counters
Short externally input signals are counted. Single-phase, phase difference and 2-pulse can be
input.
The count method is set by control relays. 5
For details on preset (reset) inputs, "Preset Function" page 5-19
HIGH-SPEED COUNTERS
(2) Internal clock input
1.0 µs 10.0 µs 100.0 µs
CTH0 CR2100 CR2101 CR2102
CTH1 CR2200 CR2201 CR2202
The internal clock is counted. This input can be used as a high-precision timer as the time can be
measured from the count value.
Pulses output by the direct clock pulse function can be counted from the other high-speed counter
without being wired externally.
"Direct Clock Pulse Output" page 5-30
KV-1000 Instruction Reference Manual "MEMSW Instruction"
The current value (CTH) of high-speed counters can be changed to a preset value by turning the
preset inputs ON.
When "0" is set as the preset value, the high-speed counter is reset.
"Preset Function" page 5-19
(2)Enable input
Enable input
CTH0 R00008
CTH1 R00009
Counter inputs can be enabled/disabled, and current values reset as desired by turning the
enable inputs ON.
"Counter Enable Function" page 5-21
5-5
5-1 High-speed Counters
You can select between linear counter and ring counter as the count method for high-speed
counters. Linear counters count at a resolution (fixed range) of 32 bits, and ring counters count at
any resolution (with the upper limit value and lower limit value set).
■ Linear counters
A "linear counter" is a counter for counting the range of 32-bit count values.
5 32-bit unsigned
Countup and countdown are performed within the range 0 to 4294967295.
HIGH-SPEED COUNTERS
When countup is performed from 4294967295, the count returns to 0. When countdown is
performed from 0, the count returns to 4294967295.
When this happens, the overflow detection relay (CR2403/CR2407) turns ON.
32-bit signed
Countup and countdown are performed within the range -2147483648 to +2147483647.
When countup is performed from +2147483647, the count returns to -2147483648. When
countdown is performed from -2147483648, the count returns to +2147483647.
When this happens, the overflow detection relay (CR2403/CR2407) turns ON.
The overflow detection relays hold the ON state until it is turned ON by the RES instruction, for example.
Count input Add
Subtract
Count value
Lower limit value
0 -2147483648
($00000000) ($80000000) Overflow
Overflow detection
CTH0: CR2403/CTH1: CR2407
Note
Counting is not stopped even if an overflow is detected. Counting stops only when
the count input has stopped.
5-6
5-1 High-speed Counters
■ Ring counters
A "ring counter" is a function for setting the upper limit value and lower limit value of a high-speed
counter to any value.
The range between the lower limit value and the upper limit value is counted up or counted down.
When countup is performed from the upper limit value, the count reaches the lower limit value,
and vice versa.
When this happens, the overflow detection relay (CR2403/CR2407) does not ON.
Range of count value setting values, and upper limit value/lower limit value store destinations 5
Setting value
HIGH-SPEED COUNTERS
Selection of
Count Method Upper Limit Lower Limit
Sign Range Value Value
CR2402 ON CM01608 OFF 0 to 4294967295 CM01601 CM01597
CTH0
(ring counter) bit7 ON -2147483648 to +2147483647 CM01600 CM01596
CR2406 ON CM01609 OFF 0 to 4294967295 CM01603 CM01599
CTH1
(ring counter) bit7 ON -2147483648 to +2147483647 CM01602 CM01598
Example
High-speed counter comparator
CR2008 #10000 CM01600
CTC0 upper limit value 10000, LDA.D STA.D
lower limit value 100 ring ON for 1 scan #00100 CM01596
LDA.D STA.D
counter settings CR2402
SET
Note
• Overflow is not detected even if the count exceeds the upper limit value or lower
limit value.
Subtract
Count value
• By changing the current value of high-speed counters or the upper limit value/
lower limit value of the ring counter, the current value of the counter is adjusted at
END instruction processing if it falls outside the lower limit value to upper limit
value range.
• The current value is adjusted to the upper limit value if it exceeds the upper limit
value.
• The current value is adjusted to the lower limit value if it falls below the lower
limit value.
• Do not set as follows: upper limit value ≤ lower limit value The count will not be
performed normally.
5-7
5-1 High-speed Counters
External input
Aphase
5 CTH0
CTH1
R00010
R00011
HIGH-SPEED COUNTERS
Example
External input R00010 is
CTH0
counted by high-speed R00010
counter CTH0.
Note
When using an external input, be sure to set the input time constant.
For details, "10-3 Input Time Constant Selection Function" page 10-5
The following count methods (single phase, phase difference and 2-pulse) are available for
counting external inputs by a high-speed counter.
The count input method is set by a combination of control relays CR2113 to CR2115 (CR2213 to
CR2215).
Important
Do not set to combinations other than those described in the above tables.
5-8
5-1 High-speed Counters
(1) Single-phase
Set this when counting single-phase pulses.
W/out direction . . . .The up edge of the A phase is counted.
The B phase does not influence counter operation. (The B phase can be used
as regular input.)
W/ direction . . . . . . The count is incremented at the up edge of the A phase when the B phase is OFF.
The count is decremented at the up edge of the A phase when the B phase is ON.
HIGH-SPEED COUNTERS
ON ON
(B phase) R00012 (B phase) R00012
OFF OFF
(counter value)
CTH0
0 1 2 3 4 3 2 1 0
2X. . . . . . . . . . . . . . The count is incremented at the up edge of the A phase when the B phase is OFF.
The count is decremented at the down edge of the A phase when the B phase is OFF.
The count is decremented at the up edge of the A phase when the B phase is ON.
The count is incremented at the down edge of the A phase when the B phase is ON.
ON
(A phase)
R00010 OFF
ON
(B phase)
R00012 OFF
(counter value)
CTH0
0 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 0
5-9
5-1 High-speed Counters
4X. . . . . . . . . . . . . . The count is incremented at the up edge of the A phase when the B phase is OFF.
The count is decremented at the down edge of the A phase when the B phase is OFF.
The count is decremented at the up edge of the A phase when the B phase is ON.
The count is incremented at the down edge of the A phase when the B phase is ON.
The count is decremented at the up edge of the B phase when the A phase is OFF.
The count is incremented at the down edge of the B phase when the A phase is OFF.
The count is incremented at the up edge of the B phase when the A phase is ON.
The count is decremented at the down edge of the B phase when the A phase is ON.
5 (A phase)
R00010
ON
OFF
HIGH-SPEED COUNTERS
ON
(B phase)
R00012 OFF
(counter value)
CTH0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 15 14 13 12 1110 9 8 7 6 5 4 3 2 1 0
(3) 2-pulse
The pulse that is input by the 2-pulse method is counted.
The pulse is incremented at the up edge of the A phase, and decremented at the up edge of the B
phase.
ON
(A phase)
R00010 OFF
ON
(B phase)
R00012 OFF
(counter value)
CTH0
0 1 2 3 4 3 2 1 0
The A and B phases can be used as regular input. (Counter operation is not influenced.)
Example
The internal clock (1.0 µs) CTH0
is counted by high-speed CR2100
counter CTH0.
5-10
5-1 High-speed Counters
Example
The direct clock pulse
output from R00501 is CTH0
counted by high-speed
R00501
5
counter CTH0.
HIGH-SPEED COUNTERS
The direct clock pulse output
CTH1
from R00500 is counted by R00500
high-speed counter CTH1.
Note
• Also enter to the operand of the CTH instruction on R00501 when comparator
match output of CTH1 is set to R00505 by MEMSW2.
• Also enter to the operand of the CTH instruction on R00500 when comparator
match output of CTH0 is set to R00504 by MEMSW2.
Tip The specified frequency pulse output from R00501 (R00505) can be counted by high-speed
counter CTH0.
"6-2 Frequency Counter Instructions 'PLSOUT Instruction'" page 6-10
5-11
5-1 High-speed Counters
Example
The values of CTC0 and CTC1 CTH0
R00010
are set to 100 and 100000,
respectively. #00100
CTC 0
#100000
CTC 1
CTC 0
CTC 1
Note
The CTC contact does not turn ON when the current value is rewritten with the same
value as the CTC. The CTC contact turns ON when it becomes equal to the CTC after
a countup or countdown.
5-12
5-1 High-speed Counters
When the current value is unsigned 0 to 4294967295 (unsigned value indicated by ".D" suffix)
Example
The current value of CTH0 is
CTH0 DM00000
stored to data memories
[DM00000 • DM00001].
LDA.D STA.D
5
HIGH-SPEED COUNTERS
MOV.D
CTH0 DM00000
When the current value is signed -2147483648 to +2147483647 (signed value indicated by ".L" suffix)
Example
The current value of CTH0 is
CTH0 DM00000
stored to data memories LDA.L STA.L
[DM00000 • DM00001].
MOV.L
CTH0 DM00000
When the current value is unsigned 0 to 4294967295 (unsigned value indicated by ".D" suffix)
Example
The current value of CTH0
MOV.D
is changed to 100000. #100000 CTH0
#100000
DW.D
CTH0
When the current value is signed -2147483648 to +2147483647 (signed value indicated by ".L" suffix)
Example
The current value of CTH0 is
MOV.L
stored to -100000. -100000 CTH0
-100000
DW.L
CTH0
5-13
5-1 High-speed Counters
Note
When "ON" is specified in the "Automatic reset by comparator match" setting, do not
change the current value (CTH) to the value of the setting value (CTC) or greater. The
current value (CTH) becomes "the value of CTC -1".
"Automatic reset by comparator match" page 5-17
When the current value is unsigned 0 to 4294967295 (unsigned value indicated by ".D" suffix)
HIGH-SPEED COUNTERS
Example
The value of CTC0 #100000 CTC0
LDA.D STA.D
is changed to 100000.
MOV.D
#100000 CTC0
#100000
DW.D
CTC0
When the setting value is signed -2147483648 to +2147483647 (signed value indicated by ".L" suffix)
MOV.L
-100000 CTC0
-100000
DW.L
CTC0
Note
When "ON" is specified in the "Automatic reset by comparator match" setting, do not
change the setting value (CTC) to the value of the current value (CTH) or greater. The
current value (CTH) becomes "the value of CTC -1".
5-14
5-1 High-speed Counters
Note
• The direction of change (CR2412, CR2413) is updated every scan. The direction of 5
change before completion is held also after completion of operation.
HIGH-SPEED COUNTERS
• It takes at most "direction of change detection time constant +1 scan" to update the
direction of change.
(2) Setting the current value (CTH) direction of change detection time constant
The direction of change detection time constant is set by the MOV instruction or DW instruction.
KV-1000 Instruction Reference Manual "MOV Instruction"
Example
The direction of change
MOV
detection time constant #00001 CM01594
of CTH0 is set to 100 µs.
#00001
DW
CM01594
5-15
5-1 High-speed Counters
Reset Method
Note
HIGH-SPEED COUNTERS
The table below summarizes the reset timing by each reset method.
Reset Method Reset Timing
Reset by RES instruction When the RES instruction is executed
Reset by CTH instruction (execution condition OFF) When the CTH instruction is executed
Automatic reset by comparator match When the comparator makes a match
Reset by external preset input When the external preset input turns ON
Use of internal enable relay
Use of combination of internal When the state of the enable signal
Reset by counter
enable relay changes from disabled to enabled, and
enable function
and external enable input vice versa
Use of external enable input
Example
Reset by RES instruction CTH0
RES
5-16
5-1 High-speed Counters
Execution condition
HIGH-SPEED COUNTERS
Execution of CTH instruction
Example
Reset by CTH instruction
Execution condition CTH0
(execution condition OFF) R00010
Scan
CTH
CTH = CTC
* Counter is reset when CTH = CTC.
Note
The current value is changed to "the value of CTC -1" even if automatic reset is
specified to "ON" and the current value is changed to the value of CTC or greater.
When "automatic reset" is specified, the current value does not becomes the value of
CTC or greater.
5-17
5-1 High-speed Counters
External preset
input
CTH
5 * The counter is reset when the external preset input turns ON.
HIGH-SPEED COUNTERS
Count input
Enabled
Enable
Disabled
CTH
Count input
Enabled
Enable
Disabled
CTH
Example
Set to reset
CR2008 CM01608 CM01608
(enabled to disabled) BSET BSET
counter enable function #004 #005
5-18
5-1 High-speed Counters
Preset Function
This function changes the current value of a high-speed counter to a preset value. The current
value is changed according to an external input.
Preset signal
5
HIGH-SPEED COUNTERS
A
Count value
Preset value
The following describes the basic concept of the preset function and how to set the preset signal.
Preset enable/inhibit
CR2408 (CR2409)
Execution of preset
■ Setting the external preset input and preset value store destination
Preset Value Store Destination
External Preset Input
Upper Lower
CTH0 R00014 CM01605 CM01604
CTH1 R00015 CM01607 CM01606
5-19
5-1 High-speed Counters
R00015
CM01609
Input CR2404 CR2405 Preset Timing
bit8
Polarity
OFF OFF Unused
Up edge of R00015
ON OFF
input signal
Normally
open OFF Down edge of R00015
OFF ON
contact input signal
For duration that
ON ON R00015 input signal is
ON
CTH1
OFF OFF Unused
Down edge of R00015
ON OFF
input signal
Normally
closed ON Up edge of R00015
OFF ON
contact input signal
For duration that
ON ON R00015 input signal is
OFF
5-20
5-1 High-speed Counters
Count input enable/disable can be controlled by using the counter enable function.
Count input enable/disable is controlled by a combination of external enable inputs (R00008,
R00009) and internal enable relays (CR2410, CR2411).
The current value can also be reset when the state of the count enable signal changes from
disabled to enabled and vice versa.
Subtract
5
HIGH-SPEED COUNTERS
Enabled
Enable signals
Disabled
Count value
Preset value 0
Preset value 0
Count value
Preset value 0
5-21
5-1 High-speed Counters
Example
CTH0 is set to preset enabled at the up edge of R01000 after the initial setting. (The
high-speed counter is reset.)
CTH0 is set to preset disabled at the up edge of R01001. (The high-speed counter is
reset.)
CTH0 is reset at the down edge of R00014. (R00014 is normally closed contact input.)
CR2408
closed contact input
CM01604: Preset value = 0
Preset enabled by R01000 turning
RES
HIGH-SPEED COUNTERS
ON
R01001 CR2408
■ Enable signals
Enable signals are set by a combination of external enable inputs and internal enable relays.
Combination Settings
Explanation
bit2 bit1 bit0
OFF OFF OFF
OFF ON OFF Enabled at all times (Count is performed at all times
regardless of external enable input and internal enable relay
ON OFF OFF enable/disable.)
ON ON OFF
CM01608 (CTH0) OFF OFF ON Count is performed when internal enable relay is enabled.
CM01609 (CTH1) OFF ON ON Count is performed when external enable input is enabled.
Count is performed when the internal enable relay and
ON OFF ON
external enable input are enabled.
Count is performed when the internal enable relay or external
ON ON ON
enable input is enabled.
■ Setting reset of the current value at change in state between enabled and disabled
bit5 bit4 Operation
OFF OFF
Reset is not performed.
CM01608 (CTH0) OFF ON
CM01609 (CTH1) ON OFF The current value is reset when the state changes from disabled to enabled.
ON ON The current value is reset when the state changes from enabled to disabled.
5-22
5-1 High-speed Counters
This function is for turning the output relays ON/OFF when the value (setting value) of the
comparator matches the current value. This reset is set in control relays. Comparator match
output is not influenced by the scan time.
Comp Match Details of Control
Selection of Output
Comparator Out Enbl/ Device Control
Relay Device No. Action at CTC ON
Dsbl ON OFF
CR2105 Output is turned OFF. ON OFF
CTC0
CR2104
OFF: enabled
CR2106 Output is turned ON. ON OFF 5
ON: disabled ON/OFF of output is
MEMSW2 bit0 CR2107 ON OFF
HIGH-SPEED COUNTERS
inverted.
CTH0 OFF: R00500
ON: R00504 CR2109 Output is turned OFF. ON OFF
CR2108
CR2110 Output is turned ON. ON OFF
CTC1 OFF: Enabled
ON: disabled ON/OFF of output is
CR2111 ON OFF
inverted.
Conceptual Overview
When MEMSW2 bit0 is OFF When MEMSW2 bit0 is ON
CTC0:CR2104
CTC1:CR2108 I/O connector I/O connector
R00500 R00500
Pin No.16 Pin No.16
CTC0:CR2104
CTC1:CR2108
CTH0 CTH0
·Comparator R00504 ·Comparator R00504
match Output Pin No.18 match Output Pin No.18
CTH1 CTH1
·Comparator R00505 ·Comparator R00505
match Output Pin No.38 match Output Pin No.38
5-23
5-1 High-speed Counters
Note
• When comparator match output is enabled (CTC0: CR2104 OFF/CTC1: CR2108
OFF), the outputs of pin No.16 and No.18, or No.36 and No.38 cannot be controlled
by the SET and RES instructions.
• The frequencies that can be output by R00501 and R00505 differ from those that
can be output by R00500 and R00504.
"Output specifications" page 1-14
5 Example
Setting for outputting output relay CR2008 CR2104
RES
CR2106
SET
R00500 without being influenced
HIGH-SPEED COUNTERS
#100000
CTC 0
Tip Direct clock pulse output can be achieved by using the comparator match output function.
"5-3 Direct Clock Pulse Output" page 5-30
The INT instruction can be used to achieve an interrupt program when the setting value of high-
speed counter comparator CTC matches the current value of high-speed counter CTH.
For details, "Chapter 4 INTERRUPTS"
The "input capture function" is for acquiring to the control memory the current value of a high-
speed counter when an interrupt cause is generated. Input capture functions when the interrupt
cause is an external input. No special settings are required for using this function.
Acquired values are stored to control memories CM01610 to CM01617.
"4-3 Input Capture" page 4-12
5-24
5-1 High-speed Counters
Extended functions
High-speed counters have the following four extended functions in addition to the regular high-
speed counter functions. These extended functions make full use of the high-speed counter
functions.
HIGH-SPEED COUNTERS
• Speed of rotation measurement function
This function measures the speed of rotation of external pulse inputs.
"Chapter 6 FREQUENCY COUNTERS"
Though extended functions can be used in combination, some combinations are not possible.
The following table summarizes the restrictions applied to combinations of extended functions.
High-spd Cntr Func Freq Meas Spd of Rot Spec Freq Cam Sw Func (inc)
CTH0 CTH1 Func Meas Func Pls Out Func CTH0 CTH1
High-spd CTH0 O X X O X O
Cntr Func CTH1 O O O X O X
Freq Meas Func X O X O X O
Spd of Rot Meas Func X O X O X O
Spec Freq Pls Out Func O X O O O X
Cam Sw CTH0 X O X X O O
Func (inc) CTH1 O X O O X O
5-25
5-2 List of Devices for High-speed Counters
Device Attribute
R: read-only Description ON OFF
No. Space: R/W
CR2100 R Internal clock (1.0 µs) – –
CR2101 R Internal clock (10.0 µs) – –
CR2102 R Internal clock (100.0 µs) – –
CR2103 When CTC0 is ON, CTH0 automatically reset ON OFF
5 CR2104
CR2105
When CTC0 is ON, comparator match output (R00500/R00504) disabled
When CTC0 is ON, comparator match output (R00500/R00504) OFF
ON
ON
OFF
OFF
CR2106 When CTC0 is ON, comparator match output (R00500/R00504) ON ON OFF
HIGH-SPEED COUNTERS
CR2107 When CTC0 is ON, comparator match output (R00500/R00504) ON/OFF inverted ON OFF
CR2108 When CTC1 is ON, comparator match output (R00500/R00504) disabled ON OFF
CR2109 When CTC1 is ON, comparator match output (R00500/R00504) OFF ON OFF
CR2110 When CTC1 is ON, comparator match output (R00500/R00504) ON ON OFF
CR2111 When CTC1 is ON, comparator match output (R00500/R00504) ON/OFF inverted ON OFF
CR2112 When CTC1 is ON, CTH0 automatically reset ON OFF
Device Attribute
R: read-only Description ON OFF
No. Space: R/W
CR2402 Selection of count method Ring Linear
Not
CR2403 Detection of overflow Detected
detected
CR2408 Disabling of preset processing ON OFF
CR2410 Enabling of internal enable relay and count input ON OFF
Decrease Increase
CR2412 R Change of direction of current value
side side
Tip The defaults for CR2104 and CR2108 are ON. Otherwise, these devices are OFF.
Note
• R00500 and R00504 are switched by MEMSW 2(bit0).
KV-1000 Instruction Reference Manual "MEMSW Instruction"
• Pay attention when switching R00500 (100 kHz) and R00504 (10 kHz) as their output
frequency specifications differ.
"Output specifications" page 1-14
• Turn control relays ON by the SET instruction and OFF by the RES instruction.
5-26
5-2 List of Devices for High-speed Counters
Attribute
Device No. R: read-only Description
Space: R/W
Setting of direction of change detection time constant
CM01594 Setting value #00000 #00001 #00002 #00003 #00004 #00005 #00006 #00007
Direction of change Filter
100 µs 500 µs 1 ms 2.5 ms 5 ms 10 ms 50 ms
detection time constant OFF
CM01596 Ring counter lower limit value (lower)
CM01597
CM01600
Ring counter lower limit value (upper)
Ring counter upper limit value (lower)
5
CM01601 Ring counter upper limit value (upper)
HIGH-SPEED COUNTERS
CM01604 Preset value (lower)
CM01605 Preset value (upper)
Attribute
Device No. R: read-only Description
Space: R/W
5-27
5-2 List of Devices for High-speed Counters
Device Attribute
R: read-only Description ON OFF
No. Space: R/W
CR2200 R Internal clock (1.0 µs) – –
CR2201 R Internal clock (10.0 µs) – –
CR2202 R Internal clock (100.0 µs) – –
CR2203 When CTC2 is ON, CTH1 automatically reset ON OFF
CR2204 When CTC2 is ON, comparator match output (R00501/R00505) disabled ON OFF
5 CR2205
CR2206
When CTC2 is ON, comparator match output (R00501/R00505) OFF
When CTC2 is ON, comparator match output (R00501/R00505) ON
ON
ON
OFF
OFF
CR2207 When CTC2 is ON, comparator match output (R00501/R00505) ON/OFF inverted ON OFF
HIGH-SPEED COUNTERS
CR2208 When CTC3 is ON, comparator match output (R00501/R00505) disabled ON OFF
CR2209 When CTC3 is ON, comparator match output (R00501/R00505) OFF ON OFF
CR2210 When CTC3 is ON, comparator match output (R00501/R00505) ON ON OFF
CR2211 When CTC3 is ON, comparator match output (R00501/R00505) ON/OFF inverted ON OFF
CR2212 When CTC3 is ON, CTH1 automatically reset ON OFF
Device Attribute
R: read-only Description ON OFF
No. Space: R/W
CR2406 Selection of count method Ring Linear
Not
CR2407 Detection of overflow Detected
detected
CR2409 Disabling of preset processing ON OFF
CR2411 Enabling of internal enable relay and count input ON OFF
Decrease Increase
CR2413 R Change of direction of current value
side side
Tip The defaults for CR2204 and CR2208 are ON. Otherwise, these devices are OFF.
Note
• R00501 and R00505 are switched by MEMSW 2(bit1).
KV-1000 Instruction Reference Manual "MEMSW Instruction"
• Pay attention when switching R00501 (100 kHz) and R00505 (10 kHz) as their output
frequency specifications differ.
"Output specifications" page 1-14
• Turn control relays ON by the SET instruction and OFF by the RES instruction.
5-28
5-2 List of Devices for High-speed Counters
Attribute
Device No. R: read-only Description
Space: R/W
Setting of direction of change detection time constant
Setting value #00000 #00001 #00002 #00003 #00004 #00005 #00006 #00007
CM01595
Direction of change Filter
100 µs 500 µs 1 ms 2.5 ms 5 ms 10 ms 50 ms
detection time constant OFF
HIGH-SPEED COUNTERS
CM01606 Preset value (lower)
CM01607 Preset value (upper)
Attribute
Device No. R: read-only Description
Space: R/W
5-29
5-3 Direct Clock Pulse Output
This section describes an outline of direct clock pulse output and how to set direct clock pulse
output.
High-speed counters (CTH) and high-speed counter comparators (CTC) can be used to output a
clock pulse not affected directly to output relays R00500 (R00504) or R00501 (R00505) without
being affected by the scan time.
5 The pulse cycle (frequency) and pulse width is set by the high-speed counter comparator (CTC)
and the cycle of the internal clock for the high-speed counter (CTH).
HIGH-SPEED COUNTERS
The cycle (frequency) of the lock pulse that can be set can be changed as desired within the
following ranges by the program.
Output* Internal Clock Pulse Cycle (frequency) Range
CR2100 (1.0 µs) 10 µs (100 kHz) to 4294967.295 ms
R00500
CR2101 (10.0 µs) 20 µs (50 kHz) to 42949672.95 ms
(R00504)
CR2102 (100.0 µs) 200 µs (5 kHz) to 429496729.5 ms
CR2200 (1.0 µs) 10 µs (100 kHz) to 4294967.295 ms
R00501
CR2201 (10.0 µs) 20 µs (50 kHz) to 42949672.95 ms
(R00505)
CR2202 (100.0 µs) 200 µs (5 kHz) to 429496729.5 ms
For the pulse output, the internal clock pulse is counted by the high-speed counter (CTH). Each
time that the current value becomes equal to the setting value of the high-speed counter
comparator (CTC), the ON/OFF state of output relays R00500 (R00504) and R00501 (R00505) is
changed to generate a pulse.
Count value
CTC
ON ON
Note
• The ON/OFF state of output relay R00500 (R00504) and R00501 (R00505) is
determined by the setting of the control relays.
• For details on control relay settings, see "Outline of High-speed Counters" page 5-2.
• Output at start of direct clock pulse output always starts from an OFF state.
• During direct clock pulse output, output relays R00500 (R00504) and R00501
(R00505) cannot be used by the regular program.
• The frequencies that can be output by R00501 and R00505 differ from those that
can be output by R00500 and R00504. Set the output destination to match the
frequency.
"Output specifications" page 1-14
5-30
5-3 Direct Clock Pulse Output
By using two high-speed comparators, you can change just the pulse width with the pulse cycle
fixed, or vice versa.
The following shows how the pulse cycle and the pulse width change by the high-speed
comparator.
5
■ Pulse with 1:1 ON/OFF ratio
HIGH-SPEED COUNTERS
Pulse ON/OFF is set by special
auxiliary relays.
ON
OFF
Pulse width
Pulse cycle
Pulse width (µs) = Setting value of CTC0 x internal clock cycle (µs)
Pulse cycle (µs) = Setting value of CTC0 x 2 x internal clock cycle (µs)
The calculation is as follows to find the pulse cycle from the frequency:
Pulse cycle (µs) = 1000000/frequency (Hz)
OFF
Pulse width
Pulse cycle
Pulse width (µs) = Setting value of CTC1 x internal clock cycle (µs)
Pulse cycle (µs) = Setting value of CTC0 x internal clock cycle (µs)
• When the setting value of CTC1 is made variable, the pulse width can be varied.
• When the setting value of CTC0 is made variable, the pulse cycle can be varied.
Note
The pulse width determined by the above calculation becomes the pulse width that is
output internally on the KV-1000.
In actual fact, the pulse width fluctuates due to the response delay and influence of
the connected load as it passes through the output circuit to be output. Be sure to set
the pulse width in advance after observing the actual output waveform on an
oscilloscope, for example. (A pulse of variable width is used.)
5-31
5-3 Direct Clock Pulse Output
The maximum frequency of the clock pulse that can be output by the KV-1000 is roughly 100 kHz.
Calculate the pulse cycle when the clock pulse is output and the setting values of the high-speed
counter comparator by the following equations.
■ Pulse cycle
Pulse cycle (µs) = 1000000/frequency (Hz)
ON
OFF
Pulse width
Pulse cycle
OFF
Pulse width
Pulse cycle
CTC setting value for pulse width = pulse width (µs)/internal clock (µs)
CTC setting value for pulse cycle = pulse cycle (µs)/internal clock (µs)
Note
• When CRC2100 and CR2200 have been set to the high-speed counter (CTH)
operand, set the CTC setting value to "5" or more. When the value has been set to a
value smaller than "5", the clock pulse is not output correctly.
• The pulse width changes due to the connected load. Set the pulse width in advance
after observing the actual output waveform on an oscilloscope, for example.
• When CTC0 and CTC1, or CTC2 and CTC3 are used to generate the clock pulse, do
not set the settings of CTC0 and CTC1, or CTC2 and CTC3 to the same values.
5-32
5-3 Direct Clock Pulse Output
HIGH-SPEED COUNTERS
The current value of CTH0 is
CR2103 ON: ON OFF: OFF
automatically reset.
CR2104 Control of R00500 (R00504) ON: Disabled OFF: Enabled
Comparator match output of R00500
CR2105 ON: ON OFF: OFF
CTC0 (R00504) is turned OFF.
Comparator match output of R00500
CR2106 ON: ON OFF: OFF
(R00504) is turned ON.
ON/OFF of R00500 (R00504) output is
CR2107 ON: ON OFF: OFF
inverted.
CR2108 Control of R00500 (R00504) ON: Disabled OFF: Enabled
Comparator match output of R00500
CR2109 ON: ON OFF: OFF
(R00504) is turned OFF.
Comparator match output of R00500
CR2110 ON: ON OFF: OFF
CTC1 (R00504) is turned ON.
ON/OFF of R00500 (R00504) output is
CR2111 ON: ON OFF: OFF
inverted.
The current value of CTH0 is
CR2112 ON: ON OFF: OFF
automatically reset.
Note
When multiple relays have been turned "ON" within each of the CR2104 or CR2107
and CR2108 to CR2111 ranges, the relay having the smallest No. is given priority.
5-33
5-3 Direct Clock Pulse Output
Relay No. Setting Relay No. Setting Relay No. Setting Relay No. Setting
CR2103 ON CR2112 OFF CR2103 ON CR2112 OFF
CR2104 OFF CR2108 ON CR2104 OFF CR2108 OFF
CR2105 OFF CR2109 OFF CR2105 OFF CR2109 ON
CR2106 OFF CR2110 OFF CR2106 ON CR2110 OFF
CR2107 ON CR2111 OFF CR2107 OFF CR2111 OFF
5 Count value
CTC0
Count value
CTC0
CTC1
HIGH-SPEED COUNTERS
ON ON ON ON ON ON
5-34
5-3 Direct Clock Pulse Output
HIGH-SPEED COUNTERS
Note
When multiple relays have been turned "ON" within each of the control relay CR2204
to CR2207 and CR2208 to CR2211 ranges, the relay having the smallest No. is given
priority.
Relay No. Setting Relay No. Setting Relay No. Setting Relay No. Setting
CR2203 ON CR2212 OFF CR2203 ON CR2212 OFF
CR2204 OFF CR2208 ON CR2204 OFF CR2208 OFF
CR2205 OFF CR2209 OFF CR2205 OFF CR2209 ON
CR2206 OFF CR2210 OFF CR2206 ON CR2210 OFF
CR2207 ON CR2211 OFF CR2207 OFF CR2211 OFF
ON ON ON ON ON ON
5-35
5-3 Direct Clock Pulse Output
The following describes an example of a program for outputting a clock pulse of pulse ON/OFF
ratio 1:1 from output R00500. This description uses a high-speed counter (CTH0) and a high-
speed counter comparator (CTC0).
For the pulse of ON/OFF ratio 1:1, the program can be simplified by CR2103 ON
using inverted input (toggle). CR2104 OFF
CR2105 OFF
CR2106 OFF
CR2107 ON
■ Program example
• Set the pulse output to output R00500 accord-
00001
CR2008 CR2103 CR2104 CR2105 CR2106 CR2107 CTH0
SET RES RES RES SET RES
ing to CR2104 to 2107.
In this example, enable (CR2104: OFF) com-
CR2002 CTH0
00002 CR2101
parator match output of R00500, and set so
that output of R00500 is inverted (CR2107:
#00050
00003 CTC0 ON) each time that CTH0 = CTC0.
• Set CR2103 to ON, and specify resetting of
CTH0 according to CTC0.
Count value
This repeats the operation of clearing the cur-
CTC0 rent value of CTH0 by the value set at CTC0.
• Reset (RES CTH0 section) the current value of
CTH0 at the start of operation.
ON ON This enables correct output of the pulse width
of the clock pulse from the 1st pulse.
• The enable input relay of CTH0 is used at ON
at all times during output of the clock pulse.
5-36
5-3 Direct Clock Pulse Output
Note
When enable input of the high-speed counter is used for starting/stopping the clock
pulse, response is delayed by one scan at maximum when the clock pulse is started.
■ Hint
When controlling (enabling/disabling) output of the clock pulse by external input, perform control
by turning CR2105 ON/OFF.
To turn CR2105 ON/OFF, execute the SET, RES or KEEP instruction.
Accordingly, be sure to start the clock pulse from "OFF" and end at "OFF".
5
When either of the following programs is added to the example on the previous page, the clock
HIGH-SPEED COUNTERS
pulse is output from R00500 only when R00000 is "ON".
●When the SET/RES instruction is used ●When the KEEP instruction is used
5-37
5-3 Direct Clock Pulse Output
The following describes an example of a program for outputting a clock pulse of pulse ON/OFF
ratio 1:1 from output R00501. This description uses a high-speed counter (CTH1) and a high-
speed counter comparator (CTC2).
CR2206 OFF
CR2207 ON
■ Program example
• Set the pulse output to output R00501 accord-
1
CR2008 CR2203 CR2204 CR2205 CR2206 CR2207 CTH1
SET RES RES RES SET RES
ing to CR2204 to 2207.
In this example, enable (CR2204: OFF) com-
CR2002 CTH1
2 CR2201
parator match output of R00501, and set so
that output of R00501 is inverted (CR2207:
#00050
3 CTC2 ON) each time that CTH1 = CTC2.
• Set CR2203 to ON, and specify resetting of
Count value CTH1 according to CTC2.
This repeats the operation of clearing the cur-
CTC2 rent value of CTH1 by the value set at CTC2.
• Reset (RES CTH1 section) the current value of
CTH1 at the start of operation.
ON ON This enables correct output of the pulse width
of the clock pulse from the 1st pulse.
• The enable input relay of CTH1 is used at ON
at all times during output of the clock pulse.
Note
When enable input of the high-speed counter is used for starting/stopping the clock
pulse, response is delayed by one scan at maximum when the clock pulse is started.
5-38
5-3 Direct Clock Pulse Output
■ Hint
When controlling (enabling/disabling) output of the clock pulse by external input, perform control
by turning CR2205 ON/OFF.
To turn CR2205 ON/OFF, execute the SET, RES or KEEP instruction.
Accordingly, be sure to start the clock pulse from "OFF" and end at "OFF".
When either of the following programs is added to the example on the previous page, the clock
pulse is output from R00501 only when R00000 is "ON".
●When the SET/RES instruction is used ●When the KEEP instruction is used
R00000 CR2205 R00000 KEEP
5
SET SET
HIGH-SPEED COUNTERS
CR2205
R00000 CR2205 R00000
RES RES
5-39
5-3 Direct Clock Pulse Output
When outputting a pulse of cycle 500 µs (2 kHz) and pulse width 200 µs
from output R00500
The following describes an example of a program for outputting a clock pulse of variable pulse
ON/OFF ratio from output R00500. This description uses a high-speed counter (CTH0) and high-
speed counter comparators (CTC0, CTC1).
5
■ Setting of control relays
HIGH-SPEED COUNTERS
Set CR2103 to CR2112 as shown in the Relay No. Setting Relay No. Setting
table on the right. CR2103 ON CR2112 OFF
CR2104 OFF CR2108 OFF
CR2105 OFF CR2109 ON
CR2106 ON CR2110 OFF
CR2107 OFF CR2111 OFF
In the above equation, substitute pulse width = 200 µs, pulse cycle = 500 µs, and internal clock =
10 µs (CR2101) to find the setting values of CTC0 and CTC1.
The setting value of CTC0 becomes "50" and the setting value of CTC1 becomes "20".
The table below shows the values calculated by other internal clocks. Use to this table for
reference.
Control Relay Internal Clock CTC0 Value CTC1 Value
CR2100 1.0 µs 500 200
CR2101 10.0 µs 50 20
CR2102 100.0 µs 5 2
5-40
5-3 Direct Clock Pulse Output
■ Program example
• Set the pulse output to output R00500 accord-
CR2008 CR2103 CR2104 CR2105 CR2106 CR2107
00001 SET RES RES SET RES ing to CR2104 to 2107 and CR2108 to 2111.
In this example, enable (CR2104: OFF) com-
CR2108 CR2109 CR2110 CR2111 CR2112 CTH0
00002 RES SET RES RES RES RES parator match output of R00500, and set so
CR2002 CTH0 that output of R00500 is turned ON (CR2106:
00003 CR2101 ON) by CTC0 and OFF (CR2109: ON) by
#00050 CTC3.
00004 CTC0 • Set CR2103 to ON, and specify resetting of
#00020 CTH0 according to CTC0.
00005 CTC1 This enables correct output of the pulse width
of the clock pulse from the 1st pulse.
Count value • The enable input relay of CTH0 is used at ON 5
CTC0
at all times during output of the clock pulse.
HIGH-SPEED COUNTERS
CTC1
ON ON ON ON
Note
• When enable input of the high-speed counter is used for starting/stopping the
clock pulse, response is delayed by one scan at maximum when the clock pulse is
started. Response is also delayed by one scan at maximum when the clock pulse is
stopped.
• For details on starting and stopping clock pulse output, see "Hint" below.
■ Hint
When controlling (enabling/disabling) output of the clock pulse by external input, perform control
by turning CR2105 ON/OFF.
To turn CR2105 ON/OFF, execute the SET, RES or KEEP instruction.
Accordingly, be sure to start the clock pulse from "OFF" and end at "OFF".
When either of the following programs is added to the example on the previous page, the clock
pulse is output from R00500 only when R00000 is "ON".
●When the SET/RES instruction is used ●When the KEEP instruction is used
• The cycle (frequency) of the clock pulse can be made variable by using the STA instruction to
rewrite the setting value of high-speed counter comparator CTC0.
"Count Input Settings" page 5-8
5-41
5-3 Direct Clock Pulse Output
When outputting a pulse of cycle 500 µs (2 kHz) and pulse width 200
µs from output R00501
The following describes an example of a program for outputting a clock pulse of variable pulse
width from output R00501. This description uses a high-speed counter (CTH1) and high-speed
counter comparators (CTC2, CTC3).
In the above equation, substitute pulse width = 200 µs, pulse cycle = 500 µs, and internal clock =
10 µs (CR2201) to find the setting values of CTC2 and CTC3.
The setting value of CTC2 becomes "50" and the setting value of CTC3 becomes "20".
The table below shows the values calculated by other internal clocks. Use to this table for
reference.
Control Relay Internal Clock CTC2 Value CTC3 Value
CR2200 1.0 µs 500 200
CR2201 10.0 µs 50 20
CR2202 100.0 µs 5 2
5-42
5-3 Direct Clock Pulse Output
■ Program example
CR2008 CR2103 CR2104 CR2105 CR2106 CR2107
• Set the pulse output to output R00501
00001 SET RES RES SET RES according to CR2204 to 2207 and CR2208 to
CR2108 CR2109 CR2110 CR2111 CR2112 CTH0 2211.
00002 RES SET RES RES RES RES In this example, enable (CR2204: OFF) com-
CR2002 CTH0 parator match output of R00501, and set so
00003 CR2101 that output of R00501 is turned ON (CR2206:
#00050 ON) by CTC2 and OFF (CR2209: ON) by
00004 CTC0
CTC3.
#00020 • Set CR2203 to ON, and specify resetting of
00005 CTC1
CTH1 according to CTC2.
Count value
This enables correct output of the pulse width
of the clock pulse from the 1st pulse.
5
• The enable input relay of CTH1 is used at ON
HIGH-SPEED COUNTERS
CTC0
CTC1 at all times during output of the clock pulse.
ON ON ON ON
Note
• When enable input of the high-speed counter is used for starting/stopping the
clock pulse, response is delayed by one scan at maximum when the clock pulse is
started. Response is also delayed by one scan at maximum when the clock pulse is
stopped.
• For details on starting and stopping clock pulse output, see "Hint" below.
■ Hint
When controlling (enabling/disabling) output of the clock pulse by external input, perform control
by turning CR2205 ON/OFF.
To turn CR2205 ON/OFF, execute the SET, RES or KEEP instruction.
Accordingly, be sure to start the clock pulse from "OFF" and end at "OFF".
When either of the following programs is added to the example on the previous page, the clock
pulse is output from R00501 only when R00000 is "ON".
●When the SET/RES instruction is used ●When the KEEP instruction is used
• The cycle (frequency) of the clock pulse can be made variable by using the STA instruction to
rewrite the setting value of high-speed counter comparator CTC2.
5-43
5-3 Direct Clock Pulse Output
A clock pulse of cycle 500 µs (2 kHz) and pulse width 200 µs is output for 10000 pulses from
output R00500 and the clock pulse is stopped.
The following table summarizes the internal clock and setting values of CTC0 and CTC1.
Control Relay Internal Clock CTC0 Value CTC1 Value
CR2100 1.0 µs 500 200
CR2101 10.0 µs 50 20
CR2102 100.0 µs 5 2
■ Program example
• Set the pulse output to output R00500 according to
00001
CR2008 CR2103 CR2104 CR2105 CR2106 CR2107 CR2104 to 2107 and CR2108 to 2111.
EI SET RES SET SET RES
In this example, enable (CR2104: OFF) compara-
CR2108 CR2109 CR2110 CR2111 CR2112 tor match output of R00500, and set so that output
00002 RES SET RES RES RES
of R00500 is turned ON (CR2106: ON) by CTC0
CR2203 CTH0 CTH1 and OFF (CR2109: ON) by CTC1.
00003 SET RES RES • Set CR2103 to ON, and specify resetting of CTH0
00000 01000 01000 CR2105 according to CTC0.
00004 DIFU RES This enables correct output of the pulse width of
CR2002 CTH0 the clock pulse from the 1st pulse.
00005 CR2101 • Enable interrupts by the EI instruction.
Stop the clock pulse by the interrupt program (INT
#00050
00006 CTC0 CTC2) when the current value of high-speed
counter CTH1 becomes equal to (10000 pulses
#00020
00007 CTC1 are output) to the setting value of high-speed
counter comparator CTC2.
CR2002 CTH1 • Set CR2203 to ON, and specify resetting of CTH1
00008 R00500
according to CTC2.
#10000 This enables repeated operation for the stipulated
00009 CTC2
number of pulses (10000).
END • The enable input relay of CTH0 is used at ON at
00010 all times during output of the clock pulse.
INT • The enable input relay of CTH1 is used at ON at
00011 CTC2 all times during counting of the clock pulse.
CR2002 CR2105
• Specify the internal clock (CR2101) for the clock
00012 SET input of the high-speed counter CTH0, and
R00500 for the clock input of high-speed counter
RETI
00013 CTH1.
This sets use of CTH0 for clock pulse output and
ENDH
00014 CTH1 for clock pulse counting.
• Set the number of clock pulses according to the
setting value of high-speed counter comparator
CTC2.
• Clock pulse output is started by input R00000
turning ON.
Restarting after the clock pulse has stopped turns
input R00000 ON again.
5-44
5-3 Direct Clock Pulse Output
■ Hint
ON/OFF of CR2103 to CCR2111 can also be set by the LDA and STA instructions in addition to
the SET and RES instructions. The following shows the sample program rewritten with the LDA
and STA instructions. The program can be rewritten with fewer rungs and steps.
CR2008 CR2103 CR2104 CR2105 CR2106 CR2107 CR2008 $0268 CR2100 CTH0 CR2203 CR2813 CTH1
EI SET RES SET SET RES EI LDA STA RES SET SET RES
HIGH-SPEED COUNTERS
[0] [2] [6] [8]
Internal registers 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0
When STA CR2100 is executed, the values of the internal registers are assigned to auxiliary
relays CR2100 to CR2115.
**: 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
Control relay 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0
CR21**
5-45
5-3 Direct Clock Pulse Output
MEMO
5
HIGH-SPEED COUNTERS
5-46
6
FREQUENCY COUNTERS
FREQUENCY COUNTERS
Three types of output (frequency measurement, speed of rotation
measurement, specified frequency pulse output) can be selected using high-
speed counter functions.
6-1
Frequency Measurement, Speed of Rotation
6-1 Measurement and Specified Frequency Pulse Output
This section describes the frequency measurement, speed of rotation and specified frequency
pulse output functions.
Outline of Frequency Measurement, Speed of Rotation Measurement and Specified Frequency Pulse Output
The frequency of input pulses or the input speed of rotation can be measured, or the frequency
specified to output pulses using high-speed counters.
Measurement result
CM01481 • CM01480
Frequency measurement
The frequency of external pulse input can be easily measured by using high-speed counter CTH0
and the FCNT instruction.
"FCNT Instruction" in "6-2 Frequency Counter Instructions"
The speed of rotation of external pulse input can be easily measured by using high-speed counter
CTH0 and the RCNT instruction.
"RCNT Instruction" in "6-2 Frequency Counter Instructions"
The specified frequency (Hz) can be easily output as a pulse from the output relay by using high-
speed counter CTH1 and the PLSOUT instruction.
"PLSOUT Instruction" in "6-2 Frequency Counter Instructions"
6-2
6-2 Frequency Counter Instructions
FREQUENCY COUNTERS
Though frequency counter functions can be used in combination, some combinations are not
possible. The following table summarizes the restrictions applied to combinations of frequency
counter functions.
High-spd Cntr Func Spec Freq Cam Sw Func (inc)
Freq Meas Spd of Rot
Pls Out
CTH0 CTH1 Func Meas Func CTH0 CTH1
Func
High-spd CTH0 O X X O X O
Cntr Func CTH1 O O O X O X
Freq Meas Func X O X O X O
Spd of Rot Meas Func X O X O X O
Spec Freq Pls Out Func O X O O O X
Cam Sw CTH0 X O X X O O
Func (inc) CTH1 O X O O X O
6-3
6-2 Frequency Counter Instructions
D O O O O O – – – O O O O O O O – – O – – – O O O
Operand Explanation
Specifies the pulse input method.*1*2
S1
0 = Single-phase, w/out direction 1 = Single-phase, w/ direction 2 = Phase difference 1X 3 = 2-pulse
Specifies the number of scans within the range 0 to 65535. Note, however, that "100" is set when the
S2
number of scans is "0" (zero).*3,*5
D Specifies the leading device to store the measurement result (Hz) to.*4,*5
*1 Append with "#". "$" cannot be used.
*2 For details, see "CTH/CTC Instruction."
*3 When a bit device has been specified, 16 continuous bits are occupied. When a word device has
been specified, one word is occupied.
*4 When a bit device has been specified, 32 continuous bits are occupied. When a word device has
been specified, two words are occupied.
*5 When a bit device has been specified, and a relay other than the start relay of the channel (e.g.
R00106, R01012) has been specified, the relay is handled straddling the next channel.
Description of Operation
When the execution condition is ON, the time between the pulses of external inputs R00010 (A
phase) and R00012 (B phase) is constantly measured, and the frequency is calculated from the
time between pulses by END processing.
Frequency (Hz) = 1/(time between pulses)
The average value for the number of scans specified by S2 is stored to the device specified by
[ D • D +1] as the frequency measurement result.
The update cycle does not become the "scan time x (number of scans specified by S2 )" or lower.
Measurement ends when the execution conditions turns OFF.
Note
• After the execution condition turns ON, measurement is started from the first pulse
input, and the measurement result is updated at the 2nd pulse input onwards.
• When this instruction is used, use the HSP instruction or control relays to set the
input time constant to 10 µs.
"10-3 Input Time Constant Selection Function" page 10-5
Max. Allowable Response Frequency
High-speed Input Method
Single-phase Phase Difference
Line driver input 100 kHz 50 kHz
Open collector input (5 V/24 V) 60 kHz 30 kHz
6-4
6-2 Frequency Counter Instructions
Note
• As high-speed counter CTH0 is used, do not change control relays or control
memories relating to CTH0, CTC0, CTC1, and cam switch functions (incremental
type) directly in ladder programs, for example.
• As high-speed counter CTH0 is used, other functions and instructions that use
CTH0 cannot be used at the same time.
• Measurement is started and ended at the end of a scan (not at execution of the
instruction).
• The frequency is 0 (Hz) when there is no pulse input for one second.
• Before changing S1 and S2 , switch the execution condition from OFF to ON.
• The FCNT instruction cannot be used in interrupt programs or in the initialization
module. 6
FREQUENCY COUNTERS
Operation flags
FCNT Execution of this instruction starts at the up edge of the execution condition. This
instruction is executed at every scan for the duration that the execution condition is ON.
The value (measurement result) that is stored to the device specified by [ D •
D +1] is updated at every scan specified by S2 .
Scan
ON
Execution condition
OFF
FCNT
Execution Execution
Sample Program
The frequencies (Hz) of encoder inputs R00010 (A phase) and R00012 (B phase) are measured,
and the result is stored to [DM00000 • DM00001].
6-5
6-2 Frequency Counter Instructions
S2 O O O O O – – – O O O O O O O – – O – – – O O O
D O O O O O – – – O O O O O O O – – O – – – O O O
Operand Explanation
*1,*2
S1 Specifies the pulse input method.
0 = Single-phase, w/out direction 1 = Single-phase, w/ direction 2 = Phase difference 1X 3 = 2-pulse
Specifies the leading device to which parameters are stored.*3,*5
S2 +0 . . . . Measurement method (0: Measure from pulse interval, 1: Measure from time of single rotation)
S2 +1 . . . .Number of pulses per rotation
S2
• At measurement from pulse interval (1 to 65535)
• At measurement from time per single rotation (1 to 32767)
S2 +2 . . . . Number of scans (0 to 65535) Note, however, that the average of 100 scans is set when "0" is set.
D Specifies the leading device to store the measurement result (rpm) to.*4,*5
*1 Append with "#". "$" cannot be used.
*2 For details, see "CTH/CTC Instruction."
*3 When a bit device has been specified, 48 continuous bits are occupied. When a word device has
been specified, three words are occupied.
*4 When a bit device has been specified, 32 continuous bits are occupied. When a word device has
been specified, two words are occupied.
*5 When a bit device has been specified, and a relay other than the start relay of the channel (e.g.
R00106, R01012) has been specified, the relay is handled straddling the next channel.
6-6
6-2 Frequency Counter Instructions
Description of Operation
FREQUENCY COUNTERS
when the execution conditions turns OFF.
Measuring the speed of rotation from the time taken to perform a single rotation (when
S2 +0 is "1")
When the execution condition is ON, the number of pulses of external inputs R00010 (A phase)
and R00012 (B phase) are counted, the time (time taken to perform a single rotation) when the
number of pulses becomes equal to the number of pulses per single rotation specified by S2
+1 is constantly measured, and the speed of rotation is calculated from the time between a
specified number of pulses by END processing.
Speed of rotation (rpm) = 60/(time taken to perform a single rotation)
The average value of the number of scans specified by S2 +2 is stored to the device specified
by [ D • D +1] as the speed of rotation measurement result. The update cycle does not
become the "scan time x (number of scans specified by S2 +2)" or lower. Measurement ends
when the execution conditions turns OFF.
Note
• After the execution conditions turns ON, the measurement result is updated by
pulse input of one rotation or more.
• When this instruction is used, use the HSP instruction or control relays to set the
input time constant to 10 µs.
"10-3 Input Time Constant Selection Function" page 10-5
6-7
6-2 Frequency Counter Instructions
measurement from the time of a single rotation, the speed of rotation becomes 0
(rpm) when a single rotation takes 1.5 seconds or more.
• Before changing S1 and S2 , switch the execution condition from OFF to ON.
• The FCNT instruction cannot be used in interrupt programs or in the initialization
module.
Operation flags
CR2012
• When the indirect specification and index modify range is inappropriate
No change in state when indirect specification and index modify are not used
* The instruction is not executed when CR2012 turns ON.
RCNT Execution of this instruction starts at the up edge of the execution condition. This
instruction is executed at every scan for the duration that the execution condition is ON.
The value (measurement result) that is stored to the device specified by [ D • D
Scan
ON
Execution condition
OFF
RCNT
Execution Execution
Sample Program
The speed of rotation (rpm) of encoder inputs R00010 (A phase) and R00012 (B phase) are
measured, and the result is stored to [DM00000 • DM00001].
CR2002 HSP The input time constant of R00010 is set to 10 µs.
R00010
ON at all times
HSP The input time constant of R00012 is set to 10 µs.
R00012
Parameter settings
R00000 #00001 #02500 #00010 <Measurement method>: Measurement from pulse width
DW DW DW
<Number of pulses per single rotation>: 2500 PLS
DM00100 DM00101 DM00102
<Number of scans>:10 scans
RCNT
#00002 DM00100 DM00000
Start of measurement
<Input setting>: Phase difference 1X
END
<Parameters>:DM00100 to DM00102
<Measurement result>: DM00001 • DM00000
ENDH
6-8
6-2 Frequency Counter Instructions
MEMO
FREQUENCY COUNTERS
6-9
6-2 Frequency Counter Instructions
PLSOUT PLSOUT
Specified frequency
pulse output
The pulse of the specified frequency is
output using the CTH1.
Operand Explanation
S
Specifies the specified frequency (0 to 100000) (Hz) or the leading device currently storing that
frequency.*1,*3
Specifies the duty ratio (-499 to 499) of the output pulse or the leading device currently storing that duty
ratio.*2,*3
Setting value
-499 ... 0 ... 499
(duty ratio -50) x 10
n Duty ratio
0.1% ... 50.0% ... 99.9%
TON / (TON + TOFF)
ON ON ON
TON
TOFF
*1 When a bit device has been specified, 32 continuous bits are occupied. When a word device has
been specified, two words are occupied.
*2 When a bit device has been specified, 16 continuous bits are occupied. When a word device has
been specified, one word is occupied.
*3 When a bit device has been specified, and a relay other than the start relay of the channel (e.g.
R00106, R01012) has been specified, the relay is handled straddling the next channel.
Description of Operation
The pulses of frequency specified by S are output from output relay R00501 (R00505) for the
duration that the execution condition is ON.
Specify the duty ratio of the pulse to output by n .
Pulse output stops when the execution condition turns OFF.
Note
• Two or more PLSOUT instructions cannot be used.
• Do not change control relays or control memories related to CTH1 directly in ladder
programs, for example.
• As high-speed counter CTH1 is used, other functions and instructions that use
CTH1 cannot be used at the same time.
• Pulse output, stop and changes to the frequency and duty ratio are performed at
the end of each scan (not at execution of the instruction).
6-10
6-2 Frequency Counter Instructions
• Output destinations R00501 and R00505 are switched by MEMSW 2(bit1). Note,
however, that 10000 (Hz) or more cannot be output normally in the case of R00505.
• Attention must be paid when performing writing in the Run mode.
KV-1000 Programming Manual "About Writing in the Run Mode"
Operation flags
CR2012
This flag is ON in the following instances. Otherwise, it is OFF.
• When a value outside of the range is specified to an operand 6
• When the indirect specification and index modify range is inappropriate
FREQUENCY COUNTERS
No change when a constant is specified for both S and n
PLSOUT This instruction is executed at every scan for the duration that the execution condition is ON.
Scan
ON
Execution condition
OFF
PLSOUT
Execution Execution
Sample Program
The pulse is output from R00501 at the frequency (duty ratio 50%) set at [DM00001• DM00000]
for the duration that R00000 is ON.
(specified frequency pulse output)
R00000 DM0000
PLSOUT
#00000
Tuned control is performed by a combination of the frequency counter function and specified
frequency pulse output function during encoder input A phase R00010 and B phase R00012.
(tuned control)
CR2002 HSP The input time constant of R00010 is set to 10 µs.
R00010
ON at all times
HSP
The input time constant of R00012 is set to 10 µs.
R00012
6-11
6-2 Frequency Counter Instructions
MEMO
6
FREQUENCY COUNTERS
6-12
7
CAM SWITCHES
Values input from an encoder can be converted to angle to enable virtual
execution of cam operation.
CAM SWITCHES
7-1 Cam Switch Functions . . . . . . . . . . . . . . . . . . . . 7-2
7-2 Cam Switch Instructions . . . . . . . . . . . . . . . . . . . 7-3
7-1
7-1 Cam Switch Functions
This chapter describes the cam switch functions.
The current value entered from an encoder or similar device is compared with present multiple
setting ranges.
This function detects which setting range the current value is in, and turns the output destination
devices corresponding to the setting range in question ON.
⋅Encoder Range setting Output destination
⋅CPU internal device device
OFF setting value ON setting value ON range
(1)OFF setting value (1)ON setting value (1) (1)ON≤(current value)<(1)OFF
Compare
(2)OFF setting value (2)ON setting value (2) (2)ON≤(current value)<(2)OFF
7 Current
...
...
...
...
...
value
(31)OFF setting value (31)ON setting value (31) (31)ON≤(current value)<(31)OFF
CAM SWITCHES
CPU MCMP
internal instruction
device
Multi-stage Comparator
The values of the CPU internal devices are used so that cam operation can be executed virtually.
"MCMP Instruction" in "7-2 Cam Switch Instructions" page 7-4
Absolute Encoder
An absolute type encoder is connected, and the gray code values are converted to angle so that
cam operation can be executed virtually.
"ABSENC Instruction" in "7-2 Cam Switch Instructions" page 7-8
Incremental encoder
An incremental type encoder is connected, and the high-speed counter (CTH) values are
converted to angle so that cam operation can be executed virtually.
"INCENC Instruction" in "7-2 Cam Switch Instructions" page 7-12
7-2
7-2 Cam Switch Instructions
Though cam switch functions can be used in combination, some combinations are not possible. 7
The following table summarizes the restrictions applied to combinations of cam switch functions.
CAM SWITCHES
High-spd Cntr Func Spec Freq Cam Sw Func (inc)
Freq Meas Spd of Rot
Pls Out
CTH0 CTH1 Func Meas Func CTH0 CTH1
Func
High-spd CTH0 O X X O X O
Cntr Func CTH1 O O O X O X
Freq Meas Func X O X O X O
Spd of Rot Meas Func X O X O X O
Spec Freq Pls Out Func O X O O O X
Cam Sw CTH0 X O X X O O
Func (inc) CTH1 O X O O X O
7-3
7-2 Cam Switch Instructions
MCMP
MCMP
Multi-stage Operation of a multi-stage
Comparator comparator is performed.
D O O O O O – – – O O O O O – – – – O – – – O O O
n O O O O O – – – O O O O O O O O O O O O – O O O
Operand Explanation
S1 Specifies the leading device of the data block to compare.*1
S2 Specifies the device to compare.*2
D Specifies the leading device to which the compare result is stored.*3
n Specifies the number of data to compare or the device currently storing that data.(1 to 32)*4,*5
*1 When a bit device has been specified, n x 32 continuous bits from the start of the channel
are handled. When a word device has been specified, n x 2 words are handled.
*2 When a bit device has been specified, 16 continuous bits are handled. When a relay other than
the start relay (e.g. R00002, R00106, or R01012) of the channel has been specified, the relay is
handled in 16 bits straddling the next channel.
*3 When a bit device has been specified, n bits are occupied. When a word device has been
specified, the lowermost bit of each word device becomes the store destination of the result. Bits
other than the lowermost bit do not change.
*4 "$" cannot be used.
*5 When a bit device has been specified, 16 continuous bits are occupied. When a word device has
been specified, one word is occupied.
7-4
7-2 Cam Switch Instructions
Description of Operation
When the execution condition is ON, 16-bit unsigned binary data currently stored to the device
specified by S2 is compared with n number of 32-bit data (two 16-bit unsigned binary
data: OFF setting value and ON setting value) starting from S1 , and the result is stored to the
bit device starting from D .
OFF setting value ON setting value Compare Result
bit bit bit bit
31 16 15 0
S1 +1 30 12 S1 D OFF
n items S1 +3 40 30 S1 +2 bit bit D +1 ON
15 0
S1 +5 30 80 S1 +4 D +2 OFF
S2 30
( n x
2 words) S1 +2 ( n -2)+1 10 30 S1 +2 ( n -2) D + n -2 ON
S1 +2 ( n -1)+1 30 30 S1 +2 ( n -1) D + n -1 OFF
CAM SWITCHES
OFF setting value < ON setting value
When OFF setting value > S2 or S2 ≥ ON setting value range, D turns ON.
OFF setting value = ON setting value
D is OFF at all times.
Note
The output state does not change even if the execution condition turns OFF.
Operation flags
MCMP This instruction is executed at every scan for the duration that the execution condition is ON.
Scan
ON
Execution condition
OFF
7-5
7-2 Cam Switch Instructions
Sample Program
The value of data memory DM00000 is compared with the setting value to turn the output relay
ON/OFF at the following conditions:
R30000 is turned ON when DM00000 is #100 or more and less than #200
R30001 is turned ON when DM00000 is #300 or more and less than #400
R30002 is turned ON when DM00000 is #500 or more and less than #600
R30003 is turned ON when DM00000 is #700 or more and less than #800
R30004 is turned ON when DM00000 is #900 or more and less than #1000
R30005 is turned ON when DM00000 is #1100 or more and less than #1200
#00500 #00600
DW DW
DM00014 DM00015
#00700 #00800
DW DW
DM00016 DM00017
#00900 #01000
DW DW
DM00018 DM00019
#01100 #01200
DW DW
DM00020 DM00021
R00000 MCMP
DM00010 DM00000 R30000
#006
END
7-6
7-2 Cam Switch Instructions
MEMO
CAM SWITCHES
7-7
7-2 Cam Switch Instructions
An absolute encoder is
ABSENC
ABSENC
Absolute
used to execute cam
Encoder
switch operation.
D2 D1 D2
D1 O O O O O – – – O O O O O – – – – O – – – O O O
D2 O O O O O – – – O O O O O – – – – O – – – O O O
Operand Explanation
Specifies the leading device of the data block to which the angle setting value (0.1°unit) to compare is
S1
currently stored. (0 to 3599)*1
S2 Specifies the device to which the value of the absolute encoder is currently stored.*2
D1 Specifies the leading device to which the compare result is stored.*3
D2 Specifies the leading device to which parameters are stored.*4
*1 When a bit device has been specified, [ D2 +0] x 32 continuous bits from the start of the
channel are handled. When a word device has been specified [ D2 +0] x 2 words are handled.
*2 When a bit device has been specified, 16 continuous bits are handled. When a relay other than
the start relay (e.g. R00002, R00106, or R01012) of the channel has been specified, the relay is
handled in 16 bits straddling the next channel.
*3 When a bit device has been specified, [ D2 +0] bits are occupied. When a word device has
been specified, the lowermost bit of each word device becomes the store destination of the
result. Bits other than the lowermost bit do not change.
*4 When a bit device has been specified, 128 continuous bits from the start of the channel are
occupied. When a word device has been specified, 8 words are occupied.
Description of Operation
Parameters
Device Description
Number of
D2 +0 Sets the number of data to compare. (1 to 32)
compare data
D2 +1 Resolution Sets the resolution of the encoder (within the range 32 to 32768).
Sets the remainder gray code (within the range 0 to 16384).
Remainder (Example) 32,64,128,256,512,1024,
D2 +2 Resolution 36 360 720
2048,4096,8192,16384,32768
gray code
Remainder
0 14 76 152
gray code
Zero degree
D2 +3 Sets the value to specify to the zero degree (within the range 0 to -1 resolution).
setting value
7-8
7-2 Cam Switch Instructions
Device Description
• The current angle after compensation is stored.(0 to 3599)
Current • When S2 -[ D2 +2]≥[ D2 +3]
angle (0.1
D2 +4 (3600/[ D2 +1])x( S2 -[ D2 +2]-[ D2 +3])
degree
units) • When S2 -[ D2 +2]<[ D2 +3]
(3600/[ D2 +1])x([ D2 +1]+ S2 -[ D2 +2]-[ D2 +3])
D2 +5 D1 D2 +4
bit0: Output response error
<Conditions>
An error occurs when the OFF setting value differs
from the ON setting value at two or more output
destinations that have changed in a single scan, or
when same ON setting values or OFF setting values
are different. Does not
Change.
An error does not occur in the following instances: change.
• When the OFF setting value is the same as the ON
D2 +5
Operation
error setting value of outputs that have changed at the same 7
time
CAM SWITCHES
• When both OFF setting values or ON setting values of
outputs that have changed at the same time are the
same
bit1: Input value out of range error
Turns ON when the input value of the encoder is out of Does not Does not
change. change.
the setting range.
D2 +6
Clear work (cannot be used by the user)
D2 +7
When the execution condition is ON, the current angle value currently stored to the device
specified by [ D2 +4] is compared with [ D2 +0] number of 32-bit data (two 16-bit unsigned
binary data: OFF setting value and ON setting value) starting from S1 , and the result is stored
to the bit device starting from D1 .
OFF setting value ON setting value Compare Result
bit bit bit bit
31 16 15 0
S1 +1 30 12 S1 D2 +4 D1 OFF
[ D2 +0] items S1 +3 40 30 S1 +2 bit bit D1 +1 ON
15 0
S1 +5 30 80 S1 +4 D1 +2 OFF
30
([ D2 +0] x
2 words) S1 +2 ([ D2 +0]-2)+1 10 30 S1 +2 ([ D2 +0]-2) D1 + n -2 ON
S1 +2 ([ D2 +0]-1)+1 30 30 S1 +2 ([ D2 +0]-1) D1 + n -1 OFF
7-9
7-2 Cam Switch Instructions
7 different
(Example) D .....When the ON setting value and OFF setting value
of two or more output destinations that changed
in a single scan are different
CAM SWITCHES
Note
• When the setting value is changed during operation, the change is immediately
reflected in the output. To disable reflection of output, set the execution condition
to OFF.
• Do not use the CR2002 (always ON) control relay for the execution condition.
• The output state does not change even if the execution condition turns OFF.
• The ABSENC instruction cannot be used in interrupt programs or in the
initialization module.
Operation flags
ABSENC This instruction is executed at every scan for the duration that the execution condition is ON.
Scan
ON
Execution condition
OFF
7-10
7-2 Cam Switch Instructions
Sample Program
R00000 to R00007 input values from the absolute encoder are stored to DM00000, and are
compared with the setting values to turn the output relays ON/OFF by the following specification:
Resolution: 256/1 turn Remainder gray code: 0 Zero degree teaching value: 12
R00000
Absolute type to
encoder R00007
KV-1000
R30000 is turned ON when DM00000 is 10.0° or more and less than 20.0°
R30001 is turned ON when DM00000 is 30.0° or more and less than 40.0°
R30002 is turned ON when DM00000 is 50.0° or more and less than 60.0°
R30003 is turned ON when DM00000 is 70.0° or more and less than 80.0°
7
R30004 is turned ON when DM00000 is 90.0° or more and less than 100.0°
CAM SWITCHES
R30005 is turned ON when DM00000 is 110.0° or more and less than 120.0°
DM00100
END
7-11
7-2 Cam Switch Instructions
An incremental encoder is
INCENC
INCENC
Incremental
used to execute cam
encoder
switch operation.
D1 D2 D1 D2
S3 – – – – – – – – – – – – – – – – – – – O – – – –
D1 O O O O O – – – O O O O O – – – – O – – – O O O
D2 O O O O O – – – O O O O O – – – – O – – – O O O
Operand Explanation
Specifies the leading device of the data block to which the angle setting value (0.1° unit) to compare is
S1
currently stored. (0 to 3599)*1
S2 Specifies the No. of the high-speed counter (CTH) to be used.(0,1)
Sets the count input method of the encoder.(0 to 5)*2
S3 0–1-phase, w/out direction 1–1-phase, w/ direction 2–Phase difference 1X
3–Phase difference 2X 4–Phase difference 4X 5–2-pulse
D1 Specifies the leading device to which the compare result is stored.*3,*4
D2 Specifies the leading device to which parameters are stored.*5
*1 When a bit device has been specified, [ D2 +0] x 32 continuous bits from the start of the
channel are handled. When a word device has been specified, [ D2 +0] x 2 words are handled.
*2 For details, "Chapter 5 HIGH-SPEED COUNTERS"
*3 When a bit device has been specified, [ D2 +0] bits are occupied. When a word device has
been specified, the lowermost bit of each word device becomes the store destination of the
result. Bits other than the lowermost bit do not change.
*4 "$" cannot be used.
*5 When a bit device has been specified, 80 continuous bits from the start of the channel are
occupied. When a word device has been specified, five words are occupied.
7-12
7-2 Cam Switch Instructions
Description of Operation
Parameters
Device Description
Number of
D2 +0 Sets the number of data to compare. (1 to 32)
compare data
D2 +1 Resolution Sets the resolution of the encoder (within the range 32 to 32768).
Zero degree
D2 +2 Sets the value to specify to the zero degree (within the range 0 to -1 resolution).
setting value
The current angle after compensation is stored.(0 to 3599)
Current angle • When [ S2 ]≥[ D2 +2]
D2 +3 (0.1 degree (3600/[ D2 +1])x( S2 -[ D2 +2])
units) • When [ S2 ]<[ D2 +2]
(3600/[ D2 +1])x([ D2 +1]+ S2 -[ D2 +2])
CAM SWITCHES
An error occurs when the OFF setting value differs
from the ON setting value at two or more output
destinations that have changed in a single scan, or
when same ON setting values or OFF setting values
are different. Does not
Change.
An error does not occur in the following instances: change.
D2 +4 Operation error • When the OFF setting value is the same as the ON
setting value of outputs that have changed at the same
time
• When both OFF setting values or ON setting values of
outputs that have changed at the same time are the
same
bit1: Input value out of range error Does not Does not
When the input value of the encoder is out of the setting range. change. change.
When the execution condition is ON, the current angle value currently stored to the device
specified by [ D2 +3] is compared with [ D2 +0] number of 32-bit data (two 16-bit unsigned
binary data: OFF setting value and ON setting value) starting from S1 , and the result is stored
to the bit device starting from D1 .
7-13
7-2 Cam Switch Instructions
Note
• When the setting value is changed during operation, the setting value is
immediately reflected in the output. To disable reflection of output, set the
execution condition to OFF.
• When the high-speed counter has been reset (by "RES instruction" or "external
input (Z phase)") during operation, an error sometimes occurs according to the
condition of the output response error ([ D2 +4] bit0).
• Do not use the CR2002 (always ON) control relay for the execution condition.
• The output state does not change even if the execution condition turns OFF. The
count value is held.
• Functions and instructions that use the high-speed counter specified by S2
7-14
7-2 Cam Switch Instructions
Operation flags
CAM SWITCHES
This instruction is executed at every scan for the duration that the execution condition is ON.
Scan
ON
Execution condition
OFF
7-15
7-2 Cam Switch Instructions
Sample Program
High-speed counter CTH1 is used to measure the input value from the incremental encoder, and
that value is compared with the setting value to turn the output relays ON/OFF by the following
specification. The value of high-speed counter CTH1 is cleared by input relay R00001 turning ON.
High-speed counter: CTH1 Count method: 2-pulse method Resolution: 256/1 turn
Zero degree teaching value: 12
R30000 is turned ON when the value of CTH1 is 10.0° or more and less than 20.0°
R30001 is turned ON when the value of CTH1 is 30.0° or more and less than 40.0°
R30002 is turned ON when the value of CTH1 is 50.0° or more and less than 60.0°
R30003 is turned ON when the value of CTH1 is 70.0° or more and less than 80.0°
R30004 is turned ON when the value of CTH1 is 90.0° or more and less than 100.0°
R30005 is turned ON when the value of CTH1 is 110.0° or more and less than 120.0°
7
CR2008 #00006 #00256 #00012
CAM SWITCHES
DW DW DW
ON for 1 scan DM00110 DM00111 DM00112
CR2002 #00100 #00200
DW DW
ON at all times DM00010 DM00011
#00300 #00400
DW DW
DM00012 DM00013
#00500 #00600
DW DW
DM00014 DM00015
#00700 #00800
DW DW
DM00016 DM00017
#00900 #01000
DW DW
DM00018 DM00019
#01100 #01200
DW DW
DM00020 DM00021
R00000 INCENC
DM00010 #001 #005
R30000 DM00110
R00001 CTH1
RES
END
7-16
8
MOTOR CONTROL
(POSITIONING CONTROL)
This chapter describes functions for outputting pulses to a stepping motor or a
servo motor, and for controlling positioning.
8-1
8-1 About Positioning Control
The KV-1000 CPU Unit has a pulse output function for positioning control. This function enables
you to control stepping motors and pulse input type AC servo motors. This section describes how to
use this function.
The KV-1000 CPU Unit can output pulses to output relays without being influenced by the scan
time. These pulses are used to perform positioning/speed control on two axes in a trapezoidal
control system.
■ Trapezoidal control
"Trapezoidal control" is an output function represented by a timing chart comprising the startup
speed, run speed and acceleration/deceleration times that form a trapezoid as shown below.
Trapezoidal control is automatically performed if the pulse frequency, startup speed, run speed and
Operating
speed
Startup
speed
(stop speed)
Time (ms)
■ Parameter setup
Settings such as start up speed, run speed, and acceleration/deceleration times that are set for
trapezoidal control are called "parameters."
Set parameters using KV STUDIO's "Edit CPU positioning parameters" function.
(2) Programming of ladder program Make a ladder program using positioning instructions.
Yes
Change parameters
8-2
8-1 About Positioning Control
There are two types of parameters: point parameters and system parameters.
Point parameters
These parameters are the basic parameters for trapezoidal control as they set movement
destination points (positions), run/startup speed, and acceleration/deceleration time.
"Point Parameters" page 8-5
System parameters
These parameters are for setting sensor input, pulse output, comparators, zero return, and jog
operation.
"System Parameters [I/O Setup]" page 8-11
"System Parameters [Comparator Setup]" page 8-16
"System Parameters [Zero Return/Jog]" page 8-18
"System Parameters [JOG]" page 8-24
■ Main functions
• Point parameters for 32 points can be set in advance on KV STUDIO. 8
If more than 32 points are set, the ladder program overwrites the contents of control memory
• You can choose from two control modes: positioning control and speed control.
Both incremental values and absolute values can be set for target values/travel amounts.
"Operation mode" page 8-6
• Pulses can be output for two axes and each of their frequencies can be set within the range 50
Hz to 100 kHz.
• Both 1-pulse mode and 2-pulse mode are supported as pulse output modes. Select the output
mode best suited to the type of motor driver that is connected.
"Output mode" page 8-15
• Zero return can be performed by the ORGX and ORGY instructions. (Parameters are set in
advance on KV STUDIO.)
"System Parameters [Zero Return/Jog]" page 8-18
• Jog operation can be performed by the JOGX and JOGY instructions. (Parameters are set in
advance on KV STUDIO.)
"System Parameters [JOG]" page 8-24
• The speed can be changed during operation by the CHGSPX and CHGSPY instructions.
(Parameters are set in advance on KV STUDIO.)
"8-4 Changing Speed during Operation" page 8-31
• Axes can be moved to the home position by the HOMEX and HOMEY instructions. (Parameters
are set in advance on KV STUDIO.)
"System Parameters [Comparator Setup]" page 8-16
8-3
8-1 About Positioning Control
Tip Parameters are stored in control memories CM02000 to CM02379. So, a ladder program for
1000 or more positioning points can be made by rewriting the content of these control
memories.
"Positioning Control Exceeding 32 Points" page 8-59
Note
The above functions are set using KV STUDIO's "Edit CPU positioning parameters"
function.
8
MOTOR CONTROL (POSITIONING CONTROL)
8-4
8-2 Setting Up Parameters and Executing Instructions
This section describes how to set up parameters and execute instructions.
Setting Up Parameters
2 Select {Edit CPU positioning parameters (I)} from the pulldown menu.
The [Edit CPU positioning parameters ] dialog box is displayed.
Point Parameters
8
(1)
Once parameters are set, they are stored to CM (control memory) on the CPU. Point parameters
are used for both X- and Y-axes.
"8-7 List Devices for Positioning & List of Error Codes" page 8-60
8-5
8-2 Setting Up Parameters and Executing Instructions
...
When the checkbox is marked, the display switches to that for the store
destination as shown on the right.
Point No.
0 to 31
8 Point Nos. are used as operands for the PLSX and PLSY instructions. (They can also be set by
devices.)
MOTOR CONTROL (POSITIONING CONTROL)
When the above ladder rung is executed, pulses are generated according to the point parameter
of point No. 01.
Operation mode
With position control (positioning (incremental and absolute)), objects are made to move from a
certain position by the target value/travel.
With speed control (speed control (CW and CCW)), objects are made to move in the specified
direction until the stop sensor turns ON.
Positioning INC
In this mode, positioning is controlled by incremental values.
Specify the distance from the current position of the object to its travel destination as the travel
amount. For example, to move an object stationary at position A in the figure below to position B,
set the travel amount to "+100". Next, to move the object from position B to position C, set "+200".
Finally, to return the object from position C to position B, set "-200".
When the current position overflows, the warning relay turns ON. Pulse output does not stop.
"8-3 Other Positioning Devices−Warning/clear warning" page 8-27
A B C
+100 +200
-200
Coordinates
Current Position 0 (origin) 100 200 300
8-6
8-2 Setting Up Parameters and Executing Instructions
Positioning ABS
In this mode, positioning is controlled by absolute values.
Specify the distance from the origin to the object travel destination as the target value. For
example, to move an object stationary at position A in the figure below to position B, set the target
value to "+100". Next, to move the object from position B to position C, set "+300". Finally, to
return the object from position C to position B, set "+100".
If absolute positioning is executed when the warning relay is ON, pulse output stops.
"8-3 Other Positioning Devices−Warnings/Clearing warnings" page 8-27
A B C
100 300
100
Coordinates
Current Position 0 (origin) 100 200 300
Speed control CW
Pulses are continuously output in the CW (clockwise) direction at the specified speed regardless
8
of the number of output pulses.
Time
CCW
CCW
Speed
Parameter store destination: The parameter is stored as follows to bits 0, 1 of CM02066 + (point
No. x 10).
8-7
8-2 Setting Up Parameters and Executing Instructions
Target value/travel
Run
speed
Startup
speed
(stop speed)
Time (ms)
8 Acceleration time Deceleration time
MOTOR CONTROL (POSITIONING CONTROL)
Startup speed
When positioning control is performed, set the output pulse speed at startup. This setting is to
ensure smooth start of motor operation.
Setting range : 50 to 65535 (PPS) (Note that the start speed must be specified lower than
the run speed.)
Parameter store destination : CM02062 + (point No. x 10)
Acceleration/deceleration time
Acceleration time : This is the time it takes for the startup speed to reach the run speed. Setting a
smaller value results in more sudden acceleration and a shorter travel time.
Deceleration time : This is the time it takes for the run speed to reach the stop speed. Setting a smaller
value results in more sudden deceleration and a shorter travel time.
On the KV-1000, the acceleration time and deceleration time are set to the same values.
Speed
Setting range : 0 to 4000 (ms)
When "0" is specified, acceleration
Run
and deceleration change as shown speed
in the figure on the right.
Parameter store destination : CM02063 + (point No. x 10)
An error occurs when the 0 Time
acceleration/deceleration time is
set to "0" and the operation
frequency is a value greater than
65535.
8-8
8-2 Setting Up Parameters and Executing Instructions
Run speed
When positioning control is performed, set the speed at which pulses are output to the motor
during operation.
Setting range : 50 to 100000 (PPS) (Note that the run speed must be specified to the start
speed or greater.)
Parameter store destination : CM02065 + (point No. x 10) • CM02064 + (point No. x 10)
Note
(1) Operation when "startup speed = run speed" is as shown in the following figure.
Speed
Run
(startup)
8
speed
(2) Trapezoidal control when a short time (distance) is set is as shown in the following figures:
Speed Speed
Run Run
speed speed Acceleration
Deceleration
Startup Startup
Acceleration Deceleration
speed speed
8-9
8-2 Setting Up Parameters and Executing Instructions
Parameter store destination: The parameter is stored as follows to bit 4 of CM02066 + (point No. x 10).
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
bit4 Description
0 Do not use stop sensor.
1 Use stop sensor.
When "Use stop sensor" is set to "ON", pulse output stops after the number of pulses set here are output.
8 Speed Stop sensor input ON
MOTOR CONTROL (POSITIONING CONTROL)
Deceleration
When the number of specified pulses is set to "0", pulse output stops immediately when stop
sensor input turns ON.
The deceleration time is ignored.
Speed Stop sensor input ON
Immediate stop
When the number of specified pulses is set to "65535" (maximum value), the motor decelerates
from the moment that stop sensor input turns ON, and pulse output stops after the deceleration
time has elapsed.
Speed Stop sensor input ON
Deceleration time
8-10
8-2 Setting Up Parameters and Executing Instructions
(1)
(2)
(4)
(3)
(6)
(5)
(8)
(7)
(10)
(9)
(11)
(12) 8
8-11
8-2 Setting Up Parameters and Executing Instructions
Origin sensor
"Origin" is the position that is used as the reference for position control. An origin sensor is
installed at the position defined as the origin on an axis.
CR3002 (CR3102) .........Sets CR3002 (X-axis) and CR3102 (Y-axis) as the origin sensor.
R00000 to R00003.........Sets input relays R00000 to R00003 as the origin sensor.
NO contact/NC contact ..Sets the logic of origin sensor input.
When R00000 to R00003 have been set, a zero return is performed taking the preset input as the
origin sensor input.
To use relays other than R00000 to R00003 as the origin sensor input, set these parameters
beforehand to CR3002 (CR3102), and turn CR3002 (CR3102) ON and OFF by the ladder program.
Example
When using input relay R30000 as the
8 origin sensor input of the X-axis
R30000 CR3002
MOTOR CONTROL (POSITIONING CONTROL)
Stop sensor
If a moving object moves to the stop sensor during operation and causes the stop sensor to turn
ON, the object decelerates to a stop immediately from that position, or decelerates to a stop after
moving by a predetermined distance (number of stop sensor specified pulses).
Note, however, that the stop sensor is ignored when Use stop sensor is set to "OFF" in the point
parameters.
CR3003 (CR3103) .........Sets CR3003 (X-axis) and CR3103 (Y-axis) as the stop sensor.
R00000 to R00003.........Sets input relays R00000 to R00003 as the stop sensor.
NO contact/NC contact ..Sets the logic of stop sensor input.
When R00000 to R00003 have been set, movement stops taking the preset input as the stop
sensor input.
To use relays other than R00000 to R00003 as the stop sensor input, set these parameters beforehand
to CR3003 (CR3103), and turn CR3003 (CR3103) ON and OFF by the ladder program.
Example
When using input relay R30001 as the
R30001 CR3003
stop sensor input of the X-axis
8-12
8-2 Setting Up Parameters and Executing Instructions
Z-phase
"Z-phase" is used for increasing the positional accuracy when zero return is completed.
Generally, the zero signal of a pulse encoder is used as the Z-phase.
R00014 (R00015) ..........R00014 (X-axis) and R00015 (Y-axis) are set as fixed.
NO contact/NC contact ..Sets the logic of Z-phase input.
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axi Store Destination bit12 Description
X CM02001 0 NO contact
Y CM02031 1 NC contact
To ensure safety, limit switches are installed at both ends of the axis along which moving objects
8
CR3000 (CR3100) .........CR3000 (CW) and CR3001 (CCW) are set as the limit switch inputs on
the X-axis, and CR3100 (CW) and CR3101 (CCW) are set as the limit
switch inputs on the Y-axis.
R00004 (R0005) ............Input relays R00004 (CW) and R00006 (CCW) are set as the limit switch
input on the X-axis, and input relays R00005 (CW) and R00007 (CCW)
are set as the limit switch input on the Y-axis.
NO contact/NC contact ..Sets the logic of limit switch input.
The limit switch installed at the end of CW travel is called the "CW limit switch."
Movement in CW direction
CW limit switch
The limit switch installed at the end of CCW travel is called the "CCW limit switch."
Movement in CCW direction
When CR3000 (CW) and CR3001 (CCW) are set for the X-axis and CR3100 (CW) and CR3101
(CCW) are set for the Y-axis, turn CR3000 (CW) and CR3001 (CCW), and CR3100 (CW) and
CR3101 (CCW) ON/OFF by the input relay to which the actual limit switch is connected.
When R00004 (CW) and R00006 (CCW) are set for the X-axis and R00005 (CW) and R00007
(CCW) are set for the Y-axis, the preset input is set as the limit switch.
8-13
8-2 Setting Up Parameters and Executing Instructions
8 Y CM02048 1 Enabled
MOTOR CONTROL (POSITIONING CONTROL)
Example
To connect the X-axis limit switch CW to
R30002 CR3000
input relay R30002 and limit switch CCW
to input relay R30003 for use
R30003 CR3001
When the limit switch turns ON, the limit error (error code: 31, 32, and 33) is generated, and pulse
output is stopped. Eliminate the cause of the error, and reset error flags CR3007/CR3107 to clear
the error.
CAUTION • For safety's sake, be sure to use NC (normally closed) type limit switches. If
NO (normally open) type limit switches are used, the limit switch may not
operate if a line break occurs, which may cause a hazard.
• When installation of positioning devices is completed, be sure to check that
the limit switches function properly.
• Allow sufficient travel allowance for the limit switch detection dog to
prevent the object from overtraveling the limit switch when the motor makes
an emergency stop.
8-14
8-2 Setting Up Parameters and Executing Instructions
Output mode
Select the output mode. Select from R00500 and R00501 for the X-axis, and R00502 and R00503
for the Y-axis.
Connection example
1axis connection 8
1 pulse system 2 pulse system
Motor
driver
driver
R00500 R00500
Direction of rotation Reverse rotation pulse
R00501 R00501
2 axis connection
1 pulse system 2 pulse system
X-axis Pulse X-axis X-axis Forward rotation pulse X-axis
Motor
Motor
driver
Motor
driver
driver
R00502 R00502
Direction of rotation Reverse rotation pulse
R00503 R00503
8-15
8-2 Setting Up Parameters and Executing Instructions
(1)
(2)
(3)
(4)
(5)
8 (6)
MOTOR CONTROL (POSITIONING CONTROL)
About comparators
During positioning control, the pulse that was output is counted as the "current position (current
value)." This current value can be compared with the setting values of (3) and (5), and the same
operation as that specified at (2) and (4) can be performed when these values match.
Also, an interrupt can be generated when these values match with the setting specified at (6).
8-16
8-2 Setting Up Parameters and Executing Instructions
Function
Comparator 1
Axi Store Destination
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
bit7 bit6 Operation at Current Position Comparator 1 Match
8
* When the same function is set on comparators 0 and 1, comparator 1 becomes invalid.
Set the value (comparator value) to be used for comparing the number (current position (current
value)) of output pulses.
Note
The KV-1000 recognizes the setting values for interrupts (X-axis: CM02029 • CM02028, Y-axis:
CM02059 • CM02058) by comparator 2 when the CHGSPX or CHGSPY instructions are
executed or when pulse output by the PLSX or PLSY instruction is started. Operation will not
be performed correctly merely by written the setting values to the control memory.
To use the interrupt caused by comparator 2, write the setting value to the control
memory, and then execute the CHGSPX, CHGSPY, PLSX, PLSY instructions.
"Reference Example of Changing Speed during Operation (2)" page 8-56
8-17
8-2 Setting Up Parameters and Executing Instructions
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
8
MOTOR CONTROL (POSITIONING CONTROL)
"Zero return" is the operation of physically returning an object to its origin after it has been moved.
If a power interruption occurs during positioning, or an axis is manually moved while the power is
turned OFF, the actual position of the object will no longer match the position of the object stored
internally on the KV-1000.
Performing a zero return matches the internally stored current position (current value) to the
actual origin.
8-18
8-2 Setting Up Parameters and Executing Instructions
Start speed
Set the output pulse speed at startup for zero return operation or home position operation.
Setting range : 50 to 65535 (Note that the start speed must be specified lower than the
operation speed.)
Parameter store destination : X-axis CM02006
Y-axis CM02036
Acceleration/deceleration time
Acceleration time : This is the time it takes for the startup speed to reach the zero return
operation speed. Setting a smaller value results in more sudden
acceleration and a shorter travel time.
Deceleration time : This is the time it takes for the zero return operation speed to reach the start
speed. Setting a smaller value results in more sudden deceleration and a 8
shorter travel time.
Operation speed
Set the pulse speed to be output to the motor during zero return operation or home position
operation.
Note
(1) Operation when "start speed = operation speed" is as shown in the following figure.
Speed
Operation
(start)
speed
0 Time
8-19
8-2 Setting Up Parameters and Executing Instructions
(2) Trapezoidal control when a short time (distance) is set is as shown in the following figures:
Speed Speed
Operation Operation
speed speed Acceleration
Deceleration
Start Start
Acceleration Deceleration
speed speed
Return direction
8
Specify the start direction of zero return.
MOTOR CONTROL (POSITIONING CONTROL)
The clear deviation counter signal R00506 (X-axis) and R00507 (Y-axis) are automatically output
when zero return is completed, when an error is generated during pulse output, or actuation of a
limit switch is detected. (A ladder program is not required.)
About control relays and control memories when an error is generated
"Other Positioning Devices−Control Relays for Positioning Control" page 8-27
The workpiece can move automatically to the home coordinate position after zero return is 8
completed.
8-21
8-2 Setting Up Parameters and Executing Instructions
Start position: CCW (CW) side (1) (limit switch turns ON and origin direction stop position is outside origin sensor range)
Acceleration/deceleration
* When the limit switch in the direction of movement during the
Limit switch operation in (1) turns ON, movement stops immediately for 300
(A) ms. "Clear deviation counter" also turns ON while movement has
stopped. The operation in (2) is then started.
* An abnormal stop occurs when the limit switch on the start
position side turns ON during the operation in (3).
* "Clear deviation counter" turns ON for 50ms when zero return is
completed.
Start position: CCW (CW) side (2) (limit switch turns ON and origin direction stop position is inside origin sensor range)
(1) The workpiece accelerates to the operation speed, and moves in
the zero return direction.
(2) The workpiece stops immediately when the limit switch turns ON,
and accelerates to the operation speed and moves.
Acceleration/deceleration Origin sensor Acceleration/deceleration (3) The workpiece decelerates when the origin sensor turns ON and
comes to a stop at the start speed.
[Operation speed] (4) After moving, the workpiece moves to the origin sensor OFF
Speed in CW (CCW) (2) (3) (4) position and comes to a stop.
direction [Start speed] (5) The workpiece moves to the origin side, and comes to a stop
Start position Origin when the origin sensor turns ON. (zero return completed)
CCW(CW) CW(CCW)
* When the limit switch in the direction of movement during the
Speed in CCW (CW) [Start speed]
direction (5) operation in (1) turns ON, movement stops immediately for 300
(1) ms. "Clear deviation counter" also turns ON while movement has
[Operation speed]
stopped. The operation in (2) is then started.
* An abnormal stop occurs when the limit switch on the start
Limit switch Acceleration/deceleration
position side turns ON during the operation in (3).
* "Clear deviation counter" turns ON for 50ms when zero return is
completed.
8-22
8-2 Setting Up Parameters and Executing Instructions
Origin sensor
(1) The workpiece moves in the direction opposite the zero return
[Operation speed] direction to the origin sensor OFF position at the start speed and
Speed in CW (CCW) (1) comes to a stop.
direction [Start speed]
(2) The workpiece moves to the origin side, and comes to a stop
Origin
CCW(CW) CW(CCW) when the origin sensor turns ON. (zero return completed)
Start position
Speed in CCW (CW) [Start speed]
direction (2) * "Clear deviation counter" turns ON for 50ms when zero return is
[Operation speed] completed.
(C) Origin sensor (B) Note At the origin at "origin sensor up edge," "Clear deviation
midpoint
counter" does not turn ON.
Origin sensor
[Operation speed]
Speed in CW (CCW) [Start speed] (1) Operation up to when the workpiece comes to the stop is the
Operation at origin same as that for "origin sensor up edge."
direction
sensor up edge (1)
(2) After the workpiece moves to the origin side at the startup speed
Origin
CCW(CW) CW(CCW) and the origin sensor turns ON, the Z-phase turns ON and the
workpiece comes to a stop. (zero return completed)
Speed in CCW (CW)
(2)
direction
[Start speed] * "Clear deviation counter" turns ON for 50ms when zero return is
[Operation speed] completed.
Z-phase
Note
"Clear deviation counter" must be set to "Output ON" in the system parameters.
"Clear deviation counter" page 8-21
8-23
8-2 Setting Up Parameters and Executing Instructions
(1)
(2)
(3)
(4)
(5)
(6)
8
MOTOR CONTROL (POSITIONING CONTROL)
Startup speed
Setting range : 50 to 65535 (Note that the start speed must be specified lower than the
operating speed.)
Parameter store destination : X-axis CM02010
Y-axis CM02040
Acceleration/deceleration time
Acceleration time : This is the time it takes for the startup speed to reach the jog speed. Setting a
smaller value results in more sudden acceleration and a shorter travel time.
Deceleration time : This is the time it takes for the jog speed to reach the startup speed. Setting a
smaller value results in more sudden deceleration and a shorter travel time.
On the KV-1000, the acceleration time and deceleration time are set to the same values.
8-24
8-2 Setting Up Parameters and Executing Instructions
Operating speed
Set the pulse speed to be output to the motor during jog operation.
Note
(1) Operation when "startup speed = operating speed" is as shown in the following figure.
Speed
Operation
(start)
speed
0 Time
(2) Jog operation when a short time (distance) is set is as shown in the following figures:
Speed Speed
Operating Operating
Acceleration
8
speed speed
Deceleration
During positioning control, the pulse that was output is counted as the "current position (current value)."
When the current value change request relay turns ON (level detection), the current position
(current value) is changed to the value currently stored in control memory. (when pulse output is
stopped only)
With current value change, set the default to be stored to control memory.
8-25
8-2 Setting Up Parameters and Executing Instructions
During positioning control, operating is performed at the value (speed) set as the operating speed.
When the operating speed change request relay turns ON (level detection) during positioning
control, the operating speed is changed to the value currently stored in control memory.
With operating speed change, set the default to be stored to control memory.
Axis Corresponding Operating speed Change No. of Control Memory to Store Setting Value
Request Relay
X CR3012 CM02017 (upper) • CM02016 (lower)
Y CR3112 CM02047 (upper) • CM02046 (lower)
8
MOTOR CONTROL (POSITIONING CONTROL)
8-26
8-3 Other Positioning Devices
This section describes devices that are useful in positioning control other than control relays that
are used in the parameter setup.
This control relay turns ON during zero return operation, and turns OFF when zero return
operation ends.
"Operation Timing Chart" page 8-30
This control relay is set when zero return is completed, and is reset at the next pulse output.
"Operation Timing Chart" page 8-30
8
Error/clear error [X-axis: CR3007, Y-axis: CR3107]
MR0000
MR0000 CR3007
RES
This control relay turns ON when an overflow at the current position occurs.
The warning state can be cleared by forcibly resetting this control relay by the ladder program.
Operation is not stopped even if a warning is generated during pulse output.
8-27
8-3 Other Positioning Devices
Operation at the point No. currently stored to CM02025 (X-axis) and CM02055 (Y-axis) is started
at the up edge of this control relay.
This control relay turns ON during pulse output.
* Driver operation can be started without operating this relay by executing the PLSX and PLSY
instructions.
This control relay is set when positioning is completed and zero return is completed. It is reset
when the next pulse is output.
"Operation Timing Chart" page 8-30
The current position (current value) is changed when this relay turns ON (only when pulse output
is stopped).
The value to be changed must be stored in the control memory in advance.
"Change current value (default)" page 8-25
The run speed is changed when this relay turns ON during position control/speed control.
The value to be changed must be stored in the control memory in advance.
"Change operating speed (default)" page 8-26
This control relay does not actually turn ON/OFF; it is used as a symbol when making the ladder
program.
8-28
8-3 Other Positioning Devices
The point No. at which operation is started when the PLSX/PLSY, JOGX/JOGY, or ORGX/ORGY
instructions have been executed is stored to this control memory. "1001" is stored when the JOG
instruction is executed; "1000" is stored when the ORG instruction is executed; and "1002" is
stored during move to home.
Number Attribute
X-axis Y-axis Description R: read-only
of words Blank: R/W
Status
CM02019 CM02049 Operation point No. (M code) 1
CM02020 CM02050
Current position 2
CM02021 CM02051
R
CM02022 CM02052
Current speed 2
CM02023 CM02053
CM02024 CM02054 Error Code 1
Specified point No.
CM02025 CM02055 (for TCHX/TCHY instruction for X-axis: CR3010, 1
Y-axis: CR3110)
8-29
8-3 Other Positioning Devices
(1) Executing the PLSX0 instruction starts pulse output. The pulse output in progress relay
CR3009 turns ON, and the positioning completed relay CR3006 and zero return completed
relay CR3005 turn OFF.
At the same time, the currently operating point No. "0" is written to M code CM02019.
(2) Executing the PLSX1 instruction starts pulse output. The pulse output in progress relay
CR3009 turns ON, and the positioning completed relay CR3006 and zero return completed
relay CR3005 turn OFF.
At the same time, the currently operating point No. "1" is written to M code CM02019.
(3) Executing the ORGX instruction starts zero return. The pulse output in progress relay
CR3009 and zero return in progress relay CR3004 turn ON, and the zero return completed
relay CR3005 and the positioning completed relay CR3006 turn OFF.
At the same time, zero return code "1000" is written to M code CM02019.
(4) Executing the JOG instruction starts jog operation. The pulse output in progress relay
CR3009 turns ON, and the zero return completed relay CR3005 and the positioning
completed relay CR3006 turn OFF.
At the same time, jog operation code "1001" is written to M code CM02019.
8-30
8-4 Changing Speed during Operation
This section describes how to change speed during operation.
Note
• When operation is performed with the acceleration/deceleration time set to "0", the
speed cannot be changed to a speed less than (run speed + 1) Hz.
• When operation is performed with the startup speed set to the same speed as the
run speed, the speed cannot be changed.
• The speed cannot be changed to less than the startup speed. The speed becomes
the startup speed when it is less than the startup speed.
8
Speed
CM02017
CM02016
Speed
8-31
8-4 Changing Speed during Operation
Use the "INT instruction" to use comparator 2. Note, however, that this control relay does not
actually turn ON/OFF; it is used a symbol when making ladder programs.
Example
(X-axis) INT (Y-axis) INT
CR3013 CR3113
After the interrupt cause is generated by comparator 2, the speed is immediately changed to the
run speed specified by S .
Input
processing Interrupt program
CR2008
EI
END
Speed
INT
S CR3013
CR2002 S
CHGSPX
RETI
Note
The KV-1000 recognizes the setting values for interrupts (X-axis: CM02029 • CM02028, Y-axis:
CM02059 • CM02058) by comparator 2 when the CHGSPX or CHGSPY instructions are
executed or when pulse output by the PLSX or PLSY instruction is started. Operation will not
be performed correctly merely by written the setting values to the control memory.
To use the interrupt caused by comparator 2, write the setting value to the control
memory, and then execute the CHGSPX, CHGSPY, PLSX, PLSY instructions.
"Reference Example of Changing Speed during Operation (2)" page 8-56
8-32
8-5 Positioning Instructions
Positioning instructions are executed to perform motor control (positioning control).
(2) Create the ladder program Make a ladder program using positioning
instructions.
No Change parameter
settings during ladder program The content of parameters can also be changed by
execution? directly rewriting the content of control memory on
the ladder program without using KV STUDIO.
Yes
Change parameters
For details on how to operate KV STUDIO, refer to the KV STUDIO User's Manual "Editing Point Parameters."
8-33
8-5 Positioning Instructions
Control memory
X-axis Y-axis Function
CM02000 CM02030 I/O setting
CM02001 CM02031 Sensor enable
CM02002, CM02003 CM02032, CM02033 Comparator 0
CM02004, CM02005 CM02034, CM02035 Comparator 1
CM02006 CM02036 Zero return: startup speed
CM02007 CM02037 Zero return: acceleration/deceleration time
CM02008, CM02009 CM02038, CM02039 Zero return: run speed
CM02010 CM02040 Jog operation: startup speed
CM02011 CM02041 Jog operation: acceleration/deceleration
time
CM02012, CM02013 CM02042, CM02043 CPU positioning Jog operation: run speed
function
CM02014, CM02015 CM02044, CM02045 Current value change setting value
CM02016, CM02017 CM02046, CM02047 Run speed change setting value
8 CM02018 CM02048 Zero return detailed setting
CM02019 CM02049 Operation point No. (M code)
MOTOR CONTROL (POSITIONING CONTROL)
Control Relay
X-axis Y-axis Function
CR3000 CR3100 Limit switch CW input
CR3001 CR3101 Limit switch CCW input
CR3002 CR3102 Origin sensor input
CR3003 CR3103 Stop sensor input
CR3004 CR3104 Zero return in progress
CR3005 CR3105 Zero return completed
CR3006 CR3106 CPU positioning Positioning completed relay
CR3007 CR3107 function Error/clear error
CR3008 CR3108 Warning/clear warning
CR3009 CR3109 Pulse output in progress/emergency stop
CR3010 CR3110 Start of driver operation
CR3011 CR3111 Current value change request (level detection)
CR3012 CR3112 Run speed change request (level detection)
CR3013 CR3113 Comparator 2 match relay
8-34
8-5 Positioning Instructions
MEMO
8-35
8-5 Positioning Instructions
PLSX PLSX
Trapezoidal control X-
axis
Starts trapezoidal control on
X-axis.
PLSY PLSY
Trapezoidal control Y-
axis
Starts trapezoidal control on
Y-axis.
Execution condition n
PLSY P L S Y n
Description of Operation
The pulse is output by the settings of the point No. specified by n at the up edge of the
execution condition.
Frequency (Hz)
Target value/travel (number of output pulses)
Operating speed
Startup speed
(stop speed)
Time (ms)
For details on settings such as positioning acceleration/deceleration time, positioning run speed, and positioning
startup speed, "Point Parameters" page 8-5.
Pulse Output Positioning Operation Point Error Error Clear Deviation Counter
Axis Target Value/Travel
In Prog Flag Complt Relay No. (M code) Code Flag Setting Output Dest
CM02060
X-axis + CR3009 CR3006 CM02019 CM02024 CR3007 CM02018 bit3 R00506
(point No. x 10)
CM02061
Y-axis + CR3109 CR3106 CM02049 CM02054 CR3107 CM02048 bit3 R00507
(point No. x 10)
During trapezoidal control, the "pulse output in progress flag" turns ON, and the point No. is
stored to the "in operation point No. (M code)." When movement is made to the "target value/
travel" position, the "pulse output in progress flag" turns OFF and the "positioning completed
relay" turns ON and movement stops.
The "positioning completed relay" stops when the next pulse output starts.
8-36
8-5 Positioning Instructions
Note
• The PLSX and PLSY instructions cannot be executed when the "pulse output in
progress flag" is ON.
• The PLSX and PLSY instructions cannot be executed when the "error flag" is ON.
• The "pulse output in progress flag" turns OFF by initial END processing after end
of pulse output.
• When pulse output has stopped due to an emergency stop, the information of the
current position is not assured. Also, the duty of the final pulse at which pulse
output stops is not assured. 8
• In the case of parameters whose number of output pulses is "0", the "pulse output
Operation flags
CR2009 No change in state
CR2010 No change in state
CR2011 No change in state
ON when the indirect specification and index modify range is inappropriate. Otherwise, OFF
CR2012
No change in state when indirect specification and index modify are not specified
* The instruction is not executed when CR2012 turns ON.
PLSX, PLSY These instructions are executed when their execution condition is ON, and
execution stops when pulse output is completed.
Scan
ON
Execution condition
OFF
ON
CR3006, CR3106
(positioning completed) OFF
Sample Program
Pulse is output at the content set to point No.00 at the up edge at which input relay R00000 turns ON.
R00000 #000
PLSX
8-37
8-5 Positioning Instructions
JOGX
JOGX
Executes jog operation on
CW Jog operation X-axis
CCW X-axis.
HIGH
CCW signal
CCW
HIGH signal
HIGH
CW signal JOGY
CW J O G Y
8 CCW signal
CCW
HIGH signal
MOTOR CONTROL (POSITIONING CONTROL)
HIGH
Description of Operation
Pulse output is started at the startup speed when the CW or CCW signal turns ON.
The pulse is output at the run speed when the HIGH signal turns ON.
Frequency (Hz)
CW/CCW signal HIGH signal HIGH signal CW/CCW signal
ON ON OFF OFF
Operating speed
Startup speed
(stop speed)
Time (ms)
Tip For details on the jog acceleration/deceleration time, jog run speed and jog startup speed
settings, "System Parameters [JOG]" page 8-24.
• In an abnormal stop and an emergency stop, the error No. is stored to "error code", and the
"error flag" turns ON. The "pulse output in progress flag" turns OFF. Clear deviation counter is
output. "System Parameters [JOG]" page 8-24
For descriptions on errors and error codes, " List of Error Codes" page 8-65.
Note
• The JOGX and JOGY instructions cannot be executed when the "pulse output in
progress flag" is ON.
• The JOGX and JOGY instructions cannot be executed when the "error flag" is ON.
• In the case of a limit error (error code: 31 or 32), the jog instruction can be executed
in the direction opposite that of the travel progress direction that was active when
the limit error occurred by turning the "error flag" OFF even if the limit switch is ON.
• The "pulse output in progress flag" turns OFF by initial END processing after end
of pulse output.
• When pulse output has stopped due to an emergency stop, the information of the
current position is not assured. Also, the duty of the final pulse at which pulse
output stops is not assured.
• The "zero return relay" and "positioning completed relay" turn OFF at the start of
pulse output.
8
JOGX, JOGY These instructions are executed when their execution condition is ON, and
execution stops when pulse output is completed.
Scan
ON
Execution condition CCW
OFF
(signal)
ON
Execution condition CCW
OFF
(signal)
ON
CR3009, CR3109
(pulse output in progress flag) OFF
Sample Program
Jog operation is CW when input R00000 turns ON and CCW when input R00001 turns ON. Jog
operation is performed at high speed if input R00002 turns ON at the same time.
R00000 JOGX
CW
R00001
CCW
R00002
HIGH
8-39
8-5 Positioning Instructions
Execution condition
ORGY O R G Y
Description of Operation
For details on zero return acceleration/deceleration time, zero return speed, and zero return startup speed settings,
Zero return operation starts when the execution condition turns ON.
MOTOR CONTROL (POSITIONING CONTROL)
Note
• The ORGX and ORGY instructions cannot be executed when the "pulse output in
progress flag" is ON.
• The ORGX and ORGY instructions cannot be executed when the "error flag" is ON.
8-40
8-5 Positioning Instructions
• The "pulse output in progress flag" turns OFF by initial END processing after end
of pulse output.
• When pulse output has stopped due to an emergency stop, the information of the
current position is not assured. Also, the duty of the final pulse at which pulse
output stops is not assured.
Operation flags
Execution condition
OFF
ON
CR3005, CR3105
(zero return completed)
OFF
CR3006, CR3106
(positioning completed)
Sample Program
R00000
ORGX
R00000
ORGY
The path that a moving object travels along by zero return differs according to the parameters set
in KV STUDIO and the position of the moving object when zero return is started. Zero return is
also possible if the error has been cleared even if one of the CW and CCW limit switches is ON.
"System Parameters [Zero Return/Jog]" page 8-18
8-41
8-5 Positioning Instructions
Execution condition
TCHY T C H Y
Description of Operation
When the execution condition turns ON, the value of "current position" is stored to "target value/
travel" of the value (point No.) current stored to the "specified point No."
8
Axis Specified Point No. Target Value/Travel Current Position
MOTOR CONTROL (POSITIONING CONTROL)
(1) The point No. is stored to "specified point No." by the LDS, STA or DW instructions.
(2) When the execution condition of the TCHX and TCHY instructions turns ON, the value of
"current position" is stored to "target value/travel" of the point No. specified at (1). The store
destination changes according to the point No. (CM02060 • CM02061 when the point No. is
"0", CM02070 • CM02071 when the point No. is "1") "List of Point Parameters" page 8-64
Example
TCHX instruction
To store the current value of the X-axis as the target value of point No.0
Store "0" to CM02025.
Execute the TCHX instruction.
The content of CM02020 and CM02021 (current values of X-axis) is transferred to
CM02060 and CM02061 (target value/travel of point No.0).
R00000 #00000
DW TCHX
CM02025
TCHY instruction
To store the current value of the Y-axis as the target value of point No.10
Store "10" to CM02055.
Execute the TCHY instruction.
The content of CM02050 and CM02051 (current values of X-axis) is transferred to
CM02160 and CM02161 (target value/travel of point No.10).
R00000 #00010
DW TCHY
CM02055
8-42
8-5 Positioning Instructions
Note
• When the point Nos. stored to CM02025 (X-axis) and CM02055 (Y-axis) are outside
of the range 0 to 31, they are ignored, and no error code is generated.
• The JOGX and JOGY instructions cannot be executed when the "pulse output in
progress flag" is ON.
• The JOGX and JOGY instructions cannot be executed when the "error flag" is ON.
Operation flags
Scan
ON
Execution condition
OFF
Sample Program
Set the current value moved to by jog operation as the target value of point No.0.
R00000 JOGX
CW
R00001
CCW
R00002
HIGH
8-43
8-5 Positioning Instructions
HOMEX HOMEX
Move to X-axis home
position
Starts move to home position on X-
axis.
HOMEY HOMEY
Move to Y-axis home
position
Starts move to home position on Y-
axis.
Execution condition
HOMEY H O M E Y
Description of Operation
The move to home operation starts when the execution condition turns ON.
8 Axis
Home
Coordinates
Pulse Output in Positioning
Operation Flag Completed Relay
Operation Point
No. (M code)
Error
Code
Error Flag
X- CM02026
CR3009 CR3006 CM02019 CM02024 CR3007
MOTOR CONTROL (POSITIONING CONTROL)
axis CM02027
Y- CM02056
CR3109 CR3106 CM02049 CM02054 CR3107
axis CM02057
During move to home, the "pulse output in progress flag" turns ON, and "1002" is stored to "M
code".
When movement is made to the "home coordinates" position, the "pulse output in progress flag"
turns OFF and the "positioning completed relay" turns ON and movement stops.
The "positioning completed relay" stops when the next pulse output starts.
The startup speed, acceleration/deceleration time, and operating speed are the same as for zero
return.
" System Parameters [Zero Return/Jog]" page 8-18
Note
• The HOMEX and HOMEY instructions cannot be executed when the "pulse output
in progress flag" is ON.
• The HOMEX and HOMEY instructions cannot be executed when the "error flag" is
ON.
• The "pulse output in progress flag" turns OFF by initial END processing after end
of pulse output.
• When pulse output has stopped due to an emergency stop, the information of the
current position is not assured. Also, the duty of the final pulse at which pulse
output stops is not assured.
8-44
8-5 Positioning Instructions
Operation flags
HOMEX, HOMEY These instructions are executed when their execution condition is ON, and
execution stops when pulse output is completed.
Scan
ON
Execution condition
OFF
CR3009, CR3109
ON
Sample Program
Move to home is executed at the up edge at which input relay R00000 turns ON.
R00000
HOMEX
8-45
8-5 Positioning Instructions
CHGSPX CHGSPX
Change X-axis
speed
Changes the speed on the X-axis.
CHGSPY CHGSPY
Change Y-axis
speed
Changes the speed on the Y-axis.
Execution condition S
CHGSPY C H G S P Y S
*1 When a bit device has been specified, 32 continuous bits are occupied. When a word device has
been specified, two continuous words are occupied. When a relay other than the start relay (e.g.
R00002, R00106, or R01012) of the channel has been specified, the relay is handled in 32 bits
straddling the next channel.
Description of Operation
Note
The speed cannot be changed to less than the startup speed. The speed becomes the
startup speed when it is less than the startup speed.
8-46
8-5 Positioning Instructions
Generation of interrupt
by comparator 2
END
Input
processing Interrupt program INT
CR3013
Speed
CR2002 S
S CHGSPX
RETI
ENDH
8
Tip When the run speed change request relays CR3012 (X-axis) CR3112 (Y-axis) are used
CM2017
CM2016
Operation flags
8-47
8-5 Positioning Instructions
CHGSPX, CHGSPY These instruction are executed at every scan for the duration that the execution
condition is ON.
Scan
ON
Execution condition
OFF
Sample Program
The run speed on the X-axis is changed to 3000Hz at the up edge at which input relay R00000
turns ON.
8 R00000 #03000
CHGSPX
MOTOR CONTROL (POSITIONING CONTROL)
8-48
8-6 Positioning Control Reference Examples
■ Setting example
CPU input wiring Wiring to Expansion Input Unit
Input common COM
R00000 Origin sensor R30000 Zero return start input
R00001 R30001 Jog instruction CW
R00002 R30002 Jog instruction CCW
R00003 R30003 Jog high-speed instruction
R00004 CW limit switch R30004
R00005 R30005
R00006 CCW limit switch R30006
R00007 R30007
Stepping motor driver
R00008 R30008
R00009
(2-pulse method)
1 Click the button on the KV STUDIO tool bar, and open the {Edit CPU Positioning
Parameters} window.
Select the button on the tool bar of the {Edit CPU Positioning Parameters} window.
2 On the [I/O Setup] tab, set the stop sensor, limit switch input
connection destinations and polarities. Then, select the
output mode in the output settings.
8-49
8-6 Positioning Control Reference Examples
4 On the [Zero Return/Jog] tab, set the zero return speed, start
direction, and output mode. Also, specify the setting value at
the home position settings.
5 On the [JOG] tab, set the jog operation and operation speed
settings.
8
6 Set the point parameter target coordinates,
MOTOR CONTROL (POSITIONING CONTROL)
8-50
8-6 Positioning Control Reference Examples
■ Program example
R30000
ORGX
R30001 JOGX
CW
R30002
CCW
R30003
HIGH
R30011 #001
PLSX
R30012 #002
PLSX
R30013 #003
PLSX
R30014 #004
PLSX
END
ENDH
8-51
8-6 Positioning Control Reference Examples
END
MOTOR CONTROL (POSITIONING CONTROL)
ENDH
8-52
8-6 Positioning Control Reference Examples
Start high-speed pulse output without being influenced by the scan time by executing the PLSX
execution in the interrupt routine.
Start pulse output at the up edge of input R00000
CR2002
EI
HSP
R00000
END
INT
8
R00000
RETI
ENDH
8-53
8-6 Positioning Control Reference Examples
By using the run speed change request relay CR3012 (X-axis) CR3112 (Y-axis)
■ Setting example
Select speed control for point No.0 in the
parameter setup, and set the startup speed,
acceleration/deceleration speed, and operating
speed.
The acceleration speed determined by this
setting is also applied to the acceleration
speed that is applied when the speed change
request is issued.
Set speed control when using the stop sensor.
8 Set the stop sensor number of specified
pulses.
MOTOR CONTROL (POSITIONING CONTROL)
8-54
8-6 Positioning Control Reference Examples
■ Program example
Turn the speed change request relay ON at the up edge of relay R30000, write setting value
"3000" to CM02016 and CM02017 (speed change setting value), and start pulse output by the
PLSX0 instruction.
Write "5000" to CM02016 and CM02017 (speed change setting value) at the up edge of R30001.
Write "6000" to CM02016 and CM02017 (speed change setting value) at the up edge of R30002.
Write "7000" to CM02016 and CM02017 (speed change setting value) at the up edge of R30003.
Turn speed change request relay ON at the up edge of R30004, turn stop sensor input CR3003
ON, and decelerate to a stop.
END
ENDH
3000
Time
Tip For details on the timing of speed change, "8-4 Changing Speed during Operation" page
8-31.
8-55
8-6 Positioning Control Reference Examples
■ Program example
Set to enable interrupt processing.
Clear multi-stage control state DM05000 at the up edge of relay R30000, set comparator 2
(interrupt position) to "50000", and start pulse output by the PLSX0 instruction.
When the current position equals comparator 2, start interrupt processing, and increment multi-
stage control DM05000.
<Interrupt Processing>
(1st multi-stage process) When multi-stage DM05000 = 0, the next interrupt position 100000 is
Note
• The KV-1000 recognizes setting values (X-axis: CM02029 • CM02028, Y-axis: CM02059 •
CM02058) for interrupts by comparator 2 when the CHGSPX or CHGSPY instruction is
executed, or when pulse output by the PLSX or PLSY instruction is started. Operation will
not be performed correctly merely by written the setting values to the control memory.To
use the interrupt caused by comparator 2, write the setting value to the control
memory, and then execute the CHGSPX, CHGSPY, PLSX, PLSY instructions.
• CR3013 and CR3113 do not actually turn ON/OFF. They are used as symbols during
ladder programming.
8-56
8-6 Positioning Control Reference Examples
CR2008
EI
ON for 1 scan at start of operation
INT
CR3013
RETI
ENDH
Speed
25000
20000
15000
Startup
speed
Tip For details on the timing of speed change, "8-4 Changing Speed during Operation" page
8-31.
8-57
8-6 Positioning Control Reference Examples
On KV-10/16/24/40, pulse output is performed by writing each of the settings to the DMs below
and turning the output start relay 2310.
0 #00500 #10000 #03000 #00001 #34644 2310
DW DW DW DW DW
DM1480 DM1481 DM1482 DM1485 DM1484
Startup speed Operating Acceleration/ Number of Number of
speed deceleration output pulses output pulses
time
On the KV-1000, pulse output is basically performed by the PLSX and PLSY instructions.
However, CR3010,CR3009, and CM2025 are provided so that ladder programs can be made by
the same programming method as on the KV-10/16/24/40.
When CR3010 is turned ON, pulse output starts based on the control memory that stores the data
of the point No. specified by CM2025.
"Point Parameters" page 8-5
8-58
8-6 Positioning Control Reference Examples
As the target values/travel amounts of each point are stored to control memories, multiple points
can be positioned by rewriting the contents of control memories in the ladder program.
For example, the target value of point No.0 can be changed by rewriting the content of target
values/travel amounts [CM02060 • CM02061].
Example
8-59
8-7 List Devices for Positioning & List of Error Codes
Number Attribute
X-axis Y-axis Description
of Words R:Blank:
read-only
R/W
System parameters
Origin and stop sensor assignments
Sensor detection and action settings at
CM02000 CM02030 I/O setting 1
comparator match
Output mode (1 pulse/2 pulses) setting
Origin/stop sensor/limit switch enable
Sensor selection
CM02001 CM02031 1
enable Origin/stop sensor/limit switch polarity
selection
CM02002 CM02032 Current value
Software limit switches using a 2
CM02003 CM02033 Comparator 0
comparator, and setting values of stop
CM02004 CM02034 Current value sensor function 2
CM02005 CM02035 Comparator 1
8 CM02006 CM02036 Startup speed setting 1
CM02007 CM02037 Acceleration/deceleration time setting 1
Zero return
MOTOR CONTROL (POSITIONING CONTROL)
CM02008 CM02038
Operating speed setting 2
CM02009 CM02039
CM02010 CM02040 Startup speed setting 1
CM02011 CM02041 Acceleration/deceleration time setting 1
Jog operation
CM02012 CM02042
Operating speed setting 2
CM02013 CM02043
CM02014 CM02044 Current value change setting value
2
CM02015 CM02045 X-axis: Change by CR3011, Y-axis: Change by CR3111
CM02016 CM02046 Run speed change setting value
2
CM02017 CM02047 X-axis: Change by CR3012, Y-axis: Change by CR3112
I/O and zero Zero return detailed setting
CM02018 CM02048 return detailed 1
settings I/O detailed settings
CM02026 CM02056
Home coordinates 2
CM02027 CM02057
CM02028 CM02058 Current value Setting value for interrupts that use
2
CM02029 CM02059 Comparator 2 comparators
Status
CM02019 CM02049 Currently operating point No. (M code) 1
CM02020 CM02050 Current Position
2
CM02021 CM02051 * Can be changed by current value change request
R
CM02022 CM02052
Current speed 2
CM02023 CM02053
CM02024 CM02054 Error code 1
Specified point No.
CM02025 CM02055 (for TCHX/TCHY instruction for X-axis: CR3010, for Y- 1
axis: CR3110)
8-60
8-7 List Devices for Positioning & List of Error Codes
bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
bit1
0 CCW
Zero return direction
8
1 CW
8-61
8-7 List Devices for Positioning & List of Error Codes
bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 Disabled
1 Enabled
8-62
8-7 List Devices for Positioning & List of Error Codes
bit8
Enabled
8-63
8-7 List Devices for Positioning & List of Error Codes
CM02060
Target value/travel 2
CM02061
CM02062 Startup speed 1
CM02063 Acceleration/deceleration time 1
0
CM02064
Operating speed 2
CM02065
CM02066 Run mode setting (user of stop sensor ON/OFF) 1
CM02067 Number of stop sensor specified pulses 1
1 CM02070 to 02077
: : Same as point parameter 0
31 CM02370 to 02377
Attribute
X-axis Y-axis Description R: read-only
Blank: R/W
8-64
8-7 List Devices for Positioning & List of Error Codes
8-65
8-7 List Devices for Positioning & List of Error Codes
MEMO
8
MOTOR CONTROL (POSITIONING CONTROL)
8-66
9
SERIAL COMMUNICATIONS
The KV-1000 can be connected to external devices having an RS-232C-
compliant interface to perform communications.
SERIAL COMMUNICATIONS
9-1 Serial Communications Specifications . . . . . . . . 9-2
9-2 Serial Communications. . . . . . . . . . . . . . . . . . . . 9-3
9-3 Commands/Responses List . . . . . . . . . . . . . . . . 9-5
9-4 Explanation of Commands and Responses . . . . 9-8
9-5 Sending/Receiving Text Data . . . . . . . . . . . . . . 9-25
9-6 ASCII Code Table . . . . . . . . . . . . . . . . . . . . . . . 9-29
9-1
9-1 Serial Communications Specifications
This section describes the communications specifications of the RS-232C interface, and how to
connect to external devices.
Communications Specifications
Note
• Set the same communications specifications as those set to connected external
To connect the KV-1000 to an external device having an RS-232C terminal, use the exclusive
connector table (straight: OP-26487, reverse: OP-96607) and D-sub 9-pin connector (OP-26486),
or D-sub 25-pin connector (OP-26485) to connect to the RS-232C connector.
Wiring diagram
RS-232C cable wiring is as follows. Be sure to connect to the KV-1000 using the exclusive
connector cable.
KV side D-Sub 9-pin on PC side KV side D-Sub 25-pin on PC side
RD 3 3 SD RD 3 2 SD
SD 5 2 RD SD 5 3 RD
+5V 1 4 DR +5V 1 6 DS
+5V 2 6 ER +5V 2 20 ER
SG 6 7 RS SG 6 4 RS
SG 4 8 CS SG 4 5 CS
1 2 3 4 5 6 5 SG 7 SG
Pin Straight cable OP-26487 Straight cable OP-26487
Nos. on + +
D-Sub 9-pin connector OP-26486 D-Sub 25-pin connector OP-26485
KV unit (cross wiring) (cross wiring)
Pin Nos. 1 and 2 on the unit side are 5 V power.
Pin Nos.4 and 6 on the unit side are ground.
Tip When the connected device is defined as a modem, use cross cable OP-96607 instead of OP-26487.
9-2
9-2 Serial Communications
The KV-1000 can be connected to a PC so that the current values or setting values of internal
counters and timers stored on the KV-1000, or the values of data memories can be read or
written.
Follow the procedure below to send commands to the KV-1000 from a PC.
Send Break signal. Initialize the buffer and baud rate settings for KV-1000 communications.
SERIAL COMMUNICATIONS
Send Break signal.
The Break signal is the signal that initializes the KV-1000's
+V 100 ms or more
communications buffer and baud rate settings. SD
-V
Before communications is started with the KV-1000,
a Break signal of 100 ms or more is sent only once.
Once communications is established, the Break signal
need not be sent again.
The figure on the right illustrates how the Break signal is sent.
Note
• To establish communications without turning the KV-1000 OFF after
communications is established between the KV-1000 and KV STUDIO, the Break
signal must be sent again.
• When the Break signal cannot be sent to the PC, the communications setup can be
initialized by turning the KV-1000 OFF then back ON again. Try establishing
communications with the PC again.
• Allow at least 10 ms after sending the Break signal before you stop
communications.
• If the duration between individual bytes of the command is one second or more, a
time-out will occur, and an error response will be returned.
• When the KV-1000 receives the Break signal, the baud rate is set to 9600 bit/s.
• When the baud rate has been changed, it returns to 9600 bit/s (default) even if a
communications error occurs.
• After the power is turned ON, the baud rate is set to 9600 bit/s.
9-3
9-2 Serial Communications
When a command is sent to the KV-1000 from the PC, a response is returned to the PC.
When writing a program that is controlled on a PC, program so that the response is confirmed
before the next command is sent.
9
Command format
SERIAL COMMUNICATIONS
Conform to the following format when sending commands to the KV-1000 from a PC.
C C L
R is the delimiter. The KV-1000 ignores R and recognizes F as the next command.
Command CR
or Command CR L F
Response format
The KV-1000 returns responses to commands according to the following format. When writing
programs on a PC, make sure that programs can be processed according to this format.
Response CR L F
9-4
9-3 Commands/Responses List
This section provides a list of commands and responses (during normal operation and errors) that
are used for serial communications in the KV mode (host link), and a list of errors.
in the table indicates a space (20H).
Commands/Responses List
SERIAL COMMUNICATIONS
T contact (timer) ST/RS Tnnnn OK 9-13
C contact (counter) ST/RS Cnnnn OK 9-13
CTC (high-speed
RS CTCn OK 9-13
counter comparator)
Continuous forced set/reset
R (relay) STS/RSS nnnnn nn OK 9-13
CR (control relay) STS/RSS CRnnnn nn OK 9-13
MR (internal auxiliary relay) STS/RSS MRnnnnn nn OK 9-13
LR (latch relay) STS/RSS LRnnnnn nn OK 9-13
Read
R (relay) RD nnnnn f 9-14
CR (control relay) RD CRnnnn f 9-14
MR (internal auxiliary relay) RD MRnnnnn f 9-14
LR (latch relay) RD LRnnnnn f 9-14
DM (data memory) RD DMnnnnn ddddd 9-14
CM (control memory) RD CMnnnnn ddddd 9-14
TM (temporary data memory) RD TMnnn ddddd 9-14
EM (expanded data
RD EMnnnnn ddddd 9-14
memory)
FM (expanded data memory) RD FMnnnnn ddddd 9-14
Z (index register) RD Znn ddddd 9-14
AT (digital trimmer) RD ATn dddddddddd 9-14
T (timer) RD Tnnnn f,dddddddddd,dddddddddd 9-14
C (counter) RD Cnnnn f,dddddddddd,dddddddddd 9-14
CTH (high-speed counter) RD CTHn 0,dddddddddd,0000000000 9-14
CTC (high-speed counter
RD CTCn f,dddddddddd,dddddddddd 9-14
comparator)
Continuous read
R (relay) RDS nnnnn n f f ... 9-16
CR (control relay) RDS CRnnnn n f f ... 9-16
MR (internal auxiliary relay) RDS MRnnnnn n f f ... 9-16
LR (latch relay) RDS LRnnnnn n f f ... 9-16
9-5
9-3 Commands/Responses List
9-6
9-3 Commands/Responses List
SERIAL COMMUNICATIONS
Tnnnn,Cnnnn,CTHn,CTCn
9-7
9-4 Explanation of Commands and Responses
Start of communications [ CR ]
This command is sent when starting communications with a PLC. Other commands can be sent
when the response to the communications start command is returned normally.
■ Command
C R CR
43H 52H
■ Response
C C CR L F
43H 43H
■ Command
C Q CR
43H 51H
■ Response
C F CR L F
43H 46H
9-8
9-4 Explanation of Commands and Responses
This command changes the baud rate in serial communications with the PLC.
■ Command
S P n CR
53H 50H 20H
■ Response
9
CR L F
SERIAL COMMUNICATIONS
O K
4FH 4BH
Note
• When the power is turned ON, the default baud rate is 9600 bit/s.
• When the Break signal is received, the baud rate is returned to 9600 bit/s.
• The baud rate is changed after the response is sent. Check the response before
sending commands at the newly set baud rate.
9-9
9-4 Explanation of Commands and Responses
■ Command
? K CR
3FH 4BH
■ Response
d d C L
R F
This command displays the current operating state of the CPU Unit.
■ Command
? M CR
3FH 4DH
■ Response
f CR L F
9-10
9-4 Explanation of Commands and Responses
This command displays errors that are currently occurring on the CPU unit.
■ Command
? E CR
3FH 45H
■ Response
d d d C L
R F
ddd : Error Nos. on the CPU Unit are displayed in three digits.
"000"···Normal
Other than "000"···Error
"APPENDICES 2 Error Message Lists" page A-12
9
<Response during an error>
SERIAL COMMUNICATIONS
If the command is not processed successfully, "E1" is entered.
"Response during an error" page 9-24
Change mode [ Mn ]
This command switches the CPU Unit to the [PROGRAM] mode or the [RUN] mode.
■ Command
M Mode No. CR
4DH
■ Response
O K CR L F
4FH 4BH
9-11
9-4 Explanation of Commands and Responses
Clear error [ ER ]
This command cancels errors that are currently occurring on the CPU unit.
■ Command
E R CR
45H 52H
■ Response
O K C L
R F
4FH 4BH
■ Command
W R T y y m 1 d d h h m 2 s s w CR
57H 52H 54H 20H Data 1 20H Data 2 20H Data 3 20H Data 4 20H Data 5 20H Data 6 20H Data 7
■ Response
O K CR L F
4FH 4BH
9-12
9-4 Explanation of Commands and Responses
■ Command
<Forced set>
<Forced reset>
SERIAL COMMUNICATIONS
Internal Auxiliary Relays MR 00000 to 99915 OK
Latch Relays LR 00000 to 99915 OK
Timers T 0000 to 3999 OK
Counters C 0000 to 3999 OK
High-speed Counter
CTC 0 to 3 OK
Comparators*1
*1 High-speed counter comparators can be used only in the case of the RS command (forced reset).
■ Response
O K CR L F
4FH 4BH
This command forcibly turns the contacts of a specified number of devices ON or OFF.
■ Command
<Continuous forced set>
9-13
9-4 Explanation of Commands and Responses
Device No. : Specify the leading No. of the device to be forcibly reset or set.
■ Response
O K CR L F
4FH 4BH
9
<Response during an error>
SERIAL COMMUNICATIONS
Read [ RD ]
■ Command
■ Response
<R, CR, MR, LR>
f CR L F
d d d d d C L
R F
d···d : Stands for the data of the specified device. The display range is 00000 to 65535 (decimal).
<AT>
9
d d d d d d d d d d CR L F
SERIAL COMMUNICATIONS
d···d : Stands for the data of the specified device. The display range is 0000000000 to
4294967295 (decimal).
f , d d d d d d d d d d , d d d d d d d d d d CR L F
Data 1 Data 2
9-15
9-4 Explanation of Commands and Responses
■ Command
Number of
Device Name Device Device No. Reads Response
Relays – 00000 to 59915 1 to 8 f f ...
Control Relays CR 0000 to 3915 1 to 8 f f ...
Internal Auxiliary
MR 00000 to 99915 1 to 8 f f ...
Relays
Latch Relays LR 00000 to 99915 1 to 8 f f ...
9 Data Memory
Control Memory
DM
CM
00000 to 65534
00000 to 11998
1 to 8
1 to 8
ddddd ddddd
ddddd ddddd
...
...
Temporary Data Memory TM 000 to 511 1 to 8 ddddd ddddd ...
SERIAL COMMUNICATIONS
Expanded Data
EM 00000 to 65534 1 to 8 ddddd ddddd ...
Memory
Expanded Data
FM 00000 to 32766 1 to 8 ddddd ddddd ...
Memory
Index Register Z 01 to 12 1 to 8 ddddd ddddd ...
Digital Trimmers AT 0 to 7 1 to 8 dddddddddd dddddddddd ...
f,dddddddddd,dddddddddd
Timers T 0000 to 3999 1 to 8
f,dddddddddd,dddddddddd ...
f,dddddddddd,dddddddddd
Counters C 0000 to 3999 1 to 8
f,dddddddddd,dddddddddd ...
0,dddddddddd,0000000000
High-speed Counters CTH 0 to 1 1 to 2
0,dddddddddd,0000000000 ...
High-speed Counters f,dddddddddd,dddddddddd
CTC 0 to 3 1 to 4
Comparator f,dddddddddd,dddddddddd ...
■ Response
<R, CR, MR, LR>
f f f CR L F
20H 20H
f : Stands for the state of devices in order from the specified device No.
"0"···OFF
"1"···OFF
9-16
9-4 Explanation of Commands and Responses
d d d d d d d d d d ... d d d d d CR L F
20H 20H
d···d Stands for the data of devices in order from the specified device No. The display range is
00000 to 65535 (decimal).
<AT>
d d d d d d d d d d d d d d d d d d d d
20H 20H
d d d d d d d d d d CR L F
d···d Stands for the data of devices in order from the specified device No. The display range is
0000000000 to 4294967295 (decimal).
9
<T, C, CTH, CTC>
SERIAL COMMUNICATIONS
f , d d d d d d d d d d , d d d d d d d d d d
Data 1 Data 2 20H
f , d d d d d d d d d d , d d d d d d d d d d
Data 1 Data 2 20H
f , d d d d d d d d d d , d d d d d d d d d d CR L F
Data 1 Data 2
f : Stands for the state of devices in order from the specified device No.
"0"···OFF *"0" is fixed in the case of a high-speed counter (CTH).
"1"···OFF
d···d Stands for the data of devices in order from the specified device No. The display range is
0000000000 to 4294967295 (decimal).
Data 1···Current value
Data 2···Setting value *"0000000000" is fixed in the case of a high-speed counter (CTH).
9-17
9-4 Explanation of Commands and Responses
Write [ WR ]
■ Command
■ Response
O K CR L F
4FH 4BH
■ Command
W R S Device Device No. Number of writes Data Data Data CR
57H 52H 53H 20H 20H 20H 20H
9-18
9-4 Explanation of Commands and Responses
Number of
Device Name Device Device No. Writes Data Response
Expanded Data
FM 00000 to 32766 1 to 8 00000 to 65535 OK
Memory
Index Register Z 01 to 12 1 to 8 00000 to 65535 OK
Timers (current value) T 0000 to 3999 1 to 8 0000000000 to 4294967295 OK
Counters (current value) C 0000 to 3999 1 to 8 0000000000 to 4294967295 OK
High-speed counters
CTH 0 to 1 1 to 2 0000000000 to 4294967295 OK
(current value)
■ Response
O K CR L F
4FH 4BH
9
Write setting value [ WS ]
SERIAL COMMUNICATIONS
This command writes the setting value of a specified device.
■ Command
■ Response
O K C L
R F
4FH 4BH
9-19
9-4 Explanation of Commands and Responses
This command writes the setting values of a specified number of continuous devices.
■ Command
Device No. : Specify the leading No. to write the setting value to.
Number of
Device Name Device Device No. Data Writes Response
Timers T 0000 to 3999 0000000000 to 4294967295 1 to 8 OK
Counters C 0000 to 3999 0000000000 to 4294967295 1 to 8 OK
High-speed Counter
CTC 0 to 3 0000000000 to 4294967295 1 to 4 OK
Comparators
9 ■ Response
SERIAL COMMUNICATIONS
O K CR L F
4FH 4BH
This command registers the specified device to the bit device registration table or word device
registration table.
■ Command
<Registration of bit device monitor>
*1
M B S Device Device No. Device Device No. Device Device No. CR
4DH 42H 53H 20H 20H
9-20
9-4 Explanation of Commands and Responses
SERIAL COMMUNICATIONS
High-speed Counter
CTC 0 to 3 OK
Comparators
*1 Up to 16 items of data can be registered.
*2 Relays, control relays, internal auxiliary relays, and latch relays are registered in ch units.
When setting these relays, be sure to specify the leading No. on the channel.
■ Response
O K CR L F
4FH 4BH
9-21
9-4 Explanation of Commands and Responses
These commands display the content of devices in the device registration table.
■ Command
<Reading the bit device registration table>
M B R CR
4DH 42H 52H
M W R CR
4DH 57H 52H
■ Response
9 CR L F
Data Data Data Data
SERIAL COMMUNICATIONS
Data: The monitor results of data currently registered to the bit device registration table or the
word device registration table are entered as the data. The monitor results are in the
same format as the response to the RDS command.
9-22
9-4 Explanation of Commands and Responses
■ Command
SERIAL COMMUNICATIONS
Timers T 0000 to 3999
Counters C 0000 to 3999
High-speed Counters CTH 0 to 1
High-speed Counter
CTC 0 to 3
Comparators
■ Response
Data CR L F
Data: The comment (32 characters) of the device specified by the command is entered as the
data. If the comment is less than 32 characters, the remaining characters are filled with
spaces (20H).
Note
During a write in the RUN mode, the response "E6" in the case of an error is entered
even if the comment is registered to the specified device.
9-23
9-4 Explanation of Commands and Responses
If you send the wrong command or an error occurs on the CPU Unit, a response different from a
regular response is returned. The table below summarizes the content, cause and remedy to take
for each of the responses that are returned during an error.
mand was sent without the program • Register the program to the CPU Unit
Program registered to the CPU Unit. before sending the command.
E2
not registered • The "M1 (switch to Run Mode)" com- • Set the RUN/PROG switch on the CPU
mand was sent with the RUN/PROG Unit to RUN.
switch on the CPU Unit set to PROG.
• An attempt was made to change the
Write • Cancel the program write protection,
E4 setting values of a timer, counter or
protected and then re-send the command.
CTC in a write-protected program.
• The "M1 (switch to Run Mode)" com- • Cancel the error on the KV-1000, elimi-
E5 Unit error mand was sent without the error on nate the cause of the error, and then re-
the KV-1000 canceled. send the command.
• Comments are not registered to the
• If necessary, register the comment to
E6 No comment device selected by the "Read com-
the device.
ment RDC" command.
9-24
9-5 Sending/Receiving Text Data
You can connect an external device having an RS-232C-compliant interface to the KV-1000, and
batch-write continuous text data (999 bytes or less or 1998 bytes or less), or send text data in
data memories.
SERIAL COMMUNICATIONS
onwards is the data, and the final byte is EXT(03H).
STX Text data (999 bytes or less, or 1998 bytes or less) ETX
Text data captured on the KV-1000 is stored in ASCII code as follows to internal data memories
CM03000 to CM03999.
"00" is written to the upper eight bits of the data memory, and text data is written in ASCII code to
the lower eight bits.
Data Memory CM03000 CM03001 CM03002 CM03003 to CM03998 CM03999
Number of data
No. Data 1 Data 2 Data 3 to data 998 Data 999
bytes
Leading CM03000
Data memory (number of data bytes) Leading CM+1 Leading CM+2 Leading CM+3 Leading CM+999
bit15 bit0
Data memory
bits 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1
9-25
9-5 Sending/Receiving Text Data
When CR2805 is ON
When CR2805 is ON, text data is stored two bytes at a time to a single control memory.
Data Memory CM03000 CM03001 CM03002 CM03003 to CM03998 CM03999
Number of data
No. Data 1, 2 Data 3, 4 Data 5 to data 1996 Data 1997, 1998
bytes
Leading CM03000
Data memory (number of data bytes) Leading CM+1 Leading CM+2 Leading CM+3 Leading CM+999
bit15 bit0
Data memory
bits 0 0 1 1 0 0 1 0 0 0 1 1 0 0 0 1
Note
• To establish communications without turning the KV-1000 OFF after
communications is established between the KV-1000 and KV STUDIO, the Break
signal must be sent again.
• When the Break signal cannot be sent to the PC, the communications program can
be initialized by turning the KV-1000 OFF then back ON again. Try establishing
communications with the PC again.
• Allow at least 10 ms after sending the Break signal before you establish next
communications.
• If an ETX is found in the read data of the text data, the data preceding the ETX is
transferred to data memory. Data following ETX is not captured.
• If a parity error occurs during text data reception, that text data will not be
transferred to data memory, and control relays CR2802 and CR2803 turn ON for one
scan only.
• To return the baud rate to the default (9600 bit/s) when it has been changed by the
command [SP] disclosed to the user, turn the KV-1000 OFF then ON again, set the
baud rate to 9600 bit/s by the command [SP], or send the Break signal.
9-26
9-5 Sending/Receiving Text Data
The KV-1000 can send text data written in ASCII code to internal data memories in single bytes at
a time.
"00" is written to the upper eight bits of the control memory, and text data is written in ASCII code
to the lower eight bits.
Data Memory CM04000 CM04001 CM04002 CM04003 to CM04998 CM04999
Number of data
No. Data 1 Data 2 Data 3 to data 998 Data 999
bytes
Data memory
bit15 bit0 9
bits 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1
SERIAL COMMUNICATIONS
Upper 8 bits (00) Lower 8 bits (ASCII code)
Leading CM04000
Data memory (number of data bytes) Leading CM+1 Leading CM+2 Leading CM+3 Leading CM+999
When CR2806 is ON
Text data is written to the upper eight bits and lower eight bits of the control memory in ASCII
code.
Data Memory CM04000 CM04001 CM04002 CM04003 to CM04998 CM04999
Number of data
No. Data 1, 2 Data 3, 4 Data 5 to data 1996 Data 1997, 1998
bytes
bit15 bit0
Data memory
bits 0 0 1 1 0 0 1 0 0 0 1 1 0 0 0 1
Leading CM04000
Data memory (number of data bytes) Leading CM+1 Leading CM+2 Leading CM+3 Leading CM+999
9-27
9-5 Sending/Receiving Text Data
Note
• To establish communications without turning the KV-1000 OFF after
communications is established between the KV-1000 and KV STUDIO, the Break
signal must be sent again.
• When the Break signal cannot be sent to the PC, the communications program can
be initialized by turning the KV-1000 OFF then back ON again. Try establishing
communications with the PC again.
• Allow at least 10 ms after sending the Break signal before you establish next
communications.
• To return the baud rate to the default (9600 bit/s) when it has been changed by the
command [SP] disclosed to the user, turn the KV-1000 OFF then ON again, set the
baud rate to 9600 bit/s by the command [SP], or send the Break signal.
9
• To start sending text data, set CR2804.
SERIAL COMMUNICATIONS
CR2800 #10
0003 T0000
CR2008 CR2805
0005 RES
0008
CR2801 CM03000 CM03001 CM03002 CM03003 CM03004 CM03005 CM03006 CM03007 ⋅11th rung is ladder
0011 LDA LDA LDA LDA LDA LDA LDA LDA
program for receive monitor.
CR2803 T0001 00500
0012
R00500 #30
0013 T0001
0014
END
0015
ENDH
0016
0017
9-28
9-6 ASCII Code Table
This section describes the content of the ASCII code table.
SERIAL COMMUNICATIONS
9-29
9-6 ASCII Code Table
MEMO
9
SERIAL COMMUNICATIONS
9-30
10
VARIOUS FUNCTIONS
This chapter describes the various functions incorporated on the KV-1000
CPU Unit such as functions for setting and checking PLC operation, and
handy functions when debugging programs and performing adjustments with
external devices.
VARIOUS FUNCTIONS
10-2 I/O Inhibit Function . . . . . . . . . . . . . . . . . . . . . . 10-3
10-3 Input Time Constant Selection Function . . . . . . 10-5
10-4 Latch Function (Power Interruption Hold) . . . . . 10-6
10-5 Clock Function . . . . . . . . . . . . . . . . . . . . . . . . . 10-9
10-6 Other Functions . . . . . . . . . . . . . . . . . . . . . . . 10-10
10-1
10-1 Fixed Scan Time Operation Functions
Normally, when a program is executed, the scan time changes depending on the content to be
processed.
When this function is used, a wait is caused by END processing to keep the scan time at a fixed
value. When the scan time is longer than the preset time, the scan time changes. Always set the
time after having actually measured the scan time to confirm the time of the program to be
executed.
Example
Scan Time
10 Stored Value of CM00721
500 µs Unit 1ms Unit
1 500 µs 1 ms
VARIOUS FUNCTIONS
2 1000 µs(1ms) 2 ms
Note
• Be sure to set a value larger than the measured scan time (stored to CM00720). The
value is stored to CM00720 in 0.1 ms units.
• When the power is turned ON, or the RUN mode is switched to the PROG mode, the
content of CM00721 is cleared, and CR2303 is turned OFF. When fixed scan time
operation is used, set the value of CM00721 in the program.
10-2
10-2 I/O Inhibit Function
I/O processing is executed at each scan during program execution. This section describes how to
inhibit I/O.
The "inhibit refresh inhibit function" disables refreshing of the content of the input relay by input signals
from an external device.
If input is disabled, debugging can be performed without the use of an external device by using
the KV STUDIO's monitor function to forcibly turn input relays ON/OFF.
■ Method of use
Inhibit/enable inputs by the content of CR2301.
Control Relay Details of Operation
ON: Inhibits input refresh processing in END processing.
The content of the input relay is not updated.
CR2301 OFF: Enables input refresh processing in END processing.
The content of the input relay is updated according to the state of the input
signal.
Note
The following functions also cannot be used when input refresh inhibit is used: 10
• Interrupts
VARIOUS FUNCTIONS
• High-speed counters (excluding internal clock)
• Positioning (origin sensor, stop sensor, Z-phase, limit switches) R00000 to R00015
The "output inhibit function" disables output of signals to external devices even if the program is
turning output coils ON/OFF. All outputs are inhibited (turned OFF).
■ Method of use
Enable/inhibit outputs by the content of CR2300.
Control Relay Details of Operation
ON: Inhibits (OFF) output processing in END processing.
CR2300 OFF: Enables output processing in END processing.
The content of the output coils is output for the output.
Note
When CR2300 turns ON, all outputs turn OFF.
For example, when CR2300 turns ON during positioning pulse output, the pulse
output from the output terminals is inhibited (turned OFF). However, as operation is
continued internally, output is restarted when CR2300 turns OFF. (Pulse output for
the duration that CR2300 is ON is treated as having been output.)
10-3
10-2 I/O Inhibit Function
10
VARIOUS FUNCTIONS
10-4
10-3 Input Time Constant Selection Function
The input time constant selection function allows you to set as an "input time constant" the pulse
width that can be reliably captured as a signal from an input contact. Setting a small input time
constant enables input of shorter-width pulses, and, alternatively, setting a large input time
constant achieves a simple noise filter.
Setting a small input time constant allows high-speed signals to be handled when connecting a
non-contact signal that does not generate chattering or when capturing high-speed signals from
an encoder or similar device.
VARIOUS FUNCTIONS
1 20 µs
2 500 µs
3 1 ms
CM01620 4 2.5 ms
5 5 ms
6 10 ms
7 110 µs
8or more Do not set.
Note, however, that when the HSP instruction and control relay CR2305 are used simultaneously, the
HSP instruction is given priority, and the specified relay cannot be changed to the value set at CM01620.
Control relay CR2305
OFF: Sets the input time constant to 10 ms.OFFJON: Looks up the value entered at CM01620 to
determine the time constant.
Example
The input time constant is set to 1 ms.
CR2008 #00003 CM01620 CR2305
LDA STA SET
Note
The input time constant is set after one scan has ended. Accordingly, specified
details are enabled from the next scan onwards.
■ How to change the input time constant of the Expansion Input Unit
Change the input time constant of the Expansion Input Unit on Unit Editor.
KV STUDIO User's Manual
"Chapter 2 ACCESS WINDOW" page 2-1
10-5
10-4 Latch Function (Power Interruption Hold)
The latch function holds (hold at power interruption) the content of devices at the state before the
power was turned OFF by battery backup even if the power is turned OFF.
Latch Function
The state of data memories and relays can be held in the event of a power interruption.
Set the latch function by the MEMSW instruction.
KV-1000 Instruction Reference Manual "MEMSW Instruction"
MEMSW0
3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0 MEMSW0
$0103
10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
SW1
SW2
SW3
VARIOUS FUNCTIONS
SW4
10-6
10-4 Latch Function (Power Interruption Hold)
MEMSW1
3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0 MEMSW0
$0216
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
SW1
SW2
SW3
SW4
VARIOUS FUNCTIONS
2 Reserved for system − −
3 Reserved for system − −
Note
Set holding of relays set by MEMSW1 only to internal auxiliary relays.
Do not set this function to relays assigned to I/O Units and special units (units other
than I/O Units). When this function is set to I/O relays, the relays do not hold the
content of devices. When this function is set to relays assigned to special units, the
program may not function normally.
10-7
10-4 Latch Function (Power Interruption Hold)
MEMSW2
3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0 MEMSW2
$0003
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
SW1
SW2
SW3
SW4
* Settings made by comparator match output destination selection are enabled by comparator
match output and specified frequency pulse output.
"Comparator Match Output" page 5-23
"Specified Frequency Pulse Output" page 6-2
Note
When comparator match output has been specified to R00504 or R00505 on
MEMSW2, the frequencies that can be output differ.
"Output specifications" page 1-14
Example
⋅Setting of error cancellation when the unit is turned ON (ProgRun) ⋅Setting of program write protection
MEMSW0 MEMSW0
$0001 $0002
10-8
10-5 Clock Function
The KV-1000 CPU Unit counts by the clock IC with "year, month, day, hour, minute, seconds, and
day of the week" backed up by battery even if the unit is turned OFF.
This section describes how to read those values and how to set the clock IC.
Clock Function
The KV-1000 CPU Unit has a built-in clock. The current "year, month, day, hour, minute, seconds,
and day of the week" data can be read from this clock, and used in the program.
The clock's accuracy is ±60 s/month at room temperature (+25°C). The clock continues to
operate even if the CPU Unit is turned OFF.
CM00700 Year 0 to 99 The year is indicated by the lower two digits of the year.
CM00701 Month 1 to 12
CM00702 Day 1 to 31
CM00703 Hour 0 to 23 All data is annotated in 16-bit binary data format. 10
CM00704 Minute 0 to 59
VARIOUS FUNCTIONS
CM00705 Seconds 0 to 59
Days of week are 0: (Sunday), 1: (Monday), 2: (Tuesday), 3: (Wednesday),
CM00706 Day of week 0 to 6 4: (Thursday), 5: (Friday), and 6: (Saturday).
10-9
10-6 Other Functions
This section describes other functions that come in handy when writing programs on KV STUDIO.
For details on operations, KV STUDIO User's Manual.
The device comment store function transfers device comments to KV-1000 CPU Unit using KV
STUDIO. Rung comments can also be transferred.
The KV-1000 CPU Unit can memorize not only programs but also the content of comments
assigned to each of the contacts in KV STUDIO. Programs that are difficult to understand by
device Nos. along can be debugged more easily and programs made more efficiently by
assigning comments to contacts.
For details on how to assign comments and KV STUDIO operations, KV STUDIO User's Manual.
The password setting function is for restricting reading of internal parameters or the program
be read unless the correct password is entered. Set a password if reading of the program will
inconvenience you.
For details on how to set, input and change passwords, and KV STUDIO operations, KV STUDIO User's
Manual.
Error Log
A log of up to 20 of the past errors that have occurred can be left on the KV-1000. The log is
recorded in control memory, and new errors are stored to the smallest error log No. When the
number of stored errors exceeds 20, the oldest error is deleted.
Control Memory Explanation
Year, month (decimal, lower 2 digits: month, 100's digit upwards: year
CM01800
Example: "406" means "2004, June")
CM01801 Day
Error log 1 log (new)
CM01802 Hour (0 to 23)
CM01803 Minute
CM01804 Error No.
: :
: :
Year, month (decimal, lower 2 digits: month, 100's digit upwards: year
CM01895
Example: "406" means "2004, June")
CM01896 Day
Error log 20 logs (old)
CM01897 Hour (0 to 23)
CM01898 Minute
CM01899 Error No.
10-10
10-6 Other Functions
Power ON Log
Up to 20 of the last power ONs can be left on the KV-1000. The log is recorded in control memory,
and new logs are stored to the smallest No. When the number of stored logs exceeds 20 logs, the
oldest log is deleted.
VARIOUS FUNCTIONS
10-11
10-6 Other Functions
MEMO
10
VARIOUS FUNCTIONS
10-12
APPENDICES
These appendices present tables for the relays, timers, counters, memory
Nos., control relays and control memories of the KV-1000 Series. Refer to
these appendices when using the KV-1000 CPU.
A-1
1 Device No. Lists
■ KV-1000
Device Device Range
CPU input relay R00000 to R00015
CPU output relay R00500 to R00507
R01000 to R59915
Internal auxiliary relay
MR00000 to MR99915
Latch relay LR00000 to LR99915
Control relay CR0000 to CR3915
Timer/counter T/C0000 to T/C3999
Data memory DM00000 to DM65534
Expanded data memory EM00000 to EM65534
Expanded data memory FM00000 to FM32766
Temporary data memory TM000 to TM511
Control memory CM00000 to CM11998
High-speed counter CTH0 to CTH1
High-speed counter comparator CTC0 to CTC3
Index register Z1 to Z12
KV-1000 Instruction Reference Manual "1-2 Configuration of Devices"
APPENDICES
A-2
1 Device No. Lists
KV-1000 Devices
Control relays CR
With control relays (CR0000 to CR3915), you can check the operation state of the CPU Unit, set
input time constants, set high-speed counters, and make other settings.
Control relays reserved for the system cannot be used.
Attribute
Device No. R: read-only Function
Space: R/W
CR0000 R Logging execution ON: enabled, OFF: disabled
CR0001 R Logging in operation
CR0002 R Write of set size end
CR0003 Reserved for system
CR0004 R Buffer overflow
Logging function
CR0005 R Write in RUN mode + logging ON
(IDO)
CR0006 to CR0007 Reserved for system
CR0008 R Logging error
CR0009 R Memory Card error no space error
CR0010 R Device/trigger setting error
CR0011 to CR0015 Reserved for system
Logging function
CR0100 to CR0915 (same as CR0000 to CR0015)
(ID1 to 9)
CR1000 to CR2001 Reserved for system
CR2002
CR2003
R
R
ON at all times
OFF at all times A
CR2004 R 10 ms clock pulse (duty 50%)
APPENDICES
CR2005 R 100 ms clock pulse (duty 50%)
CR2006 R 1 s clock pulse (duty 50%)
CR2007 R OFF for only 1 scan at start of operation
CR2008 R ON only for 1 scan at start of operation
CR2009 ON when result of arithmetic operation is minus or overflows
CR2010 R ON when result of arithmetic operation is zero
CR2011 R ON when result of arithmetic operation is plus
CR2012 R ON at arithmetic operation error
CR2013 to CR2015 Reserved for system
A-3
1 Device No. Lists
Attribute
Device No. R: read-only Function
Space: R/W
CR2100 R CTH0 dedicated internal clock (1 µs)
CR2101 R CTH0 dedicated internal clock (10 µs)
CR2102 R CTH0 dedicated internal clock (100 µs)
CR2103 Automatic reset of CTH0 ON: Execute, OFF: Do not execute
Disable comparator match output to R00500/R00504
CR2104
ON: Disable output, OFF: Enable output
Operation when
Turn OFF comparator match output to R00500/R00504
CR2105 high-speed counter
ON: Execute, OFF: Do not execute
comparator CTC0
is ON Turn ON comparator match output to R00500/R00504
CR2106
ON: Execute, OFF: Do not execute
Invert ON/OFF comparator match output to R00500/R00504 at each ON
CR2107
ON: Execute, OFF: Do not execute
Disable comparator match output to R00500/R00504
CR2108
ON: Disable output, OFF: Enable output
CR2109 Operation when Turn OFF comparator match output to R00500/R00504 ON: Execute, OFF: Do not execute
high-speed counter
CR2110 Turn ON comparator match output to R00500/R00504 ON: Execute, OFF: Do not execute
comparator CTC1
is ON Invert ON/OFF comparator match output to R00500/R00504 at each ON
CR2111
ON: Execute, OFF: Do not execute
CR2112 Automatic reset of CTH0 ON: Execute, OFF: Do not execute
High-speed
Single-phase
counter CTH0 1X 2X 4X 2-pulse
count input mode W/out direction W/ direction
CR2113 to CR2115 selection CR2113 OFF ON OFF ON OFF ON
CR2114 OFF OFF ON ON OFF OFF
CR2115 OFF OFF OFF OFF ON ON
CR2300 Disable external outputs ON: Disable output, OFF: Enable output
CR2301 Disable external input refreshing ON: Disable refreshing, OFF: Enable refreshing
CR2302 Disable external outputs at break ON: Disable output, OFF: Enable output
CR2303 Fixed scan time operation ON: Enabled, OFF: Disabled
CR2304 R ON for 1 scan only at fixed scan time setting value exceeded
CR2305 Set input time constant for all CPU Unit Inputs. ON: Set, OFF: Do not set(10ms) (Determine after referring to CM01620.)
CR2306 R ON at backup battery error
CR2307 to CR2315 Reserved for system
A-4
1 Device No. Lists
Attribute
Device No. R: read-only Function
Space: R/W
CTH0 external signalpreset
Unused Up edge Down edge Level
CR2400, CR2401 CR2400 OFF ON OFF ON
CR2401 OFF OFF ON ON
APPENDICES
CR2505 to CR2515 Reserved for system
INT R00000 interrupt polarity
Up edge Down Edge Both edges
CR2600, CR2601 CR2600 OFF ON OFF ON
CR2601 OFF OFF ON ON
A-5
1 Device No. Lists
Attribute
Device No. R: read-only Function
Space: R/W
CR2800 Send break signal (sent while relay is ON)
CR2801 R ON for one scan only when text data is received
CR2802 R Text data download error
Serial
CR2803 R ON for one scan only when a text data receive error has occurred
Communications
CR2804 Start sending text data (ON while data is being sent)
CR2805 Receive text data in byte units ON: Perform, OFF: Do not perform
CR2806 Send text data in byte units ON: Perform, OFF: Do not perform
CR2807 to CR2813 Reserved for system
Suppress zero during execution of DASC instruction (all suffixes) and FASC instruction
CR2814
ON: Execute, OFF: Do not execute
Omit + sign during execution of DASC.S, DASC.L, FASC instructions
CR2815
ON: Execute, OFF: Do not execute
CR2900 Access window, display user message 1
CR2901 Access window, display user message 2
CR2902 to CR2915 Reserved for system
CR3000 Limit switch CW direction input
CR3001 Limit switch CCW direction input
CR3002 Origin sensor input
CR3003 Stop sensor input
CR3004 R Zero return in progress
CR3005 R Zero return completed
CR3006 Positioning completed relay
CR3007 CPU positioning Error/clear error
function
CR3008 X-axis Warning/clear warning
CR3009 Pulse output in progress/emergency stop
CR3010 Start of driver operation
CR3011 Current value change request (level detection)
APPENDICES
A-6
1 Device No. Lists
Attribute
Device No. R: read-only Function
Space: R/W
CR3200 to CR3209 Reserved for system
CR3210 R Arbitrary logging operation in progress
CR3211 R Memory Card in use
CR3212 R Memory Card recognized
CR3213 R Memory Card present
CR3214 R Memory Card instruction executing
CR3215 R Memory Card write protection ON: Write protection ON, OFF: Write protection OFF
CR3300 to CR3415 Alarm relay
CR3500 R Alarm relay in operation (ON if one of CR3300 to CR3415 turns ON)
Leave history when alarm relay state changes from ON to OFF
CR3501
ON: Leave history, OFF: Do not leave history
CR3502 to CR3513 Reserved for system
CR3514 Multiple keys disabled
HKEY instruction
CR3515 R End of scan
CR3600 to CR3615 R HKEY instruction information storage area
CR3700 F1 customized switch 1
CR3701 F2 customized switch 2
CR3702 F3 customized switch 3
CR3703 F4 customized switch 4
CR3704 LED1 customized lamp 1
CR3705 LED2 customized lamp 2
CR3706 LED3 customized lamp 3
CR3707 LED4 customized lamp 4
CR3708 Green backlight (lit when ON)
CR3709
CR3710
Operation panel
KV-D30
Red backlight (lit when ON)
System message display (ON: Japanese, OFF: English)
A
APPENDICES
CR3711 Buzzer ON
CR3712 Screen display setting (ON: Positive display, OFF: Negative display)
CR3713 Enable alarm interrupt ON: Enabled, OFF: Disabled
Page switching (Switching to page of value of CM000401 is forcible turned
CR3714
OFF at the up edge.)
Page switching by "S""T" keys disabled
CR3715
ON: Disabled, OFF: Enabled
CR3800 External output 0 ON when relay is ON
CR3801 External output 1 ON when relay is ON
CR3802 to CR3815
Reserved for system
CR3900 to CR3915
A-7
1 Device No. Lists
Control memory CM
With control memory (CM00000 to CM11998), you can set various special CPU Unit functions.
Control memories reserved for the system cannot be used.
Attribute
Device No. R: read-only Function
Space: R/W
CM00000, CM00001 1st line display device setting
CM00002, CM00003 Operation panel 2nd line display device setting
CM00004, CM00005 KV-D30 3rd line display device setting
CM00006, CM00007 0 page 4th line display device setting
CM00008, CM00009 Reserved for system
CM00010 to CM00199 Pages 1 to 19 (same as CM00000 to CM00009)
CM00200, CM00201 1st line display attribute setting
CM00202, CM00203 2nd line display attribute setting
CM00204, CM00205 Operation panel 3rd line display attribute setting
KV-D30
CM00206, CM00207 0 page 4th line display attribute setting
CM00208 Template 1 setting
CM00209 Template 2 setting
CM00210 to CM00399 Pages 1 to 19 (same as CM00200 to CM00209)
CM00400 Move enable/disable setting
CM00401 Page switching setting
CM00402 Operation panel Current display page
CM00403 to CM00409 KV-D30 Reserved for system
CM00410 to CM00415 Direct access function
CM00416 to CM00499 Reserved for system
CM00500 to CM00699 Reserved for system
CM00700 R (year)
APPENDICES
CM00701 R (month)
CM00702 R (day)
Read from calendar
CM00703 R (hour)
timer
CM00704 R (minute)
CM00705 R (seconds)
CM00706 R (day of week)
CM00707 Reserved for system
CM00708,
R Free-run counter(32bits, 1 ms)
CM00709
CM00710 to CM00719 Reserved for system
CM00720 R Scan time measurement value (average value of every ten scans) (in 0.1 ms units)
CM00721 Fixed scan time operation setting value
MEMSW2, SW1No.2
Scan time when the setting value is exceeded during fixed scan ON: 500 µs unit OFF: 1 ms unit
CM00722 R
time operation
CM00723 to CM01479 Reserved for system
CM01480, CM01481 R Frequency measurement result (Hz or rpm)
Frequency counter
CM01482 1Number of pulses per rotation
function
CM01483 Number of scans
CM01484 to CM01489 Reserved for system
CM01490, CM01491 Specified frequency pulse output function, set frequency (Hz)
CM01492 Duty ratio of specified frequency pulse output
CM01493 to CM01593 Reserved for system
CM01594 CTH0 change direction detection time constant
CM01595 CTH1 change direction detection time constant
CM01596, CM01597 CTH0 ring counter lower limit value
CM01598, CM01599 CTH1 ring counter lower limit value
A-8
1 Device No. Lists
Attribute
Device No. R: read-only Function
Space: R/W
CM01600, CM01601 CTH0 ring counter upper limit value
CM01602, CM01603 CTH1 ring counter upper limit value
CM01604, CM01605 CTH0 preset value
CM01606, CM01607 CTH1 preset value
CM01608 CTH0 enable, reset, polarity setting
CM01609 CTH1 enable, reset, polarity setting
CM01610, CM01611 R Input capture at INT R00000 generation (lower, upper)
CM01612, CM01613 R Input capture at INT R00001 generation (lower, upper)
CM01614, CM01615 R Input capture at INT R00002 generation (lower, upper)
CM01616, CM01617 R Input capture at INT R00003 generation (lower, upper)
CM01618, CM01619 Reserved for system
CM01620 Input time constant setting
CM01621 to CM01699 Reserved for system
CM01700 to CM01701 Digital trimmer 0 upper limit value
CM01702 to CM01703 Digital trimmer 1 upper limit value
CM01704 to CM01705 Digital trimmer 2 upper limit value
CM01706 to CM01707 Digital trimmer 3 upper limit value
CM01708 to CM01709 Digital trimmer 4 upper limit value
CM01710 to CM01711 Digital trimmer 5 upper limit value
CM01712 to CM01713 Digital trimmer 6 upper limit value
CM01714 to CM01715 Digital trimmer 7 upper limit value
CM01716 to CM01719 Reserved for system
CM01720 User message 1
CM01721 to CM01737 User message 2 (max. 24 characters + end code (00H))
CM01738
Access
window Setting inhibited operation A
CM01739 Reserved for system
APPENDICES
CM01740 to CM01756 Ladder project name (max. 32 characters + end code (00H))
CM01757 to CM01763 Project name for access window display (max. 12 characters + end code (00H))
CM01764 to CM01799 Reserved for system
Year, month (decimal, lower 2 digits: month, 100's digit upwards: year
CM01800
Example: "406" means "2004, June")
CM01801 Day
Error log (latest)
CM01802 Hour (0 to 23)
CM01803 Minute
CM01804 Error No.
CM01805 to CM01899 Error log (2 to 20 items, same as CM01800 to CM01804)
Year, month (decimal, lower 2 digits: month, 100's digit upwards: year
CM01900
Example: "406" means "2004, June")
CM01901 Power ON Log Day
CM01902 (latest) Hour (0 to 23)
CM01903 Minute
CM01904 Seconds
CM01900 to CM01999 Power ON log (2 to 20 items, same as CM01900 to CM01904)
A-9
1 Device No. Lists
Attribute
Device No. R: read-only Function
Space: R/W
CM02000 I/O setting
CM02001 Enable sensor
CM02002, CM02003 Comparator 0
CM02004, CM02005 Comparator 1
CM02006 Zero return: startup speed
CM02007 Zero return: acceleration/deceleration time
CM02008, CM02009 Zero return: run speed
CM02010 Jog operation: startup speed
CM02011 Jog operation: acceleration/deceleration time
CM02012, CM02013 CPU Jog operation: run speed
positioning function
CM02014, CM02015 X-axis Current value change setting value
CM02016, CM02017 Run speed change setting value
CM02018 Zero return detailed setting
CM02019 Operation Point No. (M code)
CM02020, CM02021 R Current Position
CM02022, CM02023 R Current speed
CM02024 Error Code
CM02025 Specified point No.
CM02026, CM02027 Home position coordinates setting value
CM02028, CM02029 Comparator 2
CM02030 I/O setting
CM02031 Enable sensor
CM02032, CM02033 Comparator 0
CM02034, CM02035 Comparator 1
CM02036 Zero return: startup speed
CM02037 Zero return: acceleration/deceleration time
APPENDICES
A-10
1 Device No. Lists
Attribute
Device No. R: read-only Function
Space: R/W
CM02390 R Error code for Memory Card instruction
CM02391 Memory Card power OFF error
CM02392 to CM02999 Reserved for system
CM03000 Number of text receives
CM03001 to CM03999 Text receive data (1998 bytes)
CM04000 Number of text sends
CM04001 to CM04999 Text send data (1998 bytes)
CM05000 to CM11998 Reserved for system
APPENDICES
A-11
2 Error Message Lists
The following describes error messages and remedies to take when an error message is dis-
played.
When the following errors occur, change the mode from the Run mode to the Prog mode, and
remedy the error.
These errors are displayed when an error occurs on the KV-1000 unit.
No. Message Cause Remedy
This error occurs during ladder execution. Review
Sub-routine exceeds the nesting
10 CALL Nest the ladder paying attention to how sub-routines are
level.
used.
This error occurs during ladder execution. Review
FOR to NEXT instructions exceed
11 FOR Nest the ladder paying attention to how the FOR to NEXT
the nesting level.
instructions are used.
A number of interrupts that This error occurs during ladder execution. Review
12 INT Nest exceeds the limit has occurred the ladder paying attention to how the INT instruction
simultaneously. is used.
This error occurs during ladder execution. Review
MPS to MPP instructions exceed the
13 MPS Nest the ladder paying attention to how the MPS to MPP
nesting level.
instructions are used.
This error occurs during conversion. Limit the
The number of BREAK instructions
14 BREAK number of BREAK instructions between FOR to
exceeds the limit.
NEXT to within the specified limit.
Clear the error, and turn the unit ON again.
15 Convert A system error occurred.
If this error occurs frequently, contact your agent.
APPENDICES
A-12
2 Error Message Lists
APPENDICES
84 S-RAM Backup CTC current values) of RAM is clear. This erases only device values and alarm
corrupted as the voltage of the values, and does not erase the ladder program.
backup battery has dropped.
A probable cause is that the
clock value is corrupted as the Replace the backup battery, check the clock value,
85 RTC Low Voltage
voltage of the backup battery and set the clock again as required.
has dropped.
A probable cause is that the Check the file system of the Memory Card.
Memory Card is damaged, or Check the file system using the chkdsk at the
87 Memory Card Error magnetism or noise has caused Windows command prompt.
the Memory Card to stop (Ex) When Memory Card is the E: drive
functioning. C:\WINDOWS>CHKDSK E:
Remove the Memory Card by the correct procedure.
The Memory Card was removed
88 Memory Card Removed "Loading and Removing a Memory Card from
while it was being accessed.
the KV-1000" page 3-8
Handle the Memory Card by the correct handling
The KV-1000 was turned OFF
Memory Card procedure.
89 while the Memory Card was
PowerOFF "Precautions When Using a Memory Card"
being accessed.
page 3-9
Multiple operations were executed
Wait until the Memory Card has finished being
90 Memory Card Busy before accessing of the Memory
accessed before executing multiple operations.
Card was completed.
A-13
2 Error Message Lists
A-14
3 Differences between the KV-1000 Series & KV-700 Series
Tip • For differences in the instructions used on the KV-1000 Series and KV-700 Series,
KV-1000 Series Instruction Reference Manual "Appendix 5, Differences Between
the KV-1000 Series & the KV-700 Series”
• For details on the devices that can be used on the KV-1000 Series, "Device No.
Lists" page A-2
APPENDICES
Program size Approx. 160 k steps
Approx. 32k steps when memory is expanded
Input time constant selection 8 stages (110µs added) 7 stages
SD Memory Card,
Hardware Multi Media Card
Multi Media Card
Access from Ladder
Memory Possible (Memory Card instruction) Not possible
program
Card
Logging function Set in KV STUDIO Ladder program
FTP server function can be used also in FTP server function can be used in the
Other
the Run mode when KV-LE20 is used. Prog mode only when KV-LE20 is used.
QL Cannot be used Can be used
Unit KV-L20 Cannot be used Can be used
KV-L20R Can be used Can be used
• 10 interrupts (R00000 to R00009) by
• 4 interrupts (00000 to 00003) by input
input relays
relays
Interrupt causes • Interrupts by high-speed counter com-
• Interrupts by high-speed counter com-
Interrupts parators (CTC0 to CTC3)
parators (CTC0 to CTC3)
• Interrupts by positioning comparator 2
Direct input 16 points (R00000 to R00015) 10 points (00000 to 00009)
Direct output 8 points (R00500 to R00507) 4 points (00500 to 00503)
A-15
3 Differences between the KV-1000 Series & KV-700 Series
Yes No
function
Switch by MEMSW instruction Fixed
Comparator
R00500 (R00504) 00500
match output
R00501 (R00505) 00501
Ladder program by instruction (FCNT,
Frequency Control method Ladder programs using CR, CM
RCNT instruction)
Counter
Input relay R00010/R00012 00004/00006
Ladder program by instruction (PLSOUT
Specified Control method Ladder programs using CR, CM
instruction)
frequency
Switch by MEMSW instruction
pulse Output relay Fixed at 00501
R00501 (R00505)
output
Duty ratio Can be changed Fixed at 50:50
Ladder program by instruction
Common (MCMP, ABSENC, INCENC instruction) Ladder programs using CR, CM
* CR and CM are not used.
Multi-stage comparator Any device can be used for the compare value. Compare value CM1401
• Remaining gray code can be set. (36, • Remaining gray code cannot be set.
Cam Absolute 360 or 720 can be set to the resolu- (Only a value whose resolution is 2n
switch encoder tion.) can be set.)
function • Zero degrees can be set. • Zero degrees cannot be set.
• 2 ch (CTH0/1) can be used simulta-
neously. • Only 1 ch (CTH0) can be used.
Incremental
• CTH0: R00010/R00012 • CTH0: 00004/00006
encoder
• CTH1: R00011/R00013 • Zero degrees cannot be set.
• Zero degrees can be set.
A-16
3 Differences between the KV-1000 Series & KV-700 Series
APPENDICES
Ladder support
KV STUDIO KV BUILDER
software
Programming Structured (module/macro, local device) —
Indirect specification instruction, index Indirect specification using temporary
Indirect specification
modifier data memory (TM)
Basic
151 122
instructions
Programming
Applied
36 19
instructions
Instruction Arithmetic
operation 185 147
instructions
Extended
106 48
instructions
A-17
3 Differences between the KV-1000 Series & KV-700 Series
A-18
3 Differences between the KV-1000 Series & KV-700 Series
Device
KV-1000 KV-700
No.
CR0000 Logging execution ON: enabled, OFF: disabled
CR0001 Logging in operation
CR0002 Write of set size end
CR0003 Reserved for system
CR0004 Logging Buffer overflow
QL input relay (address 0)
CR0005 function Write in RUN mode + logging ON
:
CR0006 to CR0007 (IDO) Reserved for system QL input relay (address 127)
CR0008 Logging error
CR0009 Memory Card error no space error
CR0010 Device/trigger setting error
CR0011 to CR0015 Reserved for system
CR0100 to CR0715 Logging
function (same as CR0000 to CR0015)
CR0800 to CR0915 (ID1 to 9) Reserved for system
CR1000 to CR1615 QL output relay (address 0)
:
CR1700 to CR1715
QL output relay (address 127)
CR1800 Enable QL communications ON:Enable OFF:Disable
QL baud rate
CR1801 to CR1802
CR1801
156kbit/s 625 kbit/s 2.5 Mbit/s
OFF ON OFF
5 Mbit/s
ON
A
Reserved for system CR1802 OFF OFF ON ON
APPENDICES
CR1803 Clear input at QL disconnection ON:Clear OFF:Hold
QL disconnection error ON:Disconnecting
CR1804
OFF:Normal
Cam switch function absolute/incremental selection
CR1814
ON:Absolute OFF:Incremental
CR1815 Stop when state is turned ON/OFF during cam switch operation
CR2302 Output inhibit function at break ON: Execute, OFF: Do not execute
Detection of CTH0 overflow
CR2403
ON: Detected OFF: Not detected
Detection of CTH1 overflow
CR2407
ON: Detected OFF: Not detected
CR2408 CTH0 preset inhibit ON: Execute, OFF: Do not execute
CR2409 CTH1 preset inhibit ON: Execute, OFF: Do not execute Reserved for system
CTH0 internal enable relay
CR2410
ON: Count enabled OFF: Count inhibited
CTH1 internal enable relay
CR2411
ON: Count enabled OFF: Count inhibited
CR2412 CTH0 change direction ON: Decrease side, OFF: Increase side
CR2413 CTH1 change direction ON: Decrease side, OFF: Increase side
CR2508 Reserved for system Cam switch, start operation ON:Execute, OFF:Do not execute
CR2509 Reserved for system Cam switch, output response impossible warning
CR2510 Reserved for system Cam switch, error
A-19
3 Differences between the KV-1000 Series & KV-700 Series
Device
KV-1000 KV-700
No.
INT R00000 interrupt polarity
Up edge Down edge Both edges
CR2600, CR2601
CR2600 OFF ON OFF ON
CR2601 OFF OFF ON ON
A-20
3 Differences between the KV-1000 Series & KV-700 Series
Device
KV-1000 KV-700
No.
CR3200,
Trigger setting
CR3201
CR3202 Time stamp ON
CR3203 Start
CR3204 Write in Run mode error
Reserved for system Logging
CR3205 CPU buffer overflow
function
CR3206 Registered device error
CR3207 Write error
CR3208 MMC data over
CR3209 Not enough free space on MMC
CR3210 Arbitrary logging operation in progress Logging execution in progress
CR3211 Memory Card in use
CR3212 Memory Card recognized
CR3213 Memory Card present
CR3214 Memory Card instruction executing Reserved for system
Memory Card write-protected
CR3215 ON: Write protection ON, OFF: Write protection
OFF
Device
KV-1000 KV-700
No.
CM00708, CM00709 Free-run counter(32bits, 1 ms) Reserved for system
CM01000 Number of text receive data
CM01001 to CM01099 Text receive data 1 to 99 A
CM01100 Number of text send data
APPENDICES
CM01001 to CM01199 Text send data 1 to 99
CM01400 Save leading No. of output relay
Compare value in multi-stage
CM01401
comparator mode
Number of pulses in 1 cycle of
CM01402
device to be input to CTH0
CM01403 Absolute type input address
Reserved for system
CM01404 Current angle
CM01405 Cam switch Error No.
CM01406 to CM01409 function Reserved for system
Angle setting values at which output
CM01410, CM01411
relay turns ON and OFF
Angle setting values at which output
CM01412, CM01413
relay+1 turns ON and OFF
: :
Angle setting values at which output
CM01472, CM01473
relay+31 turns ON and OFF
CM01492 Duty ratio of specified frequency pulse output Reserved for system
CM01500 to CM01531 QL receive data 0 to 31
CM01532 to CM01563 QL send data 0 to 31
Reserved for system
CM01564 Number of QL communication addresses
CM01570 to CM01577 QL connection information
A-21
3 Differences between the KV-1000 Series & KV-700 Series
Device
KV-1000 KV-700
No.
CM01594 CTH0 change direction detection time constant
CM01595 CTH1 change direction detection time constant
CM01596, CM01597 CTH0 ring counter lower limit value
CM01598, CM01599 CTH1 ring counter lower limit value
CM01608 CTH0 enable, reset, polarity setting
CM01609 CTH1 enable, reset, polarity setting
CM01740 to CM01756 Ladder project name (max. 32 characters + end code (00H))
Project name for access window display (max. 12
CM01757 to CM01763
characters + end code (00H))
Year, month (decimal, lower 2 digits:
CM01800 month, 100's digit upwards: year
Example: "406" means "2004, June")
CM01801 Error log Day
(latest) Reserved for system
CM01802 Hour (0 to 23)
CM01803 Minute
CM01804 Error No.
CM01805 to CM01899 Error log (2 to 20 items, same as CM01800 to CM01804)
Year, month (decimal, lower 2 digits:
CM01900 month, 100's digit upwards: year
Example: "406" means "2004, June")
CM01901 Power ON Day
Log (latest)
CM01902 Hour (0 to 23)
CM01903 Minute
CM01904 Seconds
Power ON log
APPENDICES
CM01900 to CM01999
(2 to 20 items, same as CM01900 to CM01904)
CM02018 CPU Zero return detailed setting CPU
positioning Home position coordinates setting positioning
CM02026, CM02027 Reserved for system
function value function
CM02028, CM02029 X-axis Comparator 2 X-axis
CM02048 CPU Zero return detailed setting CPU
positioning Home position coordinates setting positioning
CM02056, CM02057 Reserved for system
function value function
CM02058, CM02059 Y-axis Comparator 2 Y-axis
CM02390 Error code for Memory Card instruction
Reserved for system
CM02391 Memory Card power OFF error
CM02600 to CM02663 Data type 0 to 31
CM02664 to CM02670 Logging Trigger specification content 0 to 6
Reserved for system
CM02671 function Number of registered devices
CM02672 Memory Card storage capacity
CM03000 Number of text receives
Reserved for system
CM03001 to CM03999 Text receive data (1998 bytes)
CM04000 Number of text sends
—
CM04001 to CM04999 Text send data (1998 bytes)
A-22
4 Index
APPENDICES
Setup Functions Available in the Access Window derating . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-13
Setup Mode . . . . . . . . . . . . . . . . . . . . . . . 2-33 External dimension diagrams (CPU). . . . . . 1-15
Accl/dec time . . . . . . . . . . . . . . . . . . . . . 8-19, 8-24 External dimension diagrams (start unit, end unit) . . . 1-15
Alarm Monitor . . . . . . . . . . . . . . . . . . . . . . . . . 2-27 I/O circuit diagrams . . . . . . . . . . . . . . . . . . . 1-19
About the Alarm Monitor Function . . . . . . . . 2-27 Input Specifications . . . . . . . . . . . . . . . . . . . 1-11
Clearing Alarm Relay Records. . . . . . . . . . . 2-32 Names and Functions of Parts . . . . . . . . . . . 1-9
Displaying the Alarm Relay Record . . . . . . . 2-31 Output specifications. . . . . . . . . . . . . . . . . . 1-14
Examples of Alarm Monitor Display . . . . . . . 2-28 Current position (current value) . . . . . . . . . . . 8-29
How to Monitor Alarms. . . . . . . . . . . . . . . . . 2-29 Current speed . . . . . . . . . . . . . . . . . . . . . . . . . 8-29
How to Register Alarms . . . . . . . . . . . . . . . . 2-27 Current value change request . . . . . . . . . . . . 8-28
real time display . . . . . . . . . . . . . . . . . . . . . . 2-28 CW limit switch/CCW limit switch . . . . . . . . . . 8-13
record display. . . . . . . . . . . . . . . . . . . . . . . . 2-29
All Clear Mode . . . . . . . . . . . . . . . . . . . . . . . . . 2-36
ASCII Code Table . . . . . . . . . . . . . . . . . . . . . . 9-29 D
Assembling and Wiring Connectors . . . . . . . . 1-48
Assembling the Unit. . . . . . . . . . . . . . . . . . . . . 1-44 Daily care . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-53
Auto home position . . . . . . . . . . . . . . . . . . . . . 8-21 Data Management on Memory Cards. . . . . . . 3-10
Auto-loading Function . . . . . . . . . . . . . . . . . . . 3-30 File names and project folder names that can be
AW Settings/Setting Inhibited Operation . . . . . 2-39 used. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Maximum number of project folders that can be
created. . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
B Number of projects that can be saved on a
Memory Card. . . . . . . . . . . . . . . . . . . . . . 3-12
Basic System Configuration . . . . . . . . . . . . . . . 1-4 Structure of folders . . . . . . . . . . . . . . . . . . . 3-10
Before You Turn the Power ON for the First Time. . . 1-3 Types and sizes of data that can be stored. 3-11
Initialization procedure . . . . . . . . . . . . . . . . . . 1-3 Data memory . . . . . . . . . . . . . . . . . . . . . . 1-7, A-2
Data to Store on the Memory Card . . . . . . . . . 3-12
Types of files stored on Memory Card . . . . 3-12
C Device Comment Store Function, Rung Comment
Store Function . . . . . . . . . . . . . . . . . . . . . . 10-10
Device Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Cam Switch Functions. . . . . . . . . . . . . . . . . . . . 7-2
Changing device values (T, C, CTH/CTC, TRM) 2-16
Cam Switch Instructions . . . . . . . . . . . . . . . . . . 7-3
Changing device values (when device values are
A-23
4 Index
APPENDICES
Key Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-40 Mounting on a DIN rail . . . . . . . . . . . . . . . . . . 1-45
How to Set Key Lock . . . . . . . . . . . . . . . . . . 2-40 Mounting orientation . . . . . . . . . . . . . . . . . . . . 1-41
KV-1000 Series Specifications . . . . . . . . . . . . . 1-6 Mounting Position . . . . . . . . . . . . . . . . . . . . . . 1-41
General specifications . . . . . . . . . . . . . . . . . . 1-6 MREAD instruction . . . . . . . . . . . . . . . . . . . . . 3-62
Performance specifications . . . . . . . . . . . . . . 1-7 Multi-stage Comparator . . . . . . . . . . . . . . . . . . 7-2
KV-B16RA/B16TA/C32TA/C64TA . . . . . . . . . . 1-31 MWRIT instruction . . . . . . . . . . . . . . . . . . . . . 3-50
KV-B16XA/C32XA/C64XA. . . . . . . . . . . . . . . . 1-24
KV-EB1S/KV-EB1R . . . . . . . . . . . . . . . . . . . . . 1-38
KV-U7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-21 O
Operating speed . . . . . . . . . . . . . . . . . . . . . . . 8-25
L Operation at a power interruption . . . . . . . . . . . 1-8
Operation point No. (M code) . . . . . . . . . . . . . 8-29
Latch Function (Power Interruption Hold) . . . . 10-6 Operation speed . . . . . . . . . . . . . . . . . . . . . . . 8-19
Latch relay . . . . . . . . . . . . . . . . . . . . . . . . . 1-7, A-2 ORGX instruction . . . . . . . . . . . . . . . . . . . . . . 8-40
Linear counter . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6 ORGY instruction . . . . . . . . . . . . . . . . . . . . . . 8-40
List Devices for Positioning & List of Error Codes. . 8-60 Origin sensor . . . . . . . . . . . . . . . . . . . . . . . . . 8-12
List of Control Relays. . . . . . . . . . . . . . . . . . 8-64 Other Functions . . . . . . . . . . . . . . . . . . . . . . 10-10
List of Error Codes . . . . . . . . . . . . . . . . . . . . 8-65 Outline of Positioning/Speed Control . . . . . . . . 8-2
List of Point Parameters. . . . . . . . . . . . . . . . 8-64 Main functions . . . . . . . . . . . . . . . . . . . . . . . . 8-3
List of System Parameters and Statuses . . . 8-60 Other Positioning Devices. . . . . . . . . . . . . . 8-27
List of Devices for High-speed Counters . . . . . 5-26 Point parameters. . . . . . . . . . . . . . . . . . . . . . 8-5
List of Devices for Memory Cards . . . . . . . . . . 3-77 Setting Up Parameters . . . . . . . . . . . . . 8-2, 8-5
Loading a Memory Card . . . . . . . . . . . . . . . . . . 3-8 System parameters . . . . . 8-11, 8-16, 8-18, 8-24
Loading and Removing a Memory Card from the Trapezoidal control . . . . . . . . . . . . . . . . . . . . 8-2
KV-1000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8 Output relay . . . . . . . . . . . . . . . . . . . . . . . 1-7, A-2
LOGD instruction . . . . . . . . . . . . . . . . . . . . . . . 3-40
LOGE instruction . . . . . . . . . . . . . . . . . . . . . . . 3-40
Logging Function . . . . . . . . . . . . . . . . . . . . . . . 3-32 P
About Logging . . . . . . . . . . . . . . . . . . . . . . . 3-32
About Logging Data (CSV file). . . . . . . . . . . 3-46 Password Setting Function . . . . . . . . . . . . . . 10-10
Logging Function Control Relays/Control PLSOUT instruction . . . . . . . . . . . . . . . . . . . . 6-10
Memories . . . . . . . . . . . . . . . . . . . . . . . . . 3-42 PLSX instruction . . . . . . . . . . . . . . . . . . . . . . . 8-36
A-25
4 Index
V
VARIOUS FUNCTIONS. . . . . . . . . . . . . . . . . . 10-1
W
Warning/clear warning. . . . . . . . . . . . . . . . . . . 8-27
Wiring to terminal block units. . . . . . . . . . . . . . 1-47
Wiring to the connector . . . . . . . . . . . . . . . . . . 1-50
Wiring Units . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-46
Z
Z-phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13
Zero return completed . . . . . . . . . . . . . . . . . . . 8-27
Zero return detailed position . . . . . . . . . . . . . . 8-20
Zero return direction . . . . . . . . . . . . . . . . . . . . 8-20
Zero return in progress . . . . . . . . . . . . . . . . . . 8-27
Zero Return Path . . . . . . . . . . . . . . . . . . . . . . . 8-21
APPENDICES
A-27
Revision History
Printing Date Version Details of Revision
E 1101-3
Copyright (c) 2005 KEYENCE CORPORATION. All rights reserved. 084110E 1042-14 051GB Printed in Japan