KV-5000/3000 Series: Programable Controller
KV-5000/3000 Series: Programable Controller
KV-5000/3000 Series
User’s Manual
■ Hardware
CPU unit AC power unit Extension I/O unit
Extension unit Error output unit
Name Description
KV-5000/3000 series To describe system configuration/specification, CPU built-in function,
User's Manual ladder programming method etc of KV-5000/3000 Series.
KV-5000/3000/1000 Series
This Manual describes available instructions for ladder programming.
Instruction Reference Manual
KV-5000/3000/1000 Series This Manual describes script programming and available operators, control
Script Programming Manual statements and functions.
KV STUDIO
This manual describes how to operate KV STUDIO.
User's Manual
KV-5000/3000/1000 Series This manual describes the system macros available for the KV-5000/
System Macro Manual 3000/1000 series.
Danger Indicates that death or severe personal injury will result if proper precautions are not taken.
Warning Indicates that death or severe personal injury can result if proper precautions are not taken.
Caution Indicates that damage to property can result if proper precautions are not taken.
Important
Indicates that an undesirable result or status can occur if the relevant notice is ignored.
Note
Describes cautions for easily mistaken operations.
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 other manuals.
■ General Precautions
· Verify that this device functions correctly at startup and during operation.
· Provide a safety circuit that bypasses PLC to enable failsafe operation of the entire system in the event that the PLC 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-L20R, 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 product 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 the product with the purpose of protecting human beings.
· Verify that the KV-5000/3000 function correctly when using the KV STUDIO.
■ Note
When use as per the condition or environment shown below, operating method with rating, function margin
Or fault self-recovery (Safety measures) etc safety countermeasures, at the same time, contact and
negotiate with business personnel of our company.
· Use of the product under conditions not described in this manual.
· Use of the product in nuclear power control, railroad facilities, aviation facilities, vehicles,
combustion devices, medical equipment, entertainment machinery, safety equipment, etc.;
· Use of the product in applications that may have a significant impact on human life or property, or
that place a high priority on safety.
- KV-5000/3000 Series User’s Manual - 1
■ Precautions for CE Marking
Keyence Corporation has evaluated compliance with the requirements of the EU Directive when the
following conditions were satisfied, and have confirmed that this product satisfies those requirements.
Accordingly, be sure to satisfy the following conditions when using this product in EU countries.
· When the KV-U7 power supply is used for the KV-5000/3000 series, since the KV-U7 is designed
to be a class I machine, so the protective conductor terminal installed on the power terminal must
be connected to the protective grounding wire of the building.
· Please install the KV-5000/3000 series into a conductive enclosure of IP54 above(e.g. control
panel).
· Rated load of KV-B16RC/RA relay is 8A at each common point. That is, when all 4 channels are
used, max. load of each channel is 1A; when 2 channels are used, max. load of each channel is
2A.
2 - KV-5000/3000 Series User’s Manual -
■ Precautions for UL Approval
The KV-5000/3000 series meets the following UL standards, and has passed the UL certification.
UL marks are available in the nameplate of every unit for an UL -approval product.
· Please install the KV-5000/3000 series into a conductive enclosure of IP54 above(e.g. control
panel).
· KV-5000/3000 series power supply must use our company KV-U7 special power supply, or up to
USA standard NFPA70 (NEC: National Electrical Code) specified UL certified power supply with
Class 2 output.
· When the KV-U7 power supply is used for the KV-5000/3000 series, since the KV-U7 is designed
to be a class I machine, so the protective conductor terminal installed on the power terminal must
be connected to the protective grounding wire of the building.
· The wire that is connected to the KV-U7 terminal block should have a wire gauge of AWG #14-#22,
and a rated temperature of 105℃ above. The tightening torque when wiring is 0.6 Nm.
· Except I/O unit and KV-DN20, wiring of all special unit terminals must adopt conductor with wire
size AWG#16-#22, wire material overmatching copper wire, rated temperature above 60 ℃ .The
tightening torque when wiring is 0.5 Nm.
· When replacing lithium battery , must use special lithium battery (OP- 51604).Wrong usage method
of lithium battery might cause explosion etc.Please do not charge, break down lithium battery or
put it into fire.
· For wiring to KV-5000/3000 (CPU unit) power supply terminal block, please always use stranded
copper wire with size AWG16-#20, its temperature rating should be above 60 ℃ .The tightening
torque when wiring is 0.5 Nm.
Chapter1 Hardware
1-1 System Configuration ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-2
System Overview •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-2
(1) About Power•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-3
(2) About Output Error Unit •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-3
(3) About CPU Unit •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-3
(4) About Expansion Unit••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-3
1-2 Unit Connection••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-4
Precautions on Connecting Unit •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-4
Unit Assembly •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-5
Mounting Onto the DIN Rail ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-6
1-3 Unit Wiring ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-7
Precautions on Wiring Each unit•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-7
Connector Assembly and Wiring•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••1-9
Removing the Terminal Block •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-13
1-4 Unit Installation •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-14
Installing Environment ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-14
Installation Position ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-14
1-5 System General Specification•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-16
General Specification •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-16
Performance Specifications••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-17
Operation During Power off ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-18
1-6 CPU Unit ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-20
Package Contents •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-20
Names and Functions of Parts ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-21
Specification ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-24
RUN-PROG Selector Switch ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-28
Wiring and Internal Circuit Diagram ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-28
Outline Dimensions••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-34
1-7 AC Power Unit •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-35
Name and Function of Each Part •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-35
Specification ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-36
How to Wire •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-37
Outline Dimensions••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-37
1-8 Expansion Input Unit
Name and Function of Each Part •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-38
Specification ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• 1-39
Appendices
1 PLC unit Error List ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• A-2
2 CR/CMlist ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• A-7
Control Relays CR••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• A-7
Control Memory CM •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• A-13
3 ASCII Code Table ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••A-19
ASCII Code Table••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• A-19
USING MODULES
2 Set the details of the new module.
Determine the name and type of the module.
The product designation from transferred to the KV-1000. Be sure to read carefully.
• When a module currently specified by a module instruction is disabled, a
Keyence is expressed capital letter. conversion error occurs.
Important information.
Expressed in uppercase letters.
• When the ladder program is verified against the ladder program on the KV-1000,
disabled modules are not targeted in this verify.
Indicates that an undesirable
result or status can occur if
Prompt information Tip • The name and type of module can be changed at Module properties after a new module is
made. the relevant notice is ignored.
Information that needs further "Changing the Type of Module" (page 2-22)
Be sure to read carefully.
understanding, helpful 2-15
BASIC INSTRUCTIONS
OR OR Connected in parallel to NO contact.
A N I S
A N D N O T S
A N D S A S
S X S
L D S
A N B S B S
L D I S
L D N O T S
A N I S
A N D N O T S
L D B N O T S
O R S
O R B S O R I S
S **For B, “1” is filled in . O R N O T S
Display the device that Available Devices ( ): Only for KV-5000/3000 Index
Indirect Local Modific
Bit device Word device
Const specifying Device ation
may be set in the selected Operand
MR DM EM
R (DR) LR T C CTC CR FM (ZF) T C CTH CTC Z CM #/$ #TM * @ : #/: Z
operand. KV-5000/3000 ƻ
(B) TM (W)
S ƻ ƻ ƻ ƻ ƻ ƻ ƻ - - - - - ƻ - - ƻ *2 ƻ ƻ *2
KV-1000 -
For read method of this list, please Operand Explanation
Is outline description of
refer to KV-5000/3000/1000 Series S Specifies the bit to be connected to the left power rail.
*1 When word device is specified in S , state of the LSB is loaded. operand content.
Command Reference Manual "1-7 KV-5000/3000 Bit specifying of word device can be performed.
KV-1000 BLD/LBDB instruction can be used if state other than that of LSB is to be loaded.
Read Method and Precautions for *2 KV-5000/3000 Can not be used when bit specifying of word device is used in S .
* This page was made for the purpose of explaining page components, and differs
from an actual page.
Scan
ON
S
OFF
LD instruction ON
AND instruction
OR instruction OFF
LDB instruction ON
ANB instruction
ORB instruction OFF
2
TIP There is no restriction to the number of contacts that can be connected in parallel or in series.
Contact Instructions
Note
Parallel connection that includes a intruction other than contact instruction is not
DMO
OR DM0
ANB R001
"How to Use
OUT R500
Mnemonics List", Page 15
- KV-5000/3000/1000 Series Reference Instruction Manual - 2-3
* This page was made for the purpose of explaining page components, and differs from an actual page.
Mnemonics lists are describes in the corresponding pages of sample ladder programs.
Use this mnemonic symbol list to input ladder program simply.
3 In ladder edit zone of KV STUDIO, click the cell to insert reference ladder program, select "edit
(e)"-> "list edit (l)" from the menu, pop up "list edit " dialog box.
Other procedure
· +
Paste the copied mnemonic symbol list into
popup " list edit " dialog box.
Paste operation, select " paste (P) " from right
click menu of " list edit " dialog box.
Terminology
Terminology Description
Is electronic equipment that could control equipment freely by changing program,
PLC
is alsocalled PLC (Programmable Logic Controller).
KV-5000/3000 Is programmable controller produced by our company.
CPU unit KV-5000/3000.
Refers to expansion I/O unit, special expansion unit other than KV-5000/3000
Expansion unit
series CPU unit.
Is a general term of expansion unit that may be connected with CPU unit KV-5000/
KV-5000/3000 series
3000.
KV STUDIO Is software that supports KV-5000/3000 series programming.
Ladder program Is program prepared by KV STUDIO.
HARDWARE
HARDWARE
This chapter describes system configuration, connection methods of KV-5000/
3000 series, and specification and application method of CPU unit, AC power
unit, expansion input/output unit, expansion unit, and error output unit, etc.
System Overview
(1)
AC power unit
KV-U7
˄DC24V 1.8A˅
KV-U7
OC
OUTPUT
24VDC
1.8A
(2) (3) (4)
CPU unit
Error output unit Expansion unit End unit
N
INPUT KV-5000/3000
100-240V
AC
50/60Hz KV-DR1 (I/O, special) (attached to CPU unit)
L
0.98A
(16-input +8-output)
(1-point relay output)
or
Start unit
(attached to CPU unit)
Cable
˄1m˅
˄OP-42142˅
Multimedia card
Cable
KV-M128C
˄2m˅
˄OP-42141˅
PC
· IBM PC and PC/AT compatible
HARDWARE
(1) About Power
System Configuration
connected.
"1-7 AC Power Unit"
■ Use DC24V
When operating KV-5000/3000 series models via DC24V voltage, AC power unit KV-U7 is not used, so
start unit shall be connected (when using error output unit, start unit + KV-DR1 will be used). DC24V is
supplied by DC power input terminal block of KV-5000/3000.
"1-6 CPU Unit"
When error output unit KV-DR1 is used, it should be connected to the the left side of KV-5000/3000. 1
CPU unit can only connect 1 KV-U7. However, error output unit is not the unit required for the operation
of KV-5000/3000 series.
"1-11 Error output unit"
AC power unit and error output unit can be connected on the left side of CPU unit, expansion input/
output unit or expansion special unit can be connected on the right side. Terminal unit must be
connected on the right side if expansion unit is not connected.
"1-6 CPU Unit"
Ladder program device data can be read/written from/to SD memory card, and high-speed counter or
motor control functions, etc. based on internal I/O can be used.
"2 CPU INTERNAL FUNCTIONS"
KV-5000/3000 series can use module/macro/local device/KV script functions, etc., to further improve
programming efficiency.
"3 LADDER PROGRAMMING"
Script Programming Manual
KV STUDIO User Manual
Expansion input/output unit or expansion special unit must be connected to right side of CPU unit. Up to
16 expansion units can be connected to a single CPU Unit. If 2 expansion units are used, maximal 48
uints can be connected. (except some special expansion units)
Terminal unit must be connected on right side of the most right expansion unit.
"1-8 Expansion Input Unit", "1-9 Expansion Output Unit", "1-10 Expansion unit"
" User manual of every expansion special unit "
This section describes how to assemble each unit and how to mount it on to DIN rail.
· Start unit, power unit or error output unit must be connected on the right side of CPU unit.
· Be sure to connect the End Unit on the right of the last connected unit.
Start unit
Expansion unit
Max. 16 (48 when using the expansion unit)
KV-DR1 KV-5000/3000 End unit
Error output unit CPU unit
Or
KV-U7
Power unit
KV-U7
OC
OUTPUT
24VDC
1.8A
N
INPUT
100-240V
AC
50/60Hz
0.98A
L
Note
During shipment of KV-5000/3000 CPU unit, the battery is removed to prevent capacity
drop. Please connect battery before first use.
"1-6 CPU Unit"
HARDWARE
Unit Assembly
This is explained as follows through an example of assembling KV-5000/3000 CPU unit and KV-B16XC
expansion input unit.
1
Unit Connection
KV
-B1
6X
C
KV-5000/3000 KV-B16XC
(left) (right)
Note
Assembly must be conducted when the power of each unit is OFF .
V V
24 24
2 Insert the locking bar of right unit into the slot for
locking bar at left unit, and connect.
· Hold two units and make them parallel, press down
once they are aligned to the connector, it's easy to
KV
do connection. -B1
6X
C
This section describes how to install/remove the connected unit to/from DIN rail.
1 ■ Installing Unit
Unit Connection
LO
CK
of each unit.
Top fastener
DIN rail
LO
each unit.
C
K
· The lower black claw can move under action
of spring. Press down until it "clicks".
· Where it is difficult to install, please first
remove all lock catches, and lock them after
installing onto DIN rail.
■ When removing
Note
Do not pullout the claw of
backup battery.
unlocked
HARDWARE
This chapter describes how to assemble connectors and how to wire units and internal circuits.
Precautions on wiring I/O units and expansion I/O units are described as follows. The contents of this 1
part must be read before wiring.
Unit Wiring
■ Precautions on I/O unit wiring
Please note the following points when wiring I/O units.
· Wire the input and output cables separately.
· I/O signal cables should be laid away from power cables. Otherwise, operation errors caused by high
voltage or current will occur. I/O signal cables should be laid at least 100mm away from power cables.
· DC 24V I/O cables should be laid separately with AC 100V and AC 200V power cables.
· Ensure that the cable conduits are grounded securely if they are used for wiring.
Input
RL
Output
■ Precautions on grounding
· Provide a D-type grounding individually for each of the devices. In addition, the grounding resistance
in this case should be lower than 100Ω.
· If a separate grounding is not possible, a common grounding point should be used. But in this case,
the cable length must be the same.
B
A B A
Contact
Contact
L L
a b
L L
Zener diode
Voltage-sensitive resistor
Supply voltage When 24 to48V, please install to position b
ǂǂǂǂ When 100to200V, please install to position a
· The rating of the load coil should be lower than the capacity of the contact.
· The inverting withstand voltage of the diode should be at least 10 times that of the circuit voltage, and
forward current should be greater than the load current.
· Diode, non-linear resistance and CR circuit shall be directly installed to relay coil terminal.
Fitted size
B: 6mm below
Dimensions of Y terminal L
B: outside dimension of Y ferminal L: 13mm below
d1: diameter of the inserted terminal
d2: 3.2mm above
of wire
d2: Y inside (screw engaging part)
width
L: Total length d1
HARDWARE
Connector Assembly and Wiring
When connecting equipment on each unit, please connect the wire from each equipment on the
connector (femal) on the unit side.
1
■ Precautions on wiring (OP-22184/51404/23139/42224)
Unit Wiring
The following points must be noted before wiring:
· The following matching cable must be used:
Wire gauge : AWG24 to 22 (twistd wire)
Cross-section area: 0.2 to 0.3mm2
Sheath O.D.: Ø1.5 to Ø1.1
· Top of wire shall be cut off straight to make it flat.
· After wiring, make sure that wire has been clamped completely by the fixed part, and inserted inside.
· No burr shall be left at cutting on the cuting part of wire (it's not necessary to strip the sheath).
· AWG28 to 26 fine line contact OP-30594 is supplied.
(please use with OP-22184, OP-51404, OP- 23139 and OP-42224, etc.)
Wire gauge : AWG28 to 26
Cross-section area: 0.08 to 0.14mm2
Sheath O.D.: Ø1.3 to Ø1.1
Note The unit is made of synthetic resin. It may be dissolved after touching with strong
solvents such as acetone, trichloroethylene and gasoline, etc. Besides, it may be
damaged if too large force is applied in crimp connection. Be sure to take care.
Note
Please use OP- 42224 connector (34-pin) for 64 points unit.
Do not use OP-23139.
Note
If no special crimping tool is available, it is necessary to solder.
Handle
Crimping plier
Body
1
Unit Wiring
Shielded cover
Vertical cover Vertical 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
Below
40-pin connector: type:OP-22184ǃOP-51404
▼ Symbol 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
Below
HARDWARE
■ Connector wiring
The wiring method of using special crimping tool is introduced below. Contact, shield sleeve and wire
shall be prepared.
Unit Wiring
Clamp part
Contact-break position
2 Insert contact into the contact stand of special crimping tool and contact directly (Fig. A).
Crimping groove
Cover
Wire
Guide
Contact
Power circuit program
Crimping
Handle pliers
Crimping groove
Cover
Body
Wire Guide
Needle for pulling off contact
Guide Cover
Connector receive part
Wire
6
HARDWARE
Shielded cover
1
Unit Wiring
Shielded cover
Close it here
8 Fix the wire with band as shown.
Belt
2 Press the contact, and pull out the wire. Pull the wiring
HARDWARE
Removing the Terminal Block
Note
Power must be disconnected before removal. 1
Unit Wiring
1 Open terminal block cover installed on the unit.
C
6X
-B1
KV
V
24
5V
C
6X
-B1
KV
V
24
5V
C
6X
-B1
KV
V
24
5V
This chapter describes important matters concerning unit installation environment and installation
position inside the panel.
Installing Environment
1
Don't install it in the following places:
Unit Installation
Location with direct Location with ambient Location with ambient humidity
sunshine temperature exceeding 0 to +50°C exceeding 10~95% RH
Location with dewing due to Location with corrosive gas Location with heavy dust,
sharp change in temperature and combustible gas salt, chip and oily smoke
Place that is directly under Place to which water, oil and Place with strong magnetic
vibration and shock drug is sprayed and electric field
Magnetic
Chemicals Electric field
Oil field
Installation Position
■ Installation direction
During installation inside panel, the front panel and input/output connector of KV-5000/3000 CPU unit
must be frontward.
CK
LO
24V
2
4
V
5V
5
V
KV LO
-B CK
16
XA
KV
-C
32
XA
24
V
5V
LOCK
HARDWARE
■ Distance from surroundings
During installation, 30mm above interval must be kept between equipment, inner wall and other
equipment.
30mm 1
Unit Installation
30mm
Unit Below
Allow 30mm of space so
that you can insert your
30mm finger and remove the lock
lever.
Left
Allow 30mm of space for heat dissipation.
Note
When temperature inside panel (temperature below the unit) exceeds ambient
temperature, adopt the methods such as forced air cooling, enlarging surrounding
gap or improving ventilation, etc. to reduce temperature.
This section describes the specification of KV-5000/3000 series models and the operation during power
off.
General Specification
1
Item Specification
System General Specification
HARDWARE
Performance Specifications
Item Specification
Operation control method Program storage method
I/O control method Reresh mode 1
Program language Expansion Ladder KV script mnemonic
HARDWARE
MEMO
Package Contents
The package contains the following items. Before using, make sure that the package contains
1 everything that it is supposed to contain.
Start End
CPU Unit
Battery
(attached with CPU unit)
Instruction Manual
KEYENCE
KV-5000/3000
Instruction Manual
We hope package will be completed. In case of any error, damage, please contact the nearest
marketing department listed on back cover.
1 Insert battery (battery case) into the lower part of the unit.
HARDWARE
Names and Functions of Parts
● KV-3000
Front side of CPU unit
(1) Input voltage toggle
switch (top of unit)
1
CPU Unit
(2) Access window
● KV-5000
Common
ľࡔ ࠞ to KV-3000
࠼ except (9) to (12).
ǂᤓܹষ Ļܹߎࠦࡀࠢ࠲
(10) USB access LED (9) Ethernet access
LED
1 (11) RJ-45 (Ethernet)
(12) USB connector
CPU Unit
connector
HARDWARE
Note
· Communication may interrupt due to noise influence and unstable USB communication
status. In this case, please pull out USB cable and then plug again.
· Under extremely unstable communication status (quite severe environment noise), to
protect PC, please wrap ferrite on cable.
1
CPU Unit
Note Do not connect USB cable to serial port, Ethernet port. (may lead to damage)
Specification
■ Input specification
HARDWARE
Input wave (high speed A-phase/B-phase input)
· line drivern input
Single phase, 100kHz, Duty cycle 50% Phase difference 50kHz, Duty cycle 50%
*Time between start (end) points of A-phase/B-phase shall be above 2.5µs.
ON
20.0μs above
1
10.0μs above
CPU Unit
A phase 50%
5.0μs above 5.0μs above
OFF
ON ON
OFF OFF
T1 T2 T3 T4
T1ǃT2ǃT3ǃT4 : 2.5μs above
* please note whether above waveform can be satisfied in case of larger impedance of connecting wire.
33.3μs above
16.6μs above ON
A phase 50%
8.3μs above 8.3μs above
OFF
ON ON
OFF OFF
3μs below 3μs below T1 T2 T3 T4
* please note whether above waveform can be satisfied in case of larger impedance of connecting wire.
1 ON
50%
CPU Unit
OFF
ON
50%
OFF
● Input derating
Continuous and simultaneous ON rate (%)
40ć 45ć
100
80
60
50%
26.4Vinput
40 40%
24Vinput
20
0
0 10 20 30 40 50
Ambient temperature (ć)
HARDWARE
■ Output specification
● R500 to R503 (High speed output, 4 points)
Item Specification
Output mode Transistor NPN output
Rated load DC 30 V, 0.1A 1
Peak load current 0.2A
CPU Unit
Max. OFF voltage DC 30 V
Leak current at OFF 100µA
Residual current at ON DC 0.6 V below
Common point mode 8 point/1 common point
OFF -> ON : or less 1µs
ON/OFF response time
ON -> OFF : or less 5µs
Output frequency 100kHz (5 to 100mA)
"I/O Wiring Diagram", Page 1-32
OFF90%
10%
ON
The load of above output waveform is resisive load, not considering of the influence of connecting wire.
Please note, in case of larger impedance of connecting wire, ON/ OFF pulse width will be less than above value
sometimes.
Item Specification
Voltage DC 5 V
Current Max. 100mA
"Reference Example of Positioning Control", Page 2-199
- KV-5000/3000 Series User’s Manual - 1-27
1-6 CPU Unit
HARDWARE
There are two modes for KV-5000/3000 CPU unit: RUN mode and
PROG mode.
1 Mode can be selected through the RUN-PROG Selector Switch shown
on the right.
CPU Unit
Note
In case of severe error, even if the switch is in RUN
position, it will be switched to PROG mode.
Tip When the switch is in RUN position, you can switch between PROG mode and RUN mode
via KV STUDIO.
■ KV-3000
Serial( RS-232C) communication can be realized via peripheral equipment such as modular connector,
PC or touch panel, etc.
"2-5 Serial Communication(only KV-3000)", Page 2-74
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
HARDWARE
■ KV-5000
Ethernet communication can be realized via external equipment such as RJ-45 connector and PC or
touch panel, etc. Besides, FL-net communication can be also realized.
"2-6 Ethernet/FL-net Communication(only KV-5000)", Page 2-82
CPU Unit
3 23
4 24
5 25
6 26
7 27
8 28
9 29
10 30
11 31
RJ-45˄Ethernet˅ I/O connector 12 32
connector 13 33
1 14 34
2 15 35
3 16 36
4 17 37
18 38
5 19 39
6 20 40
7
8
"I/O connector wiring diagram", Page 1-30
HARDWARE
Open collector connection (A phase)
Terminal No. Signal name
7,27 A(+24V)
8,28 A(+5V)
9,29 A(-COM)
CPU Unit
Terminal No. Signal name
7,27 A(+24V)
8,28 A(+5V)
9,29 A(-COM)
Note
· When using A (+24v) terminal, ensure open circuit of A (+5V) terminal.
Similarly, when using A (+5V) terminal, ensure open circuit of A (+24V) terminal.
So are B phase and Z phase.
· Please note, if connecting wire of input terminal is longer and naked, it will become noise-
initiating antennae, and error input may appear.
Photocoupler-isolation
R000̚R009
1 IN
Internal circuit
4.3kΩ
5Vǃ24V
CPU Unit
Switch circuit
COM0
3.3kΩ
A(+24V˅/B(+24V) Photocoupler-isolation
100Ω
Internal circuit
A(+5V˅/B(+5V)
1.3kΩ
A-COM/B-COM
110Ω
6.2kΩ
Z(+24V˅ Photocoupler-isolation
1.2kΩ
Z(+5V˅ Internal circuit
1kΩ
Z(-COM)
COM1
R504 to R507
L
COM1
HARDWARE
■ Peripheral equipment input wiring example
● Input R010 to R013
Example1 Peripheral equipment belongs to open collector output
ˇ5V
CPU Unit
External equipment
External equipment
ˇ5V ˇ
-COM ˉ
External
equipment
-COM Z phase
ˇ5V
External
equipment
-COM ˉ
Note · When connecting, do not mislead the polarity of load power on output side. If
polarity is reversed, equipment damage may result.
· Input waveform may distort in case of overlong cable. Please note during wiring.
Outline Dimensions
■ CPU Unit
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]
HARDWARE
This sections describes name, function and technical specification of each part of KV-U7 AC power unit.
AC Power Unit
(6) Lock lever
KV-U7
(1) Output lever
LED OC
OUTPUT
(3) DC24V output 24VDC
1.8A
(4) PE terminal
N
INPUT
terminal L
0.98A
ǂAC100V to 240V
LED No. 1 2 3 4 5 6
OC
When LED No.5 yellow lamp lits, the power capacity is not sufficient,
please use other power.
(2) Terminal block cover Cover
Operation power shall use 24 VDC output terminal. Including ( M4
(3) 24 VDC output
screw) main power, total 1.8A.
Protective earthing terminal connected onto protective earthing
(4) PE terminal
conductor of buildings, etc. (M4 screw)
(5) Power input terminal Connect to AC100-AC100 (50 / 60Hz) power. (M4 screw)
(6) Lock lever Locks the connection of the unit.
KV-5000/3000, KV-DR1,
(7) KV-5000/3000, KV-DR1, KV-EB1R connector.
EB1R connector
- KV-5000/3000 Series User’s Manual - 1-35
1-7 AC Power Unit
HARDWARE
Note · When overcurrent (LED No.6 red lamp lits) occurs, please temporarily disconnect
power, eliminate the fault reason.
· In case of overvoltage, output stops (output display lamp off).
1 Please disconnect power for more than 30 seconds, and then turn on the power again.
· When using KV-U7, do not supply power from the power terminal of KV-5000/
AC Power Unit
3000
Note
· KV-U7 must be connected to the left side of KV-5000/3000 (CPU unit), KV-DR1 (error
output unit), KV-EB1R (expansion unit). Besides, when using KV-U7 24V will not be
output from power terminal of KV-5000/3000.
· When using KV-U7, to prevent poor start due to inrush current of the unit, please control
the total current consumption of the unit below 70% of KV-U7 output capacity (LED No.4
green light lits, about 1.3A).
Specification
Item Specification
Input power voltage AC 100 to 240V±10%(50/60Hz)
Output voltage DC 24V±10%
Output capacity 1.8A (total for power of all units and operation power)
Power consumption < 135 VA
Dwell time < 10ms
Start-up time Max. 2s
HARDWARE
How to Wire
KV-U7 1
KV-U7
AC Power Unit
OC
OUTPUT
24VDC
1.8A
N
Other external INPUT
100-240V
AC
D-type ground
AC100to 240V
±10%
Note
· To reduce line noise, please connect 1:1 insulated transformer and noise filter.
· To reduce induction influence, please twist the cable.
· When connecting power unit, be sure to supply protective grounding.
Outline Dimensions
2.8
KV-U7
OC 27.3
OUTPUT
24VDC
1.8A
90 35.9
N
INPUT
100-240V
AC
50/60Hz
0.98A
L
3.5 80
35 5.2 93.2 Unit: [mm]
This chapter describes name, function and technical specification of every part of KV-B16XC/C32XC/
C64XC expansion input unit.
24V 24V
5V 5V
L H
(4) Input terminal block (1) Input voltage toggle switch (2) Input connector (5) Lock lever
HARDWARE
Specification
Note · If the number of inputs in ON status exceeds the specified range, the unit may fail.
· Relationship between continuous simultaneous ON rate and ambient temperation
of the KV-C32XC 2-wire terminal and KV-C64XC 2-wire terminal is shown as
follows.
KV-C32XCǂDerating factor KV-C64XCǂDerating factor
Continuous and simultaneous ON rate (%)
120 120
20ć 33ć 25ć 35ć 48?
100 100
80 80
70ˁ
60 60ˁ 60
50ˁ
26.4V Input 26.4V Input
40 40 40ˁ
24V Input 24V Input
20 20
0 0
0 10 20 30 40 50 0 10 20 30 40 50
Ambient temperature ć) Ambient temperature (ć)
1 Terminal No.
Expansion Input Unit
1 000̚015 4.3kΩ
Internal circuit
0
3 IN
2 5V. 24V
5
4 Switch circuit
7 COM0
6 Photocoupler-isolation
C0
8 COM1
9 Input supply
10
11
12
13
14
15
C1
DC24V/5V
* COM circuit-shorted internally
HARDWARE
KV-C32X Wiring diagram KV-C32XC internal circuit diagram
1 18
2 19
3 20
000̚015
100̚115 4.3kΩ 1
4 21
Internal circuit
IN
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
DC24V/5V DC24V/5V
Note Input continuous and simultaneous ON rate should not exceed the range of
technical specification. Otherwise, equipment damage may result.
1 3 20
4 21
3 20
4 21
Expansion Input Unit
5 22 5 22
6 23 6 23
7 24 7 24
8 25 8 25
9 26 9 26
10 27 10 27
11 28 11 28
12 29 12 29
13 30 13 30
14 31 14 31
15 32 15 32
16 33 16 33
17 34 17 34
DC24V DC24V
IN
470Ω
COM0̚3
Photocoupler-isolation
Input supply
HARDWARE
Note Input continuous and simultaneous ON rate shoud not exceed the range of technical
specification. Otherwise, equipment damage may result.
Outline Dimensions
KV-B16XC
2.8
1
Expansion Input Unit
27.3
90 35.9
3.5 80
9 29 3 96.5) Unit: [mm]
KV-C32XC
2.8
27.3
90 35.9
3.5 80
9 23 3 96.3
(125) Unit: [mm]
KV-C64XC
2.8
27.3
90 35.9
3.5 80
9 29 3 96.3
(125) Unit: [mm]
HARDWARE
This section describes name, function and specification of each part of KV-B16RC/B16TC(P)/
C32TC(P)/C64TC(P) expansion output unit.
(3) Output terminal block (1) Output connector (4) Lock lever
Specification
Note
KV-C32TC(P)/C64TC(P) is 1.6A/ 1 common point.
30 ć
Ambient temperature and continuous and 100
60
40
37.5ˁ
20
0
0 10 20 30 50
Ambient temperature (ć)
HARDWARE
Wiring and Internal Circuit Diagram
KV-B16RC/B16TC/B16TCP Wiring diagram
Terminal No.
1
0
3
5
2
4
1
7
Internal circuit
000 0 L
L 3 003
002 2 L
L 5 005
004 4 L COM0
L 7 007
006 6 L ˄COM1˅
C0 COM
008 8 L
L 9 009
010 10 L
L 11 011 Load power supply
012 12 L
L 13 013
014 14 L
L 15 015
COM C1
008 8 L Load
L 9 009
010 10 L
L 11 011
012 12 L
L 13 013
014 14 L Photocoupler-isolation COM0
L 15 015
COM1 C1
COM1
* COM circuit-shorted internally. Load power supply
000 0 L
L 3 003
002 2 L
L 5 005
004 4 L OUT
L 7 007 Load
006 6 L
C0 COM0 000 to015
008 8 L
L 9 009
010 10 L
L 11 011
012 12 L
L 13 013
014 14 L
L 15 015 Insulation power
COM1 C1
1 18
2 19
3 20
4 21
1 5 22
6 23
7 24
Expansion Output Unit
8 25
9 26
10 27
11 28
12 29
13 30
14 31
15 32
16 33
17 34
KV-C32TC internal circuit diagram
Pin No. Signal name Signal name Pin No.
Insulation
L 1 000 100 18 L power
L 2 001 101 19 L
L 3 002 102 20 L
000to 015
L 4 003 103 21 L 100 to 115
Internal circuit
L 5 004 104 22 L OUT
Load
L 6 005 105 23 L
L 7 006 106 24 L
L 8 007 107 25 L
Photocoupler-isolation COM0
L 9 008 108 26 L
L 10 009 109 27 L
COM1
L 11 010 110 28 L Load power supply
L 12 011 111 29 L
L 13 012 112 30 L
L 14 013 113 31 L
L 15 014 114 32 L
L 16 015 115 33 L
17 COM0 COM1 34
DC * COM circuit-shorted internally. DC
KV-C32TCP internal circuit diagram
Load power supply
Pin No. Signal name Signal name Pin No. COM0
L 1 000 100 18 L
Photocoupler-isolation
Internal circuit
COM1
L 2 001 101 19 L
L 3 002 102 20 L
L 4 003 103 21 L
OUT
Load
L 5 004 104 22 L
000to 015
L 6 005 105 23 L 100to 115
L 7 006 106 24 L
L 8 007 107 25 L
L 9 008 108 26 L Insulation
L 10 009 109 27 L power
L 11 010 110 28 L
L 12 011 111 29 L
L 13 012 112 30 L
L 14 013 113 31 L
L 15 014 114 32 L
L 16 015 115 33 L
17 COM0 COM1 34
DC * COM circuit-shorted internally. DC
HARDWARE
KV-C64TC Wiring diagram KV-C64TC internal circuit diagram
L side H side
Connector pin No. Connector pin No.
1 18 1 18
2 19
3 20
2 19
3 20 Insulated power 1
4 21 4 21
Internal circuit
7 24 7 24 OUT
Load
8 25 8 25
COM0
9 26 9 26
COM1
10 27 10 27
Photocoupler-isolation COM2
11 28 11 28
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
Please use OP-42224 connector (34-pins) for 64-point unit.
Do not use OP-23139.
L side H side
Connector pin No. Connector pin No.
1 18 1 18 Load power supply
COM0
1 2 19
3 20
2 19
3 20 Photocoupler-isolation COM1
Internal circuit
4 21 4 21 COM2
Expansion Output Unit
5 22 5 22 COM3
6 23 6 23 OUT
Load
7 24 7 24 000 to 015
8 25 8 25 100 to 115
200 to 215
9 26 9 26 300 to 315
10 27 10 27
11 28 11 28 Insulation power
12 29 12 29
13 30 13 30
14 31 14 31
15 32 15 32
16 33 16 33
17 34 17 34
Note
Please use OP-42224 connector (34-pin) for 64-point unit.
Do not use OP-23139.
HARDWARE
Outline Dimensions
90 35.9
3.5 80
9 29 3 96.5) Unit: [mm]
KV-C32TC/C32TCP
2.8
27.3
90 35.9
3.5 80
9 23 3 96.3
(125) Unit: [mm]
KV-C64TC/C64TCP
2.8
27.3
90 35.9
3.5 80
9 29 3 96.3
(125) Unit: [mm]
This section describes name, function and technical specification of each part of KV-EB1S/KV-EB1R expansion
unit.
(6) OP cable
24V 0V
(4) Power toggle switch (bottom)
Note
When toggling power or switch, be sure to disconnect power.
HARDWARE
Specification
Expansion Unit
About Connection / Setting
Vertical
KV-EB1S
KV-EB1R
■ About setting
When using expansion unit, please consider of heat influence, the gap between the upper unit and the
lower unit shall be 60mm above.
When temperature inside panel (temperature below the unit) exceeds environmental temperature used
by the unit, please adopt the methods such as forced air cooling, enlarging surrounding gap or
improving ventilation, etc. to reduce temperature.
1
■ Use the power on previous section
Expansion Unit
POWER When using the power from the previous section supplied via OP cable, set
INT EXT power switch to "INT".
KV-U7 or other power need not to be used during operation. However, total
current consumption should not exceed rating value of power.
● Using KV-U7
Connect KV-U7 to left side of KV-EB1R.
KV-U7 KV-EB1R
KV-U7
OC
OUTPUT
24VDC
1.8A
N
INPUT
100-240V
AC
50/60Hz
0.98A
L
Note When supplying power separately from KV-EB1R, please note the following points.
· Turn ON power: please supply power from KV-EB1R side first.
· Turn OFF power: Please disconnect power from KV-5000/3000 side first.
(when an error occurs and after the error is cleared in access window or KV
STUDIO , it will operate when switching from PROG- >RUN.)
Note
· When using KV-EB1 for 3 section addition, and using other powers for each equipment,
please wrap 2 turns of ferrite core on power cable (Beichuan Industry: RFC-10). When
using KV-U7, please adopt anti-noise measures such as FG grounding, etc.
HARDWARE
Outline Dimensions
KV-EB1S
2.8
Expansion Unit
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]
This chapter describes name, function and technical specification of every part of KV-DR1 error output unit.
(1) Output
terminal block
Specification
Item Specification
Output mode Relay
Rated load DC 24 V, 0.5A
ON resistance < 50m
OFF -> ON < 10ms
Response time
ON -> OFF 5ms or less
Internal current consumption Below DC5V 30mA (supplied by CPU unit)
Weight approx. 90g
Electrical: more than 100 thousand cycles (20 cycles/min)
Relay life
Mechanical type: more than 20 million cycles
Replace relay Impossible
HARDWARE
Wiring and Internal Circuit Diagram
Load
+
Load power supply
Outline Dimensions
Unit: [mm]
81.5
2.8
27.3
90
35.9
3.5
26 5.2 80 (4.4)
91
This section describes unit repair and maintenance procedure as well as how to replace battery and
relays.
■ Service
When KV-5000/3000 Series units are used for a long time, the connecting part of the connectors
becomes loose or the battery is worn down. Continued use of KV-5000/3000 Series units in this state
may cause KV-5000/3000 trouble.
So, periodical check shall be conducted for each unit body, wiring part, etc. of KV-5000/3000 or KV-
5000/3000 series.
The main service items are as follows:
· Whether the lock at each unit’s connection part is dropped or loose?
· Whether the connector's connection part is mismatched or loose?
· Whether the terminal screw of terminal block is loose?
· Battery low?
· Whether the wiring cable between unit and equipment is damaged?
■ Daily care
Dust will be adhered on CPU unit and every unit after long term use.
Clean off any dirt from the KV-LE20A using a clean, dry cloth.
Dust and dirt on fine components can be removed with a cotton bud after removing the connector.
Replace Battery
HARDWARE
Note · Battery life is 5 years at +25°C. The life will be shortened when used at higher
temperature.
· Battery shall be replaced within 2 years when used under hot environment(
ambient temperature: more than +40°C). 1
· Battery shall be replaced within 1 year during power off storage under hot
Maintenance
environment (ambient temperature: +50°C).
· Before changing battery, if power is not connected for more than 10 minutes, the
data will disappear. Battery replacement shall be completed within 10 minutes.
· Never throw KV-5000/3000 battery into fire, or disassemble the battery. Besides,
the battery is an rechargeable battery, do not change it. Otherwise, the battery
may explode.
· Using other batteries other than OP-51604 may lead to fire or explosion, so be
sure to use specified battery.
1 The power shall be turned on for more than 10 minutes and off before replacement.
2 Remove screws for backup battery, and remove the old battery.
· Replacement shall be completed within 10 minutes.
˄1˅
˄2˅
MEMO
1
Maintenance
This section describes the Access Window used to monitor data of the CPU unit or perform change
operations.
The KV-5000/3000 is provided with a compact LCD display with 2-color backlight.
2 The LCD is displayed green in the Run mode and red in the PROGRAM mode.
Access Window
■ Function list
The KV-5000/3000 unit is equipped with an Access Window for easily changing and monitoring data.
The Access Window also allows the user to check error codes that may occur.
The Access Window has the following functions.
Unit Monitor
In this mode, state of the unit can be monitored on the Access Window by pressing the direct access
switch connected to the CPU.
2
Access Window
"Unit Monitor", Page 2-6
Device mode
In this mode, internal devices can be displayed and their settings changed.
"Device Mode", Page 2-9
Error clear
Clear serious errors of the CPU unit.
"Error Clear", Page 2-15
Digital trimmer
In this mode, trimmers can be set digitally. The maximum resolution is 4294967296.
"Digital Trimmer", Page 2-17
I/O Test
Can confirm I/O status of expansion I/O unit.
"I/O Test", Page 2-18
CPU monitor
In this mode, the state of CPU positioning and frequency counter functions can be monitored. Also,
name of the program project contained on the unit can be checked.
"CPU Monitor", Page 2-22
Monitoring alarm
In this mode, the alarms can be monitored and alarm log can be checked.
"Alarm", Page 2-25
Commission
Can release forced set/reset register, input update disable/output disable from the Access Window.
"Commission", Page 2-32
■ Menu Structure
Switching among modes is implemented by menu.
Pressing the "M" key displays a menu. (When other units are selected, press the direct access key for
the unit, or press 'M' key twice.)
If not all of the menu items fit in the screen, press the "▼" key to display the rest of the menu. Press the
"▲" and "▼" keys t scroll the menu up and down.
1 . デバイスモード 1 . DeviceMode
2 . エラークリア 2 . Error Clr
3 . トリマ 3 . Trimmer
4 . I/ Oテスト 4 . I/ O TEST
In the examples shown, Japanese characters are shown on the left and English letters on the right.
Switching between Japanese/ English is implemented through “AW Setting".
"Access Window Setup", Page 2-34
The following table shows the CPU menu items.
Japanese English Japanese English
1.デバイスモード 1. DeviceMode 7.アラーム 7. Alarm
2.エラークリア 2. Error Clr 8.メモリカード 8. MemoryCard
3.トリマ 3. Trimmer 9.デバッグ 9. Debug
4.I/Oテスト 4. I/O TEST 10.AWセッテイ 10. AWSetting
5.トケイ 5. Date 11.SRAMクリア 11. SRAM Clr
6.CPUモニタ 6. CPU Mon 12.オールクリア 12. All Clr
TIP When severe error occurs and its log hasn't been cleared, ' ' will be displayed on the upper
right of Access Window.
1 . デバイスモート 1 . DeviceMod
2 . エラークリア 2 . Error Clr
3 . トリマ 3 . Trimmer
4 . I/ Oテスト 4 . I/ O TEST
1. Device mode
2. Error clear
3. Trimmer
4. I/O test
5. Data
6. CPU monitor Project name 2
Positioning
Access Window
Frequency counter
Ethernet (only KV-5000)
7. Alarm Monitor
Log
Log clear
8. Memory card Load
Save
File list
Free space
9. Commission Forced set/reset register release
Input refresh disable release
Output disable release
10. AW setting Contrast (3 to 9)
Language (Japanese/English)
11. SRAM clear
12. all clear
(1)Access window
2 (2)Setup key
Access Window
(1) Access Window Displays the current values and setting values of each device, and error
messages.
Information of each unit is displayed by pressing the direct access switch for
the respective unit.
(2) Setup key Used for swithing between modes and changing settings in each mode. Key
functions differ according to each mode. For detailes, see the operation
instructions for each mode.
Unit Monitor
Units can be monitored and set in the Access Window by pressing the direct access switch for 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 access
switch of the unit currently displayed on the Access Window.
TIP When unit error occurs, the direct access switch will turn red, and the error contents will be
displayed in the Access Window.
For details on monitor items and settings for each unit, refer to the User's Manual for the respective unit.
Access Window
Direct access switch
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.
RLY30000 RLY30100
76543210 76543210
L__■____■ L__■____■
H■___■___ H■___■___
RLY30000
76543210 Display leading No. of relay occupied by KV-C32XC in
L__■____■ access window (R30000)
H■___■___
● Menu display
1 Press the "M" key with the direct access switch for the unit flashing (selected).
The menu for the unit is displayed.
モニタ Monitor
ジテイスウ Input Filter
2
Access Window
● Changing Settings
Let's take altering the input time constant as an example.
1 Press the key to select "Time constant", then press " " key.
The currently set time constant can be checked.
KV-C3 2 X* KV-C3 2 X*
ジテイスウ Input Filter
1 0 ms 1 0 ms
2 Hold down the " " key for at least one second in this state.
The setting value flashes, and the unit enters the change mode. (Change operation is not possible in
the Run mode. Values can be changed only in PROG mode.)
KV-C3 2 X* KV-C3 2 X*
ジテイスウ Input Filter
1 0 ms 1 0 ms
3 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 cancels the
newly set value.)
KV-C3 2 X* KV-C3 2 X*
ジテイスウ Input Filter
1 ms 1 ms
Device Mode
Access Window
R Relay W Link register
MR Internal auxiliary relay CM Control memory
LR Latch relay TM Temporary data memory
B Link relay T Timer
CR Control relay C Counter
DM Data memory CTH High-speed counter
EM Extended data memory CTC High-speed counter comparator
FM File register (memory bank switching mode) TRM Digital trimmer
ZF File Register (consecutive number mode) Z Index register
Note
The contact states of timers, counters, and high-speed counter comparators cannot be monitored.
■ Operation method
● Switch to the Device mode
1 Press the "M" key.
A menu is displayed.(If other units are selected, press the "M" key twice.)
R0
Access Window
OFF
R1
OFF
R500
ON
R501
OFF
R
MR
LR
B
The numerical value displayed on the 4th line is the device No. change increment.
Change the device No. using the "▲" and "▼" keys.
As shown in this diagram, device No. will increase by an increment of 10 after pressing "▲" key.
The device No. change increment will become 1/10 by pressing the " " key.
Determine the device No. to display using the "▲", "▼" and " " keys.
TM53 Press the " " key. This displays the TM of the specified No.
0
TM54
100
Access Window
R500
ON
R501
OFF
2 Press the " " key with the list of device types displayed.
R
MR
LR
B
1 6 Bit-BASE2 1 6 Bit-BASE2
5 Press the " " key. This displays the monitor value in the selected display format.
The display format selected here is applied to all devices.
R500
ON
R501
OFF
T/C/CTH/CTC/TRM × × × × × ◎ ○ ○
Z × × × × × × ◎ ○
The display format that can be selected varies according to the device type. When a display format that cannot be
applied is selected, the default display format is selected.
R500
ON
R501
OFF
2 Press the " " key with the list of device types displayed.
R
MR
LR
B
3 Press the " " key in the display format selection screen.
Disp Format
Default
Device Name
Comment
5 Press the " " key. This selects comment display, and the display returns to the device mode.
The following screen shows that comment "Sensor A is registered to R0, and not registered to R1.
Sensor A
OFF
R1
OFF
Access Window
● Changing device values
· When display format is ON/OFF
1 Hold down the " " key for at least one second with the device to change displayed.
If two devices are currently displayed in one screen, the device whose value can be changed is the
device displayed on the previous row of the screen. (In this case, the device on the next row is no
longer displayed).
R1000
OFF
R1000
OFF
R1000
OFF
3 To set the desired device value and hold down the " " key for at least one second.
Flashing stops and device value will be stored. If the key is released within one second, then storing is
not executed, and the screen returns to the monitor display.
R1000
ON
1 Hold down the " " key for at least one second with the device to change displayed.
DM1000
100
DM1001
101
2
2
Access Window
DM1000
101
10
100
DM1000
201
100
7 Adjust the device value to a suitable value, and hold down the " " key for at least one second.
This stores the value, and the screen returns to the monitor display.
If press and hold "' " key for less than 1 second, write operation will not be executed, and the screen
will return to monitor display.
Access Window
(High-speed counter) Value of trimmer
300 400
S 6000 L 7000
Upper limit of trimmer
CTH value
(High-speed comparator) Not displayed when
C0 upper limit is not set.
----- It will be shown as left when
S ----- devices are not used (not registered) "Digital Trimmer",
in Ladder Page 2-17
Error Clear
TIP When an error occurs on CPU or expansion unit, detailed information will be displayed automatically. You
can press a certain key in Access Window to clear a slight error and return to the previous display. In the
case of a severe error, the display can disappear, but the error cannot be cleared. If you don't operate the
Access Window for 30s, or switch RUN PRG toggle RUN, the error will be displayed again. Moreover,
" " will be generally displayed on the upper right of Access Window in the screen.
1 . デバイスモート 1 . DeviceMod
2 . エラークリア 2 . Error Clr
3 . トリマ 3 . Trimmer
4 . I/ Oテスト 4 . I/ O TEST
2 ▲
no error occurs, the operation is also invalid.
disabled
Access Window
▼ disabled
disabled
■ How to operate
エラーナシ No Error
3 After changing the value, hold down the " " key again for at least one second.
Serious error displayed can be cleared.
If several severe errors occur, the other ones will be displayed. Press " " key for more 1s to clear
them. When all the errors are cleared, "No Error" will be displayed.
TIP When KV-DR1 is connected, KV-DR1's output is ON if all errors are cleared.
Digital Trimmer
In numeric tuner mode, the trimmer's value can be changed simply through device mode.
Use TMIN instruction to read the value of trimmer in ladder diagram.
Please refer to KV-5000/3000/1000 Series PLC Instruction Reference Manual, “TMINInstruction"
Access Window
Setup key Function
M Menu display
Changes the No. of the trimmer displayed.
Each press increments the device No.(TRM0 to 9)
▲ Increments the trimmer value.
▼ Decrements the trimmer value.
Changes the digit of the incremented value. Each press of the key increases a digit.
When the tenth digit is exceeded, it will return to the ones digit.
Changing values in this mode differs from changing values in the device mode. In the digital trimmer
mode, changes to values are reflected directly without pressing the " " key.
■ How to operate
TRM0 Direct
1
L 10000
1
The value of the 3rd row indicates the trimmer upper limit value. When the
upper limit value setting is not used, it will not be displayed.
3 The trimmer No. displayed can be changed by the " " key.
Select the trimmer No. to change.
TRM0 Direct
1
L 0
10
TRM0 Direct
11
L 0
10
5 Pressing the "▲" key increases the trimmer value by the increment value, and pressing the "▼"
key decreases the trimmer value by the decrement value.
The digital trimmer mode differs from the device mode in that changes to values are reflected directly
without pressing the " " key.
TIP · The current trimmer value can be read by the TMIN instruction.
· To enable setting of upper limit, it's necessary to set on KV STUDIO. ("CPU system setting"
2 -> "Setting of digital trimmer's upper limit".)
· Upper limit can be set in KV STUDIO or Access Window's device mode (CM1700 to CM1715).
Access Window
· When the setting of upper limit is enabled, the upper limit will change to 4294967295
automatically if the setting value of upper limit is set to "0".
· The upper limit is stored in the following CM.
Trimmer No. Device
TRM0 upper limit CM01700, CM01701
TRM1 upper limit CM01702, CM01703
TRM2 upper limit CM01704, CM1705
TRM3 upper limit CM1706, CM1707
TRM4 upper limit CM1708, CM1709
TRM5 upper limit CM1710, CM1711
TRM6 upper limit CM1712, CM1713
TRM7 upper limit CM1714, CM1715
I/O Test
Note
Can be executed only in PROM mode.
TIP This can also be verified when the settings of unit configuration set through KV STUDIO
haven't been transmitted to CPU.
■ How to operate
● Switch to I/O test
2 Select "4. I/O test", and press the " " key.
The following screen appears.
2
Access Window
I/ Oテスト I/ O Test
テスト 3 2 DI * TEST 3 2 DI *
76543210 76543210
+0 ________ +0 ________
+8 ________ +8 ________
Shift the verified relay position according to every 16 digits by pressing " ▲" "▼".
*: High bit/low bit will be displayed by H/L only for 64-point unit
テスト 3 2 DO * TEST 3 2 DO *
76543210 76543210
+0 ________ +0 ________
2 +8 ________ +8 ________
Access Window
Shift the verified relay position according to every 8 digits by pressing " ▲" "▼".
Press " " key to reverse the output state of cursor position (ON/OFF).
Press " " key to change the cursor position.
Note
Please operate after verifying the state of connected control equipment.
Date
■ How to operate
● Switching clock
2007/06/14
12:34:56
Thu
2
● Date/time setting
Access Window
1 Press " " key for more than 1s in date/time.
The "Year" segment flashes.
2007/06/14
12:34:56
Thu
2007/06/14
12:34:56
Thu
2007/06/14
12:34:56
Thu
4 Repeat steps 2 and 3. After setting, hold down the " " key for at least one second..
"Exec" is displayed at the most right bottom row of the screen.
(In this case, the date/time has not been set.)
Release the " " key. This appplies setting of date/time, and returns the screen to the date/time display.
2007/06/14
12:34:56
Thu
Exec
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, minute, second, and day of the week accurately.
The day of the week is not checked corresponding to the year, month, day, hour, minute, and
second.
■ 0 second adjustment
0 second adjustment is a function for setting the seconds value to "0".
Current Seconds Value Operation
0 to 29 Only sets seconds value to "0".
30 to 59 Add 1 minute, and sets seconds value to "0".
15:59:44 15:59:44
Thu Thu
アジャスト Adjust
"Adjust" is displayed on the moset bottom row, indicating 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.)
2 Hold down the " " key for at least one second.
"Exec" is displayed at the right of the most bottom row of the display. (In this case, time adjustment has
not been executed.)
Release the " " key. This executes the time adjustment.
2007/06/14 2007/06/14
16:00:00 16:00:00
Thu Thu
アジャスト ジッコウ Adjust Exec
If you release the " " key before "Exec" is displayed, time adjustment is not executed, and the screen
returns to date/time display.
CPU Monitor
CPU's internal functions can be monitored. Meanwhile, the names of projects stored in CPU unit can be displayed.
■ How to operae
● Switch to CPU monitor
Access Window
ProjectName
Pos Control
Freq Count
Ethernet
● Project Name
1 Select "ProjectA" in the CPU monitor menu, and then press " " key.
Project name will be displayed.
Project Name
ProjectA
TIP When ladder program is created, the project names set by KV STUDIO will be stored into
CM1740 to CM1756 after data transmission.
● Positioning
1 Select "Pos control" in the CPU monitor menu, and then press " " key.
Status of positioning function is displayed.
There are five monitor functions in positioning monitor, which can be switched by "▲" and "▼".
The monitoring contents are as follows:
X CR3000
76543210
L__■_■_■■ CR30
H_■_■■___ CR30
8
CR30
15
· Code M, current value, current speed of Y axis.
'*' is displayed in the pulse output process.
Y Y
Mコード 0 M-Code 0
P +0 P +0 P current value
V 0 V 0 V current speed
· Relays related to Y axis
Y CR3100
76543210
L__■_■_■■ CR31
H_■_■■___ CR31
8
CR31
5
· Current value, current speed of X axis; Current value, current speed of Y axis.
P +123456789 The 2 top lines are for X axis X axis current value
V 2345 X axis current speed
P -123456789 The 2 bottom lines are for Y axis Y axis current value
V 1234 Y axis current speed
● Frequency counter
1 Select "Freq. Counter" in the CPU monitor menu, and then press " " key.
The frequency counter monitor screen is displayed.
The display unit is either "Hz" or "rpm", depending on the frequency counter setting.
Example of "Hz" display
シュウハスウカウンタ
CH0
Freq Counter
CH0 2
+1 2 3 4 5 +1 2 3 4 5
Access Window
Hz Hz
The channel No. of displayed frequency counter can be changed through "▲" and "▼".
Alarm
After messages are registered in the alarm relays (CR3300 to CR3415) as device comment, the
messages will be displayed in Access Window automatically when alarm relay is ON. In addition, alarm
logs generated can also be confirmed or deleted.
■ How to use
Devices used during alarming are described below.
Control relay R/W Description
CR3300 to CR3415 R/W Alarm relay (32). Device comment is registered in advance.
Even if one alarm relay exists, CR3500 will also be ON.
CR3500 R When all the alarms in ON state are closed, CR3500 will
be OFF automatically.
CR3501 R/W ON->OFF log is stored.
CR3502 R/W The alarm record in P3-9 will be cleared when OFF->ON
Note
Be sure to operate the alarm relays by the SET and RES instructions. Currently operating
alarm relays can be reset and batch-cleared also by the ARES instruction.
Note
The maximum message length displayed in Access Window are half-width characters.
When there are characters other than HEXl 20 to 7e and HEXl al to df in ASCII code, the
device comment is hidden while alarm relay No. is displayed. When device comment isn't
■ How to operate
● Switch to alarm
・ モニタ ・ Monitor
・ リレキ ・ Record
・ リレキクリア ・ Clr Record
● Monitor
1 Select "Monitor" in the Alarm menu, and then press " " key.
The alarm monitor is displayed.
When several alarm relays are in ON state, other alarms can be displayed by pressing "▲" and "▼".
(1)
アラーム モニタ Alarm Mon
2
01/03 01/03
Access Window
Work Error Work Error
(2) アラーム0 Alarm 0
(1) "01/03"
Alarm No. currently displayed/total number of alarms occurred.
When several alarms occur, the alarm with smaller alarm relay No. will be displayed first.
(2) "Work Error"
Comment of the destination device of currently displayed alarms.
● Log display
1 Select "Record" in the Alarm menu, and then press " " key.
Alarm logs will be displayed.
Press "▲"key or "▼" key to display previous/next log.
(1) "01/04"
Alarm log No./ otal number of logs currently displayed.
The latest log No. is "01".
(2) "Press Alarm"
Comment of the destination device of currently displayed logs.
(3) "▼"
It indicates the log when alarm relay switches from ON to OFF. The log when alarm relay switches
from OFF to ON is indicated by "▲".
(4) "2007/06/14 15:49:39"
It indicates the log date and time.
● Log clear
1 Select "ClrRecord" in the Alarm menu, and then press " " key.
The confirmation message of cleared logs will be displayed.
Clr Record
Clr OK?
2
Access Window
2 Hold down the " " key for at least one second.
The following contents are displayed when the logs are cleared.
Clr Record
Clr Done
Memory Card
In the Access Window, you can save data and access files from the memory cards.
For details, please refer to"2-2 Memory Card", Page 2-42 .
Note
Loading can only be executed in PROM mode.
■ How to operate
● Switch to memory card
・ ロード ・ Load
・ セーブ ・ Save
・ ファイルイチラン ・ File List
・ アキヨウリョウ ・ Free Space
2
● Load
Access Window
1 Select "Load" in the memory card menu, and then press " " key.
The folders (projects) in the folder path of memory card are displayed. (files hidden).
The names of file folders are shown as "KvSAVE00 <D>", in which the last three characters are
displayed as "<D>".
KVSAVE00 <D>
KVSAVE01 <D>
AUTO <D>
TIP The updated date and time of file folders can be confirmed by pressing " " key.
2 Select the folder to be loaded by pressing "▲" and "▼" , then press " " key.
Confirmation message of loading execution is displayed.
ロード Load
ロード OK? Load OK?
KVSAVE0 0 <D> KVSAVE0 0 <D>
3 Loading is executed if pressing " " key is displayed for more than 1s.
During loading, the following contents will be displayed.
If you want to cancel loading, press "M" or " " key for less than 1s.
ロード Load
Note
If memory card is write-protected, the following diagram is displayed.
Forced loading is executed by pressing " " key for 1s.
Loading is canceled if "M" or " " key is pressed for less than 1s.
ロード Load
ライトプロテクト Protected
ロード OK? Load OK?
KVSAVE0 1 <D> KVSAVE0 1 <D>
ロード Load
1 Select "Save" in the memory card menu, and then press " " key.
Confirmation information is displayed, prompting whether CPU data is to be saved.
セーブ Save
セーブ OK? Save OK?
2 Saving is executed if " " key is pressed for more than 1s.
Folders with name KVSAVE?? (?? is 2 half-width number, and a folder with the smallest 2-digit number
will be created and saved.
While saving is implemented, the file names currently being saved and saving progress will be
displayed.
セーブ Save
DM . ZDV DM . ZDV
80% 80%
3 After saving is finished, the name of the saved project folder will be displayed.
セーブ Save
セーブカンリョウ Save Done
ディレクトリメイ Dir Name. .
KVSAVE0 0 KVSAVE0 0
● File list
1 Select "File list " in memory card menu, and press " " key.
The folders (projects) in the folder path of memory card are displayed.
The names of file folders are shown as "KvSAVE00 <D>", in which the last three characters are
displayed as "<D>".
KVSAVE00 <D>
KVSAVE01 <D>
README1 .TXT
README2 .TXT
2 Select a (project) folder through "▲" and "▼" key, and press " " key.
The files in the directory (project folder) will be displayed.
. <D>
Return to root directory .. <D>
KVSAVE01 YLB
KVSAVE01 YCD
Note
2
The files in the (project) folder cannot be referenced.
Access Window
TIP Press " "key to confirm the updated date and time of file folder or files.
● File delete
1 Select the files or (project) folder to be deleted from the "File list".
2 Hold down the " " key for at least one second with the " " key held down.
The confirmation prompt of "Delete?" is displayed.
If you want to cancel delete operation, press "M" or " " key for less than 1s.
<File>
㩅㩂㩆㩨㨸 &GNGVG
㩅㩂㩆㩨㨸1-! &GNGVG1-!
-85#8'<%& -85#8'<%&
7,3 <Directory>
㩅㩂㩆㩨㨸1-! &GNGVG1-!
㩍㩨㨲㩤㩂㩎㩢㨼㩀 &GNGVG&KT
㩇㩗㩨㩍㩂㩢㨻㩅㩤㩙㩇 %QPVGPU
-85#8'& -85#8'&
3 Press " " key for more than 1s again to perform deleting.
The message for deleting is displayed.
Delete
Wait...
4 After deleting is finished, the screen will return to file list display.
● Free space
1 Select "Free Space" in the memory card menu, then press the " " key.
The following screen will be displayed after free space is verified.
5 8 6 4 Kbyte 5 8 6 4 Kbyte
2
Access Window
Commission
Forced set/reset register, input refresh disable, output disable can be released from Access Window.
TIP When registering or disabling is in progress due to write operation to KV STUDIO or CR/CM,
registering or disabling in progress will be displayed automatically in the Access Window. You
can return to original screen by pressing a key, but registering or disabling setting cannot be
released.
■ How to operate
● Switch to commission
・ キョウセイセット ・ ForceSet
・ ニュウリョク ・ Input
・ シュツリョク ・ Output
1 Select "Force Set Regi" in the commission menu, and then press " " key.
The verification message for collective releasing is displayed.
キョウセイセットリセット ForceSetRegi
イッセイカイジョ Cancel
OK? OK?
2
Access Window
Note
No operation can be performed if a device is not registered as forced set/reset.
2 Hold down the " " key for at least one second.
After collective releasing it, a completion message will be displayed.
キョウセイセットリセット ForceSetRegi
イッセイカイジョ Cancel
カンリョウ Done
1 Select "Input Refresh" in the commission menu, and then press " " key.
The confirmation information of input refresh disable is displayed.
ニュウリョクリフレッシュ InputRefresh
キンシ カイジョ Inhibit
OK? Cancel OK?
Note
No operation can be performed if input refresh disable isn't set.
2 Hold down the " " key for at least one second.
After disable setting is released, a completion message will be displayed.
ニュウリョクリフレッシュ InputRefresh
キンシ カイジョ Inhibit
カンリョウ Cancel Done
1 Select "output" in the commission menu, and then press " " key.
The confirmation information of output refresh disable is displayed.
Note
No operation can be performed if output refresh disable isn't set.
2 Hold down the " " key for at least one second.
After disable setting is released, a completion message will be displayed.
■ Contrast
To adjust the contrast of LCD screen.
2 Press the "▼" and "▲" key, select "7. AW Setting", then press the " " key.
The Access Window setup menu is displayed.
·Contrast
·Language
3 Press the "▲" key and the "▼" key, select "Contrast", then press the " " key.
コントラスト Contrast
6 6
4 Scroll the contrast value by pressing "▲" and "▼", and adjust to a proper contrast.
Contrast can be set between 3 to 9. 2
Access Window
コントラスト Contrast
5 5
■ Display language
The display language can be selected between Japanese and English. Katakana of Japanese will be
displayed.
2 Press the "▲" key and the "▼" key, select "7. AW Setting", then press the " " key.
The Access Window setup menu is displayed.
・ コントラスト ・ Contrast
・ ゲンゴ ・ Language
3 Press the "▲" key and the "▼" key to select "Language", then press " " key for more than 1s.
ゲンゴ Language
ニホンゴ English
ゲンゴ Language
English ニホンゴ
5 Hold down the " " key for at least one second.
Language setup is finished.
The current memory Nos. of device value, alarm log/error log and file register can be cleared by SRAM
clear. It also restores details set by Access Window setup to their defaults.
Executing this function initializes R, MR, LR, B,CR, T/C (current values), CTH, CM, DM, EM, FM, ZF,W
and Z. Ladder programs, unit setup information, comments, T/C (setting values), CTC, and log setup
2 information will not disappear.
Access Window
Note
SRAM clear can be executed only in the PROG mode.
2 Select "11. SRAM clear" through "▲" and "▼" keys, and press " "key.
The SRAM clear confirmation message is displayed.
3 Hold down the " " key for at least one second with the " " key held down.
The confirmation screen is displayed again.
4 Hold down the " " key for at least one second when confirmation screen is displayed again to
perform SRAM clear.
The following screen will be displayed while SRAM clear is being executed. When SRAM clear is
finished, a restart will be performed automatically.
オマチクダサイ. . . Wait. . .
Note
If " "key isn't pressed for more than 1s, the message "Please wait---" will not be
displayed, and SRAM clear will be canceled.
The all clear mode returns all settings on the CPU unit to their defaults. (This means that the ladder
program and device values are cleared.)
Note
All clear can be executed only in the PROG mode.
2
1
Access Window
Press the "M" key.
A menu is displayed. (If other units are selected, press the "M" key twice.}
2 Select "12. All clear " through "▲" and "▼" key, and press " "key.
The all clear confirmation message is displayed.
3 Hold down the " " key for at least one second with the " " key held down.
The confirmation screen is displayed again.
Pressing the "M" or the " " key cancels the all clear instruction, and the screen returns to the menu
display.
4 Hold down the " " key for at least one second when confirmation message screen is displayed
again to perform all clear.
The following screen will be displayed while all clear is being executed. Whenall clear is finished, a
restart will be performed automatically.
Note
If " " key isn't pressed for more than 1s, the message "Please wait---" will not be
displayed, and all clear will be canceled.
User Message
User message function is used for displaying any numerical value or ASCII string within 24 half-width
characters in the Access Window through the ladder program.
User message come in two types, user message 1 and user message 2. User message 1 is used to
display values stored in CM1720. When CR2901 is ON, the ASCII 24 half-width characters stored with
2 CM1721 as the leading address, or the characters before end code NULL (00 H) will be displayed.
Access Window
(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 are ON simultaneously, user message 1 numberical value is displayed
first.
For details on instructions, refer to the "KV-5000/3000/1000 Instruction Reference Manual", "5-14 Access
Window Instructions."
(2) Create a ladder program using the control relay (CR) and control memory (CM).
To display user message 1, store the displayed numerical value to CM01720 and turn CR2900 ON.
To display user message 2, store the displayed character string (ASCII code) to CM01721 to CM01732
and turn CR2901 ON.
When CR2900 and CR2901 are ON simultaneously, CR2900 is performed first.
(Value stored in CM01720 is displayed.)
■ Display example
● User Message 1
When CR2900 is ON, the numerical value currently stored in CM01720 will be displayed on screen.
In the screen example, the value of CM01720 is set to "12345", and the entire screen flashes.
UsrMessage1:
12345
The screen will return to the original display in the following cases.
· When any of the Access Window keys is pressed. In this case, CR2900 will be OFF.
· When CR2900 is OFF.
● User Message 2
When CR2901 is ON, 24 half-width ASCII characters stored with CM1721 as the leading address or the
characters before end code NULL (00H) are displayed.
UsrMessage2:
Emergency
Stop!!
2
Access Window
CM No. CM Value (HEX) ASCII Representation
CM1721 $456d Em
CM1722 $6572 er
CM1723 $6765 ge
CM1724 $6e63 nc
CM1725 $7920 y (Space)
CM1726 $2020 (Space) (Space)
CM1727 $2020 (Space) (Space)
CM1728 $2020 (Space) (Space)
CM1729 $5374 St
CM1730 $6f70 op
CM1731 $2021 (Space) !
CM1732 $2100 !(00H)
The operations on Access Window can be separately disabled according to different functions.
The functions and projects of operation disable setting are as follows.
Function Item
Unit Monitor Change settings
Device mode Change device value
Trimmer mode Change device value
Alarm Clear alarm log
Memory card Load, save, delete
Access Window setup Change settings
All Clear mode Clear
SRAM clear mode Clear
Operation disable setting is used to assign 1 bit to CM1738 for each function, which will be disabled when the
bit is ON.
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 disable operation.
AW Message:
Key Input
Disabled
Example
●Write disable setting of digital trimmer ●Write disable setting in device mode
MOV MOV
$0004 CM1738 $0002 CM1738
●Memory card read/write disable ●Setting change disable set by Access Window
MOV MOV
$0010 CM1738 $0020 CM1738
Note
In device mdoe, when device write disable is set, it can not be released in the Access
Window.
Key lock function is used to disable operations in Access Window. This is used when you intend to
make the settings unchanged, or fix the display screen.
■ How to operate
Hold down the "M" key for at least three seconds with the " " key held down.
2
Access Window
● Incase of key unlock
Key lock state is entered when the following screen is displayed.
AW Message
Key Lock
Under the state of key lock, this display remains unchanged irrespective of any operation, unless you
release key lock.
AW Message
Key UnLock
Note
· During the process of key lock, operation is disabled even if direct access switch is
pressed.
· Key lock cannot be achieved during Unit Monitoring and I/O test.
On the KV-5000/3000 Series PLC, you can exchange ladder programs, comments, and various unit
setup information using the memory card. You can also transfer ladder programs or save and load
device values by operation on the KV-5000/3000's access window using only the memory card without
the need for KV STUDIO.
2
· Transferring data from memory card to the CPU
Memory Card
Data can be read by selecting the sub-directory (project folder) on the memory card in the access
window.
Data includes the following: program data such as ladder programs, comments, unit setup
information and logging setup information, and device file data such as DM, EM, W, FM, ZF,CM, R,
MR, LR, and CR.
"Writing/Reading Project Data", Page 2-47
· Auto-read function
Files stored to the directory (project folder) named "AutoLoad" are automatically transferred to the
CPU when the power is turned ON. After storing into the folder named "Run Load", automatic read
will be executed automatically during PROG->RUN switching.
"Auto Load Function", Page 2-50
2
6DYHWRPHPRU\FDUG Read ladder
Memory Card
program from memory card
Dedicated terminal is unnecessary
· Logging of device values is easy. Data is tabulated from logs to create data sheets with greater ease.
. Total
Qty
■ Used in PC
The connection methods may differ depending upon PCs.
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 Windows2000/XP Professional can be used.
INSERT
Memory card
KV-M256/128
PC with USB
Card reader
1 Slide the lock on the memory card slot cover upwards to open
the memory card slot cover.
Memory Card
2 Insert the memory card into the memory card slot.
The labeling side at right hand is inserted properly with a "click"
sound.
3 After inserting the memory card, close the memory card slot
cover until it clicks into place.
(inside)
1 Make sure that the memory card access LED is out, and slide the
lock on the memory card slot cover upwards to open the memory
card slot cover.
3 After removing the memory card, close the memory card slot cover until it clicks into place.
Note Do not use unnecessary force to open the memory card slot cover in a locked state.
Note · Data saved on a memory card may be lost in the following instances. Note
that Keyence can assume no liability whatsoever if recorded data is lost.
· When the memory card has been subjected to static electricity and
electrical noise
· When the memory card has been removed or other equipments 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, CD/DVD or other
storage media.
· Never remove the memory card or turn power OFF while the memory card
access LED on the PLC is lit (indicating that memory card is being read/
written). Doing so might corrupt the data on the memory card.
Note
· In environments subject to severe noise, it may take longer time to access the
memory card.
(In the worst case, this might damage the card or FAT (File AllocationTable).
In this case, attach a ferrite core onto the power cable before use.
·Also, install the unit away from equipment that emits strong electromagnetic fields.
· Accessing of the memory card can not be started with the memory card slot cover
open. Be sure to use memory card 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 is continued until it is completed. However,
subsequent accessing of memory card will not be performed.
· The SD memory card (KV-M256/128) 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
demonstrated. If the memory card needs to be restored to its initial shipped state,
contact your nearest agent.
■ Structure of folder
The data managed by (project) folder on the memory card is described below.
Software File type File name Way of storing
CPU System setting
Ladder program 2
Global label □.YCD*1
Memory Card
Local label
Local Device Comment
Global device comment □.YGC*1 Access window
Setting information of initial KV STUDIO
value of device. □.YDR *1
(File>Memory card)
Communication setting
information □.YAS*1
DM DM.ZDV
EM EM.ZDV
KV-5000/3000
FM FM.ZDV*2 *5
CM CM.ZDV
R R.ZDV Access window
Device KV STUDIO
MR MR.ZDV
File (Monitor/simulator
LR LR.ZDV >Batch change window)
CR CR.ZDV
B B.ZDV
W W.ZDV
ZF ZF.YDV*5
CPU Positioning function KV STUDIO
CPUMB.ZSH*3
Parameter file (File>Memory card)
Access window
Email setting information. MAIL*.YSH(*=0 to 48)*4 KV STUDIO
(Email setup tool)
PROTOCOL STUDIO
KV-L20R PB*.ZSH(*=1A to 48B)*3 PROTOCOL STUDIO
File
PROTOCOL STUDIO 2
File (PS1 compatibe PB*.ZSH(*=1A to 48B)*3 PROTOCOL STUDIO 2
KV-L20V (standard/Large) mode)
PROTOCOL STUDIO 2 Access window
PB*.YSH(*=1A to 48B)
File (Protocol Studio2 mode) PROTOCOL STUDIO 2
Positioning unit
MB*.ZSH(*=1 to 48)
Parameter file
Positioning unit MOTION BUILDER
Positioning unit
MC*.ZSH(*=1 to 48)
Comment file
MV-L40
MLS*.ZSH(*=1 to 18)
Parameter file
MV-L40 MV LINK STUDIO
MV-L40
MLC*.ZSH(*=1 to 18)
Comment file
KV-DN20 KV STUDIO
KV-DN20 DN*.ZSH(*=1 to 48)
Parameter file (KV-DN20 Setup Tool)
KV-CL20 KV STUDIO
KV-CL20 CL*.ZSH(*=1 to 48)
Parameter file (KV-CL20 Setup Tool)
- KV-5000/3000 Series User’s Manual - 2-47
CPU INTERNAL FUNCTIONS
*1 "□" file name is the same with the name of project folder.
*2 FM saves the FM of current bank, and read to FM of current bank.
*3 You cannot save it from Access Window to memory card. The setting itself is to save in DM or CM, so normal
operation is possible even if the project data not containing such files are read.
*4 When performing email setup through KV-5000's CPU built-in Ethernet function, the setting will be saved by
"MAIL0.YSH".
*5 If reading FM and ZF, it's required to firstly read the data of ZF and then data of FM.
■ Access window
2 ● How to save
Memory Card
If project data are saved from the Access Window of KV-5000/3000, project folders "KVSAVE **"
(**means serial No.: 00 to 99) will be generated automatically. The serial No. is the smallest two-digit
number not yet used for folder name in the memory card.
"Memory Card", Page 2-28
● How to read
Select and read the project folders from Access Window of KV-5000/3000.
"Memory Card", Page 2-28
■ Use KV STUDIO
You can read/write project data of the memory card in the menu of KV STUDIO.
2
Select the folder for saving data
Display file types
saved in the selected
folder.
2
Memory Card
Note If you select to save in the original folder, the data will be overwritten, the previous
data will be lost.
Tip · If you intend to create new folder for saving, just click
"New" button and enter the folder name to generate an
project folder.The project folder will be created.
· The data in the memory card is managed separately
through project folder.
· To ensure the project data in the memory card is automatically read at power-on, it's
required to save it by the folder name of "AutoLoad".
· To ensure the project data in the memory card is automatically read at PROG->RUN, it's
required to save it by the folder name of "RunLoad".
● Device file
3 Select "File (F)" -> "Read memory card (R)" or "Save to memory card (Z)" from the menu of the
uniform change window.
Read: specify the read drive and folder name.
Save: save the registered device and current value.
Tip If the device's default setting of KV STUDIO is employed, the device value can also be
2 managed through the memory card.
Memory Card
At power-on or PROG -> RUN, the project data saved in the memory card will be automatically.
1 Using KV STUDIO, write project data into the memory card by the folder name of "AutoLoad".
"Ladder program etc. (except device file)", Page 2-48
2 Insert the memory card into memory card slot of KV-5000/3000, close the slot cover until a
"click" is heard.
Note
If CPU system of KV STUDIO is set to read/write protection, an error will occur and
operation can not be performed.
1 Using KV STUDIO, write project data into the memory card by the folder name of "RunLoad".
"Ladder program etc. (except device file)", Page 2-48
2 Insert the memory card into memory card slot of KV-5000/3000, close the slot cover until a
"click" is heard.
Note
If CPU system of KV STUDIO is set to read/write protection, an error will occur and
operation can not be performed.
The memory card can be accessed from the ladder program when memory card instructions are used.
Memory Card
Delete specified folder and file after
executing MRKDIR/MDEL instruction.
MMKDIR
MRKDIR/MDEL
Read
MWRIT
Write
MREAD
Please see KV-5000/3000/1000 series Instruction Reference Manual "5-9 Memory Card"
Overview
● Logging function
The logging function of KV-5000/3000 means that the state or value of specified device is loaded by
any timing (triggering). The loaded data is automatically saved into the memory card in the format of
Memory card PC
(Microsoft Excel etc.)
KV-5000/3000
● Tracing Function
As in the case of logging function, the state or value of device will be recorded in buffer memory.
According to the timing when saving the files, the preceding and subsequent files of specified data size
are extracted and recorded into memory card or internal memory.
For example, after trigger setting is made for saving files in the event of abnormality of equipment, the
data prior to or after occurrence of abnormality will be saved automatically, which facilitates abnormality
analysis.
Routine record
TIP After the file save destination is set as "internal memory", the data saved can be read from the
real-time diagram monitor of KV STUDIO.
How to Use
Logging/Tracing
(2) Create the ladder program
“LOGE””LOGD””TRGD" instruction
"Log Instructions", Page 2-63
Setup
2-3 Logging/Tracing
2
Logging/Tracing
Item Description
Status The current execution state is displayed during monitoring/on-line edition.
Function The functions (logging/tracing) already set are displayed
File path preview An example of file saving position (file path) is displayed.
Comment File comment already set is displayed.
Setup "Logging/tracing setting" dialog box is displayed. The selected logging/tracing ID is set.
Delete Delete the setting of selected logging/tracing ID.
OK Confirm the setting contents and close the dialog box.
Cancel Cancel the setting contents and close the dialog box.
The customized monitor of selected logging/tracing ID is displayed during
Custom Monitor
monitoring process.
The selected logging/tracing ID is implemented only during monitoring process
Start
(Ladder Program first)
The selected logging/tracing ID is implemented only during monitoring process
Stop
(Ladder Program first)
File name
Logging/Tracing
Data of log files are saved on the memory
card by the following forms.
Example
Folder File
Root
Item Description
File No. Select from "Auto numbering/Fixed/Dev val (lower 3 dgts)".
Auto numbering*1 Between 0 to 999, use the minimum unused file No.
No. upper limit Set the upper limit (0 to 999) of file NO.
Start operation Select operation at logging start from "New file/Add to latest file".
If there isn't remaining No., please select "Overwrite from the oldest file/
When noempty No.
Stop logging".
File No.
2-3 Logging/Tracing
*1 After retrieving of remaining No., you may prepare to save data to the files. In this case, the relay for
logging the working condition is ON. Buffer overflow is liable to occur if trigger is previously activated, so
don't activate the trigger after the relay for logging the working condition is ON.
The higher the upper limit of No., the longer the time for retrieving remaining NO. The required time is
about 15s when the upper limit of No. is 999.
*2 When log ID4, file NO. 2, character string "KEYENCE", time information (in YY/MM/DD/HH/MM) are
2 selected and file is created at 14:15, Jun 13, 2007, "log002_KEYENCE0706131415.csv" will be
generated under folder "log4" of the memory card.
Logging/Tracing
Up to 32 half-width characters
Note
“KV-5000/3000" PLC identifies files through folder name (log ID) and file No. (without
consideration of character string, date and time.)
Under the same folder logging ID in the memory card, don't use PC to create several files of
different character strings or date/time with the same file No.
Device
To set the saved devices by mixing the bit device and word device.
At most 128 devices can be set for every logging ID.
Example
(1) When all 128 devices are set to the bit device:
ON/OFF state (0 or 1) of 128 bit devices will be logged.
(2) When all 128 devices are set to the word device with
1 words:
Values of 128 word devices with 1 words will be logged.
(3) When all 128 devices are set to the word device with
2 words:
Value of 64 word devices with 2 words will be logged.
Item Description
"Logging/tracing device setting" dialog box is displayed when "Add" button is pressed. The
Add
logging/tracing device is added.
Select the changed device. Press "Change" button to display "Logging/tracing device
Change
setting"dialog box. The logging/tracing device setting is changed.
Delete Press “Delete" button to delete the selected device. (Multiple device can be selected)
Up Shift the selected device up in the registering sequence.
Down Shift the selected device down in the registering sequence.
Project Description
2
Logging/Tracing
Set the logging/tracing destination device.
Target device*1
Press the button to select from the device comments.
*1 Destination device
bit: R / MR / LR / CR / T (Contact) / C (Contact)/ CTC (Contact)
word: DM/EM/FM/ZF/W/CM/TM/TC(Timer current value)/CC(Counter current value)
CTH/TRM (trimmer) / Z
Trigger
2-3 Logging/Tracing
Item Description
Type *1 Select trigger types from "Bit device/period/trigger instruction (TRGD)".
Set bit device
Bit device
Press the button to select from the device comments.
2 cycle
trigger
when If the checkbox is selected, trigger is activated when logging/tracing is started.
Logging/Tracing
starting
logging
Triggering occurs when TRGD instruction is executed.
Trigger instruction
"TRGD Instruction", Page 2-66
*1 Bit device
Logging/tracing is run when the specified bit device is in ON state.
Referenced to the processing state of END, the state of bit device isn't logged when ON/OFF during 1
scan.
Device value at END processing of detecting trigger is saved.
If bit device is ON, the device value for each scan and END processing will be saved.
cycle
Through the built-in timer of KV-5000/3000, logging/tracing according to the specified interval time is
run.
Device value at END processing of detecting trigger.
Every scanning is performed when specified time is less than scanning time.
Time interval is calculated starting from the operation of logging/tracing.
In PROG mode, the timing of time interval is reset.
Note
Through END processing after trigger is activated, the specified device value is read. Thus,
at most 1 scan can be delayed from trigger activation to device value saving.
TRGD instruction
The device value when performing TRGD instruction is loaded, without the need of waiting for END
processing.
At most 8 value can be logged in the program for 1 ID.
Logging is also performed in the interruption program or fixed period module.
Option
To set the detailed condition of additional information or operation. When the tracing functions is
selected, no setting can be done if the file saving destination is "internal memory".
Logging/Tracing
Item Description
Insert file comment into the If the checkbox is selected, file comment will be inserted at the beginning
leading of CSV file. of CSV file.
Add comments row of device *1 If the checkbox is selected, the device's comment line will be inserted.
Add instruction
Attach time stamp to each row *2 If the checkbox is selected, time interval at each line will be added.
If the checkbox is selected, data No. will be added at each line. Logging/
tracing will be started from 0. When setting file No. and selecting "Add", No.
Add data No. to each row will be started from 0 at the middle of file (the position for starting adding).
In the event of buffer overflow and unexpected situation, the time of
occurrence of unexpected situation can be clearly learnt from the data No..
Add data obtain span to each row The lapse time from Captured latest data is logged (unit: 1s), up to 3600s.
Write to memory eard at every If the checkbox is selected, saving on memory card will be performed
trigger*3 (only logging).
Operation
2-3 Logging/Tracing
If the checkbox is selected (Write to memory card at every trigger), as long as saving is completed after
trigger, the logged results will remain in the memory card even if the power is off.
However, if the power is off when being saved into the memory card, the data in the memory card may be
lost.
To perform writing to memory card at each trigger, the access time to the memory card will become
longer. Thus, buffer overflow will likely occur. When the trigger interval is short, please uncheck "Write to
memory card at every trigger".
2 *4 This function is "Auto restart", not "Auto start". When LOGE instruction is executed and memory card isn't
inserted into the unit, the log error relay will be opened without starting logging.
Logging/Tracing
"Auto restart" refers to the function that a restart will be performed when the memory card is inserted.
*5 The number of lines, file comment and device comment occupy 1 line respectively.
File size indicates the size including all file comments and device comments.
"Program Capacity", Page 3-11
Item Description
File *3
Set bit device
Saving Device Press the button to select from the device comments.
trigger
Trigger Trigger data size (%) Press % to set the data size after trigger. Slider can also set up.
position Trigger data size (point)*1 The data size set by % is displayed by number of points.
Saving (destination)*2 Select from "Memory card/internal memory".
*1 Open "CPU system setting" from work space, then set the data size to be saved through "System
2
setting" -> "CPU unit buffer capacity setting".
Logging/Tracing
After the used ID capacity is increased, the data size (number of samples) that can be saved will become bigger.
Avoid exceeding total capacity 1024kB when setting.
*2 When internal memory is selected, read data will be read from "Real-time diagram monitor".
KV STUDIO user's manual "Real-time diagram monitor"
When power is off, the data saved in the internal memory will be lost.
*3 When trigger type is "TRGD instruction", the file saving/triggering state will be confirmed only
when TRGD instruction/function executed.
■ CSV files
CSV files generated automatically through logging/tracing function comprise device data, additional
data information and additional file information. The character length column (separated by comma)
fixed. In the event of lacing characters of data, spaces will be inserted automatically. A half-width
character is counted as 1 character, and a full-width character is counted as 2 characters. In addition,
these letters align left if the data format is ACII character string, otherwise align right.
● File additional information
The following items will be saved from the first line of the file according to the setting contents "Options"
tab of "logging/tracing setting" dialog box.
Item 1 column character length Example Note
The length of 1st line includes 64
File Comment 64 Header characters." " is not included in the
character length.
2-3 Logging/Tracing
● Device data
According to the setting of "Device", it's saved by the following character length.
Item 1 Column character length* Example Note
Bit device 1 …,1,… ON:1 OFF: 0
No "+" is added in the case of
±DEX16 bits 6 …, -1234,…
positive value.
decimal 16 bist 5 …, 1234,… -
No "+" is added in the case of
±DEX32 bits 11 …, 1234567890,…
positive value.
DEX 32 bits 10 …, 123456789,… -
HEX 16 bits 4 …,BA98,…
HEX 32 bits 8 …,BA987654,…
FLOAT 13 …, 2.4123E+12,… Exponent format is fixed.
If NULL exists in the character
ASCII16BIT (words)×2+2 …,”a123” … ,… string, the subsequent character
strings are not logged.
Data line
Log Instructions
To implement the logging operation, a program for using logging instruction can be written.
Instruction mnemonics Description about instruction Page
Enable logging/tracing LOGE Set logging of ID logging/tracing to enabled/disabled 2-64
Disable logging/rracing LOGD state 2-64
Capture log data TRGD Capture log data of ID specified. 2-66
2
Logging/Tracing
2-3 Logging/Tracing
Execute condition n
Logging/Tracing
LOGD L O G D n
Available devices
Index
Cons Indirect Local change
Bit device Word device tant specifying Device
Operand
MR DM EM
R (DR) LR T C CTC CR FM (ZF) T C CTH CTC Z CM #/$ #TM * @ : #/: Z
B TM (W)
n ○ - ○ - - - ○ ○ ○ ○ ○ ○ ○ ○ *1 - ○ ○ ○
Operand Description
n Logging/tracing specifying ID (0 to 9).*1 *2
*1 Cannot be specified in "$".
*2 When bit device is specified in n , continuous 16 bit will be occupied.
If word device is specified, 1 word will be occupied.
Description of Operation
LOGE When execute condition is ON, n will set ID of specified logging/tracingto enabled state.
When the instruction is performed, CPU unit buffer of specified ID is cleared, and the
logging/tracing operation relay is set. When a trigger is activated, logging/tracing will be
performed.
Operation enable state will continue before LOGD instruction is executed, independent of
the execution condition of the LOGE instruction.
The logging/tracing of all log IDs can enter into operation enable state under the same
execution condition.
LOGD When execute condition is ON, n will set ID of specified logging/tracing as disabled state.
After the instruction is executed, logging/tracing operation relay of every ID is reset, then
logging/tracing is stopped. All log contents till now are output to memory card.
Log ID Logging operation relay
0 CR000
1 CR100
2 CR200
3 CR300
4 CR400
5 CR500
6 CR600
7 CR700
8 CR800
9 CR900
Trigger
(Bit device)
Execute
Execute
Execute
Execute
Execute record/tracing
Logging/Tracing
Scan
Trigger (cycle)
Execute
Execute
Execute
Operation flag
Sample Program
When input R000 is ON, logging/tracing of ID5 enters into operation enable state.
When input R001 is ON, logging/tracing of ID5 enters into operation disable state.
2-3 Logging/Tracing
TRGD TRGD Capture log data Capture log data of specified ID.
2 Available devices
Index
Logging/Tracing
Operand Description
n Specify the logging/tracing ID for capturing, or save the first device of logging/tracing ID. *1
*1 Specify the logging ID between 0 to 10. Please specify "10" when trigger by instruction is used in real-
time diagram monitor.
Description of Operation
Note
· At most 8 TRGD instructions can be used by 1 project for 1 ID.
· If data is captured through TRGD instruction, it's required to set the trigger type to
"instruction trigger" when setting up logging/tracing or "Real-time diagram monitor" of KV
STUDIO. In the absence of such settings, no data can be captured even if TRGD
instruction is performed.
Operation flag
Sample Program
If the following ladder program is included in the fixed period module, logging will be performed every period.
2
Note
Logging/Tracing
When fixed period module is implemented, it's necessary to set it to interrupt enable state
(perform EI instruction).
Control information and error information for logging/tracing are assigned to the control relay and
control memory.
Control relays include control relays for each logging/tracing ID and a relay only resvered for the
system.
Note
The control relay/control memory is reflected through END processing. Under locking state,
no results can be reflected prior to END processing, even if operation is performed.
■ Devices of IDs
2-3 Logging/Tracing
■ Common devices
Attribute
Device No. R: Read only Content
Blank: R/W
2 CR3213
CR3215
R
R
With memory card
Memory card write protect
CM2391 Power OFF during memory card access
Logging/Tracing
■ Details of devices
● Logging/tracing operation relay
To enable and disable logging/tracing. It is set when logging/tracing instruction (LOGE) is performed, or
logging/tracing is started through KV STUDIO, generally no direct operation is required.
When this relay is ON, all state relays of the same logging/tracing ID will be OFF.
It will be reset when an error occurs.
Logging/Tracing
● Memory card without remaining space error relay
When the memory card has no sufficient remaining space, it's ON.
When the relay is ON, logging/tracing will be completed. When logging/tracing failure relay is ON, the
logging/tracing relay will be OFF. In this case, the residual data in the buffer will disappear. When LOGE
instruction is executed the next time, error will be cleared.
2-3 Logging/Tracing
● Storing speed
· Max. scan time in execution of logging/tracing is "3+6 x number of IDs in use" ms.
· When several triggers are activated simultaneously, the access volume to the Memory Card
increases. So, the scan time will be longer, buffer overflow is liable to occur.
TIP The data failure can be improved by setting of certain scanning time or END processing time.
"Fixed Scan Time (FST) Operation", Page 3-23
"Enable END proceeding time", Page 3-25
Logging/Tracing
corrupt the data on the Memory Card.
· When power is turned OFF while logging/tracing is being executed, data will not be saved to the Memory
Card.
· When the Memory Card slot cover is opened while the Memory Card is being accessed, the process
that is being performed at that time is continued until it is completed. However, subsequent
processing is no longer accepted on the Memory Card.
Replacing Memory Card
· Replace Memory Card by the following procedure.
"Used on the KV-5000/3000", Page 2-45
· If auto-restart is logging/tracing by Memory Card insertion is set in the logging settings of KVSTUDIO,
when Memory Card is removed during execution of logging, the logging data is stored in memory until
the Memory Card is next inserted. When the Memory Card is inserted, data stored in memory will be
written to the Memory Card. At this time, the logging error relay will not be ON. If there is a long period
between the Memory Card is inserted next time or many triggers have been generated, a buffer
overflow will occurs and some data may be lost.
When "auto-restart logging/tracing by Memory Card insertion is not set, never remove the Memory
Card while logging is being executed. Doing so might corrupt the data on the Memory Card.
2-3 Logging/Tracing
· When "Add to latest file" is performed, and latest file capacity overflow occurs:
The files with remaining No. will be used. If no remaining No. exists, "Processing at capacity
exceeded" will be performed.
When the specifying method of file No. is "Fixed/Dev val"
· When same file exists and "Overwrite old file" is selected: old file will be deleted and file will be saved
by the same file name.
· When same file exists, and "Add" is selected:
2 Data are added to specified files. When the file capacity is full, if logging/tracing is started, the
logging/tracing error relay is started to stop logging/tracing.
Logging/Tracing
● Character restriction
(1) Character string in CSV file: file comment, device comment
(2) File name character string : file name character string
(3) ASCII character string : there are restrictions on characters that can be used when "ASCII
character string" is selected as the device's data format.
Item Explanation
Character string in CSV files • "," cannot be used.
The following characters cannot be used.
• 12 half-width characters * / < > ? ¥ | % , : ; "
• 7 full-width characters / : ? ¥ * [ ]
Character string in file names
• NEC special characters (8740H to 879CH)
• IBM extended characters for NEC (ED40H to EEFCH)
• IBM extended characters for IBM (FA40H to FC4BH)
All ASCII codes are saved directly. Control characters and " etc. are also
ASCII string
saved directly.
TIP If DATA BUILDER is used, then PLC device values can be read/written.
Method of Connecting PC
USB Communication
Note
It's required to install KV STUDIO properly before connecting KV-5000/3000 to PC
USB interface.
Be sure to install USB driver prior to first connection. For 2nd or subsequent connection, no program is
required to be installed due to auto identification function.
The steps of installing in Windows XP are described below.
1 Only the user with setting change right (such as administrator) can operate.
2 Connect computer USB port to KV-5000/3000 USB port using USB cable.
"Found New Hardware Wizard" is displayed, and then information of the hardware to be added is displayed.
If serial port of KV-3000 (modular connector is used), you can monitor of ladder program through KV
STUDIO, as in the case with USB port. In addition, communication is possible by connecting
peripherals with RS-232C interface, or connecting to our VT3 series touch panel.
Communication Specification
2 Item Specification
Communication
Serial Communication (KV-3000 only)
RS-232C
interface
Communication
Full-duplex
mode
Synchro mode Demodulation synchronization
Baud rate 9600, 19200, 38400, 57600, 115200bit/s (default 9600bit/s)
Data length 8-bit
Parity Even
End bit length 1-bit
Note
· Set the same communication specification as that set to connected peripherals.
Communication cannot be performed correctly if the settings are different.
· For details on the settings of connected peripherals, refer to the User's Manual for the
respective equipment.
How to Connect to PC
When connecting KV-3000 and PC, please use dedicated connection cable (OP-26487) and D-Sub 9-
pin connector (OP-26486).
KV-3000
OP-26486
To RS-232C connector
KV side PC side
RD 3 3 SD
SD 5 2 RD
4 DR
6 ER
7 RS
8 CS
˄2˅
˄3˅˄4˅
˄5˅ SG 4 5 SG
KV side pin No Modular connector D-Sub 9-pin connector
When connecting KV-3000 to VT3 series touch panel, please use dedicated KV program-controlled
direct-connect cable (OP-26484 : 5m, OP-35403 : 1m).
To PORT 2
To modular connector
KV-3000 Touch display panel VT3 series
OP-26486
TO PORT3
OP-24025˖5m
To modular connector OP-24045˖1m
KV-3000 Touch display panel VT3 series
When connecting KV-3000 to peripherals, please refer to the following wiring diagram with PC, and
connect according to shape of the connectors of peripherals.
TIP When the connected equipment is a modem, please use cross cable OP-96607 instead of
OP-26487.
Note
· To establish communication without turning KV-3000 OFF after communication is
performed between KV-3000 and KV STUDIO, the Break signal must be sent again.
· When the Break signal cannot be sent to PC, the communication settings of KV-3000 can
be initialized by turning the KV-3000 OFF then back ON again.
· Allow at least 10 ms to stop communication after sending the Break signal.
S P n C
R
53H 50H 20H
O K C L
R F
4FH 4BH
Note
· Default value is 9600bit/s when power is turned ON.
· If Break signal is received, the communication speed is returned to 9600 bit/s.
· The communication speed will be changed after a response is sent. Please confirm the
response first, then send command according to the set communication speed.
The device value or operating state of KV-3000 can be read/written from peripherals through the
protocol initiated by KEYENCE. As in the KV mode of KV-L20V (host link), KV-3000 will automatically
return response according to the instruction from peripherals. No communication program is required at
KV-3000 PLC side.
“KV-L20V User’s Manual", “Chapter 5 Programming In KV Mode (host link)" 2
Instruction CR or PC (Host)
Instruction C L
R F
Response CR LF
Response
KV-3000
Note
· Once the power of KV-3000 is turned on and Break signal is received, communication
speed is set to 9600bit/s.
· When a communication error occurs, the communication speed will recover to 9600bit/s.
· If 1s is exceeded between the bytes of instruction, it's regarded as a timeout, and an error
response will be returned.
Continuous text data (below 999 bytes or 1998 bytes) can received or sent collectively. Though data
format can be freely set, communication program should be written at KV-3000 side.
External equipment
STX Text data ETX
LASER
ON
STB
OK/N
G
TIMING
TEST
BL-70
0
Text data
KV-3000
ETX
Serial Communication (KV-3000 only)
bit15 bit0
Data memory bit
0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1
bit15 bit0
Data storage bit
0 0 1 1 0 0 1 0 0 0 1 1 0 0 0 1
● Receiving
The receiving state can be confirmed through the following control relay.
Relay No. Content
CR2801 Only one scan period will be ON when text data are received.
Only one scan period will be ON when text data are received while
CR2802
CR2801is ON or when CR2803 is ON.
Only one scan period will be ON if an error occurs when receiving text
CR2803
data. 2
TIP You can change communication speed via "SP " instruction of KV mode (host link).
"Communication speed setting”, Page 2-76
bit15 bit0
Data memory bit
0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1
bit15 bit0
Data memory bit
0 0 1 1 0 0 1 0 0 0 1 1 0 0 0 1
■ Sending
Sending is performed through ON/OFF of the following control relay.
Relay No. Content
CR2804 Start/stop text data sending ON :send OFF :stop
CR2800 Start/stop Break signal sending ON :send OFF :stop
Note
Communication setting needs to be initialized before communication.
"Communication speed setting", Page 2-76
TIP You can change communication speed via "SP" instruction of KV mode (host link).
“KV-L20V User's Manual “, "Chapter 4 Programming in KV Mode" (host link)"
Higher 4 bits
0 1 2 3 4 5 6 7 8 9 A B C D E F
0
N
U
D
L S
0 ? P ? p ࠲ ࡒ
2
L E P
Q K
A S
6 C
K
Y
N ? 6 F V f v ࡥ ࠞ ࠾ ࡛
B E
7 E
L
T
B ’ 7 G W g w ࠔ ࠠ
B C
8 S AN ? 8 H X h x ࠖ ࠢ ࡀ
H E
9 T M ? 9 I Y i y ࠘ ࠤ ࡁ ࡞
L SU
A F B ? ? J Z j z ࠚ ࠦ ࡂ
V ES
B T C ? ? K ? k ? ࠜ ࠨ ࡅ ࡠ
F
C F → ? ? L \ l ? ࡖ ࠪ ࡈ ࡢ
C
D R ← ? M ? m ? ࡘ ࠬ ࡋ ࡦ
S
E O ↑ ? ? N ? n ? ࡚ ࡎ ࠐ
S D
F I ↓ ? ? O ? o E
L ࠶ ࠰ ࡑ °
Characters within can be used.
ST ET L C
X ? X ? F ? R are used as data seperatorsDŽ
Other codes are used for controlling, and should not be used.
Ethernet port (RJ-45 connector) of KV-5000 allows to achieve the same functions as those with KV-LE20V or KV-FL20V.
Note
· CPU's built-in Ethernet communication function and built-in FL-net communication function can be
used simultaneously.
· Optional "compatible mode" for KV-LE20V/KV-FL20V cannot be used.
2
Operations that Can be Implemented through CPU's Built-in Ethernet/FL-net Communication Function
Ethernet/FL-net Communication (KV-5000 only)
To use the built-in Ethernet port of KV-5000, please select KV-5000 in the Unit Editor of KV STUDIO to display the
unit setting. After the communication mode is set to "Ethernet/FL-net", the same functions as those with KV-LE20V/
KV-FL20V can be used.
For how to use KV STUDIO and Unit Editor, refer to "KV STUDIO User's Manual".
For the details of unit settings or various functions that can be used by Ethernet mode, refer to "KV-LE20V User's
Manual"
Please refer to the "KV-FL20A User's Manual."
Item See
Interrupt input " Input Time Constant Setting", Page 2-84
High-speed counter "2-8 High-speed Counter", Page 2-87
Frequency counter "2-9 Frequency Counter", Page 2 133
Cam switch
Specified frequency pulse output
"2-10 Cam Switch", Page 2-139
"2-11 Specify Frequency Pulse Output", Page 2-153
2
I/O
Motor (positioning) control "2-12 Motor (positioning) Control", Page 2-157
Input time constant setting "Input Time Constant Setting", Page 2-84
Disable input refresh "Disable Input Refresh", Page 2-85
Disable output "Disable Output", Page 2-86
Common I/O
If high-speed counter, frequency counter, cam switch, specified frequency pulse output, motor
(positioning) control, CPU unit's I/O (R000 to R015, R500 to 507) are not used as interrupt input, they
can be used as common I/Os.
For terminal No.s of I/Os, see "I/O connector wiring diagram", Page 1-30。
The methods of using the common I/Os are described below. In addition, the following methods can
also be used for expansion I/O unit.
Example
DR000 DR500
Whether or not DR can be used, please refer to KV-5000/3000 series Instruction Reference Manual.
● Interrupt processing
During interruption processing, input relay (R000 to R015) will be refreshed before the program is
executed. In addition, when SET/RES instruction is executed, it's not required to wait for END
processing of the program, and the output relay (R500 to R507) will be refreshed directly.
"3-5 Interrupt", Page 3-31
2-7 I/O
If input time constant selection function is used, the pulse width acquired reliably as signals from input
contact will be set as input time constant. If input time constant becomes smaller, shorter pulse can be
obtained, otherwise, it can be used as a simple noise filter.
When a non-contact signal without fluctuation is connected, and a high-speed signal (encoder, etc),
2 high-speed signal can be processed by reducing input time constant.
I/O
TIP When expansion I/O unit is used, input time constant can be set through Unit Editor (10ms/
1ms/300µs/25µs).
KV STUDIO User's Manual, "Chapter 3-6 Unit Editor"
But, if HSP instruction and control relay CR2305 are used simultaneously, HSP instruction will be
processed first, the specified relay cannot be changed into a value set through CM1620.
Example
Input time constant is set to 1ms.
CR2008 #3 CM1620 CR2305
LDA STA SET
Note
Input time constant is set after one scanning is completed. The specified contents will be
enabled from the next scanning.
I/O
input unit) will not be updated according to actual input signal. As the actual input relay can be ON/OFF
forcedly in the process of monitoring by KV STUDIO, commissioning operation can be performed
without being influenced by the connection state of peripherals.
Note
When "input refresh disabled" is used, the following functions cannot be disabled.
· Interrupt
· Hi-speed counter (internal clock not included)
· Positioning (origin sersor, stop sensor, Z-phase, limit switch) R000 to R015
TIP When expansion I/O unit is used, forced set/reset operation can be performed through KV
STUDIO.
"KV STUDIO User's Manual “, "Foreced set/reset registering"
1 Select "Debug (D)" -> "Disable Input refresh (F)" from menu.
After input refresh is disabled, the menu is in selected state, "input refresh disabled" is displayed in the
status bar. After the menu is selected while input refreshe is disabled, the input refresh disable can be
released.
2-7 I/O
Disable Output
After output is disabled, it's impossible to output to output relay (R500 to R507, assigned as the relay of
expansion output unit), even if ON/OFF operation is performed on the output coil in the program. Thus,
debugging of program is possible without actual output to peripherals.
2 Note
If CR2300 is ON, all outputs will be OFF.
For example, if CR2300 is ON while positioning pulse is output, the pulse output from output
I/O
terminal will be disabled (OFF). But, when CR2300 is OFF, output will restart (the pulse
output is processed as output content when CR2300 is ON) due to ongoing internal
operation.
1 Select "Debug (D)" -> "Disable output (O)" from the menu.
After output is disabled, the menu is under selected state, "Output disabled" is displayed in the status
bar. After the menu is selected while output is disabled, the output disabling wiil be released.
High-speed Counter
Item Specifications
Number of channels 2
Line driver input Single-phase: 100kHz phase difference: 50kHz
Input response frequency
Open collector input Single-phase: 60kHz phase difference: 30kHz
Note
Other functions or instructions using high-speed counter of the same No. cannot be used
simultaneously.
For details about input relays, see "Wiring and Internal Circuit Diagram", Page 1-28。
KV-5000/3000 is equipped with 2 high-speed counters, each of which is fitted with 2 high-speed
counter comparator and dedicated internal clock.
Count input 32-bit high speed counter 0 CTH0 input capture function *1
A phase R010 CM1610, CM1611(INT R000)
External input CTH0
(B phase R012) R010 CM1612, CM1613(INT R001)
(R012)
(internal wiring)
(internal wiring)
Count input 32-bit high speed counter 1 CTH0 input capture function *1
Direct clock pulse input CM1614, CM1615(INT R002)
ǂǂR500 CTH1 CM1616, CM1617(INT R003)
CR2513
Internal timer ǂOFF R501
CR2415(50ns) Control circuit
ǂON R505
CR2200(1.0μs) (comparator matching output)*2
CR2201(10.0μs)
CR2202(100.0μs) CTH1 setting value
External input High-speed counter comparator Interrupt function
A phase R010
R011 CTC2
(B phase R012) (R013) INT CTC2
CTC3 INT CTC3
When high-speed counter is used, the following items can be set through ladder program.
● Counting range
Counting range is set.
● Input mode
To set counting input mode, and log the instruction of high-speed counter (CTH instruction).
· External input… counting pulse input of single phase, phase difference and 2 pulses.
· Internal clock…counting the internal lock of 50ns / 1µs / 10µs / 100µs.
· Direct clock pulse (specified frequency pulse) output… counting the output pulse with high-speed counter.
"Counting Input Setting", Page 2-101
● Setting value
Set the setting value (CTC) of counting up/counting down.
"Settings of High-speed Counter (CTC)", Page 2-104
When CPU's built-in high-speed counter is used, it's required to write ladder program for specifying
ounting range, input mode and setting value. However, if CPU high-speed counter setup wizard is
used, it's only required to specify various items according to the screen instructions, and the ladder
program for high-speed counter will be generated automatically.
When the CPU high-speed counter setup wizard is used, it's only required to select the setting item.
Ladder program CPU's built-in high-speed counter will be generated automatically, and will be
registered according to scanning module called "INIT_CTH0" or "INIT_CTH1".
The setting contents of CPU high-speed counter setup wizard are described below.
Channel selection
CH0
-> Step 1, Page 2-90
CH1
2
Operation mode selection
High-speed Counter
Up/down count
-> Step 2, Page 2-90
Preset count
Enable accu count
Enable count
Set count
Count range
-> Step 4, Page 2-93
Count mode
Initial value setting
Consistent comparator
operation setting Output relay
-> Step 5, Page 2-94 Operation in case of matching
Setting default value
The steps for setting CPU high-speed counter setup wizard and various dialog boxes are described below.
1 Select "Tool (T)" -> "CPU high-speed counter setting wizard (H)" from the menu of KV STUDIO,
and start CPU high-speed counter setup wizard".
2 Specify the channel of setting the high-speed counter, and click "Next" button.
Step 1 Channel selection
High-speed Counter
Overflow*
(1)
Current value
2
High-speed Counter
(2) *
Overflow
Tip · Count mode and count range are set through the CPU high-speed counter setup wizard
(page 2/4).
· When overflow is detected, CR2403 (CTH0) and CR2407 (CTH1) are ON.
● Preset count mode
A mode in which once preset input (external input) is input, the current value is changed to preset
value.
up
Count input
down
Preset input
(1)
Preset value
Current value
(2)
Tip Count mode and count range are set through the CPU high-speed counter setup wizard,
Page 2/4.
ON
Enable input
OFF
2
(1)
High-speed Counter
Current value
(2)
Tip Count mode and count range are set through the CPU high-speed counter setup wizard, Page
2/4.
ON
Enable input
OFF
(1)
Current value
Reset value
(2)
Tip Count mode and count range are set through the CPU high-speed counter setup wizard, Page
2/4.
High-speed Counter
Item Description
External input Selected when external input is counted through high-speed counter.
Select count input mode from the pull-down menu.
Selection range: 1-phase (w/ direction)/1-phase (w/o direction)/Phase difference
count input mode
(1x)/Phase difference (2x) / Phase difference (4x)/2-pulse
"Counting Input Setting", Page 2-101
Selected when counting is performed through internal clock or direct clock
Internal input
pulse (specified frequency pulse).
Select an internal clock from the pull-down menu.
Internal clock input Select range: 50ns/1.0µs/10.0µs/100.0µs
"When using internal clock", Page 2-103
Selected when direct clock pulse or specified frequency pulse output is counted.
Direct clock pulse input "When using direct clock pulse (specified frequency pulse) output", Page 2-
103
Item Description
Count range (current value) is set.
Count range Selection range: unsigned 32-bit (0 to 4294967295)/
signed 32-bit (-2147483648 to +2147483647)
Count mode Count mode is set.
Count is performed according to the set count range.
2 Linear count When the current value exceeds this range, the overflow detection relay is ON.
"Linear counter", Page 2-99
Counting is performed according to the set range of upper and lower limit.
High-speed Counter
Ring count Even if the current value exceeds the range, overflow detection relay will not be ON.
"Ring counter", Page 2-100
When operation mode of CPU is changed from PROG to RUN, the current
Default setting
value is rewritten to the specified default setting.
Item Description
After the this checkbox is selected, output relay will operate if current value
Use comparator
matches the comparator value (setting value).
Used to select the output relay when the comparator matches.
The following steps will vary with the operation modes set in step 2.
· When the mode is "Up/down count" ............................go to step 8
· When the mode is "Preset count"................................go to step 6
· When the mode is "Enable accumulative count" ........go to step 7
· When the mode is "Enable count" ..............................go to step 7
High-speed Counter
Set "Preset value", "Polarity of preset input relay" and "preset timing", click the "Next" button, then go to step 8.
步骤 6 预置的设定
Item Description
To specify the preset value used to rewrite current value in the case of preset input.
Preset value (CM1604)
The preset value should be set within the range specified by "Counting range".
To select input polarity of preset input relay.
Polarity of preset input
N.O.(A contact) : Preset will be performed when external input is ON.
relay (R014/R015)
N.O.(B contact) : Preset will be performed when external input is OFF.
To select preset timing when preset input is performed.
Up edge : Preset is performed on the rising edge of external preset input relay
Down edge : Preset is performed on the falling edge of external preset input relay
Preset timing Level : When polarity of external preset input relay is N.O. (A
contact), preset will be performed while relay is ON.
: When polarity of external preset input relay is N.C. (B
contact), preset will be performed when the relay is OFF.
2
High-speed Counter
Item Description
To select enable condition of counting.
When internal relay is in enabled state: when internal relay is ON, counting is
enabled.
When external input is in enabled state: when polarity of external input is N.O.,
counting will be enabled when is ON; when the polarity of external input is
N.C., coun ting is enabled when it's OFF.
Counting enable condition
When internal relay is in enabled state and external input is in enabled state:
Counting is enabled when internal relay is ON and external input is in
enabled state.
When internal relay is in enabled state or external input is enabled state:
Counting is enabled when internal relay is ON or external input is in enabled
state.
To select the input polarity of external enable input relay (R008/R009).
N.O.(Contact A): When external input is ON enabled
External input (R008/R009)
When external input is ON disabled
polarity
N.O. (Contact B): When external input is ON disabled
When external input is ON enabled
Polarity of internal relay
Fixed for A contact (enable). The setting cannot be changed.
(CR2410/CR2411)
8 Specify the output module name and confirm the setting of high-speed counter.
Specify the setting content set through the CPU high-speed counter setup wizard as the module name
for ladder program output.
Confirm the setting content of CPU high-speed counter,and click the "Finish" button to finish setup.
Step 8 Set up name for module
High-speed Counter
How to Operate High-speed Counter
● Execute counting
The execution condition of high-speed counter instruction (CTH instruction) is set to ON.
"CTH Instruction", Page 2-114
● Reset
The current value of high-speed counter (CTH) is set to 0.
· RES instruction
· CTH instruction
· Automatic reset based on comparator matching
· External preset input
· Reset based on counter enable
"Reset Mode", Page 2-105
● Count enable/disable
The count enable/disable can be controlled with counter enable function.
"Counter Enable Function", Page 2-109
When program is executed, the current value of high-speed counter is refreshed using the "RFSCTH"
instruction.
"RFSCTH Instruction", Page 2-118
● Input capture
In the case of interruption, the current value of high-speed counter is stored in control memory (CM).
"Capturing Current Value Based on Input Capture", Page 2-113
TIP If the specified frequency pulse output is used, then pulse can simply be output.
● Expansion function
You can use special instructions to simply use expansion functions of high-speed counter.
· Frequency counting function… To measure frequency of external pulse input.
"2-9 Frequency Counter", Page 2-133
· Rotary speed measuring function…To measure rotary speed of external pulse input.
"2-9 Frequency Counter", Page 2-133
· Pulse of specified frequency output function… To set any frequency and output pulse.
"2-11 Specify Frequency Pulse Output", Page 2-153
· Cam switch function… It is possible to use incremental encoder to perform cam control through PLC.
"2-10 Cam Switch", Page 2-139
The count value range of high-speed counter can be set through counting mode and signs.
■ Linear counter
Linear counter is a counter used to count within 32-bit counting range.
2
Unsigned 32-bit
High-speed Counter
Up counting or down counting is performed in the range of 0 to 4294967295.
It will turn to 0 if up counting is performed from 4294967295; or it will turn to 4294967295 if down
counting is performed from 0.
In this case, overflow detection relay (CR2403/CR2407) will be ON.
Signed 32-bit
Up counting or down counting is performed in the range of -2147483648 to +2147483647.
It will turn to -2147483648 if up counting is performe from +2147483647; or turn to +2147483647 if
down counting is performed from -2147483648.
In this case, overflow detection relay (CR2403/CR2407) will be ON.
Count input up
down
Counting
value
Lower limit 0 -2147483648
($00000000) ($80000000) Overflow
Overflow detection
CTH0:CR2403/CTH1:CR2407
Note
Counting will not stop even if overflow is detected. Counting will stop when counting input is
stopped.
■ Ring counter
Ring counter is one that allows random setting of upper and lower limits of high-speed counter.
Up counting or down counting is performed within the range of upper and lower limits.
It will be change to lower limit if up counting is performed from upper limit; It will be change to upper
limit if down counting is performed from lower limit.
Example
Ring counting of high-speed
CR2008 #10000 CM1600
countor comparator CTC0 with LDA.D STA.D
1 scan ON #100 CM1596
upper limit 10000 and lower limit LDA.D STA.D
100 CR2402
SET
Note
· Overflow wll not be detected even if upper or lower limit is exceeded.
Counting input up
down
Counting
value
Lower limit CTH0:[CM1597・CM1596]
CTH1:[CM1599・CM1598]
· Through changing current value of high-speed counter or upper/lower limit of ring counter
the current value can be corrected when the current value is outside the range between
upper limit and lower limit during executing of END instruction.
· If the current value exceeds the upper limit, then it is corrected to upper limit.
· If the current value is smaller than lower limit, then it is corrected to lower limit.
· Please do not set upper limit <= lower limit, otherwise normal counting is impossible.
High-speed counter has 3 counting modes: external input, internal clock input, and direct clock pulse
input.
High-speed Counter
A-phase B-phase
CTH0 R010 R012
CTH1 R011 R013
Example
High-speed counter CTH0 is HSP
used to count external input R010
%6*&
R010
Note
When external input is used, be sure to set the input time constant.
"Input Time Constant Setting", Page 2-84
w/ direction ..........Up counting is performed on the up edge of A-phase when B-phase is OFF.
Down counting is performed on the up edge of A-phase when B-phase is ON.
W/O direction W/ direction
ON ON
(A phase)R010 (A-phase)R010
OFF OFF
ON ON
(B phase)R012 (B-phase)R012
OFF OFF
2 (B phase)
R012
ON
OFF
High-speed Counter
(Counter value)
CTH0
0 1 2 3 4 3 2 1 0
(Counter value)
CTH0
0 1 2 3 4 5 6 7 8 7 6 5 4 3 2 1 0
(Counter value)
CTH0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Pulse up counting is performed on the up edge of A-phase, and down count is performed on the down
edge of B-phase.
ON
(A phase)
R010 OFF
(B phase)
R012
ON
OFF
2
High-speed Counter
(Counter value)
CTH0
0 1 2 3 4 3 2 1 0
Example
Internal clock (1.0µs) is
CTH.D 0
counted with high-speed CR2100
counter CTH0.
Comparator
matching output
CTH0 R501
CTH1 R500
Example
The direct clock pulse output
CTH.D 0
R501 from R501 is counted through
high-speed counter CTH0.
Note
· When CR2513 is ON and CTH1's comparator matching output is set to R505, please
input R501 at operand of CTH instruction.
· When CR2505 is ON and CTH0's comparator matching output is set to R504, please
input R500 at operand of CTH instruction.
"Comparator Matching Output", Page 2-111
2
Settings of High-speed Counter (CTC)
High-speed Counter
The setting value of high-speed counter is set by high-speed counter comparator CTC0 to CTC3.
The matching with CTH0 is judged through CTC0 and CTC1.
The matching with CTH1 is judged through CTC2 and CTC3.
If no CTC interrupt program is available, and CTH matches CTC, then contact of CTC is ON.
CTC contact can be turned OFF through RES instruction. When CTC interrupt program is available, the
contact of CTC will not be ON.
High-speed counter
Sign Setting range
comparator
OFF 0 to 4294967295
CTH0 CM1608 bit7 CTC0 CTC1
ON -2147483648 to +2147483647
OFF 0 to 4294967295
CTH1 CM1609 bit7 CTC2 CTC3
ON -2147483648 to +2147483647
Example
Value of CTC0 is set to 100; HSP
value of CTC1 is set to 100000. R010
CTH.D 0
R010
#100
CTC 0
#100000
CTC 1
CTC 0
CTC 1
Note
When the current value is changed to the same value of CTC, contact of CTC will not be ON.
After up/down counting, the contact will be ON only when the current value is same as the
CTC value.
Reset Mode
High-speed Counter
Reset based on counter enable function
Note
The reset time of various reset modes is shown as follows.
Reset mode Reset time
Reset based on RES instruction The time for executing of RES instruction.
Reset based on CTH instruction (execution condition OFF) The time for executing CTH instruction.
Automatic reset based on comparator matching The time of comparator matching.
The time when external preset input
Reset based on external preset input
is ON.
Use internal enable relay
Reset based on The time for the enable signal to
Use internal enable relay and
counter enable change from disable -> enable or
external enable input
function enable -> disable.
Use external enable input
Example
Reset based on RES instruction.
CTH0
RES
Execute condition
2
CTH current value
High-speed Counter
Example
Reset based on CTH instruction
(execution condition OFF) Execute condition CTH.D 0
R010
High-speed High-speed
counter Device No. Operation ON OFF
counter comparator
CTC0 CR2103 When CTH0=CTC0, auto reset Disable Enable
CTH0
CTC1 CR2112 When CTH0=CTC1, auto reset Disable Enable
CTC2 CR2203 When CTH1=CTC2, auto reset Disable Enable
CTH1
CTC3 CR2212 When CTH1=CTC3, auto reset Disable Enable
Scan
CTH
CTH˙CTC
Example
Automatic reset based on
CR2008 CR2103 CR2203
comparator matching SET SET
Note
Precautions on CTH change when auto reset is performed.
· In the case that the value is "unsigned" or "signed" and value of CTC is positive, even if
CTH is changed to above CTC, the CTH value will be "CTC value-1 ".
· In the case that the value is "signed" and value of CTC is negative, even if CTH is
changed to below CTC, the CTH value will be "CTC value +1".
2
■ Reset based on external preset input
High-speed Counter
Set through preset function.
Preset is performed by setting preset value to 0.
"Preset Function", Page 2-108
CTH
Enable->Disable
Counter input
enable
enable
disable
CTH
Disable ->Enable
Counter input
enable
enable
disable
CTH
Example
Reset based on counter enable
CR2008 CM1608 CM1608
function (enable -> disable) BSET BSET
#4 #5
Preset Function
With this function, you can change the current value of high-speed counter to preset value. The current
value can be changed through external input.
Counter input up
down
2
High-speed Counter
Preset signal
A
Counting value
Preset value
Concept of the preset function setting of preset signal are described below.
Schematic diagram of preset function
Preset enable/disable
CR2408(CR2409)
Execute preset
■ Setting destination storage address of external preset input and preset value
Destination storage address of preset value
External preset input
Higher bit Lower bit
CTH0 R014 CM1605 CM1604
CTH1 R015 CM1607 CM1606
With the counter enable function, disabling /enabling of counting input can be controlled.
Control can be perform through external enable input (R008, R009) and internal enable relay (CR2410,
CR2411).
In addition, the current value can be reset when counter enable signal changes between enable ->
disable or disable -> enable. 2
High-speed Counter
Counter input up
down
enable
Disable signal
disable
Counting
value
Reset value 0
Reset value 0
Counting
value
Reset value 0
Example
After initial setting, CTH0 is set to preset enable on the up edge of R1000. (high-speed
counter reset)
CTH0 is set to preset disable on the up edge of R1001. (high-speed counter reset )
CTH0 is set on the down edge R014. (R014 is a NC contact input)
R1000 CR2408
→
R1001 CR2408
→
■ Disable signal
Set via external enable input and internal enable relay.
Combination setting
Description
Bit 2 Bit 1 Bit 0
OFF OFF OFF
Normal enable (counting is perfomed all the time regardless of
OFF ON OFF
the disable/ enable state of external enable input, internal enable
ON OFF OFF
relay.)
ON ON OFF
CM1608 (CTH0) OFF OFF ON Counting is performed when internal enble relay is in enable state.
CM1609 (CTH1) OFF ON ON Counting is performed when external enble relay is in enable state.
Counting is performed when internal enble relay and external
ON OFF ON
enable relay are in enable state.
Counting is performed when internal enble relay or external
ON ON ON
enable relay are in enable state.
When comparator value (setting value) matches the current value, output relay will be ON/OFF. It can be set
through control relay. The comparator matching output will not be affected by scan time.
High-speed Counter
CTC0 OFF: disable CR2106 Output OFF Disable Enable
CR2505
ON : enable CR2107 Output ON/OFF inverted Disable Enable
CTH0 OFF:R500
CR2108 CR2109 Output OFF Disable Enable
ON :R504
CTC1 OFF: disable CR2110 Output ON Disable Enable
ON: enable CR2111 Output ON/OFF inverted Disable Enable
Schematic diagram
When CR2505 is OFF When CR2505 is ON
CTCO:CR2104
CTC1:CR2108 I/O connector I/O connector
R500 R500
Pin 16 Pin 16
CTCO:CR2104
CTC1:CR2108
CTH0 CTH0
comparator R504 comparator R504
matching output Pin 18 matching output Pin 18
CTH1 CTH1
comparator R505 comparator R505
matching output Pin 38 matching output Pin 38
Note
· When comparator matching output in enabled state (CTC0:CR2104 OFF/CTC1:CR2108 OFF), output of
pin 16, pin 18 or pin 36, pin 38 can not be controlled through SET instruction and RES instruction.
· Frequency that can be output from R500 is different from that from R504, R501 and R505.
"Output specification", Page 1-27
Note
· The change direction (CR2412, CR2413) is refreshed with every scan. After operation is
completed, change direction before completion is maintained .
· The max. refreshing time of change direction is "change direction detection time constant
+ 1 scan period". Value is refreshed to latest value when RFSCTH instruction is executed.
"RFSCTH Instruction", Page 2-118
(2) Setting the change direction detection time constant of current value (CTH)
The change direction detection time constant is set through MOV instruction or DW instruction.
Please refer to KV-5000/3000/1000 Series PLC Instruction Reference Manual, “MOV instructions"
Example
The change direction detection time MOV
constant of CTH0 is set to 100µs. #1 CM1594
#1
DW
CM1594
Input capture refers to the function in which current value of high-speed counter is captured from
control memory when interrupt condition occurs. When the interruption condition is on external input,
this function is enabled (ON), which need not be set.
The captured value is stored in control memory CM1610 to CM1617.
Interrupt condition (external High-speed counter for Destination storage address 2
input) current value capturing Higher DM Lower DM
High-speed Counter
When INT R000 occurs CTH0 CM1611 CM1610
When INT R001 occurs CTH0 CM1613 CM1612
When INT R002 occurs CTH1 CM1615 CM1614
When INT R003 occurs CTH1 CM1617 CM1616
CTH CTH(.D)
CTH.L
CTH 32-bit
High-speed counter
To perform 32-bit (unsigned 0 to
4294967295, signed -2147483648 to
2147483647) up/down counter operation
CTC CTH(.D)
CTC.L
CTC
High-speed counter
Comparator
with max. input frequency of 100 KHZ.
CTC n
Available devices
Index
Indirect Local Modification
Bit device Word device Constant
Operand specifying device
MR DM EM
R (DR) LR T C CTC CR FM ZF T C CTH CTC Z CM #/$ #TM * @ : #/: Z
B TM W
C n KV-5000/3000 - - - - - - - - - - - - - - ○ - - - -
T
H S KV-5000/3000 ○ - - - - - ○ - - - - - - - - - - - -
C n KV-5000/3000 - - - - - - - - - - - - - - ○ - - - -
T
C S KV-5000/3000 - - - - - - - - - - - - - - ○ - - - -
Operand Explanation
n Specifies counter No. with 0 or 1.
CTH
S Specifies counter input.
n Specifies comparator No. with 0 to 3.
CTC Specifies setting value of high-speed counter within the range of 0 to 4294967295 (unsigned)
S
and -2147483648 to +2147483647 (signed).
Operation Description
CTC(.D) It is ON when setting value in S matches the current value of high-speed counter
during operation of high-speed counter.
CTC.L n is specified within the range of 0 to 42497295 when suffix is ".D".
n is specified within the range of 2147483648 to +2147483647 when suffix is ".L".
For control relay (CR) and data memory (DM) used for high-speed counter function and counting and
reset modes, see settings of each setting item.
Example
Current value of CTH0 is stored in
data memory "DM0/DM1".
CTH0
LDA.D
DM0
STA.D
2
High-speed Counter
MOV.D
CTH0 DM0
Example
Current value of CTH0 is stored nto
CTH0 DM0
data memory "DM0/DM1". LDA.L STA.L
MOV.L
CTH0 DM0
Example
Current value of CTH0 is changed
MOV.D
to 100000. #100000 CTH0
#100000
DW.D
CTH0
Example
Current value of CTH0 is changed
MOV.L
to -100000. -100000 CTH0
-100000
DW.L
CTH0
Note
Precautions on CTH change during automatic reset.
·When value is "unsigned" or "signed" and CTC value is positive, even if CTH is changed to
above CTC, the CTH value will be "CTC value-1 ".
·When value is "signed" and CTC value is negativ, even if CTH is changed to below CTC, the
CTH value will be "CTC value +1".
"Automatic reset based on comparator matching", Page 2-106
2
(3) Changing setting value (CTC)
High-speed Counter
Example
Value of CTC0 is change to 100000. #100000 CTC0
LDA.D STA.D
MOV.D
#100000 CTC0
#100000
DW.D
CTC0
Example
Current value of CTC0 is changed
to -100000. -100000 %6%
.&#. 56#.
/18.
-100000 %6%
-100000
&9.
%6%
Note
Precautions on CTH change during automatic reset.
·When value is "unsigned" or "signed" and CTC value is positive, even if CTH is changed to
above CTC, the CTH value will be "CTC value-1 ".
·When value is "signed" and CTC value is negative, even if CTH is changed to below CTC, the
CTH value will be "CTC value +1".
"Automatic reset based on comparator matching", Page 2-106
MEMO
High-speed Counter
Operand Description
n Specifies high-speed counter No..(0 or 1)
Operation Description
Operation flag
Sample Program
The latest value of high-speed counter 0 is used to change the state of output relay R30000 and
R30001.
High-speed Counter
CR2102 R Internal clock(100.0µs) - -
CR2103 If CTC0 ON, then CTH0 is reset automatically. Disable Eable
CR2104 If CTC0 ON, then comparator matching output (R500/R504) is disabled Disable Eable
CR2105 If CTC0 ON, then comparator matching output (R500/R504) is OFF Disable Eable
CR2106 If CTC0 ON, then comparator matching output (R500/R504) is ON Disable Eable
If CTC0 ON, then ON/OFF of comparator matching output (R500/R504)
CR2107 Disable Eable
is inverted
CR2108 If CTC1 ON, then comparator matching output (R500/R504) is disabled Disable Eable
CR2109 If CTC1 ON, then comparator matching output (R500/R504) is OFF Disable Eable
CR2110 If CTC1 ON, then comparator matching output (R500/R504) is ON Disable Eable
If CTC1 ON, then ON/OFF of comparator matching output (R500/R504)
CR2111 Disable Eable
is inverted
CR2112 If CTC1 ON, CTH0 is reset automatically. Disable Eable
Device Attribute
R: Read only Description ON OFF
No. Blank: R/W
CR2402 To select counting mode Ring Linear
CR2403 To detect overflow End Not end
CR2408 To disable preset processing Disable Enable
CR2410 To enable internal enable relay and counting input Disable Enable
Down
CR2412 R Change direction of current value Up counting
counting
CR2505 To switch pulse output destination. R504 R500
TIP The default state of CR2104 and CR2108 is ON. Otherwise, these devices are OFF.
Note
Control relay should be turned on using SET instruction, and turned off using RES instruction.
Attribute
Device No. R: Read only Description
Blank: R/W
To set combined condition of external enable input and internal enable relay
High-speed Counter
CR2205 If CTC2 ON, then comparator matching output (R501/R505) is OFF Disable Enable
CR2206 If CTC0 ON, then comparator matching output (R501/R505) is ON Disable Enable
If CTC2 ON, then ON/OFF of comparator matching output (R501/
CR2207 Disable Enable
R505) is inverted
CR2208 If CTC3 ON, then comparator matching output (R501/R505) disabled Disable Enable
CR2209 If CTC3 ON, then comparator matching output (R501/R505) is OFF Disable Enable
CR2210 If CTC3 ON, then comparator matching output (R501/R505) is ON Disable Enable
If CTC3 ON, then ON/OFF of comparator matching output (R501/
CR2211 Disable Enable
R505) is inverted
CR2212 If CTC3 ON, then CTH1 is reset automatically. Disable Enable
Device Attribute
R: Read only Description ON OFF
No. Blank: R/W
CR2406 To select counting mode Ring Linear
CR2407 To detect overflow End Not end
CR2409 To disable preset processing Disable Enable
CR2411 To enable internal enable relay and counting input Disable Enable
down
CR2413 R Change direction of current value Up counting
counting
CR2513 To switch pulse output destination. R505 R501
TIP The default state of CR2104 and CR2108 is ON. Otherwise, these devices are OFF.
Note
Control relay should be turned on using SET instruction, and turned off using RES instruction.
Attribute
Device No. R: Read only Content
Blank: R/W
To set combined condition of external enable input and internal enable relay
Bit 2 Bit 1 Bit 0 Explanation
Bit 0
OFF OFF OFF
OFF ONOFF Normal enable (counting is performed all the time, whether
external enable input and internal enable relay are enabled/
ON OFF OFF disabled or not.)
ON ON OFF
Bit 1 OFF OFF ON Counting is performed when internal relay is in enabled state.
OFF ON ON Counting is performed when external enable input is in enabled state.
Counting is performed when internal enable relay and
ON OFF ON
external enable input are in enabled state.
Counting is performed when internal enable relay or external
Bit 2 ON ON ON
enable input is in enabled state.
When high-speed counter (CTH) and high-speed counter comparator (CTC) are used, it's possible to
output the clock pulse to direct output relay R500 (R504) or R501 (R505) without being influenced by
scan time.
2
■ Overview
High-speed Counter
For pulse output, the internal clock pulse is counted through high-speed counter (CTH). Whenever the
current value matches the setting value of high-speed counter comparator (CTH), the ON/OFF state of
output relay R500 (R504) and R501 (R505) will be changed to generate pulse.
Counting value
CTC
ON ON
Relay No. of ouput pulse can be changed through CR2505 (CTH0)/CR2513 (CTH1).
Device No. Description ON
CR2505 Switches the pulse output destination of CTH0. Outputs pulse to R504 Outputs pulse to R500
CR2513 Switches the pulse output destination of CTH1. Outputs pulse to R505 Outputs pulse to R501
Note
· The output at beginning of direct clock pulse output begins always with OFF state.
· In the direct clock pulse output process, the output relay R500 (R504) and R501 (R505)
cannot be used for general program.
· Frequency that can be ouput by R500 and R504 is different from that of R501 and R505.
Please set the output destination address according to frequency.
"Output specification", Page 1-27
Clock pulse period (frequency) that can be set can be changed within the following range.
Output Internal clock Pulse period(frequency)range
CR2414 (50ns) 10µs (100kHz) to 214748.36475ms
CR2100 (1.0µs) 10µs (100kHz) to 4294967.295ms
R500 (R504)
CR2101 (10.0µs) 20µs (50kHz) to 42949672.95ms
CR2102 (100.0µs) 200µs (5kHz) to 429496729.5ms
CR2415 (50ns) 10µs (100kHz) to 214748.36475ms
CR2200 (1.0µs) 10µs (100kHz) to 4294967.295ms
R501 (R505)
CR2201 (10.0µs) 20µs (50kHz) to 42949672.95ms
CR2202 (100.0µs) 200µs (5kHz) to 429496729.5ms
OFF
High-speed Counter
Pulse width
Pulse period
OFF
Pulse width
Pulse period
Setting value of CTC for pulse width = pulse width (µs) / internal clock (µs)
Setting value of CTC for pulse period = pulse period (µs)/internal clock (µs)
Note
· If CR2100 and CR2200 are set in operand of high-speed counter (CTH), please set the
CTC setting value to above 5. If the setting value is smaller than 5, the clock pulse cannot
be output correctly.
· If CR2414 and CR2415 are set in operand of high-speed counter (CTH), please CTC
setting value to above 100. If the setting value is smaller than 100, the clock pulse cannot
be output correctly.
· The pulse width will change due to the influence of connected load. Please observe
actual output waveform with oscillograph, and then set the pulse width.
· If you use CTC0 and CTC1 or CTC2 and CTC3 to generated clock pulse, please don't set
the same setting value for CTC0 and CTC1, or CTC2 and CTC3.
· The above mentioned pulse width is the pulse width that is ouput from inside of V-5000/
3000 PLC. In fact, it's output through output circuit. So, the pulse width will fluctuate due
to the influence of response relay and connected load. Please observe actual output
waveform with oscillograph, and then set the pulse width.
High-speed Counter
counter control relay Operation when CTH0 (current value) = CTC (setting value)
comparator
CR2103 Current value of CTH0 is reset automatically ON : Auto reset OFF: not auto reset
CR2104 Controls R500(R504) ON : disabled OFF : enabled
Comparator matching output of R500
CR2105 ON : Auto reset OFF: Not auto reset
CTC0 (R504) is turned off
Comparator matching output of R500
CR2106 ON : Auto reset OFF: Not auto reset
(R504) is turned on
CR2107 R500 (R504) output ON/OFF is inverted ON : Auto reset OFF: Not auto reset
CR2108 Controls R500 (R504) ON : disabled OFF : enabled
Comparator matching output of R500
CR2109 ON : Auto reset OFF: Not auto reset
(R504) is turned off
CTC1 Comparator matching output of R500
CR2110 ON : Auto reset OFF: Not auto reset
(R504) is turned on
CR2111 R500 (R504) output ON/OFF is inverted ON : Auto reset OFF: Not auto reset
CR2112 Current value of CTH0 is reset ON : Auto reset OFF: Not auto reset
Note
· Only one relay between CR2104 to CR2107 and CR2108 to CR2111 will be turned on.
· SET, RES or STA instruction can be used to set CR2103 to CR2112 ON/OFF.
· If pulse period can be changed, be sure to turn on CR2103 or CR2112 to let current value
of CTH0 reset automatically. The pulse period cannot be changed if CR2103 or CR2112
isn't turned on.
· Within the control relay range of CR2104 to CR2107 and CR2108 to CR2111, when
serveral relays are to be turned on, relays of smaller No. are turned on first.
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
CR2109 OFF
2 CR2105
CR2106
OFF
OFF CR2110 OFF
CR2105
CR2106
OFF
ON
CR2109
CR2110
ON
OFF
CR2107 ON CR2111 OFF CR2107 OFF CR2111 OFF
High-speed Counter
CTC0 CTC0
CTC1
ON ON ON ON ON ON
Note
· If pulse period can be changed, be sure to turn on CR2203 or CR2212 to let current
value of CTH1 reset automatically. The pulse period cannot be changed if CR2203 or
CR2212 isn't turned on.
· Only one relay between CR2204 to CR2207 and CR2208 to CR2211 will be turned on.
· SET, RES or STA instruction can be used to set CR2203 to CR2212 ON/OFF.
· Within the control relay range of CR2204 to CR2207 and CR2208 to CR2211, when
serveral relays are to be turned on, relays of smaller No. are turned on first. 2
High-speed Counter
● Operation of output R501(R505) based on control relay setting
Pulse with 1:1 ON/OFF ratio Pulse with variable pulse width
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
2 ● Program example
·Pulse output of output R500 set through CR2104 to
High-speed Counter
Note
If enable input of high-speed counter is used for startting/stopping clock pulse, then
response may be delayed up to one scan period when clock pulse is started.
■ Tip
If clock pulse output is to be controlled through external input (enable/disable), it can be controlled
through ON/OFF of CR2105.
CR2105 ON/OFF can be set through SET, RES or KEEP instruction.
So clock pulse must start from "OFF", and finish with "OFF".
In the example of previous page, if a program in the figure below is added, then R500 will output clock
pulse only when R000 is ON.
High-speed Counter
CR2205 OFF CR2209 ON
CR2206 ON CR2210 OFF
CR2207 OFF CR2211 OFF
In above-specified formula, pulse width=200µs, pulse period=500µs and internal clock=10µs (CR2201)
are substituted, and the setting value of CTC2 and CTC3 is calculated.
The setting value of CTC3 is "20", and that of CTC2 is "50".
The values calculated from other internal clocks are as follows (only for reference).
Control relay Internal clock CTC2 value CTC3 value
CR2415 50ns 10000 4000
CR2200 1.0µs 500 200
CR2201 10.0µs 50 20
CR2202 100.0µs 5 2
● Program example
CR2008 CR2103 CR2104 CR2105 CR2106 CR2107 ·CR2204 to 2207 and CR2208 to 2211 are used to set
00001 SET RES RES SET RES pulse output for output R501.
In this example, it should be guaranteed when setting
CR2108 CR2109 CR2110 CR2111 CR2112 CTH0
00002 RES SET RES RES RES RES that, for comparator matching output of R501,
(CR2204 :OFF) can turn on output of (CR2206: ON)
CR2002 CTH.D0 R501 through CTC2, and can turn off (CR2209:ON)
00003 CR2101 through CTC3.
#50 ·CR2203 is turned off, and reset of CTH1 is specified
00004 CTC.D0 through CTC2.
Pulse width of clock pulse can be correctly output
#20
00005 CTC.D1 from 1st pulse through the above operation.
·CTH1's enable input relay is always ON when clock
pulse is output.
Count value
CTC0
CTC1
ON ON ON ON
Note
· If enable input of high-speed counter is used for for starting/stopping clock pulse, the
response may be delay up to 1 scan period when clock pulse is started or stopped.
· For starting and stopping of clock pulse output, refer to the "Tip" below.
● Tip
2 When the output of clock pulse is controlled through external input (enable/disable), this can be done
through ON/OFF of CR2205.
High-speed Counter
· Through rewriting the setting value of high-speed counter comparator CTC2 via STA instruction,
clock pulse period (frequency) can be changed.
● Program example
·Pulse output of output R500 is set through CR2104 to
CR2008 CR2103 CR2104 CR2105 CR2106 CR2107 2107 and CR2108 to 2111.
00001 EI SET RES SET SET RES
In this example, (CR2104 OFF) R500's comparator
CR2108 CR2109 CR2110 CR2111 CR2112 matching output is allowed to turn on (CR2106: ON)
00002 RES SET RES RES RES
R500 output through CTCO, and turn off (CR2109:
CR2203 CTH0 CTH1 ON) R500 output through CTC3.
00003 SET RES RES
·CR2103 is specified, and CTH0 reset is specified via
R000 R1000 R1000 CR2105 CTC0.
00004 DIFU RES Pulse width of clock pulse can be correctly output from
00005
CR2002 %6*&
CR2101
1st pulse via above operation.
·Interrupt is enabled through EI instruction.
2
When the current value of high-speed counter CTH1
High-speed Counter
#50
00006 CTC.D0 matches the setting value of high-speed counter
comparator CTC2 (10000 pulse output), clock pulse
#20
00007 CTC.D1 will be stopped through interrupt program (INT CTC2).
·CR2203 is turned on, and CTH1 reset is specified via
CR2002 %6*& CTC2.
00008 R500
Through the above operations, operation can be
#10000 performed repeatedly using the specified number of
00009 CTC.D2
pulses (10000).
END ·CTH1's enable input relay is always kept at ON state
00010
during counting of clock pulse.
INT ·CTH1's enable input relay is always ON when clock
00011 CTC2 pulse counting is performed.
CR2002 CR2105 ·Internal clock (CR2101) is specified on the clock input
00012 SET high-speed counter CTH0, and R500 is specified on
the clock input of high-speed counter CTH1.
RETI
00013 Through the above operations, CTH0 is used for clock
pulse output, and CTH1 is used for clock pulse
ENDH
00014 counting.
·Number of pulses of clock pulse is set the setting value
of high-speed counter comparator CTC2.
·Clock pulse output is started turning on input R000.
When clock pulse is turned on again after stopping,
please turn on input R000 again.
● Tip
ON/OFF of CR2103 to CR2111 can be set by LDA instruction and STA instruction in addition to SET
instruction/RES instruction. If the program shown in the example is rewritten through LDA instruction
and STA instruction, then number of rungs and steps can be reduced as shown in the figure below.
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
Internal register 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0
When STA CR2100 is executed,value of the internal register will be assigned to auxilary relay
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ˆˆ
MEMO
2
High-speed Counter
Through special instructions, frequency (Hz) or rotation speed (rpm) of external pulse input can be
measured simply.
Frequency Counter
Frequency measurement
B-phase R012 measurement (Hz)
RCNT command
External pulse input CTH1
A-phase R011
Rotation speed(rpm)
B-phase R013
Note
Since high-speed counter is required to use frequency counter function, therefor, other
functions or instructions of high-speed counter with the same No. cannot be used
simultaneously.
For Terminal No. of input relays (R010 to R013), see "Wiring and Internal Circuit Diagram", Page 1-28。
Operand Decription
n Specifies used high-speed counter No.(0, 1)*1
Specifies pulse input mode. *1
S1 0 = 1-phase w/o direction; 1 = 1-phase w/ direction; 2 = phase difference 1x; 3 = 2-pulse
"Counting Input Setting", Page 2-101
Speciies scan times within 0 to 65535. But, if the scan times is "0", it will be set to "100".
S2 When bit device is specified, continuous 16 bits will be occupied. If word device is specified, only 1 word
is occupied. *2
Specifies the leading device for storing detection result (Hz). When bit device is specified, continuous 32
D
bits will be occupied. If word device is specified, then 2 words will be occupied. *2
*1 The device cannot be specified in "$".
*2 When a bit device other than channel start is specified (R106, R1012, etc.), it will be dragged to
next channel during processing.
Description of Operation
Settings of S1 and S2 are read on the rising edge of the execution conditon, and each scan is
performed when the execution condition is ON. The value (detection result) stored in D / D+1 will
be refreshed whenever the scan times in S2 is perfomred. No. of the high-speed counter n is
specified.
If the execution condition is established, then time between pulses of external input is detected
continuously, and with END processing, frequency is calculated from the time between pulses.
Fruquency (Hz) =1/(time between pulses)
The mean value corresponding to scan times in S2 is taken as the measurement result of
frequency, and stored in D / D+1 .
The updating period is below "scan time X (scan times specified by S2 )".
If execution condition is OFF, then detection will be stopped.
Note
· 2 or above FCNT intructions using high-speed counter with the same No. cannot be
executed simultaneously.
· Other functions or instructions cannot be used simultaneously when the high-speed
counter with the No. n is used.
· After execution condition is ON, detection is started from the 1st pulse input, and
detection result is refreshed from the 2nd pulse input on.
· When this instruction is used, please use HSP instruction and control relay and set the 2
input time constant to 10 μs.
Frequency Counter
"Input Time Constant Setting", Page 2-84
· Please don't change the control relay (CR) and control memory (CM) related to high-
speed counter specified by n .
· Starting and stopping of detection is executed when scanning is finshed. (when no
instruciton is executed.)
· If there is no pulse input within 1s, the frequency is 0 (Hz).
· When S1 and S2 are changed, please temporarily change execution condition
from OFF -> ON.
· Cannot be used in interrupt program and initialization module.
Operation flag
Sample Program
Frequency (Hz) of encoder input R010 (A-phase) and R012 (B-phase) is detected, and the result is
stored in " DM0/DM1". (CTH0 is used)
R000 FCNT 0
#2 #10 DM0
Operand Description
n Specifes used high-speed counter No..(0, 1).*1
Specifes pulse input mode. *1
S1 0 = s1-phase w/o direction; 1 = 1-phase w/ direction; 2 = phase difference 1x; 3 = 2-pulse
"Counting Input Setting", Page 2-101
Specifies the leading device for storing parameters. When bit device is specified, continuous 48 bits will
be occupied. If word device is specified, 3 words will bes occupied. *2
S2 +0 … Detection method (0: to detect according pulse interval; 1: to detect according to time per revolution)
S2 S2 +1 … number of pulses per revolution.
· to detect according to pulse interval (1 to 65535)
· to detect according to time per revolution (1 to 32767)
S2 +2 … Scan times (0 to 65535). If it is 0, the scan times will be set to 100.
Speciies the leading device for storing detection result (rpm). When bit device is specified, continuous 32
D
bits will be occupied. If word device is specified, 2 words will be occupied. *2
*1 The device cannot be specified in "$".
*2 When bit device other than channel starting (R106, R1012, etc.) is specified, it will be dragged to
next channel during processing.
Description of Operation
Settings of S1 and S2 are read on the rising edge of the execution conditon, and each scan is performed
when the execution condition is ON. The value (detection result) stored in D / D+1 will be refreshed
whenever the scan times in " S2 +2" is perfomred. No. of the high-speed counter n is specified.
Frequency Counter
If execution condition is OFF, detection will be stopped.
Note
· 2 or above RCNT intructions using high-speed counter with the same No. cannot be
executed simultaneously.
· Other functions or instructions cannot be used simultaneously when the high-speed
counter with the No. n is used.
· After execution is ON, detection result is refreshed from the 2nd pulse input on.
· When this instruction is used, please use HSP instruction and control relay, and set the
input time constant to 10µs. "2-12 Motor (positioning) Control", Page 2-157
· Please don't change control relay (CR) and control memory (CM) not related to high-
speed counter with the No. specified by n .
· Starting and stopping of detection is executed when scanning is finshed. (when no
instruciton is executed.)
· When detection is started according to pulse interval, it will change to 0 (rpm) when pulse
interval is larger than 1s.
· When detection is started according to time per revolution, it will change to 0 (rpm) when
time longer than 1.5s is required for 1 revolution.
· When S1 and S2 are changed, please temporarily change execution condition
from OFF -> ON.
· Cannot be used in interrupt program and initialization module.
Operation flag
Sample Program
Rotation speed (rpm) of encoder input R010 (A-phase) and R012 (B-phase) is detected, and the result
is stored in "DM0/DM1". (CTH0 is used)
2 Always ON
HSP
HSP R010
HSP R012
LD R000
R012 MOV #1 DM100
Frequency Counter
MOV
#2500 DM101
MOV
#10 DM102
RCNT 0
#2 DM100 DM0
Current value obtained from acquisition encoder input is compared with preset setting of multiple ranges.
The setting range in which the current value is located will be detected, and the output destination
device corresponding to this setting range is set to ON. 2
gEncoder Setup range Output destination device
Cam Switch
gCPU internal device OFF setting value ON setting value Range of ON
Compare (1)OFF setting value (1)ON setting value (1) (1) ON<=(current value) < (1) OFF
(2)OFF setting value (2)ON setting value (2) (2) ON<=(current value) < (2) OFF
current … … … … …
(31)OFF setting value (31)ON setting value (31) (31) ON<=(current value) < (31) OFF
(32)OFF setting value (32)ON setting value (32) (32) ON<=(current value) < (32) OFF
CPU internal
MCMP instructions
device
Note
When incremental encoder is used, since high-speed counter is required, other functions or
instructions using a high-speed counter with the same No. cannot be used simultaneously.
MCMP
MCMP Multi-stage
comparator
To perform multi-stage
comparator operation.
Operand Description
S1 Specifies the leading device of data block for comparing. *1
S2 Speciies the device for comparing.*2
D Specifies the leading device for storing comparison result. *3
n Specifies number of data for comparing or the device for storing number of data. (1 to 32)*4*5
*1 If bit device is specified, then n x 32 continuous bits starting from channel will be processed.
If word device is specified, n x 2 words will be processed.
*2 If bit device is specified, then continuous 16 bits will be processed.
If relays other than channel leading relay (R002, R106, R1012, etc.) are specified, then 16 bits
will be processed, straddling to the next channel.
*3 When bit device is specified, n bits will be occupied.
When word device is specified, the result is stored in lowest bit of each word device. The bits
other than the lowest bit is not changed.
*4 "$" cannot be used.
*5 When bit device is specified, continuous 16 bits will be occupied.
If word device is specified, 1 word will be occupied.
Description of Operation
When execution condition is ON, n 32-bit data (2 unsigned 16-bti BIN data: OFF setting and ON
setting) starting from S1 are compared with the unsigned 16-bit BIN data stored in S2 , and the
result is stored in devices starting from D .
OFF setting value ON setting value Compare Result
S1 ˇ1
bit
31
30
bit bit
16 15
12
bit
0
S1 D OFF
2
n S1 ˇ3 40 30 S1 ˇ2 D ˇ1 ON
Cam Switch
bit bit
S1 ˇ5 30 80 S1 ˇ4 15 0 D ˇ2 OFF
S2 30
n ×
˄ǂǂ
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
Note
· Even if the execution condition is OFF, output will not be changed.
Operation flag
Sample Program
The value of data memory DM0 is compared with setting value, and output relay is ON/OFF according
to the following conditions.
If #100<=DM0<=#200, R30000 is ON.
If #300<=DM0<=#400, R30001 is ON.
If #500<=DM0<=#600, R30002 is ON.
If #700<=DM0<=#800, R30003 is ON.
If #900<=DM0<=#1000, R30004 is ON.
If #1100 <= DM0 <=#1200, R30005 is ON.
- KV-5000/3000 Series User’s Manual - 2-141
CPU INTERNAL FUNCTIONS
2 MOV
#400 DM13
MOV #900 DM18
MOV #1000 DM19
MOV #1100 DM20
MOV #1200 DM21
Cam Switch
LD R000
MOV
MCMP DM10 DM0 R30000 #6
#500 DM14
MOV
#600 DM15
MOV
#700 DM16
MOV
#800 DM17
MOV
#900 DM18
MOV
#1000 DM19
MOV
#1100 DM20
MOV
#1200 DM21
R000 MCMP
DM10 DM0 R30000
#6
MEMO
Cam Switch
Operand Decription
S1 : 0 to 3599). *1
Specifies the leading device of the data block for storing comparison angle setting value (unit 0.1°
S2 Specifies the device for storing absolute encoder value. *2
D1 Specifies the leading device for storing comparison result. *3
D2 Specifies the leading device for storing parameters. *4
*1 If bit device is specified, then " D2 +0" x 32 bits starting from channel will be processed.
If word device is specified, " D2 +0" x 2 words will be processed.
*2 When bit device is specified, continuous 16 bits will be used. If relays other than the channel leading relay
(R002, R106. R1012 etc.) are specified, then 16 bits will be processed, straddling to the next channel.
*3 When bit device is specified, then " D2 +0" bits will be occupied.
When word device is specified, the result is stored in the lowest bit of each word device. The bits other than
the lowest bit will not be changed.
*4 If bit device is specified, then continuous 128 bits starting from the start of channel will be occupied.
If word device is specified, 8 words will be occupied.
Description of Operation
Parameter
Device Content
Number of
D2 +0 Sets number of comparison data (1 to 32).
comparison data
D2 +1 Resolution Sets the resolution of encoder (32 to 32768) . 2
Sets residual gray code (0 to 16384).
Cam Switch
Residual (Exa 32,64,128,256,512,1024,
Resolution 36 360 720
D2 +2 mple) 2048,4096,8192,16384,32768
gray code
Residual
0 14 76 152
gray code
Zero degree
D2 +3 Sets the value specifed to zero degree.(0 to resolution -1)
setting value
Stores the current angle after compensation.(0 to 3599)
Current angle ·When S2 -" D2 +2" >= " D2 +3".
D2 +4 (unit: 0.1 (3600÷" D2 +1") x ( S2 -" D2 +2"-" D2 +3")
degree) ·When S2 -" D2 +2"<" D2 +3").
(3600/" D2 +1") x (" D2 +1"+ S2 -" D2 +2"-" D2 +3")
Device Content
D2 +5 D1 D2 +4
Bit 0: output response error
<Condition>
If within a scan period, the ON setting value is equal to the OFF setting value for 2 above changed
output destination devices, or there is any difference between ON setting values, and between OFF
setting values, an error will occur. No No change
Operation No error will occur in the following cases. change in status
D2 +5
error · When ON setting value is equal to OFF setting value for the output destination devices changed
simultaneously.
·When ON/OFF setting values of the output destination devices changed simultaneously are the same.
Bit 1: Input value out of range error No No
It will be On when input value of the encoder isn't within the setting range. change change
Please reset by ladder program.
D2 +6
Workspace (User cannot use)
D2 +7
When execution is ON, " D2 +0" 32-bit data (2 unsigned 16-bit BIN data: OFF setting and ON setting)
starting from the leading device S1 will be compared with the current angle value in " D2 +4", and
the result will be stored in devices starting from D1 .
D
value of output destination device (3)
·OFF setting value of output destination device (3) = OFF setting
value of output destination device (4)
Cam Switch
Output destination(4)
C A (In the case of error)
Output destination(5) Within a scan period, when the ON setting value is different from
the OFF setting value ofr 2 above output destination devices. Or,
there is difference between ON setting values and between OFF
setting values.
e.g.) D …Within a scan period, the ON and OFF setting value of
2 above output destination devices are changed
OFF setting value of output destination device (4) ≠ ON setting
value of output destination device (5)
Note
· In the process of operation, change of setting value will immediately be reflected to the
output. If you don't want reflect it to output, please set the xecution condition OFF.
· Do not use CR2002 (normal ON) control relay in execution condition.
· Even if the execution condition is OFF, output will be not changed.
· Cannot be used in interrupt program and initialization module.
Operation flag
Sample Program
Input value R000 to R007 from absolute encoder is stored in DM0, and is comparated with the setting
value. Output relay will be ON/OFF according to the following specification.
Resolution: 256/rev. Residual gray code: 0 Zero-point teaching value: 12
嗩
R000
Absolute
encoder R007
KV-5000/3000
CR2008 MOV
;(mnemonics list)
LD CR2008
MOV #6 DM110
2
#6 DM110
MOV #256 DM111
Cam Switch
1 scan ON at
operation start MOV #0 DM112
MOV MOV #12 DM113
#256 DM111 LD CR2002
LDA R0
MOV CON
#0 DM112 ANDA $FF
CON
STA DM0
MOV
LD CR2002
#12 DM113
MOV #100 DM10
MOV #200 DM11
MOV #300 DM12
CR2002 R0 $FF DM0
MOV #400 DM13
LDA ANDA STA MOV #500 DM14
Always ON
MOV #600 DM15
CR2002 MOV MOV #700 DM16
#100 DM10 MOV #800 DM17
Always ON MOV #900 DM18
MOV
MOV #1000 DM19
MOV #1100 DM20
#200 DM11
MOV #1200 DM21
LD MR000
MOV ABSENC DM10 DM0 R30000 DM110
#300 DM12
MOV
#400 DM13
MOV
#500 DM14
MOV
#600 DM15
MOV
#700 DM16
MOV
#800 DM17
MOV
#900 DM18
MOV
#1000 DM19
MOV
#1100 DM20
MOV
#1200 DM21
MR000 ABSENC
DM10 DM0 R30000
DM110
Operand Description
S1 Specifies leading device of the data block for storing comparison angle setting value (unit 0.1°: 0 to 3599). *1
S2 Specifies No. of used high-speed counter (CTH). (0,1)*2
Sets encoder counting input mode. (0 to 5)*2
0 - 1-phase w/o direction 1 - 1-phase w/ direction 2 - phase difference, 1x
S3
3 - phase difference, 2x 4 - phase difference, 4x 5 - 2-pulse
"Counting Input Setting", Page 2-101
D1 Specifies the leading device for storing comparison result. *3
D2 Specifies the leading device for storing parameters. *4
*1 If bit device is specified, then continuous " D2 +0" x 32 bits starting from channel will be
processed. If word device is specified, then " D2 +0" x 2 words will be processed.
*2 "$" cannot be used.
*3 When bit device is used, " D2 +0" bits will be occupied.
When word device is specified, the result is stored in the lowest bit of each word. Bits other than
the lowest bit will not be changed.
*4 If bit device is specified, then continuous 80 bits starting from the start of channel will be
occupied.
If word device is specified, then 5 words will be occupied.
Description of Operation
Parameter
Device Content
Number of
D2 +0 Sets number of comparison data (1 to 32)
comparison data
D2 +1 Resolution Sets resolution of encoder (32 to 32768) 2
Zero degree
Cam Switch
D2 +2 Sets the value specified to zero degree. (0 to resolution -1)
setting value
Stores the current angle after compensation. (0 to 3599)
· " S2 ">=" D2 +2").
Current angle
D2 +3 (3600/" D2 +1")×( S2 -" D2 +2")
(unit: 0.1°C)
· " S2 "<" D2 +2".
(3600/" D2 +1")×(" D2 +1"+ S2 -" D2 +2")
Device Content
D2 +4 D1 D2 +3
Bit 0: output response error
<Condition>
If within a scan period, the ON setting value is different from the OFF setting value for 2 above output
destination devices, or there is any difference between ON setting values, and between OFF setting
No No change
values, an error will occur.
change in status
No error will occur in the following cases.
D2 +4 Operation error · When ON setting value is equal to the OFF setting value for the 2 above output destination devices.
· When ON setting values or OFF setting values for 2 above destination devices changed simultaneously
are same.
Bit 1: Input value out of range error No No
When input value of encoder isn't within the setting range. change change
Please reset by ladder program.
When execution is ON, " D2 +0" 32-bit data (2 unsigned 16-bit BIN data: OFF setting and ON setting)
starting from the leading device S1 will be compared with the current angle value in " D2 +3", and
the result will be stored in devices starting from D1 .
Note
· In the process of execution, change of setting value will immediately be reflected to
output. If you don't want to reflect it output, please turn execution condition OFF.
· In the process of operation, sometimes an error will occur when high-speed counter reset
is performed ("RES instruction", "external input (Z-phase)") under output response error
condition (" D2 +4" bit 0).
· Do not use CR2002 (normal ON) control relay under execution condition.
· Even if the execution condition is OFF, output will be not changed. Setting value is held.
· Other instructions can not be used when functions specified by " S2 " are used.
· Meanwhile, NCENC instructions with same " S2 " cannot be used.
· When INCENC instruction is used, please use HSP instruction and control relay, and set
the input time constant to 10µs.
"Input Time Constant Setting", Page 2-84
· Since high-speed counter functions are used, don't' change control relay, control memory,
CTH and CTC related to high-speed counter using ladder program, etc.
· When power is OFF, value of high-speed counter will be maintained. Please use RES
instruction and CTH instruction to clear.
· Cannot be used in interrupt program and initialization module.
· Attention should be paid if writing is performed in RUN mode.
"Write in the RUN mode", Page 3-179
Operation flag
Sample Program
Input value from the incremental encoder is measured using the high-speed counter CTH 1, the
measured value is compared with the setting value. Then output relay is turned ON/OFF according to
the following specifiaction. Value of high-speed counter CTH1 can be cleared through turning ON the
input relay R001.
2
High speed counter •• CTH1 Resolution•••••••••••••••••••• 256/rev.
Cam Switch
M counting mode ••••• 2-pulse zero degree teaching •••••• 12
MOV
#500 DM14
MOV
#600 DM15
MOV
#700 DM16
MOV
#800 DM17
MOV
#900 DM18
MOV
#1000 DM19
MOV
#1100 DM20
MOV
#1200 DM21
R000 INCENC
DM10 #1 #5
R30000 DM110
R001 CTH1
RES
If instruction "PLSOUT" dedicated for specified frequency pulse output is used, it's only required to
specify high-speed counter/output frequency/duty cycle to simply output pulses with specified
frequency from the output relay of PLC. 2
Output pulse by R500 or R504
CTH0
CTH0/CTH1
specified frequency
setting operation ratio Output pulse by R501 or R505
CTH1
The relay No. of output pulse can be changed through CR2505 (CTH0)/CR2513 (CTH1).
Device No. Content ON OFF
CR2505 Switches the pulse output destination of CTH0. Outputs pulse to R504 Outputs pulse to R500
CR2513 Switches the pulse output destination of CTH1. Outputs pulse to R505 Outputs pulse to R501
Note
Since the specified frequency pulse output function will use high-speed counter, therefore,
other functions or instructions using the high-speed counter with same No. cannot be used
simultaneously.
For No. of each I/O terminal, see "Wiring and Internal Circuit Diagram", Page 1-28.
Description of Operation
PLSOUT PLSOUT
Specified frequency
pulse output
To output the pulse of specified
frequency using high-speed counter.
Operand Description
n1 Specifies No. of used high-speed counter. (0, 1)*1
Specifies frequency (0 to 100000) (Hz) or stores the leading device of specified frequency.
S When bit device is specified, continuous 32 bits will be occupied. If word device is specified, 2 words will
be occupied. *1 *2
Specifies duty cycle (-499 to 499) of output pulse, or stores leading device for the duty cycle.
When bit device is specified, continuous 16 bits will be occupied. If word device is specified, 1 word will
be occupied. *1 *2
Setting value
(Duty cycle -50) *10
-499 … 0 … 499
n2
Duty ratio
TON / (TON + TOFF)
0.1% … 50.0% … 99.9%
ON ON ON
Description of Operation
When execution condition is ON, pulse with specified frequency by S will be output through output
relay. No. of used high-speed counter ( n1 ) is specified. Specify the Duty cycle of output pulse is
specified by n2 .
If the execution condition is OFF, then pulse output is OFF.
When output relay is CTH0, it will be R500 or R504. When output relay is CTH1, it will be R501 or
R505. Output relay switching can be performed through CR2505 (CTH0)/CR2513 (CTH1).
"Specifed Frequency Pulse Output", Page 2-153
Note
· 2 above PLSOUT instructions using a high-speed counter with the same No. cannot be used.
· Other functions or instructions using the high-speed counter of the No.specified by n
Sample Program
When R000 is turned on, pulses will be output to R501 according to the frequency (duty cycle 50%) set
by "DM1/DM0". (CTH1 is used)
MEMO
2
Specifed Frequency Pulse Output
Item Specification
Control mode
Positioning (point to point) control, speed control 2
"Operation mode", Page 2-160
* Parameters are stored in control memory (CM). Over 33 positioning points can be managed through
changing value by program.
Operating speed
Starting speed
(stopping speed)
Time (ms)
Acceleration time Deceleration time
2
(2) Generate ladder program
Description of Operation Motor (positioning) Control
No
Change parameter
during executing? "Lilst of Devices/error Codes for Positioning", Page 2-208
"Change speed during operation", Page 2-183
Yes "Reference example for executing speed change during
operation", Page 2-203
Change parameter "Reference example for executing positioning control over 32
points", Page 2-207
Parameter Setup
Parameters are divided into 2 types: point parameters and system parameters.
Every parameter can be managed through control relay (CR) or control memory (CM), and the value
can be rewritten through ladder program, so that parameters can be changed during operation.
Point parameters
Point parameters are the basic parameter for ladder control, which is used to set movement target point
(position), operating/starting speed as well as acceleration/deceleration time.
"Point parameters", Page 2-159
System parameters
System parameters can be used to set sensor input, pulse output, comparator, origin return operation
and JOG operation.
"System parameters (I/O setting)", Page 2-165
"System parameters (comparator setting)", Page 2-170
"System parameters (origin returning)", Page 2-172
"System parameters (JOG)", Page 2-177
Point parameters
(1)
TIP Once set, the parameters will be stored in control memory (CM) (control memory) of CPU.
Point parameters are common to X-axis and Y-axis.
If the checkbox is selected, then the storage position as shown on the right will be displayed.
■ Point No.
Used as operand of PLSX and PLSY instruction and can be specified according to device.
Execute condition #1
PLSX
When the above ladder program is executed, pulse will be generated according to the point parameter of
2 point No.1.
“PLSX, PLSY instruction", Page 2-186
Description of Operation Motor (positioning) Control
■ Operation mode
Through positioning control (INC positioning and ABS positioning), you can move an object by a target
value/movement from a certain position.
Through speed control (CW control and CCW control), you can move an object towards a specified
direction, until the stop sensor is ON.
● INC positioning
In this mode, relative coordinates are used for positioning control.
When an object moves from current postion to a specified position, the distance between the two
positons will be specified as movement. For example, in the following figure, when the object at A
moves to B, the movement should be set to "+100". Then, when it moves from B to C, the movement
should be set to "+200". When it returns to B from C, the movement should be set to "-200".
In the case of current position overflow, warning relay will be ON, but pulse output will not stop.
"Lilst of Devices/error Codes for Positioning", Page 2-208
A B C
+100 +200
-200
Coordinate
Current position 0 (origin) 100 200 300
● ABS positioning
In this mode, absolute coordinates are used for position control.
The distance from origin to the target positon is specified as target value. For example, in the following figure,
when the object at A moves to B, the target value should be set to "+100". Then, when it moves from B to C,
the target value should be set to "+300". When it returns to B from C , the target valueshould be set to
"+100".
When warning relay is ON, an error will occur and pulse output will stop if ABS positioning is performed.
"Lilst of Devices/error Codes for Positioning", Page 2-208
A B C
100 300
100
Coordinate
Current position 0 (origin) 100 200 300
● CW control
In CW control, pulses will be output continuously in CW direction according to specified speed,
independent of number of output pulses.
Speed
CW
CCW
Time 2
CCW
Speed
TIP Parameter storage position: parameters are stored in bit 0 and bit 1 of CM2066+(point No. x
10), as shown below.
■ Target value/movement
The position to move to is called “target value" or "movement".
If ABS positioning is selected as operation mode, it is "target value"; if INC positioning is selected, then
it is "movement”. If CW/CCW control is selected, then it cannot be set.
Frequency (Hz)
Target value/movement (number of output pulses)
Operating speed
Starting speed
(Stop speed)
Time (ms)
Acceleration time Deceleration time
■ Starting speed
When performing positioning control, output pulse speed should be set to ensure smooth startup of motor
revolution.
Setting range : 50 to 65535 (PPS) (note: starting speed must be smaller than operating speed).
Parameter storage position: CM20621+(point No.x10)
2 ■ Acceleration/deceleration time
Acceleration time: time required from starting speed to operating speed. The lower the value is, the
Description of Operation Motor (positioning) Control
quicker the acceleration and the shorter the moving time will be.
Deceleration time: time required from operating speed to stopping speed. The lower the value is, the
quicker the deceleration and the shorter the moving time will be.
In KV-5000/3000, acceleration time and deceleration time are set to the same value.
Speed
Setting range : 0 to 4000 (ms)
If "0" is specified, then acceleration
Operating speed
and deceleration are shown on the
right.
Parameter storage position: CM2063+(point No. x10) 0 T
■ Operating speed
When performing positioning control, pulse speed that is output to motor should be specified during
operation.
Setting range : 50 to 100000 (PPS) (note: operating speed must be largeer than starting speed).
Parameter storing position: CM2065+ (point No.x10)/CM2064+ (point No.x10)
Note
(1) The operation when "starting speed=operating speed" is shown below.
Speed
Operating (starting)
speed
0 Time 2
In this case, acceleration/deceleration time can be neglected.
Parameter storage position: parameters are stored bit 4 of CM2066+(point No.x10), as shown below.
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
bit 4 Contents to be set
0 Stop sensor not used
1 Stop sensor used
2
Description of Operation Motor (positioning) Control
If the specified number of pulses is set to "0", then stop sensor input will be ON, and operation will stop
immediately.
Deceleration time will be neglected.
Speed Stop sensor input ON
Stop immediately
If the specified number of pulses is set to "65535" (max. value), then stop sensor input will be ON,
acceleration operation will start, and will stop after deceleration time ends.
Speed Stop sensor input ON
Deceleration time
(1)
(2)
(4)
(6)
(3)
(5)
2
(12)
■ Origin sensor
“Origin" refers to the position used as the reference point for positioning. "Origin sensor" refers to the
sensor installed at origin position of axis.
CR3002 (CR3102) ...........CR3002 (X axis) and CR3102 (Y axis) are set to origin sensors.
R000 to R003 ...................Input relay R000 to R003 are used as origin sensors.
If R000 to R003 is set, then the preset input is used as origin sensor input for origin return.
If relays other than R000 to R003 are used as origin sensor input, then CR3002 (CR3102) should be
set in advance according to these parameters, and can be turned ON/OFF through ladder program.
Example
Input relay R30000 is used for origin sensor
R30000 CR3002
input of X-axis.
■ Stop sensor
During operation, the moving object will move up to the position of stop sensor. When stop sensor is
ON, the moving object will decelerate and stop immediately from this position; or continue to move a
certain distance (specified number of pulses for stop sensor), then decelerate and stop.
Howevert, if "Stop sensor used or not" is set to "None" in point parameters, the stop sensor can be
neglected.
CR3003 (CR3103)............CR3003 (X axis) and CR3103 (Y axis) are set to stop sensors.
R000 to R 003 ..................Input relay R000 to R003 are used as stop sensors.
N.O./N.C...........................Logic of stop sensor input is set.
If R000 to R003 is set, then the preset input is used as stop sensor input to stop moving.
If relays other than R000 to R003 are used as stop sensor input, CR3003 (CR3103) should be set in
advance according to these parameters, and can be turned ON/OFF through ladder program.
Example
Input relay R30001 is used for stop sensor
R30001 CR3003
input of X-axis.
■ Z-phase
Z-phase is mainly used to improve the position accuracy when origin return is finished. Generally, pulse
encoder's zero signal is used as "Z-phase".
CR3000 (CR3100) ......... X axis: CR3000 (CW) CR3001 (CCW) are set as limit switch input; Y axis:
CR3100 (CW) CR3101 (CCW) are set as limit switch input.
R004(R005).................... X axis: Input relays R004(CW) R006(CCW) are set for limit switch input; Y
axis: input relays R005(CW) R007(CCW) are set for limit swtich input.
N.O/N.C. ........................ Logic of limit switch input is set.
The limit switch installed on the CW direction end is called CW limit switch.
Movement toward the CW direction
Limit switch CW
The limit switch installed on the CCW end is called CCW limit switch.
Movement toward the CCW direction
If CR3000 (CW) and CR3001 (CCW) are set at X axis, and CR3100 (CW) and CR3101 (CCW) set at Y
axis, then you can turn ON/OFF CR3000 (CW) and CR3001 (CCW) or CR3100 (CW) and CR3101
(CCW) through input relays connected to the actual limit switch.
If R004 (CW) and R006 (CCW) are set at X axis, and R005 (CW) and R007 (CCW) set at Y axis, then
the preset input is set as limit switch.
Y CM2031 1 N.C
Use of limit switch CW R004 (X axis), R005 (Y axis)
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axis Destination storage address bit8 Contents to be set
X CM2018 0 Not used
Y CM2048 1 Used
Use of limit switch CCW R006 (X axis), R007 (Y axis)
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axis Destination storage address bit9 Contents to be set
X CM2018 0 Not used
Y CM2048 1 Used
Example
CW limit switch of X axis is connected to R30002 CR3000
input relay R30002, and CCW limit switch
connected to input relay R30003.
R30003 CR3001
If limit switch is ON, it indicates that a limit error (error code: 31, 32 and 33) has occured, and pulse
output will be stopped. Please find out the cause of error, and reset the error flag CR3007/CR3107 to
clear the error.
Note · For safety reasons, please use limit switches of N.C. type whenever possible. If
N.O.type limit switches are used, it's very dangerous when the switch does not
operation in case line-break occurs.
· After positioning equipment is installed, be sure to verify that limit switches can
operate normally.
· In the case of emergency stopping of motor, the near point detector of limit switch
must be wide enough to prevent object from crossing the limit switch.
Connection example
1-axis connection
1-pulse output 2-pulse output
Motor drive
Motor drive
2-axis connection
1-pulse output 2-pulse output
Motor drive
Motor drive
X1 axis Pulse X1 axis X1 axis CW pulse X1 axis
R500 R500
Rotation direction CCW pulse
R501 R501
Motor drive
In the process of positioning control, count the output pulse as "current value". Compare the current value
with the setting value of (3) or (5), if they match, execute the setting operation specified by (2) or (4).
In addition, interruption occurs if they match with the settings specified by (6).
2
(1)
Description of Operation Motor (positioning) Control
(2)
(3)
(4)
(5)
(6)
■ Function selection
Disable ............................... No operation is performed base on comparator No.
Stop sensor ........................ Stop sensor executes the same operation with input.
Limit switch CW................... CW limit switch executes the same operation with input.
Limit switch CCW ................ CCW limit switch executes the same operation with input.
Comparator 1
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axis Destination storage address bit7 bit6 Operaton when current position comparator 0 matches
X CM2000 0 0 Not used
Y CM2030 0 1 Used as stop sensor
1 0 Used as limit switch of CW direction
1 1 Used as limit switch of CCW direction
* If comparator 0 and 1 are set with the same functions, comparator 1 is invalid.
■ Setting value
Set a value (comparator value) that can be compared with the output pulse number (current position
(current value)).
Note
KV-5000/3000 PLC can identify the interrupt value according to comparator 2 when CHGSPX and
CHGSPY are executed or pulse output is started throught PLSX or PLSY. (X axis: CM02029/
CM02028; Y axis: CM02059/CM02058. Operation will not be normal when setting value is written only
in control memory.
When using comparator 2 as interrupt condition, please write setting value to control
memory and then execute the CHGSPX,CHGSPY,PLSX,PLSYinstruction.
"Reference example for executing speed change during operation", Page 2-203
If power becomes off at positioning or moving axis manually, the actual position of object will be
different from that "memorized" by KV-5000/3000.
Actual origin point and internal current position (current value) can be matched via origin return.
2 (1)
Description of Operation Motor (positioning) Control
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
■ Starting speed
Set start output pulse speed applied to origin return operation or home position operation.
Setting range : 50 to 65535 (note: starting speed must be less than operating speed).
Parameter storage position
X axis CM2006
: Y axis CM2036
2
■ Acceleration/deceleration time
■ Operating speed
In the case of origin operation and home position operation, pulse speed that is output to motor shoulde be specified.
Setting range : 50 to 00000
Parameter storage position
X axis CM2009(High bit)/CM2008(Low bit)
: Y axis CM2039(High bit)/CM2038(Low bit)
Note
(1) The operation when "starting speed=operating speed" is shown in figure below.
Speed
Operating (starting)
speed
0 Time
bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Axis Destination storage address bit1 Contents to be set
X CM2000 0 CCW
Y CM2030 1 CW
● When "detailed position of origin return" is set as "medium point of origin sensor"
"origin direction" CCW(CW)
Acceleration/deceleration Origin sensor Acceleration/deceleration (1) After completion of the operation at origin sensor's up edge, the
work pieces will move to origin sensor OFF at starting speed
(3) [operating speed] along the reverse direction of origin, and then stop. store the
(2)
Speed in CW (CCW) [starting speed] finish position at up edge of origin sensor as " (B) position".
direction (2) work piece moves to ON position of origin sensor at starting
Origin speed.store ON position of origin sensor to " (C) position".
CCW(CW) CWCCW (3) From "(C) position" to "(B) position", work piece will move via
Origin at the ring edge of
origin sensor incline control and stop.
Speed in CCW (CW)
(4) Work pieces moves towards and then stop at central position of
direction
[starting speed] origin sensor calculated by "(B) position" and "(C)position"
(1) (4)
[operating speed] through slope control. (finish of origin)
(C) Medium point of(B) Note: for origin postion at "up edge of origin sensor", "deviation
the origin sensor counter clear" isn't ON.
Origin sensor
[operating speed]
Speed in CW (CCW) [starting speed] (1) The operation prior to work pieces stop is the same with "up edge
direction Operation at the ring of origin sensor"
edge of origin sensor (1) (2) After work piece moves to origin point at starting speed and origin
Origin
CCW(CW) CW(CCW) sensor is ON, once Z-phase is ON, the work piece will
immediately stop. (finish of origin)
Speed in CCW (CW)
direction (2)
[starting speed] * After Origin return ends, " deviation counter clear " will be ON for
[operating speed] 50ms.
Z phase
CCW(CW)
Origin
[starting speed]
Home position
CW(CCW)
point sensor, stop.
(5) Work piece moves to origin point side, stops when origin point sensor is ON.
(finish of origin)
Description of Operation Motor (positioning) Control
Speed in CCW (CC) [starting speed] * acceleration/deceleration = (operating speed-starting speed) / acceleration/
direction (2) (5) (1) deceleration time
[operating speed] * During operation of (1) and (2), stop immediately when limit switch at
movement direction side is ON, and stops 300 ms. After that, "deviation counter
Acceleration time Acceleration time clear" will be ON. Then, move reversely. If limit switch at starting position side is
(A) ON, emergency stop occurs.
* After Origin return ends, " deviation counter clear " will be ON for 50ms.
Home position: CCW (CW) side (1) (limit switch ON, when stop position at origin postion direction is outside of origin sensor)
(1) The work pieces accelerates to operating speed, and moves towards origin
return direction.
(2) When limit switch is ON, work pieces stop immediately, and move after
accelerating to a certain operating speed.
Acceleration/deceleration Origin sensor Acceleration/deceleration
(3) When origin point sensor is ON when, work piece speed reduced; stop at
[operating speed] starting speed.
(3)
Speed in CW (CCW) (2) (6) (4) Work pieces accelerates to origin sensor.
direction [starting speed] (5) When origin point sensor is ON when, work piece speed reduced; stop at
(7)
Home position Origin starting speed. store ON position of origin sensor to " (A) position".
CCWCW CW(CCW) (6) Work piece moves stop position to " (A) position", via slope control.
(8) (7) After moving to " (A) position ", work piece will move to OFF position of origin
Speed in CCW (CW) [starting speed] point sensor, stop.
direction (5) (4)
(1) (8) Work piece moves to origin point side, stops when origin point sensor is ON.
[operating speed] (finish of origin)
Acceleration/deceleration During *(1) operation process, when limit switch at movement direction side is
Limit switch ON, stop immediately, and then stop 300 ms. After that, "deviation counter clear"
A)
will be ON. And start execution of (2).
* During (3) operation process, if limit switch at movement direction side is ON,
emergency stop occurs.
* After Origin return ends, " deviation counter clear " will be ON for 50ms.
Home position: CCW (CW) side (2) (limit switch ON, when stop position at origin postion direction is within the range of origin sensor)
(1) The work pieces accelerates to operating speed, and moves towards origin
return direction.
Acceleration/deceleration Origin sensor Acceleration/deceleration
(2) When limit switch is ON, work pieces stop immediately, and move after
[operating speed] accelerating to a certain operating speed.
Speed in CW (CCW) (2) (3) (3) When origin point sensor is ON when, work piece speed reduced; stop at
(4)
direction [starting speed] starting speed.
Home position Origin (4) Workpiece moves to origin sensor OFF position and stops.
CCW(CW) CW(CCW) (5) Work piece moves to origin point side, stops when origin point sensor is ON.
(finish of origin)
Speed in CCW (CW) [starting speed] During *(1) operation process, when limit switch at movement direction side is
direction (5) ON, stop immediately, and then stop 300 ms. After that, "deviation counter clear"
(1)
[operating speed] will be ON. And start execution of (2).
* During (3) operation process, if limit switch at movement direction side is ON,
Acceleration/deceleration
Limit switch emergency stop occurs.
* After Origin return ends, " deviation counter clear " will be ON for 50ms.
Home position: within the range of origin sensor
Origin sensor
[operating speed]
(1) Work pieces move at the starting speed to origin sensor OFF position along
Speed in CW (CCW) (1)
direction [starting speed] reverse direction of origin, and the stop.
(2) Work piece moves to origin point side, stops when origin point sensor is ON.
Origin (finish of origin)
CCW(CW) CW(CCW)
Home position
Speed in CCW (CW) [starting speed] * After Origin return ends, "deviation counter clear" will be ON for 50ms.
direction (2)
[operating speed]
Note
"Deviation counter clear" is set as "output ON" using system parameter.
"Deviation counter clear", Page 2-174
(1)
(2)
(3) 2
(4)
■ Starting speed
To set output pulse speed when JOG operation is ON.
Setting range : 50 to 65535 (note: starting speed must be less than operating speed).
Parameter storage position
X axis CM2010
: Y axis CM2040
■ Acceleration/deceleration time
Acceleration time: time required from starting speed to JOG operating speed. The lower the value is,
the quicker the accelerating movement, and the shorter the moving time will be.
Deceleration time: time required from JOG operating speed to starting speed. The lower the value is,
the quicker the decelerating movement, and the shorter the moving time will be.
In KV-5000/3000, acceleration time and deceleration time are set to the same value.
■ Operating speed
To set pulse speed that is output to motor during JOG operation.
Note
(1) The operation when "starting speed=operating speed" is shown in figure below.
Speed
2 Operating (starting)
speed
Description of Operation Motor (positioning) Control
0 Time
(2) JOB operation within short time (short distance) is shown in figure below.
Speed Speed
Control memory can be set to stored default value by changing the current value.
Control memory can be set to stored default value by changing the operating speed.
To achieve positioning control, use special positioning control instruction, control relay (CR) and control
memory (CM) to edit ladder program.
"Positioning Instruction List", Page 2-185
"Control relay for positioning control", Page 2-180
"CM for positioning control", Page 2-182
"Reference Example of Positioning Control", Page 2-203
In addition, the operating speed can also be changed during positioning control process.
"Change speed during operation", Page 2-183
When over 33 positioning points are managed, the point parameters managed by control memory (CM)
are changed through ladder program.
"Reference example for executing positioning control over 32 points", Page 2-207.
(1) Start pulse output by performing PLSX0 instruction. Pulse output relay CR3009 is ON, positioning
complete relay CR3006 and origin return complete relay CR3005 is OFF.
Meanwhile, the operating point No. "0" is written into M code CM2019.
(2) Start pulse output by performing PLSX1 instruction. Pulse output relay CR3009 is ON, positioning
complete relay CR3006 and origin return complete relay CR3005 is OFF.
Meanwhile, the operating point No. "1" is written into M code CM2019.
(3) Start origin through execution of ORGX instruction. Pulse output relay CR3009 and origin return relay
CR3004 ON, origin return complete relay CR3005 and positioning complete relay CR3006 OFF.
Meanwhile, write origin code "1000" into M code CM2019.
(4) Start JOG operation through execution of JOG instruction. Pulse output relay CR3009 ON, origin
return complete relay CR3005 and positioning complete relay CR3006 OFF.
Meanwhile, write JOG operation code "1001" into M code CM2019.
MR000
MR000 CR3007
RES
Positioning complete relay will not be set if no pulse output is conducted, even if executing PLSX and PLSY
instruction.
(Example) when operation mode is incremental positioning, and movement is "0".
Mode is absolute positioning, and target value is the same with current position.
Note
This control relay doesn't perform ON/OFF operation.
2
Description of Operation Motor (positioning) Control
TIP When positioning control is performed using the PLSX and PLSY instructions, it is not
necessary to operate this relay.
Note
· The speed cannot be changed during operation if starting speed is equal to operating speed.
(except for acceleration/deceleration time=0.).
· It cannot be changed before reaching starting speed. If less than starting speed, the
speed will change to starting speed.
Speed
Use INT instruction if comparator 2 is employed. Actually, this control relay will not be ON/OFF. It is only
used as a symbol in ladder program programming.
Example
(X axis) INT (Y axis) INT
CR3013 CR3113
Change immediately to the operating speed set by " S " when the interrupt condition based on
comparator 2 occurs.
Genelate interrupt X axis current value [CM2021/CM2020] = comparator 2 setting value [CM2029/CM2028]
by comparator 2 Y axis current value [CM2025/CM2050] = comparator 2 setting value [CM2059/CM2058]
Input
Interrupt program CR2008
processing
EI
END
Speed INT
CR3013
S
CR2002 S
CHGSPX
RETI
Note
KV-5000/3000 PLC can identify the interrup value according to comparator 2 when
CHGSPX and CHGSPY instructions are performed or pulse output is started through PLSX
and PLSY (X axis: CM02029/CM02028, Y axis: CM02059/CM02058). It cannot operate
correctly only when setting value is writen to control memory.
When using comparator 2 as interrupt condition, please write setting value to control
memory and then execute the CHGSPX, CHGSPY, PLSX, and PLSY instructions.
"Reference example for executing speed change during operation", Page 2-203
● Use operating speed change request relay CR3012 (X axis) and CR3112 (Y-axis)
In the process of pulse output, the operating speed can be changed to setting value (CM2017/
CM2016) when the operating speed change request relay is ON.
Execute condition Identify execution Operating speed
ON condition change request relay ON
Speed
processing processing processing processing SET
2
"Reference example for executing speed change during operation", Page 2-203
2 PLSX P L S X n
Execute condition n
Description of Operation Motor (positioning) Control
PLSY P L S Y n
Operand Explanation
n Specify point No.(0 to 31)*1 *2 *3
*1 Can’t use "$".
*2 When the bit device is specified, continuous 16 bits will be occupied. If word device is specified, only 1
word is occupied.
*3 When specifying the device, lower 5 bits only used.
Description of Operation
Output the pulse through setting details of point No. set by n at the up edge of executing condition, and then stops.
Frequency (Hz)
Target value/movement (number of output pulses)
Operating speed
Starting speed
(Stopping speed)
Time (ms)
Deviation counter
Operation in clear
Target value/ Pulse Positioning progress Error Error
Axis output in complete Output
movement progress relay point No. Code Flag
(M-code) Setting destination
Flag address
X CM2060 CM2018
+ CR3009 CR3006 CM2019 CM2024 CR3007 R506
axis Bit 3
(Point No.×10)
Y CM2061 CM2048
CR3109 CR3106 CM2049 CM2054 CR3107 R507
axis + Bit 3
(Point No.×10)
Store the point No. into "Operation in progress No. (M code) when "Pulse output in progress flag" is ON in the
process of trapezoidal control.
When moving to "target value/movement" position, "Pulse output in progress flag" is OFF and "positioning
complete relay" is ON, and stops.
"Positioning complete relay" is OFF during the next pulse output.
Scan
2
ON
Execute condition
OFF
Note
· If "Pulse output in progress flag" is ON, PLSX and PLSY instructions cannot be executed.
· If "error flag" is ON, PLSX and PLSY instructions cannot be executed.
· "Pulse output in progress flag" is OFF, during the first END processing after pulse output.
· During emergency stop, pulse output stop, current position message may lose.
Besides, when pulse output stops, final pulse duty cycle cannot be guaranteed.
· When the number of output pulse changes to parameter "0", "Pulse output in progress
flag" is not ON, and "positioning complete relay" is ON. In this case, no warning will occur.
Operation flag
Sample Program
Pulse is output for the setting contents point No. 0 on the up edge when input relay R000 is ON.
R000 #0 ;(mnemonics list)
↑ PLSX LDP R000
PLSX #0
JOGX
JOGX CW
CCW
HIGH
Jog operation X-axis
Execute JOG operation of X-
axis.
JOGY
JOGY CW
CCW
HIGH
Jog operation Y-axis
Execute JOG operation of Y-
axis.
CW J O G X
CCW signal
CCW
HIGH signal
HIGH
CW signal JOGY
CW J O G Y
CCW signal
CCW
HIGH signal
HIGH
Description of Operation
Operating
speed
Starting speed
Stopping speed
Time (ms)
In the process of JOG operation, "Pulse output in progress flag" is ON and store "1001" into "M code"
When the operation is finished, "Pulse output in progress flag" will be OFF.
Scan
ON
Execution conditon
OFF
CW(Signal)
ON
Execution conditon
2
OFF
CCW(Signal)
Note
· If "Pulse output in progress flag" is ON, JOGX and JOGY instructions cannot be executed.
· If "error flag" is ON, JOGX and JOGY instructions cannot be executed.
· When a limit error accurs (error code: 31 or 32), JOG instrunction can also be executed in
the direction opposite to the moving direction when the limit error occurs even if the limit
switch is ON, simply by turning OFF the "error flag".
· "Pulse output in progress flag" is OFF, during the first END processing after pulse output.
· During emergency stop, pulse output stop, current position inforamtion may be lost.
Besides, when pulse output stops, final pulse duty cycle cannot be guaranteed.
· "Origin return relay" and " positioning complete relay " are OFF during the pulse output.
Operation flag
Sample Program
Execute CW-JDG operation when input R000 ON; execute CCW-JOG operation when input R001 ON.
JOG operation will be executed at high speed when input R002 ON.
ORGX ORGX Origin return X-axis Start origin return on the X-axis.
ORGY ORGY Origin return Y-axis Start origin return on the Y-axis.
2 ORGX O R G X
Execute condition
Description of Operation Motor (positioning) Control
ORGY O R G Y
Description of Operation
When the execution condition is ON, origin return operation starts, and then stops after pulse output is finished.
Origin Origin Operation in
Pulse output return in return Positioning progress
Axis in progress complete Error code Error flag
Flag progress complete relay point No.
Flag relay (M-code)
X axis CR3009 CR3004 CR3005 CR3006 CM2019 CM2024 CR3007
Y axis CR3109 CR3104 CR3105 CR3106 CM2049 CM2054 CR3107
In the process of origin return, "Pulse output in progress flag" is ON and store "1000" in "M code".
When moving to origin (0) position, "Pulse output in progress flag" is OFF. When "origin return complete
relay" and "positioning complete relay" ON, it stops.
"Origin return complete relay" and " positioning complete relay " are OFF during the next pulse output.
Scan
ON
Execute condition
OFF
CR3006, CR3106
(Locating complete)
Note
· If "pulse output in progress flag" is ON, ORGX and ORGY instructions cannot be
executed.
· If "error flag" is ON, ORGX and ORGY instructions cannot be executed.
· "Pulse output in progress flag" is OFF, during the first END processing after pulse output.
· During emergency stop, pulse output stop, current position message may lose.
Besides, when pulse output stops, final pulse duty cycle cannot be guaranteed.
Operation flag
Sample Program
2 TCHX T C H X
Execution conditon
Description of Operation Motor (positioning) Control
TCHY T C H Y
Description of Operation
When the execution condition is ON, "target value/movement" stored in "specifiedpoint No." (point No.)
will be stored in "current position" value.
Axis Specified pointNo. Target value/movement Current position
X axis CM2025 CM2060+(Point No. x10 ) CM2021, CM2020
Y axis CM2055 CM2061+(Point No. x10) CM2051, CM2050
(1) Use LDA, STA or DW instruction to store point No. in "specified point No." device.
(2) If execution condition of TCHX and TCHY instruction is ON, the "target value/movement" of
specified point No. in (1) will be stored in the "current position" value.
storage position differs for various point Nos. (when point No. is "0, it is CM2060/CM2061; when
point No. is "1", it is CM2070/CM2071)
"Lilst of Devices/error Codes for Positioning", Page 2-208
Example
· TCHX Instruction
When storing current value of X axis as target value of point No. 0:
(1) "0" is stored in CM2025.
(2) TCHX instruction is executed.
(3) Content of CM2020 and CM2021(current value of X axis) is transmited to CM2060
and CM2061 (target value/movement of point No. 0).
R000 #0
↑ DW TCHX
CM2025
· TCHY Instruction
When storing current value of Y axis as target value of point No. 10:
(1) "10" is stored in CM2055.
(2) TCHY instruction is executed.
(3) The details of CM2050 and CM2051 (current value of Y axis) are transmitted to
CM2160 and CM2161 (target value/movement of point N0. 10).
R000 #10
↑ DW TCHY
CM2055
Note
· If the point No. stored in CM2025 (X axis) and CM2055 (Y axis) is not in the range of 0 to
31, it can be neglected, and no error code will occur.
· When the "error flag" is ON, JOGX and JOGY instructions cannot be executed.
· When the "Pulse output in progress flag" is ON, JOGX and JOGY instructions cannot be
executed.
2
Operation flag
Sample Program
Set the current position moving under JOG operation to target value of point No.0
HOMEX HOMEX
Moving to home position
of X-axis
Start moving to home position of
X-axis.
HOMEY HOMEY
Moving to home position
of Y-axis
Start moving to home position of
Y-axis.
Execute condition
HOMEY H O M E Y
Available devices
Index
Cons Indirect Local Change
Bit device Word device
Operand tant specifying device
MR DM EM
R DR LR T C CTC CR FM ZF T C CTH CTC Z CM #/$ #TM * @ : #/: Z
B TM W
- - - - - - - - - - - - - - - - - - - -
Description of Operation
When the execution condition is ON, the operation of moving to home starts, and then stops after
completion of pulse output.
Y CM2056
CR3109 CR3106 CM2049 CM2054 CR3107
axis CM2057
In the process of moving to home, "Pulse output in progress flag" is ON, and store "1000" into "M code".
When moving to "Home position coordinate" position, "Pulse output in progress flag" is OFF, and
"positioning complete relay" is ON, and then stops.
"positioning complete relay" is OFF during the next pulse output.
Scan
ON
Execute condition
OFF
Note
· If "Pulse output in progress flag" is ON, HOMEX and HOMEY instructions cannot be
executed.
· If "error flag" is ON, HOMEX and HOMEY instructions cannot be executed.
· "Pulse output in progress flag" is OFF, during the first END processing after pulse output.
· During emergency stop and pulse output stop, current position information may be lost.
Besides, when pulse output stops, final pulse duty cycle cannot be guaranteed.
2
Operation flag
Sample Program
On the up edge when input relay R000 is ON, operation of moving to home position is performed.
Execute condition S
Description of Operation Motor (positioning) Control
CHGSPY C H G S P Y S
Available devices
Index
Bit device Word device Cons Indirect Local Change
tant specifying device
Operand
MR DM EM
R DR LR T C CTC CR FM ZF T C CTH CTC Z CM #/$ #TM * @ : #/: Z
B TM W
S ○ - ○ - - - ○ ○ ○ ○ ○ ○ ○ ○ ○ - ○ ○ ○
Operand Description
S Specify changing speed value (50 to 100000). Unsigned 32-bit BIN data. *1
*1 When the bit device is specified, continuous 32 bits will be occupied.
If the bit device is specified, continuous 2 bits will be occupied.
If relays other than channel leading relay (R002, R106, R1012, etc.) are specified, it will straddle
the next channel for 32 bits processing.
Description of Operation
In the process of pulse output, when the execution condition is ON, the speed will be changed to S
.
S The specified value is stored in "operating speed change setting value" device.
Note
It cannot be changed before reaching starting speed. If lower than starting speed, the speed
will change to starting speed.
Generate interrupt
by comparator 2
Output Input
processing processing Master program
Output Input
processing processing
CR2008 2
EI
Input
processing Interrupt program INT
CR3013
Speed
CR2002 S
S CHGSPX
RETI
ENDH
TIP Use operating speed change request relay CR3012 (X axis) and CR3112 (Y-axis)
Execute condition Identity execution Operating speed change
ON condition request relay ON
CM2017
CM2016
Operation flag
Sample Program
On the up edge when input relay R000 is ON, the operating speed of X axis is changed to 3000Hz.
R000 #3000 ;(mnemonics list)
↑ CHGSPX LDP R000
CHGSPX #3000
RFSPSX RFSPSX
Refresh current value X-axis
Refresh current value and speed
of X-axis to the lastest value.
RFSPSY RFSPSY
Refresh Y-axis current value
Refresh current value and speed
of Y-axis to the lasted value.
Operand Decription
- -
Description of Operation
RFSPSX When execution condition is ON, update the current position (CM2020, CM2021) and
current speed (CM2022, CM2023)of X axis to latest value.
RFSPSX When execution condition is ON, update the current position (CM2020, CM2021) and
current speed (CM2022, CM2023)of X axis to latest value.
Operation flag
Sample Program
˵axis stop
sensor input
1 Click button on the KV STUDIO tool bar to open "Edit CPU Positioning Parameters".
Select button on the "Edit CPU Positioning Parameters" tool bar.
● Program example
;(mnemonics list)
Origin return part LDP R30000
ORGX
LD R30001
R30000 LD R30002
ORGX LD R30003
JOGX
LDP R30010
JOG operation part PLSX #0
LDP R30011
2
PLSX #1
R30003
HIGH
R30010 #0
PLSX
R30011 #1
PLSX
R30012 #2
PLSX
R30013 #3
PLSX
R30014 #4
PLSX
END
ENDH
ENDH
HSP
HSP R000
END
INT R000
2
R000 LD CR2002
INT
R000
CR2002 #0
PLSX
Always ON
RETI
ENDH
<Interrupt processing>
When (the first multi-stage processing) multi-stage control state DM5000=0, write next interrupt position
"100000" in comparator 2, change speed to 15000 (Hz).
When (the second multi-stage processing) multi-stage control state DM5000=0, write next interrupt
position "150000" in comparator 2, change speed to 25000 (Hz).
When (the third multi-stage processing) multi-stage control state DM5000=2, change speed to 20000
(Hz).
Note
· KV-5000/3000 PLC can identify interrupt value according to comparator 2 when
CHGSPX and CHGSPY are executed or pulse output is started through PLSX and PLSY
(X axis : CM02029/CM02028, Y axis : CM02059/CM02058). It cannot operate correctly
and setting value is writen to control memory only.
When using comparator 2 as interrupt condition, please write setting value to control
memory and then execute the CHGSPX, CHGSPY, PLSX, PLSY instructions.
· Actually, CR3013 and CR3113 will not be turned. They are only used as a symbol for
ladder program.
INT
CR3013
X axis comparator 2 matching relay
DM5000 MOV.D
= #100000 CM2028
#0
Multi-stage control status X axis comparator 2
#15000
CHGSPX
DM5000 MOV.D
= #150000 CM2028
#1
Multi-stage control status X axis comparator 2
#25000
CHGSPX
DM5000 #20000
= CHGSPX
#2
Multi-stage control status
CR2002 DM5000
INC
Always ON Multi-stage control status
RETI
ENDH
Speed
25000
20000
15000
Starting speed
2
50000 100000 150000 Distance
● Use operating speed change request relay CR3012 (X axis) and CR3112 (Y axis)
Select speed control through parameter setup, and set
starting speed, acceleration time and operating speed
from point No.0.
Acceleration determined by this setting is also applicable
to acceleration when speed change request is sent out.
Set to speed control when stop sensor is used.
Set specified number of pulses for stop sensor.
65535 means deceleration stopping.
For specified number of pulses for stop sensor
65535, see "Specified number of pulses for stop
sensor", Page 2-164
On the up edge of relay R30000, speed change request relay is ON. Write setpoint "3000" in CM2016
and CM2017 (speed change setting), through PLSX instruction, start pulse output.
On the up edge of relay R30001, write setpoint "5000" in CM2016 and CM2017 (speed change setting).
On the up edge of relay R30002, write setpoint "6000" in CM2016 and CM2017 (speed change setting).
On the up edge of relay R30003, write setpoint "7000" in CM2016 and CM2017 (speed change setting).
On the up edge of relay R30004, speed change request relay is OFF. Stop sensor input CR3003 is ON,
decelerate to stop.
2 ;(mnemonics list)
R30000 MOV.D LDP R30000
Description of Operation Motor (positioning) Control
R30001 MOV.D
#5000 CM2016
X axis operation
speed change setting
R30002 MOV.D
#6000 CM2016
X axis operation
speed change setting
R30003 MOV.D
#7000 CM2016
X axis operation
speed change setting
R30004 CR3012
RES
X axis operation
speed change request
CR3003
END
ENDH
3000
2
TIP For details about time for changing speed, see "Change speed during operation", Page 2-183.
Example
R000 #10000 #0
DW.D PLSX
CM2060
R001 #200000 #0
DW.D PLSX
CM2060
R002 #600000 #0
DW.D PLSX
CM2060
"Point parameters", Page 2-159
parameter
Set whether to use through
CR3001 CR3101 CCW limit switch
parameter
Set whether to use through
CR3002 CR3102 Origin sensor input
parameter
Set whether to use through
CR3003 CR3103 Stop sensor input
parameter
CR3004 CR3104 Origin return in progress
ON when origin return is finished; R
CR3005 CR3105 Origin return complete
OFF at next pulse output
ON when origin return or
CR3006 CR3106 Positioning complete relay positioning is finished; OFF at
next pulse output
CR3007 CR3107 Error/error clear
CR3008 CR3108 Warning/clear warning Current position overflow
Pulse output in progress/
CR3009 CR3109 Emergency stop by forced reset
emergency stop
Pulse output is started. Used for
CR3010 CR3110 Drive operation start
CM2025 and CM2055
Used for changing current value
CR3011 CR3111 Current value change request
(used when pulse is stopped)
Operating speed change Used for changing speed (in the
CR3012 CR3112
request case of speed control)
Only used as a symbol for ladder
Interrupt when comparator 2
CR3013 CR3113 programing, thus will not be ON/
(interrupt specificl) matches
OFF
bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
bit
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
● State
Number Attribute
X axis Y axis Content R: Read only
of words Blank: R/W
● Point parameter
Serial Common to X/Y Number Attribute
Content R: Read only
No. axis of words Blank: R/W
CM2060
Target value/movement 2
CM2061
CM2062 Starting speed 1
0
CM2063
CM2064
Acceleration/deceleration time 1
2
Operating speed 2
CM2065
● Error code
Error code
(X axis: CM2024,Y Opera Content
axis:CM2054) tion
10 Stop Startting speed value smaller than setting range.
11 Stop Operating speed value smaller than setting range.
12 Stop Operating speed value larger than setting range.
13 Stop Start speed value larger than operating value.
14 Stop Acceleration/deceleration time larger than setting range.
Warning relay CR3008 (X axis)CR3108 (Y axis) starts from
20 Stop
ON state to perform positioning control by ABS positioning.
Through the effect of drive operation start relay CR3010 (X
Error
21 Stop axis) CR3110 ( Y axis), the value of CM2025 (X axis)
CM2055 (Y axis) to be moved is out of range.
30 Stops when there is emergency stop input.
31 Stop Limit error: stops when there is CW limit switch input.
32 Stop Limit error: stops when there is CCW limit switch input.
Moves towards the CW (CCW) direction, and detects CCW
33 Stop
(CW) limit switch.
90 Stop System error
KV-5000/3000 can continue to count time of "year, month, day, hour, minute, second, week " through
built-in clock IC backed up by battery when power is OFF.
It can be used for error /power ON/OFF log and logging/tracing function etc.
Clock accuracy under normal temperature (+25°C) is ± 60s/month.
bit bit
15 0
CM700 year 0 to 99 Year indicates the last 2 digits of solar calendar year 2000.
CM701 month 1 to 12
CM702 day 1 to 31
CM703 hour 0 to 23 Data are all expressed as 16-bit BIN format
CM704 minute 0 to 59
CM705 second 0 to 59
CM706 week 0 to 6 Week is 0: (Sunday), 1: (Monday), 2: (Tuesday), 3: (Wednesday),
4: (Thursday), 5: (Friday),6: (Saturday)
LADDER PROGRAMMING
LADDER PROGRAMMING
In this chapter, the specifyings or setups for ladder programming will be
introduced. If module, macro, local device are used, programming efficiency
may be improved.
are stored in a control unit which are executed to perform required control actions sequentially until a
car is assemblied. This is called sequence control.
For this, such PLCs as the KV-5000/3000 series PLC etc (Programable Logic Controller) for sequence
control.
3
What Is Sequence Control
LADDER PROGRAMMING
Let's take fully automatic washing machine as an example.
To start the specified washing sequence, press the Start button. The washing process goes like this:
ON
(1) Put in the clothes to be washed, and press the Start button.
Start
Water
supply I
(2) Press the Start button, and turn on the tap.
3
(4) When the specified time has elapsed, the washing motor is stopped,
Pause Water and the water drain valve is opened.
drain I
End
(10) When it is detected that the specified time has elapsed,
the spin dry motor is stopped indicating the washing process is completed.
And the buzzer sounds.
End
The basic sequence control is mainly divided into " sequence control ", " condition control " and " time
limit control ". A target control circuit can be designed by combining these control types.
● Sequence Control
Sequence control is that the next action is triggered by an external signal from detector after the
(2) water intake > "- water intake is finished> " (3) wash (start wash motor) "
"(4) drainage I"-> drainage is finished -> " (5) dehydration I (start dehydration motor) "
● Condition control
Condtion control means that required actions are initiated only when pre-defined conditions are met.
"condition control of fully automatic washing machine "
"(3) wash" -> if cover is opened -> "pause" -> if cover is closed -> "(3) wash"
"(5) dehydration I"-> if cover is open is close-> "pause" -> if cover is closed -> "(5) dehydration I"
Typical condition control ladder diagram instruction: STP, STE, CJ, NCJ, LABEL etc.
Typical time limit control ladder diagram instruction: TMR, LDWK etc.
LADDER PROGRAMMING
To enable the programs on KV-5000/3000 PLC, the "mnemonics" will be used as operating language.
Extended Ladder
Expanded Ladder is a unique language developed by Keyence Company on the basis of normal
ladders (the relay symbol-based programming language), it has the following features:
· Output instruction and input instruction may be mixed for programming
· Provide output coil branch
· A wide range of instructions can be connected
3
Programming Language
R000 DM0 DM1 #123 DM10
LDA MUL ADD STA
Since a set of correlated processings can be programmed in one line, the process is then simplified,
thereby improving design and maintenance efficiency. Since many instructions are programmed on one
line, number of lines of all ladder diagram programs may be reduced.
Note
To use the Extended Ladder, please select "Edit (e)" -> "Edit Mode (b)" -> "Extended Ladder
Mode" from the menu bar of KV STUDIO.
Only intput Only output Only input Both input circuits Only output
circuits can circuits can circuits can and output circuits circuits can
be written be written be written can be written be written
Ladder folding
<Conventional ladder> <Expanded ladder>
Branches are possible only from input contacts. Branches from output coils are also possible.
Note MOV
Block instructions are ( etc) always written on right side of ladder
program.
Example
<Conventional ladder>
R000
T1
T1 R001 R500
LADDER PROGRAMMING
Ladder symbols are arranged according to processing sequence making the program more readible.
At the same time, also easy for maintenance.
Programming Language
Repeat (1) - (3).
KV Script
Although suitable for sequence control programming, processing complicated operation and character
strings etc. programs remains a toufh challenge for ladder programs in that, its programming becomes
complicated, commissioning and maintenance also become difficult.
The programming language KV Script provides a solution to this in that it can be used as an efficient
programming tool to tackle with programming tasks.
Easy to understand procedure of program because Even though not aware of internal register,
can programming to control sentence. we can describe calculation process as
mathematic formula.
Script programs are converted into ladder programs before they are executed.
Script program can be monitored if they are converted into ladder programs.
Mnemonics
LD R002
OUT R501
LD R003
OUT R502
·To edit the Mnemonic Language Table, select "Edit (E)" -> "Edit list (l)" (edit Mnemonic
Language Table) from the menu.
Other procedure · Ctrl + D
·In this manual, the mnemonics table for CPU built-in functions or sample programs is
provided, which, if used, will simplify sample programs entering.
"How to Use Mnemonics List", Page 15
·when expanded ladder diagram is used for programming, programming man-hour may be
reduced by input instructions using mnemonic symbol.
"Input mnemonics", Page 3-152
LADDER PROGRAMMING
Project Configuration
■ What is project?
Project is used by KV-5000/3000 PLC for management of program and unit setup information.
When KV STUDIO is used to create a new project, a folder with the same name will be generated automatically.
The information in a project is as follows:
Project
3
Project
Program
Unit Setting info
Note
The information management capacity of one project varies depending on the
information required by KV-5000/3000 PLC.
● Program
● Global label
Label can be used as a replacement to device names to facilitate programming.
"Label", Page 3-162
LADDER PROGRAMMING
Program Capacity
Program capacity statistics are automatically calculated by KV STUDIO and displayed in the
3
"Conversion Result" dialog box. Hence no calculation and management efforts are required.
Project
Note
The max. capacities for Program Capacity, Object Size, and Internal Work Occupation must
be exceeded. Otherwise, no transmission and operation is possible.
<Program Capacity>
The bite size for each instruction is fixed. This size varies depending on operand type,
instruction suffix, and indexing availability. In program capacity calculation, in addition to the
total number of bytes used by all the instructions, the number of bytes used by comments,
device comments/labels sould also be added. One device comment use 40 bytes. And the
size for a rung momment and label varies depending on the number of words.
In the residual program size in the 260k steps/160k steps programming with KV-5000/3000,
up to 96,000/30000 device comments can be managed. If the whole is used for labels, up to
137,000/44,000 labels can be managed.
For details on instructions, refer to the "KV-5000/3000/1000 Instruction Reference Manual, "2-14
Access WindowInstructions."
<Object Size>
LADDER PROGRAMMING
Object Size is the total run data size, which is determined by instruction size. Object size
varies dependin on operand type and availability of instruction suffixs and indexing. The size
of comment rungs and labels are not considered in the object size calculation.
For instruction size, please refer to the "Appendix-2 List of Instruction Size in the "KV5000/3000/
1000 Instruction Reference Manual,"2 Access Window Instructions."
<Total Step>
Total step is the total number of instructions used in a project.
000610
000610
000610
The number of steps used in the modules/macros under each rang No. is indicated.
000633
000638
000643
LADDER PROGRAMMING
Project Protection Setting
■ Project Protection
A code is set up for KV-5000/3000 read/write protection.
The setup steps are as followings.
1 Select "Workspace".
2 Right-click, and select "Project Properties (F)" from the pop-up menu. 3
Or procedure select "File (F)" (document) -> "Project Properties (F)" from the menu,
Project
The "Project Properties (F)" dialog box is displayed.
2
3
Password setting
(within 6 1-byte alphanumeric characters)
When KV-5000/3000 reads the project for which the password is setup, the "Cancel Password" dialog
box is displayed.
If the password is not entered, the project can not be read from KV-5000/3000.
This protection is effected after you select the option and transfer the same to KV-5000/3000.
Note
If the read/write protection is appied before the project is transferred to KV-5000/
3000,monitoring may not be performed.
This should be done after the commissioning is completed.
LADDER PROGRAMMING
CPU Unit Operation
Communication processing
Execute program
Access window processing
Direct access switch processing
Built-in positioning function
Ethernet function
or
3
Scan once Frequency counter FL-net function
Synchronization
END processing Synchronization
■ Control Processing
This involves such main processes as ladder program execution. One control processing is counted as
one scan. The duration of one scan is the so-called scan time.
● Auto Refreshing
Update the state or value of device distributed to CPU built-in function or expansion unit. Firstly transfer
output device state or value to the units, then transfer state or value of the units to input device.
● Program execution
In this process, the device status or values assigned to CPU built-in or external units are updated. In
this process, the first step is to transfer device status or values to the units, and the second step is to
transfer unit status or values to input devices.
● END Processing
In this process, the device values required for external processing or CPU built-in Ethernet/FL-net processing are
fetched into the Control Processing. Also, the system error checking is performed in this process.
Generally speaking, END processing time will also be determined automatically according to
different program execution time.If the data traffic is heavy, however, END processing time
needs to be set up..
"END Processing Time" Page 3-25
■ External Processing
In this process, other communication or management data than the program data is processed here. In
addition, memory card or clock related instructions are executed also in this process. The scanning
time is minimum affected by processing tasks through parallel processing.
As described above, every scanning implies one automatic processing, whereby the device values or
status assigned to CPU built-in or extended units are updated. Information updating (direct processing)
can be performed in the following ways in the program execution.
Note
For Expansion Unit, the following direct processing may be executed only when the
corresponding expansion unit is connected.
3
■ Extended I/O Unit
Program Structure and Operation
● RFSX/RFSY Instruction
This is used for update of all the relays which are assigned as operands.
Example
CR2002 MOV
DM0 R30000
Always ON
Result of calculation
RFSY
R30000 #16
see the "RFSX/RFSY Instruction " in the KV-5000/3000/1000 PLC Instruction Reference Manual,.
● Unit-specific Instruction
With the unit-specific instructions, data exchanging with extended units can be performed without
knowing the buffer memory address.
"Unit-specific Instruction " in the Expansion Unit User's Manual
LADDER PROGRAMMING
The buffer memory read (UREAD)/write (UWRIT) instructions can be used for direct data read/write
from the buffer memory.
see the "RFSX/RFSY Instruction" in the KV-5000/3000/1000 PLC instruction Reference Manual
The List of Buffer Memories in the Expansion Unit User's Manual
The following items are checked when the power is turned to ON. If everything is OK, the operation continues.
· Hardware checking and initialization
· Backup battery voltage checking
· Memory and device checking and initialization "Power OFF Hold Setting (latch)", Page 3-57
· Expansion bus checking and initialization
· Auto-load processing "Auto Load Function", Page 2-50
● Power ON Log
LADDER PROGRAMMING
Error Handling
LADDER PROGRAMMING
Error may be divided into error which implies a serious error and alarm which implies a slight error.
For more information, please see "A" in the "PLC Error List" on Page 2.
For error details of the expansion unit, see the user manuals of individual expansion units.
■ Error-handling Setup
From the KV STUDIO work space, Open "CPU System Settings" , and set up Error/Alarm in the Action
when error occur."
3
3 CM1804
:
error No.
:
: :
Program Structure and Operation
You can also view and clear errors from the access window of the CPU unit.
"Error Clearing", Page 2-15
LADDER PROGRAMMING
· When No.128 (calculation error)
Extended information n Description
Error description
0 (not used)
1 Incorrect indirect specifying
2 The indirect specifying destination is T/C
3 Incorrect simple indirect specifying
4 Beyond operand range
5 Single-precision floating-point number overflow 3
6 Incorrect device specifying
Extended
Description
information n
Extended
Unit No.
Information 1
Extended
Error No. of each unit
Information 2
Extended
00H fixed
Information 3 to 20
3 · Others
Program Structure and Operation
Extended
Description
information n
Extended
00H fixed
Information 1 to 20
Scanning Time
The time required to execute a processing period (automatic update -> program execution -> end
processing) is called scanning time. scanning time varies depending on the program size and
instruction type.
Scan time Scan time Scan time
Note
In addition, when scanning time exceeds 300ms, "scan timeout may occur (CPU error No.30)"
will occur, it cannot continue to run. (Changed to the PROG mode)
· To verify the actual scanning time, please select When execute monitoring process via KV
STUDIO, confirm measured value of scanning time in the menu "Monitor" -> "Scan time
monitor".
LADDER PROGRAMMING
Scan time varies depending on the executing state or processing content, interrupt processing of every module
during execution of common program.
The scan time can be fixed if required.
Auto update
Execute program
END Auto update
process Execute program
END
process
Auto update
Execute program
END
process
3
1.2ms 1.2ms
In this mode, only the specified time elapsed could the next period start, even if all the processing
activities are completed in the period before the specified time elapsed.
Note
· When the scan time is longer than specified time, the scan time will be extended.
Please always measure the program execution time before you specified the scan time.
· In case an interrupt occurs during the rest time prior to the next period, this interrupt
processing will be prioritized. (only when interrupt is enabled)
Even if the specified scan time elapsed during execution of the interrupt program, the next
scan period will not be started until the interrupt program is completed.
From the work space, open the CPU System Settings, and select "System Settings" -> "Scantime
related".
3
Program Structure and Operation
Note
Please set a value larger than the actual scan time.
· The measured value of scan time can be confirmed via CM720 (10µs).
"A" in the Appendix-2 CR/CM List, Page 7.
• When the specified scanning time is exceeded, CR2304 is in the ON state only during one-
time scanning.
LADDER PROGRAMMING
Scan time varies depending on the executing state or processing content, interrupt processing of every module
during execution of common program.
After the END processing time is set up, a specific END processing time will be included in each time of
scan. And this setting is also required when the communication data traffic is heavy and the scan time
is too long such that Fixed scan time operation cannot be performed.
END processing time measured value can be confirmed via CM723 (10µs unit)
"A" in the Appendix-2 CR/CM List, Page 7.
Program Configuration
In one-time scanning, the program will be executed according to the pre-defined sequence. The master
program in each module will be executed step by step.
Module 1
Auto refresh
3 Module 2
Program Structure and Operation
Scan once
Execute program
END process
Module n
In the module, master routine, sub-routine, and interrupt routine can be written respectively.
Master routine
Module
Subroutine
Interrupt program
Although macros may be called from the module, macros consists of master routines and sub-
routines. Interrupt routine cannot be prepared.
"3-9 Macro", Page 3-109
■ Master Routine
LADDER PROGRAMMING
The portion from the module or macro start to the END instruction is called Master Routine.
If there is no sub-routine or interrupt routine, the ENDH instruction should then be written behind END
instruction.
Master routine 3
Module/macro
Note
If there is no END/ENDH instruction in the program, an error may occur during conversion.
The END/ ENDH instruction will be inserted automatically when creating a new unit and macro, therefore
please do not delete.
■ Subroutine
Sub-routine is a routine to be executed via the CALL subroutine call/ECALL inter-module subroutine call
instruction. If the execution condition of the CALL instruction is ON, the subroutine is then executed.
If the same processing needs to be repeatedly performed in the routine, or if you want to execute routine only
when the pre-defined condition is met, the routine can then be written into a subroutine and executed if required.
Up to 200 subprograms can be written between END - ENDH instructions (000 to 199).
Subroutine is started by the SBN instruction, and ended by the RET instruction.
In the same module or macro, several subroutines should not share the same No. Several CALL
instructions for the same subroutine No. may be To programed in the master routine.
CALL #0
Master routine
CALL #1
END
Module/macro
SBN #0
RET
Subroutine
SBN #1
RET
ENDH
Note
· If the SBN instruction corresponding to CALL instruction does not exist, an error will occur
during conversion.
· If the SBN instruction corresponding ECALL instruction does not exist, an error will occur
during conversion.
· The INT/RETI/STG/JMP/ENDS instructions cannot be used in a subroutine.
· Attention should be made when using differential execution instruction, timer instruction,
and macro instruction in subroutine.
"Precautions for Differential Execution Type Instruction" in the "KV-5000/3000/1000 Series
3 instruction Reference Manual
"Precautions when using timer instructions", Page 3-63
Program Structure and Operation
· Up to 16 levels of nesting can be made during subroutine nesting through the CALL/ECALL
instruction.
• Although a subroutine could call itself (recursion call), "CALL nesting (CPU self error
No.10)" may occur if more than 16 layers are nested.
R001 #0
CALL
Master routine
END Other sub-routine programs (A)
that are called in a sub-routine program (B) must be
programmed in upper rungs than (B).
SBN
#1
Subroutine (A)
RET
SBN Call
#0
R000 #1
Subroutine (B) CALL
RET
ENDH
■ Interrupt Routine
Once the interrupt condition is met, the master routine processing is terminated and the interrupt routine is executed.
After the interrupt processing is completed, the master routine processing continues from where it was broken.
There are three interrupt conditions: external input (R000 to R009), high-speed counter comparator
(CTC0 to CTC3), CPU positioning function comparator 2 matching relay (CR3013, CR3113).
To execute interrupt processing periodically, please use the fixed period module.
LADDER PROGRAMMING
"Fixed Period Module", Page 3-99.
Master routine
END
Module
INT R000
RETI
Interrupt program
INT CTC0
RETI
ENDH
Note
· Interrupt routines cannot be written in a macro.
· In order to execute interrupt routine, always use the EI instruction to set the interrupt
routine execution to "enable". (when operation starts, interrupt is in the "disable" mode.)
· If ithe nterrupt condition is an input relay, the HSP instruction or CR2305/CM1620 can be
used to set up a small input time constant to increase the response speed.
· Internal registers, operators (CR2009 to CR2012), TM0 to TM3, Z11 to Z12, R000 to
R015 will be eliminated automatically when interrupt routine starts, and restored when the
interrupt routine is completed.
· Some instructions cannot be used in the interrupt program.
Prohibited Instructions in the Interrupt Routine", Page 3-38
· For direct output(R500 to R507), please use the SET/RES instruction.
Master routine
END
Module
SBN #1 RET Subroutine
LADDER PROGRAMMING
Overview
Ordinary PLCs execute ladder sequential control by repeatedly executing Input Processing -> Program
Execution -> Output Processing. Therefore, signals shorter than scanning time cannot be input.
If the interrupt processing function is used, an interrupt can be performed irrespective the scanning time.
Once the interrupt condition is met, the master routine processing is terminated and the interrupt routine is executed.
After the interrupt processing is completed, the master routine processing continues from where it was broken.
Interrupt
Input processing
Operation
Execute program
interrupt program
˄R500 to R507˅
Output processing
(3)
When an interrupt starts, the internal registers, R000 to R015, operation flags, TM0 to TM3, Z11 to Z12
index registers are stored in the system. When the interrupt routine ends, these values are restored.
During interrupt processing, the master routine will not be affected even if the about values are
changed. These changes are only effected in the interrupt routine.
The current value of high-speed counter (CTH) is changed to the value that is obtained through
interrupt processing after the interrupt routine is finished.
The values of other devices changed in interrupt process are mapped in the master routine after
interrupt routine is finished.
3 Note
· When fixed period module is the reason for interrupt, no saving/resetting is performed for
Interrupt
R000~R015
· To perform saving/resetting, the index registers Z1 to Z10 can be set up from the "Fixed
period execution and user interrupt" settings in the CPU System Settings.
Note
When fixed period module is the reason for interrupt, R000 to R015 will also be
automatically updated. "Input processing", Page 3-38
Note
When fixed period module is the reason for interrupt and it is not assigned through DR,
direct output cannot be performed based on the SET/RES instruction.
To update the value of the non-auto update device to the latest status, perform the following:
·To program I/O relays through "DR".
·To program "RFSX/RFSY" instruction
·To program "RFSCTH" instruction
"About Direct Processing", Page 3-16
■ Processing Time
When all of the following conditions are met, the setting time prior to interrupt is within 65µs.
· When selecting the "Enable interrupt in instruction execution" checkbox in "Fixed period execute and
user interrupt" setting of CPU System Settings"
3-32 - KV-5000/3000 Series User’s Manual -
3-5 Interrupt
· No other interrupt routines with a priority higher than this interrupt are used
LADDER PROGRAMMING
· KL-N20V, KV-CL20, KV-DN20, KV-H20, KV-H20S, KV-H40S are not used (when used, maximum is 115µs)
· The FASC instruction (when used, maximum 102µs) is not To programed in the program
· RFASC instruction (when used, maximum 67µs) is not To programed in the program
In addition, the start/end processing (update/save/reset of the devices) time of interrupt routine is about
5µs respectively.
Interrupt
Example for Interrupt program
CR2008
EI
HSP
R000
Main program
Can’t execute interrupt program when E1
instruction doesn’t execute.
END Set by setting the input time constant to
the HSP instruction (10μs) or the value
INT to CM01620 to set CR2305 ON.
R000
Interrupt program
ǂWrite interrupt program
RETI
ǂbetween “END” and “ENDH”
ENDH
■ INT/RETI Instruction
Between END/ENDH instructions, set the interrupt reason to operand, and To program the INT
instruction.
Behind the INT instruction, write the interrupt processing contents into the program, then To program the
RETI instruction.
Note
Only one INT instruction can be To programed for one interrupt reason.
· Some instructions cannot be used in the interrupt routine .
"Unavailable Instructions for Interrupt Routine", Page 3-37。
- KV-5000/3000 Series User’s Manual - 3-33
3-5 Interrupt
· In order to shorten the input time constant, it is necessry to set up input/output time
LADDER PROGRAMMING
constant through HSP instruction (10µs) or data memory CM1620, and start CR2305. For
input time constant, please refer to KV5000/3000/1000 Series PLC Instruction
Reference Manual
CR2008
EI
CR2008 #0 CR2305
EI DW SET or
CM1620 CR2002 HSP
R000
Input relay is used as the interrupt condition. Execute interrupt through the input relays R000-R009.
Depending on the control relay, interrupting can be done either in the up edge or down edge.
Note
To specify the ON/OFF state of special auxiliary relays, use the SET/RES instruction.
■ Input Capturing
LADDER PROGRAMMING
In external input interrupt, INT R000 to INT R003 have the input capture capability, which is used for
capturing the current value of high-speed counter when interrupt occurs from the control memory. Even if this
function is not set up, the current value of high-speed counter will be transmited to CM1610 to CM1617
automatically when interrupt occurs.
For detail, please refer to "Input Capture", Page 3-41.
Interrupt
current value of high-speed counter CTH is the same as the setting value for high-speed counter comparator
CTC.
INT Interrupt
condition Operation condition
instruction Comparator 2
When the setting value of the X-axis comparator 2 is the same as the
INT CR3013 (CR3013)
current value
When the setting value of the Y-axis comparator 2 is the same as the
INT CR3113 (CR3113)
current value
CR3013/CR3113 are not Physical ON or OFF, and only used for ladder lablels for KV
STUDIO.
Interrupt Priority
3
Interrupt
Priority can be set as per "High/Middle/Low". Interrupts with a higher priority are considered and those
with a lower priority are not be considered.
In addition, after the "Enable interrupt in instruction execution" check box is selected, interrupt response
time fluctuation can be suppressed by interrupting instructions with a long processing time halfway.
Suppose the priority of Interrupt Routine A is set up as "Middle", only interrupt routines with a prioirty of
"High" can interrupt this interrupt routine, whereas those with a prioirty of "Low" or "Middle" cannot.
In addition, while interrupt routines with a "Low" priority can interrupt other interrupt routines except
those with a "High" or "Middle" priority.
LADDER PROGRAMMING
Unavailable Instructions for Interrupt Routine
Interrupt
Basic Instructions
File register instructions FRSTM/FRLDM File register all saving/Batch read file register
Data processing
HKEY Hex key input
instructions
Cam switch
ABSENC/INCENC Abstract encoder / incremental encoder
instructions
Extended Instructions
Frequency counter
FCNT/RCNT Measure frequency / Measure speed
instructions
PID instructions PID PID Control
MWRIT/MREAD/ Memory Card write/Memory Card read/Get Memory
Memory card MFREE/MMKDIR Card free space/Memory card folder is made
instructions Memory card folder is deleted/Deletion of memory card
MRMDIR/MDEL
files
Access window
AWNUM/AWMSG Display user message 1/Display user message 2
instructions
■ Input processing
The input relay (R000 to R015) status is captured when the interrupt routine is initiated. For other
cases, the stauts captured during scanning input processing (I/O update) will be retained, even when
interrupt routine is executed.
The initially captured input relay (R000 to R015) status is valid only in interrupt routine process. After
interrupt processing is finished, the status captured in scanning input processing (auto updating) will be
3 used in the master routine.
Interrupt
Example
Interrupt factor occur
ON
R000
OFF
ON
R001
OFF
ON
R30000
OFF
R001:OFF R001:ON
R30000:OFF R30000:ON
Input
Interrupt program
process
R001:ON
R30000:OFF
OFF ON OFF ON
Note
When fixed period module is the interrupt reason, R000 to R015 related input
processing cannot be executed.
LADDER PROGRAMMING
;(mnemonics list)
CR2002 LD CR2002
EI Enable interrupt when power is ON.
EI
CR2002 HSP LD CR2002
R000 The input time constant of input relays R000 HSP R000
and R005 is set to 10 μs. HSP R005
HSP LD R1000
R005
OUT R500
R1000 R500 END
Output relay R500 is turned ON by internal INT R000
auxiliary relay R1000 from interrupt processing. LD R1000
END
SET R1000
INT
R000
Execute interrupt program when input
relay R000 is ON.
RETI
ENDH 3
When R005 turns ON during interrupt
Interrupt
R005 R1000
SET processing, relay R1000 is turned ON.
RETI
* Input information obtained by direct input
ENDH is valid only during the interrupt program,
and must be made to via the internal auxiliary relays.
■ Output Processing
An interrupt routine has no output processing. After interrupt routine is finished, the output processing
of master routine (auto updating) is used for output.
However, output (direct output) can be enabled immediately after the routine is executed only after
output relays (R500 to R507) are programmed in the SET and RES instructions.
Example R501:Output
R30500:Output
Input
(1) (2) (3) (4)
process
R500:Output R502:Output
CR2002 R500
(1) SET
CR2002 R501
(2)
CR2002 R502
(3) SET
CR2002 R30500
(4) SET
· Rung (3), when the output relay R500 is a direct output relay, output can be enabled directly.
LADDER PROGRAMMING
· Rung (4), since output relay R30500 is energized via internal processor hense not a direct output
relay, the output processing of master routine is then used for output.
Note
· In interrupt routine, direct output is possible only when the SET/RES instruction is
used. However, please use SET/RES instruction to directly specify the device
output source.
· Even if in an interrupt process, direct ouput cannot be enabled in the following
output source.
· (2) other relays than R500 to R507 are used as well as indirect specifying or
index modification are used to specify the SET/RES instruction device.
· (3) a macro is called during interrupt process or the SET/RES instruction is
executed in subroutine.
· When fixed period module is the interrupt reason, the SET/RES instruction-based
R500 to R507 output processing cannot be performed.
ENDH
LADDER PROGRAMMING
Input Capture
With the input capture feature, current value of high-speed counter in data memory can be captured
when an interrupt condition takes place. This feature is initiated when the interrupt condition is an
external input (only R000 to R003 can be used). No settings are required for this.
The captured value is stored in the control memories CM1610 to CM1617.
Interrupt condition Capture current value Destination storage address
(external input) of high-speed counter High bit Low bit
When INT R000 occur CTH0 CM1611 CM1610 3
When INT R001 occur CTH0 CM1613 CM1612
Interrupt
When INT R002 occur CTH1 CM1615 CM1614
When INT R003 occur CTH1 CM1617 CM1616
Note
The timing for input capture execution is connected to specified interrupt polarity (up
edge/down edge) through CR2600 to CR2607.
High-speed counter
CTH0 current value10 11 12 99 100 101 999 1000 1001
(1) (2)
100 1000
(1) Since the instantaneous value in interrupt condition occurrence is collected by Input Capture, the
current value of high-speed counter CTH0 is then #100.
(2) Since the value collected through interrupt routine is the value captured in input processing of
interrupt routine, the current value of high-speed counter CTH0 is then #1000.
As mentioned above, if time elapsed exists in the process from interrupt condition occurrence to
interrupt routine execution, then the captured current value of high-speed counter will also be different.
Current value of high-speed counter (CTH) is the value obtained through input processing of
interrupt routine after interrupt routine is finished.
- KV-5000/3000 Series User’s Manual - 3-41
3-5 Interrupt
LADDER PROGRAMMING
Sample Program
3 Scan
ON
OFF
ON
CR2008
EI Enable interrupt when ;(mnemonics list)
LD CR2008
power is ON
EI
CR2002 HSP LD CR2002
R000 Constants is set to 10μs when HSP R000
input relay R000 is ON LD R500
R500 #10 T0 R500 TMR @0 #10
T0 RES CON
To set output relay R500 to AND TO
ON only for 1s RES R500
END END
INT R000
LD CR2002
INT SET R500
R000 Output relay R500 is set to RETI
ENDH
ON when input relay R000
CR2002 R500 is ON.
SET
RETI
ENDH
LADDER PROGRAMMING
The input value of high-speed counter and ON/OFF of input relay is
used to control ON/OFF of output relay R500.
3
Scan
Interrupt
ON
Input relayR010
OFF
ON
Input relayR000
OFF
ON
Output relayR500 ON
OFF
CR2002 R500
When high-speed CTC0 is
SET
#10000, interrupt program is
RETI executed and outpit relay
R500 is set to ON.
ENDH
Pulse width
width.
· The measured value is stored in data memory "DM0/DM1" (unit µs).
;(mnemonics list)
CR2008 Interrupt is enabled at power
LD CR2008
EI ON.
EI
LD CR2002
CR2002 HSP The input time constant of HSP R000
R000 input relay R00000 is set to 10 LD CR2002
μs. CTH.D #0 CR2100
END
CR2002 CTH.D 0 The 1μs internal clock is counted INT R000
CR2100 by high-speed counter CTH0. LDB CR2601
LDA.D CM1610
END CON
Interrupts are executed by input STA.D DM10
relay R000. CON
First of all, the interrupt polarity is LDB CR2601
INT changed to the down edge by LDA.D CM1610
R000 executing the interrupt at the up CON
edge of R000, storing the current SUB.D DM10
value [CM1610/CM1611] of CTH0 at CON
CR2601 CM1610 DM10 KEEP that time to [DM10·DM11], and
LDA.D STA.D SET STA.D DM0
turning CR2601 ON. CON
CR2601 Next, the pulse width of R000 is KEEP CR2601
CR2601 CM1610 DM10 DM0 calculated by executing the interrupt RETI
LDA.D SUB.D STA.D RES at the down edge of R000, and ENDH
decrementing [DM10/DM11] at the
up edge from the current value
RETI [CM1610/CM1611] of CTH0 at that
time. The result is stored to
[DM0/DM1].
ENDH Finally, CR2601 is turned OFF to
change the interrupt polarity to the
up edge.
LADDER PROGRAMMING
Determine elapsed time between two input relays.
Sensor 1 ON
· Determine elapsed time between input relay R002 and input relay R003.
· Save the determined value in data memory "DM0/DM1", taking 1µs as unit. 3
Interrupt enable at power
Interrupt
CR2008 CR2604 CR2605 CR2606 CR2607 ON and the interrupt polarity
EI RES RES RES RES ;(mnemonics list)
of input relays R002 and LD CR2002
R003 are set to the up edge. EI
CR2002 HSP CON
R002 The input time constant of RES CR2604
R002 is set to 10μs. CON
HSP RES CR2605
The input time constant of CON
R003
R003 is set to 10μs. RES CR2606
CON
CR2002 CTH.D1 The 1μs internal clock is RES CR2607
CR2200 counted by high-speed LD CR2002
counter CTH1. HSP R000
HSP R003
END LD CR2002
CTH.D #1 CR2200
END
INT When INT002 is executed, INT R002
R002 the current value of CTH1 is RETI
automatically stored (by INT R003
LD CR2002
RETI input capture) to LDA.D CM1616
[CM1614/CM1615]. CON
SUB.D DM1614
INT CON
R003 When INT003 is executed, STA.D DM0
the current value of CTH1 is RETI
automatically stored (by ENDH
CR2002 CM1616 CM1614 DM0
LDA.D SUB.D STA.D input capture) to
[CM01616/CM01617].
RETI The pass time between two
points is calculated by
subtracting the input capture
ENDH value of INT002 from the
input capture of INT003.
The result is stored to
[DM0/DM1].
Available Devices
Index
Cons Indirect Local Change
3 Operand
Bit device Word Devices tant specifying device
MR DM EM
R DR LR T C CTC CR FM ZF T C CTH CTC Z CM #/$ #TM * @ : #/: Z
Interrupt
B TM W
D ○ - - - - - - - - - - - - - - - - - -
Operand Explanation
D Designate relay device No.That reduces input time constant.*1
Description of Operation
When the execution condition is ON, specify the input time constant of the device in D to 10μs.
When the INT and CTH instructions are used, setting is required.
Note
When input time constant of control relay CR2305 is the same as input time constant of
HSP instruction, the HSP instruction will prevail.
· For CPU unit input time constant change, please refer to "2-7 I/O", Page 2-83.
· Input time constant of expansion input unit can be set using KV STUDIO unit editor. For change,
Please refer to KV STUDIO User's Manual, "Chapter 3 Unit Editor ".
Operation Flag
Example
LADDER PROGRAMMING
DI DI
Interrupt
disable
Disable interrupt routine and fixed
period module execution.
EI EI
Interrupt
enable
Enable interrupt routine and fixed period
module execution.
Execute condition
DI D I
3
Interrupt
Available Devices Index
Cons Indirect Local Modific
Bit device Word Devices tant specifying device ation
Operand
MR DM EM
R DR LR T C CTC CR FM ZF T C CTH CTC Z CM #/$ #TM * @ : #/: Z
B TM W
- - - - - - - - - - - - - - - - - - - -
Description of Operation
DI When execution condition is ON, interrupt routine and fixed period module are disabled.
This instruction is used for temporary interrupt disable .
EI When execution condition is ON, interrupt routine and fixed period module are not disabled.
the interrupt routine that are disabled via DI instruction will be enabled.
· Once EI instruction is executed, interrupt routine execution can be enabled before executing DI
instruction.
· When the program starts, interrupt is disabled.
· If interrupt is initiated in execution of DI instruction (interrupt disable), up to 16 subprograms can be nested.
While EI instruction is executed, the stored interrupt routine is executed.
To be initiated, the interrupt routine should be in enable (EI) state. In order to execute further interrupt
routines during the execution of an interrupt routine, the priority of these interrupts should be higher
than the interrupt routine in execution. To specify priority, select "CPU system setting" -> "Fixed period
execution and user interrupt" settings. Up to three levels of interrupting can be specified.
Operation Flag
Example
DIC DIC
Interrupt disable
range
Set up interrupt disable range.
3 EI
Available Devices
Interrupt
Index
Bit device Word Devices Cons Indirect Local Change
tant specifying device
Operand
MR DM EM
R DR LR T C CTC CR FM ZF T C CTH CTC Z CM #/$ #TM * @ : #/: Z
B TM W
D ○ - ○ ○ ○ - ○ ○ - - - - - ○ - - ○ ○ ○
Operand Explanation
D Specifythe bit device that outputs interrupt disable/enable state.*1
*1 If the word device is specified with the lowest bit, then other bits keep unchanged.
Description of Operation
CR2002 D CR2002 D
DIC DIC
D D
EI EI
OFF ON
Disable interrupt status Enable interrupt status
Input
Interrupt program
process
Operation Flag
LADDER PROGRAMMING
CR2009 No change in status
CR2010 No change in status
CR2011 No change in status
It is ON when indirect specifying or index modification range is incorrect. Otherwise, OFF.
CR2012
If indirect specifying and index modification are not specified for operand, it is not changed.
* If CR2012 is ON, the instruction will be not executed.
If CR2012 is ON, the detail information of error is stored in CM5100 to CM5176.
"Error Log (CM)", Page 3-20 3
Interrupt
Example
Interrupt is disnabled in operation processing. After DIC instruction execution, the interrupt processing
state is returned to the state before DIC instruction is executed.
INT INT
Interrupt
Execute the interrupt routine in front of RETI
at up edge or down edge of operand.
3 Interrupt program
RETI
Interrupt
R E T I
(I R E T )
Available Devices
Index
Cons Indirect Local Change
Bit device Word Devices
Operand tant specifying device
MR DM EM
R DR LR T C CTC CR FM ZF T C CTH CTC Z CM #/$ #TM * @ : #/: Z
B TM W
S ○ - - - - ○ ○ - - - - - - - - - - - -
Operand Explanation
S Specify the bit device.*1
*1 Only R000 to R009,CTC0 to CTC3,CR3013,CR3113 can be specified.
Description of Operation
Note
Internal register, index register, operation flag, R000 to R015, TM0 to TM3 are stored
automatically when interrupt routine starts. Each stored value is returned when interrupt
routine is finished. In default settings state, only Z11, Z12 index registers execute save/reset
processing. Z0 to Z10 index registers can be set to execute save/reset processing in "CPU
system settings" -> "Fixed period execution and user interrupt" settings.
Operation Flag
LADDER PROGRAMMING
Instruction Execution Timing
Scan
Interrupt
Example
ENDH
memories used in the program. During programming, devices are programmed behind the instruction,
which are used to assign data used in instructions and store instruction execution results.
Device List
■ Bit device
When Indirect
3 Device name Range *1
Number of
Main Functions
operation
starts
Local Index
device( modification
specifying(*)*9
points
@)*1
Device and Constant
Some input, output and internal auxiliary relays can be used for interrupt and high-speed counter.
"Input/output/internal auxiliary relay", Page 3-55
■ Word Devices
LADDER PROGRAMMING
When Indirect
Index
operation Local specifying(*)*9
Number of modific
Device name Range *1 Main Functions starts device(
points *1 ation
(Power ON, @) Lookup Store
(:Z/:#)
PROG ->RUN)
Data Memory DM0 to DM65534 65535 points Clear/hold*4 ○ ○ ○ ○
Extended data *4
EM0 to EM65534 65535 points Clear/hold ○ ○ ○ ○
Memory
Usedfor storing
File register
Consecutive number mode:
ZF0 to ZF131071
131072 points numerical data (16-
bit) Hold
×
○ ○ ○
3
Current bank: (32768×4
● Index Modification Programming (through index register and index constant modification)
LADDER PROGRAMMING
Example
D00: Z01 (if Z1 value is 100,then DM100)
D1000: Z01 (if Z1 value is 100,then R1604)
Example
DM0:#1 (means DM1)
R1000:#1 (means R1001)
Example
*DM0 *TM100
"Indirect Specifying", Page 3-75
Example
@DM0 @R10000
LADDER PROGRAMMING
Common High speed
Device No.
use Interrupt*1 High-speed counter*1 Positioning*1
Interrupt input
R000 -
INT R000
Interrupt input
R001 -
INT R001
Stop/Origin sensor input
Interrupt input
R001 -
INT R002
R001
Interrupt input
INT R003
- 3
Interrupt input
Macro argument devices that can beused only in the macro is as follows.
Indirect Local
Sym Index
Attribute Range Description specifyi device(
bol modify(:)
ng(*) @)
The device is used as an
Device P P0 to P9 × × ○
argument for processing
The device value or constant is
UR UR0 to UR9 × × ○
ng R in expansion unit as argument
Process the initial data memory
Leadi
assignd in expansion unit is
ng UM UM0 to UM9 × × ○
Unit used as an argument for
DM
processing
the code number of expansion
No. UV UV0 to UV9 unit as argument is used as an × × ×
argument for processing
■ Constant
Constant Range Main Functions
#0 to #65535/non-signed 16 bit
Used for specifying DEC number.
-32768 to +32767(signed 16 bit)
DEC(#) It will display "K" when
#0 to #4294967295/non-signed 32 bit
set it XYM display mode.
-2147483648 to +2147483647 signed 32 bit
-3.4E38<=N<=-1.4E-45
Single-precision
N=0 Used for specifying floating-point
floating-point
+1.4E-45<=N<=+3.4E38 constant.
number
"Significant bits is 7 bit"
Used for specifying HEX
$0000 to $FFFF(16 bit) constants.
HEX($)
$00000000 to $FFFFFFFF(32 bit) "H" is displayed when
XYM is selected.
Fixed string ("") (Example) "model number ABC", "month/08:30:15" Used for specifying fixed string.
■ Internal register
When operated
Number of
Device name Range Main Functions (Power ON,
points
PROG->RUN)
For temporary data storage
Internal register - 1 point Clear
(16 bit, 32 bit)
LADDER PROGRAMMING
Set Power Failure Holding (latching)
Power-off Hold means that the device values are retained when the power is cut off.
To select option, open the "CPU system settings" from KV STUDIO workspace, and select "System
settings" -> "Set Power Failure Holding".
Bit Device
I/O Relay R
Overview Input relay is the device that collects ON/OFF information from peripherals into PLC.
Output relay is the device that sends ON/OFF instructions or arithmetic operation results
from PLC to peripherals.
R00012
Device nameDevice No. (00000 to 99915)
·The letter R can be omitted in programming. (for constant operands, however, R cannot be
omitted in programming.)
·Zero suppression in programming.
(Example)R12
·Can be used as word device.
"The word unit processing for bit device", Page 3-80
·Can be used as direct I/O relay by adding "D" in the device name.
(Example) DR500,,, R500 will act as a direct output relay
"Direct I/O Relay (DR)", Page 3-16
·When XYM Marking is selected, input devices are designated as "X" and output relays as "Y".
"About XYM Marking", Page 3-54
Default setting Under default state, output relays will clear the states turning to OFF when power is ON
and PROG-> RUN. You can change this to "Hold" in the "set power failure setting" tab
from the "CPU system settings".
Unit No. Starting from CPU, labeling can be performed in the order of 01, 02,
03, 04…and the like.
Unit relay No. Starting from 00000, the occupied points are specified as relay number.
Unit No. 00 * 01 02 03 04 05
KV-
KV-U7 KV-B16XA KV-C32XA KV-B16TA KV-C32TA KV-H20S
5000/3000
16-input 32-input 16-output 32-output 12CH occupied
CPU
Unit relay No. R000 to R015˄input˅
00000 to 00015 00000 to 00115 00000 to 00015 00000 to 00115 00000 to 00915
R500 to R507˄output˅
Link Relay B
LADDER PROGRAMMING
Oerview Used as the relay that executes cyclic transfer when connecting with FL-net. Device numbers
are specified with hexadecimal symbols, which is different from other relays.
B3A6F 3
Device name Device No.(0000 to 3FFF)
Note
· Please use hexadecimal number (0 - F) for specifying.
· Local devices (@) cannot be used.
Application Used as the relay that executes cyclic transfer when connecting FL-net.
Denotation These relays cannot be assigned as the unit device of expansion unit.
Default setting In default state, link relay will elimination state when power is ON, PROG-> RUN,
become OFF.Set to hold state in " Power-off hold settings " of CPU system setting.
■R
Overview R that is not assigned to actual I/O relays and expansion unit relays can beused as internal
auxiliary relay.
R00012
Device nameDevice No. (00000 to 99915)
Default setting Under default state, output relays will clear the states turning to OFF when power is ON
3 and PROG-> RUN. You can change this to "Hold" in the " set power failure setting " tab
from the "CPU system settings"..
Device and Constant
■B
Overview When FL-net is not connected, the B that is not assigned to link relays can beused as internal
auxiliary relay.
B1EE7
Device name Device No. (0000 to 3FFF)
Note
· Please use hexadecimal number (0 - F) for specifying.
· Local devices (@) cannot be used.
Description These relays cannot be assigned as the unit device of expansion unit.
Default setting Under default state, output relays will clear the states turning to OFF when power is ON
and PROG-> RUN. You can change this to "Hold" in the "set power failure setting" tab
from the "CPU system settings".
■ MR
LADDER PROGRAMMING
Overvi A device that can be used only in CPU
MR02809
Device name Device No. (00000 to 99915)
3
Default setting W hen power is ON, or PROG→RUN, the states will be cleared, and output becomes OFF.
LR02308
Device name Device No. (00000 to 99915)
Description These relays cannot be assigned as the unit device of expansion unit.
Timer (Contact) T
LADDER PROGRAMMING
Overvi Timer includes contact (1-bit), setting value (32-bit) and current value (32-bit).Timer is a kind
of device. And when the current value of down counter is "0" (time is up) or current value of
up/down counter is the same as the setting value or or "0", the contact becomes "ON".
T0501
Device and Constant
Device name
Contacts, current values and setting values depend on the instruction operand used.
Description Timer is classified into 4 categories: 1ms timer, 10ms timer, 100ms timer and up/down timer.
Default When power is ON, or PROG->RUN, the state will be cleared, and the output becomes OFF.
Current value is the same as setting valuewhen power on as well as PROG -> RUN.
(only up/down counter may keep current value.)
setting value is held.
LADDER PROGRAMMING
Timer type (instruction) Device No. Setup value Time before ON
100ms down counter(TMR) n x 100ms
10ms down counter(TMH) n x 10ms
0 to 3999 0 to 4294967295
1ms down counter(TMS) n x 1ms
10ms up/down counter(UDT) n x 10ms
■ Timer error
Timer error is shown below:
· TMR(100ms timer): ±(100ms + 1 scan time) 3
· TMH(10ms timer): ±(10ms + 1 scan time)
8 second 20 second
Execution
SBN to RET instruction
Stop
ON
Execute condition
OFF
Timer
Current value Second 20 181614 12 0
˄Setting value:
20 seconds˅
ON
Contact
OFF
Not update for timer current value. Timer contact ON when restart
·The ONDL/OFDL/SHOT/FLIK instruction will act just like the above-mentioned, which should
be paid attention to.
·If a timer instruction is used in the module/macro and the execution in module/macro is stoped,
the timer instruction is then reset through OFF , and the above-mentioned will not occur.
"Operation of standby module", Page 3-98
"Macro Type", Page 3-112
The setting value/current value reading or changing instructions are listes as follows:
Reading Changing
Current value MOV, LDA instruction MOV, DW instruction
Set value (Can't read) STA Instruction*
* Set values changed with the STA instruction will be cleared when power is ON or RUN→PROG, and
returned to original value.
If the timer value is specified with a device, then the value is updated by the specifying device each time
3 scanning is performed.
Device and Constant
Note
If the current value exceeds setting value, the current value is then changed to the setting value.
Counter (Contact) C
Overview Counter contains contact (1-bit), setting value (32-bit), current value (32-bit).
Counter is a kind of device whereby the contact is ON when the current value is the same as
the setting value (counting is finished).
C0551
Device name
Contacts, current values and setting values depend on the instruction operand used.
Description Three kinds of counter are available: counter, output counter, up/down counter.
Default setting Under the default state, contact states, current values, setting values are kept.
Under default state, output relays will clear the states turning to OFF when power is ON
and PROG-> RUN. You can change this to "Hold" in the " set power failure setting " tab
from the "CPU system settings".
LADDER PROGRAMMING
Program counter action by designating counter No.setting value, count input relay used in counter instruction operand.
For details on instructions,"KV-5000/3000/1000 series Instruction Reference Manual "2-6 Memory Card
Instructions"
T2
when T1>T2ǂoperation ratio˙ ×100 (unit: %)
T1ˇT2
The setting value/current value reading or changing instructions are listes as follows:
Read Change
Current value MOV, LDA instruction MOV, DW instruction
Setting value (Can't read) STA Instruction*
* If the counter value is specified with a device, then the value is updated by the specifying device each time
scanning is performed.
3 Note
If the current value exceeds setting value, the current value is then changed to the setting
Device and Constant
value.
Overview High speed counter comparator is a device whereby it turns ON when the current value of
high-speed counter is the same as the setting value.
Note
When CTC is used as interrupt element, CTC (contact) is not ON.
Description CTC can also be taken as an interrupt condition for interrupt routine execution.
Default setting Under the default state, contact states and setting value are kept.
You can also choose to clear the value when power is ON or PROG->RUN by selecting
the "Clear" option from the "set power failure setting" tab in the "CPU system settings"
window.
Control relay(contact) CR
Overview Control relay is special internal auxiliary relay that is used to control PLC function and
capture PLC state.
LADDER PROGRAMMING
Word Device
Overview A data memory and extended data memory is used to save reference data or 16-bit per point
devices in function operations.
Description ·Only Data Memory (DM) can be assigned as the unit device of expansion unit.
The bit width of 1 device point is 16 bit. When used as unsigned decimal number, 0 to 65535 can be
processed; when used as signed decimal number, - 32768 to ++32767 can be processed; when used
as hexadecimal number, $0 to $FFFF can be processed.
DM1
bit bit bit bit
15 8 7 0
16-bit
·2 devices can also be used to process 32-bit data. For 32-bit data, the low 16 bits will be
stored in the data memory of the specified device No. and the high 16 bits will be stored in
the data memory of the next device No.. If used as unsigned decimal, the value will be 0 to
4294967295; if used as signed decimal, the value will be -2147483648 to +2147483647; if
used as hexadecimal, the value will be $0 - $FFFF.
DM1 DM0
bit bit bit bit bit bit bit bit
31 24 23 16 15 8 7 0
32-bit
·If the data memory is used to specify a 32-bit operand, then only the device No. which stores
LADDER PROGRAMMING
the menu.
Unit No.: From CPU, according to the unit connection sequence, assign 00, 01,
02, 03, 04…and the like.
Unit DM No.: Specifying for the occupied data memories starts from 0000.
(Example)
*
Unit No. 00 01 02 03 04 05
KV-
KV-U7 KV-AD40 KV-DA40 KV-H20S KV-H20S KV-H20S
5000/3000
22 words 18 words 320 words 320 words 320 words
CPU
Unit DM No.:
0000 to 0021 0000 to 0017 0000 to 0319 0000 to 0319 0000 to 0319
Overview File register can beclassified into ZF whereby all areas are processed sequentlyand FM
whereby the area is divided into four memory banks which are switched over in processing.
ZF0372
LADDER PROGRAMMING
(Example) ZF372
·Can be used a bit device.
(Example) FM1100 ......the lowest bit of FM1100 is processed.
·Can be used as a bit device by specifying the bit position.
(Example) DM1200.12 the 13th bit of ZF1200 is processed.
"The bit device processing for a word device", Page 3-81
·“FM" is displayed as ”F" when the XYM Marking option is selected.
"About XYM Marking", Page 3-54
Note
· ZF local devices (@zfxxx) cannot be used.
3
Description These relays cannot be assigned as the unit device of expansion unit.
·The device category and range varies depending on consecutive numbering and memory
bank switching modes, .
·A device's bit width is 16 bit. If unsigned decimal is used, the value will be 0- 4294967295; if
signed decimal, it will be +32767- +2147483647; if hexadecimal, it will be $0- $FFFF.
ZF2510
bit bit bit bit
15 8 7 0
16-bits
·2 devices can also be used to process 32-bit data. For 32-bit data, the low 16 bits will be
stored in the data memory of the specified device No. and the high 16 bits will be stored in
the data memory of the next device No.. If used as unsigned decimal, the value will be 0 to
4294967295; if used as signed decimal, the value will be -2147483648 to +2147483647; if
used as hexadecimal, the value will be $0 - $FFFF.
ZF0 ZF131071
The file register is divided into four areas which are switched over in use.
ZF0
ZF32767, ZF32768
ZF65535, ZF65536
ZF98303, ZF98304 ZF131071
Through switching memory banks, four different device ranges are available for a single device.
Since it can bemixed with ZF devices in use, attention should be made in data processing.
3 For more inforamtion about memory bank switching, please refer to "3-11 File Register", Page 3-
137.
Device and Constant
Link Register W
Overview It is used as the cyclic transfer register for FL-net. Hex symbols are used for device labeling
which is different from other word devices.
W3A6F
Note
· Please use hexadecimal number (0 - F) for specifying.
· Local device (@) cannot be used.
Description These relays cannot be assigned as the unit device of expansion unit.
·A device's bit width is 16 bit. If unsigned decimal system is used, the value will be 0-
4294967295; if signed decimal, +32767- +2147483647; if hexadecimal, $0- $FFFF.
W123E
bit bit bit bit
15 8 7 0
16-bit
3-70 - KV-5000/3000 Series User’s Manual-
3-6 Device and Constant
·2 devices can also be used to process 32-bit data. For 32-bit data, the low 16 bits will be
LADDER PROGRAMMING
stored in the data memory of the specified device No. and the high 16 bits will be stored in
the data memory of the next device No.. If used as unsigned decimal, the value will be 0 to
4294967295; if used as signed decimal, the value will be -2147483648 to +2147483647; if
used as hexadecimal, the value will be $0 - $FFFF.
W2BE1 W2BE0
bit bit bit bit bit bit bit bit
31 24 23 16 15 8 7 0
Overview Temporary data memory is 16-bit word device that may perform the same processing as data
memory. When an arithmetic operation instruction is used, the device area can also be used
for temporary store of arithmetic operation data or arithmetic operation result data.
TM010
For more information about DIV and MUL instructions, please refer to theKV-5000/3000/1000
Instruction Reference Manual.
For more information about simple Indirect specifying, please see "Indirect Specifying", Page 3-75.
Default setting When power ON or PROG->RUN, the value is cleared and set to 0.
·TM000 - TM003 are used in DIV and MUL arithmetic operation instructions. It is advisable
not to use them for any other purpose.
·Zero suppression can be used in programming.
(Example) TM10
·TM is saved in internal ultra high-speed buffer memory of KV-VELOCE Ⅱ (ladder special
execution engine) for high-speed access.
When the timer setting value (32-bit) is set up and current value (32-bit) is read, the timer is used as a
word device.
3 When the counter setting value (32-bit) is set up and current value (32-bit) is read, the counter is used
as a word device.
Device and Constant
Overview High speed counter is a 32-bit counter used to collect short interval signals that cannot be
collected by common counter instructions.
Default setting Under default state, the contact state and setting value is held.
Under default state, output relays will clear the states turning to OFF when power is ON
and PROG-> RUN. You can change this to "Hold" in the " set power failure setting " tab
from the "CPU system settings".
Index Register Z
LADDER PROGRAMMING
Overview A 32-bit word device that is used to specify the value attached to target device for index
modification. Like data memory, it is used to store data and operation results.
Default setting When power is ON, or PROG -> RUN, index register is reset.
Control Memory CM
Overview Control memory is a special word device that is used to control PLC and capture PLC state.
Index Modification
"Index modification" refers to the method for addressing a device by adding the value and constant of
index register (Z) to a corresponding device.
The range for adding value is of signed 32-bit.
The devices that can use Index modification include R (DR), B, MR, LR, T, C, DM, W, EM, ZF, FM, and
TM, and this is availabe to the whole device range.
Index modification can beused together with indirect specifying (*) and local device (@).
Note
· For the bit position specifying of the CTH, CTC, CR, CM, and Z labels (label
arrangement) and word devices, index modification is not available.
"Label", Page 3-162
"The bit device processing for a word device", Page 3-81
· If addressing can beperformed on the devices out of range that is capable of index
modification according to argument, control relay CR2012 becomes ON and this function
is not executed. But the operation continues.
This is used to modify the devices specified with an instruction operand in operation.
Programming method to modify device through pointer register is as follows:.
"Device No."Z (1 to 10)
(Example) DM01000:Z01 .......... DM0990 is referenced when the value of Z1 is -10
R000 : Z5 ................. If the value of Z5 is a positive one, R100 should then be specified.
Note
3 Z11, Z12 are reserved for system, thus can't be used.
Device and Constant
Example The current value in DM10000 will be stored as trigger signal in up edge of R001. Recording is
started in the up edge of R000 , and data storing is started from DM0.
R000 MOV.L
Index register Z01 is set to "0" at the
+0 Z1
up edge of R000.
Recording start
button
Z1
Index register Z01 is
INC.L
incremented by "1".
DM99 1234
Note
Since the value for index modification is processed as a signed 32-bit value, ".L" should be
suffixed to the instruction for index register operation.
If more than ten index registers (Z) are used in one project, the index register instruction
(ZPUSH/ZPOP) can be used to clean up or restore index registers of each module or macro
in batch.
For more information, please refer to "3-8 Memory Card Instructions" in the KV-5000/3000/1000
Series Instruction Reference Manual
LADDER PROGRAMMING
When a constant is used for in index modification, programming should done as follows:
The leading number can be easily identified if constant-based index modification is used in
the macro in which unit devices are used. In addition, in macro programming, this, as the
argument device, is effective even if UR/UM is used.
(Example)
3
Indirect Specifying
■ Indirect specifying(*)
Indirect specifying (*) is used to modify the devices specified as an instruction operand in program
execution process. Although index modification is also applicable to lookup devices, device types may
also be modified if indirect specifying (*) is used, .
Note
· Indirect specifying (*) cannot be used together with simple indirect specifying (#TM).
· If addressing can beperformed on the devices out of range that are capable of index
modification according to argument, control relay CR2012 becomes ON and this function
is not executed. But the operation continues.
(Example)
LADDER PROGRAMMING
Device Value
TM10TM11 DM0 25
Indicates value of *TM10ˈreference
DM1 1234
DM1’s address 1234 or DM1.
DM2 0
DM3 96
3 Note
· The devices that can be programmed (for address storage) to "*(device)" include DM/EM/
Device and Constant
FM/TM/W/ZF.
· The devices applicable for indirect specifying include R/MR/LR/B/T/C/DM/EM/FM/TM/W/ZF.
·If the indirect specifying device is a timer (T) or counter (C), the contact, current value and
setting value then depend on the instruction operand.
·When a local device is used, the programming format is "*@ (device) ".
1 Use the address setting instruction (ADRSET) to write the address of lookup device.
(Example)
ADRSET
Save address of DM0 to
DM0 TM10
TM10/TM11.
Note
The device that can store address include TM, DM, EM, FM, W, and ZF.
For details on instructions, please refer to "ADRSET Instructions" in the "KV-5000/3000/1000 Series Instruction
Reference Manual.
2 Add the prefix "*" before the device that stores the current address, and indirectly specify the
device according to each instruction operand.
(Example)
MOV
The value of DM10000 is
DM10000 *TM10
stored to DM0.
DM0
Note
Before adding prefix "*" to the device that stores the address, please always use the
ADRSET instruction to store address of the indirectly specified device.
3 To change the device to be searched, use the special indirect addressing instruction (ADRINC/
LADDER PROGRAMMING
ADRDEC/ADRADD/ADRSUB) to change the currently stored address.
(Example)
MOV
The value of DM10000 is
DM10000 *TM10
stored to DM1.
DM1 3
For details on instructions, please refer to "3-9 Memory Card Instructions" in the KV-5000/3000/1000 Series
Instruction Reference Manual
DM99 1234
To save the current value of DM10000 with the up edge of R001 as the trigger signal.
At the up edge of R000, if R002 is ON, data is stored from DM0; if it is OFF, stored from EM0.
(1) (2)
R000 +0 R002 ADRSET
< DW.S > DM0 TM10
Measurement Z1 Save destination selection Save destination 1 start Address store destination
start button
(3)
R002 ADRSET
EM0 TM10
3 Save destination selection Save destination 2 start Address store destination
(4)
Device and Constant
R001 MOV
DM10000 *TM10:Z1
Trigger
signal Measured value Address store destination
(5)
Z1
< INC.L >
To start,
(1) Write 0 in the pointer register Z1.
(2) If R002 is ON, write the DM0 address in TM10/TM11.
(3) If R002 is OFF, write the EM0 address in TM10/TM11.
To trigger,
(4) Use the Z1 index specification to modify the device (adding the value of Z1) whose address is stored
in TM10/TM11, and write the value of DM10000 in the modified device.
(Example)
*TM10->EM0 *TM10:Z1->EM23
Z1= 23
(5)Add Z1 by 1.
Note
· Simple indirect specifying cannot be used together with the index modification, indirect
specifying (*), and local device (@) .
· The simple indirect specifying feature is support for the reuse of exsiting programs. To
program a new program, it is recommended that the index modification or indirect
specifying be used.
LADDER PROGRAMMING
This is done by programming #TMnnn in instruction operand to modify the value stored in TMnnn.
The relationship between the value stored in TMnnn and #TMnnn is shown in the table below.
10000 R000
10001 R001
10002 R002
Indirectly specified relays (R)
17913 R7913
17914 R7914
17915 R7915
The usable range of temporary data memory is TM0 to TM511. Since TM0 to TM3 can also be used for
arithmetic operation, however, duplication should be prevented.
Note
· Simple indirect specifying is only applicable to DM/R, DM10000 to DM65534,and R8000
to R99915.
· If the value in temporary data memory (TM) is larger than 17915, the control relay
CR2012 (operation flag) is ON when performing simple indirect specifying, and this
instruction is not executed. But the operation continues.
Generally speaking (namely sequence instruction), a bit device can beprocessed as a 1-bit device.
R006 R30500
1 bit between R006 and R30500 as
processed object when under the
condition of command above .
R R R R R R R R R R R R R R R R
3 0
1
5
0
1
4
0
1
3
0
1
2
0
1
1
0
1
0
0
0
9
0
0
8
0
0
7
0
0
6
0
0
5
0
0
4
0
0
3
0
0
2
0
0
1
0
0
0
Input relay
Device and Constant
Process object
Output relay
R R R R R R R R R R R R R R R R
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
In an arithmetic operation instruction, bit devices can begrouped into 16-bit or 32-bit for processing.
If a bit device is designated to a instruction operand based on bit unit for processing, the word unit is
used for processing starting from the specified bit device.
Example
MOV
R30000 DM0
R30015 R30000
1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
MOV.D
R30000 DM0
1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
If the bit device assigned to an operand is not in the leading channel position, straddle word unit
LADDER PROGRAMMING
processing is then performed for the bit device.
MOV
R30003 DM30505
R30102 R30003
301ch 300ch
1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
R30604 R30505 3
306ch 305ch
Note
When the straddle word unit processing is used, the processing speed will decrease.
0 1 1 1 0 1 1 0 0 1 1 0 1 1 0 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
When a word device is specified with other instructions than the above-mentioned, only the lowest bit of
the specified word device is processed as a bit device.
Example
LADDER PROGRAMMING
DM1000 EM1001
DM1000˙#46563($B5E3)
1 0 1 1 0 1 0 1 1 1 1 0 0 0 1 1
3
Device and Constant
Lowest bit
1Contact ON
0Contact OFF
In the above-mentioned example, when the contact is ON, the lowest valid bit of EM1001 becomes "1".
EM1001=#14($E)
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
EM1001=#15($F)
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1
Constant
The constant value and range varies depending on the instruction and suffix used.
#Decimal constant
Overview A decimal constant is a decimal that is represented by a bit width of 16-bit and 32-bit.
#06143
·Signed (when the suffix is "S" or "L")
A decimal constant is represented by a sign which is followed by decimal numbers.
LADDER PROGRAMMING
·A signed decimal constant can also use the prefix "#". If a decimal constant has the symbol
"#", the "+" sign then has to be omitted.
·In the XYM Marking mode, "K" can be attached.
"About XYM Marking", Page 3-54
$Hex constant
Overview A hex constant is a hex symbol which is represented by a bit width of 16-bit or 32-bit. 3
$1AF7
Range ·16 bits : $0000 to $FFFF
·32 bits : $00000000 to $FFFFFFFF
Note
During programming, if the hex constant has no prefix "$" and contains A to F, an error mayl
occur; if it does not contain A to F, it will be considered as a decimal number.
Floating-point constant
The prefix "#" symbol can be used. If so, the "+" sign has to be omitted.
Overview This refers to a character string instruction and timing contact instruction operand.
Note
If there is no the " ", it will be treated as a label in processing.
Internal register
Internal register is a device that is used to store the arithmetic operation results of an application
instruction, arithmetic operation instruction, and extended instruction. As well as store temporary data
during an arithmetic operation.
The data stored in an internal register remain unchanged before the following new data is stored.
When power is ON or PROG->RUN, internal register is reset.
Internal register of low bit 16-bit is called 16-bit internal register. An internal register which contains 16
low bits is called 16-bit internal register. An internal register which contains both high and low 32 bits is
called 32-bit internal register.
This is identified to the instruction and suffix used.
"Suffix", Page 3-93
LADDER PROGRAMMING
(expansion) data memory
DM/EM (internal auxiliary) relay
File register Handling of control relays
FM/ZF Current value of timer/counter in word units
Temporary data memory Constant
TM R00000 to R99915
#$ TǃCǃCTH MR00000 to MR99915
Control memory
CM LR00000 to LR99915
Index register CR0000 to CR3915
Z
3
LDA command
Data memory
DM/EM/FM (internal auxiliary) relay
File register Handling of control relays
FM/ZF Setting value of timer/counter in word units
Temporary data memory
TM R00000 to R99915
Control memory TǃCǃCTC MR00000 to MR99915
CM LR00000 to LR99915
Index register CR0000 to CR3915
Z
Example
Read DM0 to the internal register, which is multiplied by 2 plus the value of DM1, then
stored in DM2.
CR2002 DM0 #2 DM1 DM2
LDA MUL ADD STA
#1000 #100 #2100
BIN Data
In KV-5000/3000 PLC, only BIN processing is available within a device and internal register.
1 BIN bit is processed with "bit" as the unit.A bit has two states: "0 (OFF) " and "1 (on).
Normally, a 16-bit data is processed with "word" as the unit. A unsigned DEC can be represented as 0
to 65535.
(Example)
MSB
0 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0
噼
噼
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 Weighting of each bit
3276816384 8192 4096 2048 1024 512 256 128 64 32 16 8 4 2 1 Decimal number value
MSB
When a 32-bit device is processed in the DM/EM/FM/TM 16-bit word devices, two consecutive words
should be used. Low 16-bit data is processed in the low byte device and high 16-bit data is processed
in the high byte device.
LADDER PROGRAMMING
Representation
■ BIN (Binary)
Only "0" and "1" are used to represent KV-5000/3000 internal BIN data. Each digit postion carries when
larger than 1.
MSB
bit
15
bit
8
bit
7
bit
0
3
Data Processing
噼
噼
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 Weighting of each bit
32768163848192 4096 2048 1024 512 256 128 64 32 16 8 4 2 1 Decimal number value
(Example) 0110110100110001
■ #DEC
A DEC is used to represent the internal BIN data of KV-5000/3000 .
● Unsigned
For 16-bit data, the processing range is 0 to 65535; for 32-bit data,
the processing range is 0 to 4294967295.
● Signed
Positive/negative is determined by the highest bit. (0: possitive; 1:negative)
For 16-bit data, the processing range is -32768 to 65535; for 32-bit data, -2147483648 to
+2147483647.
■ HEX
A HEX is used to represent the internal BIN data of KV-5000/3000 .
Each HEX digit represents four BIN digits. One digit is in the range of DEC 0 to 15. So digits larger than
9 uses A, B, C, D, E, F. When larger than F, carrying is performed.
For 16-bit data, the processing range is -32768 to +32767; for 32-bit data,
the processing range for $000000 is 00 to $FFFFFFFF.
Values with "$" as the leading symbol can be used as instruction operand.
(example) $00FF
Like HEX, BCD also takes 4 BIN digits as a unit for processing. And like DEC, carrying is performed
when larger than 9. Hence sympols A to F are not used.
For 16-bit data, processing range is 9999 to 65535; for 32-bit data,
the range is 99999999 to 4294967295.
Example
0 0 0 0 1 0 0 1 1 0 0 0 0 1 1 1
thousand bit hundred bit ten bit one bit
0 9 8 7
Binary Code Decimal (BCD) is well suited for external data processing (digital switch etc).
For arithmetic operations in KV-5000/3000 PLC, however, they have to be procesed in the BIN formy
data. When reading from external equipment, please use the TBIN instruction to convert them into BIN
data; and when outputing to external equipment (digital display etc), please use the TBCD instruction to
convert BIN data into BCD.
To use BCD as an operand, please add the prefix "$" to the value forming a HEX number.
LADDER PROGRAMMING
Relationship Between Different Numbering Systems
■ 16-bit data
DEC HEX
BIN BCD BIN
Unsigned Signed HEX
0 +0 0 0000 0000 0000 0000 0000 0000 0000 0000 0000
1
2
+1
+2
1
2
0000
0000
0000
0000
0000
0000
0001
0010
0001
0002
0000
0000
0000
0000
0000
0000
0001
0010
3
Data Processing
3 +3 3 0000 0000 0000 0011 0003 0000 0000 0000 0011
4 +4 4 0000 0000 0000 0100 0004 0000 0000 0000 0100
5 +5 5 0000 0000 0000 0101 0005 0000 0000 0000 0101
6 +6 6 0000 0000 0000 0110 0006 0000 0000 0000 0110
7 +7 7 0000 0000 0000 0111 0007 0000 0000 0000 0111
8 +8 8 0000 0000 0000 1000 0008 0000 0000 0000 1000
9 +9 9 0000 0000 0000 1001 0009 0000 0000 0000 1001
10 +10 A 0000 0000 0000 1010 0010 0000 0000 0001 0000
11 +11 B 0000 0000 0000 1011 0011 0000 0000 0001 0001
12 +12 C 0000 0000 0000 1100 0012 0000 0000 0001 0010
13 +13 D 0000 0000 0000 1101 0013 0000 0000 0001 0011
14 +14 E 0000 0000 0000 1110 0014 0000 0000 0001 0100
15 +15 F 0000 0000 0000 1111 0015 0000 0000 0001 0101
16 +16 10 0000 0000 0001 0000 0016 0000 0000 0001 0110
99 +99 63 0000 0000 0110 0011 0099 0000 0000 1001 1001
100 +100 64 0000 0000 0110 0100 0100 0000 0001 0000 0000
32767 +32767 7FFF 0111 1111 1111 1111 0999 0000 1001 1001 1001
32768 -32768 8000 1000 0000 0000 0000 1000 0001 0000 0000 0000
65534 -2 FFFE 1111 1111 1111 1110 9998 1001 1001 1001 1000
65535 -1 FFFF 1111 1111 1111 1111 9999 1001 1001 1001 1001
■ 32-bit data
LADDER PROGRAMMING
DEC
HEX BIN
Unsigned Signed
0 +0 0 0000 0000 0000 0000 0000 0000 0000 0000
1 +1 1 0000 0000 0000 0000 0000 0000 0000 0001
2 +2 2 0000 0000 0000 0000 0000 0000 0000 0010
3 +3 3 0000 0000 0000 0000 0000 0000 0000 0011
4 +4 4 0000 0000 0000 0000 0000 0000 0000 0100
5 +5 5 0000 0000 0000 0000 0000 0000 0000 0101
6 +6 6 0000 0000 0000 0000 0000 0000 0000 0110
3 7
8
+7
+8
7
8
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0111
1000
9 +9 9 0000 0000 0000 0000 0000 0000 0000 1001
Data Processing
2147483647 +2147483647 7FFFFFFF 0111 1111 1111 1111 1111 1111 1111 1111
2147483648 -2147483648 8000000 1000 0000 0000 0000 0000 0000 0000 0000
4294967294 -2 FFFFFFFE 1111 1111 1111 1111 1111 1111 1111 1110
4294967295 -1 FFFFFFFF 1111 1111 1111 1111 1111 1111 1111 1111
BCD BIN
00000000 0000 0000 0000 0000 0000 0000 0000 0000
00000001 0000 0000 0000 0000 0000 0000 0000 0001
00000002 0000 0000 0000 0000 0000 0000 0000 0010
00000003 0000 0000 0000 0000 0000 0000 0000 0011
00000004 0000 0000 0000 0000 0000 0000 0000 0100
00000005 0000 0000 0000 0000 0000 0000 0000 0101
00000006 0000 0000 0000 0000 0000 0000 0000 0110
00000007 0000 0000 0000 0000 0000 0000 0000 0111
00000008 0000 0000 0000 0000 0000 0000 0000 1000
00000009 0000 0000 0000 0000 0000 0000 0000 1001
00000010 0000 0000 0000 0000 0000 0000 0001 0000
00000011 0000 0000 0000 0000 0000 0000 0001 0001
00000012 0000 0000 0000 0000 0000 0000 0001 0010
00000013 0000 0000 0000 0000 0000 0000 0001 0011
00000014 0000 0000 0000 0000 0000 0000 0001 0100
00000015 0000 0000 0000 0000 0000 0000 0001 0101
00000016 0000 0000 0000 0000 0000 0000 0001 0110
LADDER PROGRAMMING
When the arithmetic operation result exceeds maximum value or minimum value, dpending on data
type, data change is shown below respectively.
0
1
2 0002
0001
0000 0
1
2 0002
0001
0000
3
65535 FFFF -1 FFFF
Data Processing
65534 FFFE -2 FFFE
65533 FFFD -3 FFFD
65532 FFFC -4 FFFC
… … … …
32771 8003 -32765 8003
32770 8002 -32766 8002
32769 8001 -32767 8001
32768 8000 -32768 8000
32767 7FFF 32767 7FFF
32766 7FFE 32766 7FFE
32765 7FFD 32765 7FFD
32764 7FFC 32764 7FFC
0 1.4×10-45 3.4×1038
(1.4E-45) (3.4E38)
0 ∞(display as "----")
Character Code
In order to process text strings in ladder program, the code number assigned to them are called character code.
In KV- STUDIO , the following character codes can be processed.
■ ASCII code
8 bits are used to represent 1 half-width character.
(example) A···$41 1···$31
3
"ASCII Code Table", Page A-19
Data Processing
Can be used as character processing instruction and calendar contact instruction operand.
Use the """ to bracket the text string.
(example):"model ABC" ± "month/08:30:15"
LADDER PROGRAMMING
Suffix
A suffix is a symbol attached to the end of an instruction, which is classified into the following 5
categories:
□.U □.S □.D □.L □.F
Data Processing
ADD.S MOV.S
ADD.D MOV.D
ADD.L MOV.L
ADD.F MOV.F
Overview
Normally, a ladder program involves multiple processes such as initialization, automatic operation,
manual operation, and error handling. In an ordinary ladder program, these are processed in a
consective fashion. With KV STUDIO, however, each process and feature can be programmed
separately, thereby facilitating separate management over each of them.
˷Auto operation˹
˷Manual operation˹
˷Auto operation˹
Module
■ Module Management
In KV STUDIO, the "workspace" is used for module management .
Easy program calling can be achieved by registering a frequently used module into the "Module
Library".
Workspace
Module library
"Workspace" and "Module Library" can be selected from the "View(V)" option in the menu bar.
LADDER PROGRAMMING
Alternatively, you can also the Hide/Show icon in the tool bar to display them.
The display position can be changed.
·You can copy a module between applications by opening up multiple KV STUIDO windows.
·Modules of other projects can also be imported.
■ Module features
● Know the whole program at a glance
Since the tree structure is adopted for each module in the "Workspace" , even a non-programmer can
3
Module
understand them at a glance.
Display
module list.
● Easy to reuse
Module E Module G
Module Type
Module can be classified into "Every Scan Execution Type Module", "Initialization Module", "Standby
Module", and "Fixed Period Module".
You can manage and even change all types of module In the KV STUDIO "Workspace".
3 Every Scan Execution Type Module is executed right from the first time scanning (power on, or PROG -
> RUN).
Module
You can use the module instructions (MDSTOP Module Stop/MDSTRT Module Start) to control the
module in operation.
The operations when using the module instructions are the same as the Standby Module.
"Standby Module Operation", Page 3-98
·If a module instruction is used but the execution state is not controlled, the module will be executed for each
scanning.
·When KV STUDIO is used to create a new project, an Each Scan Execution Type Module
with the same name as the project name will be created automatically.
Initialize Module
Initialize Module is carried out for a module only in first time scanning in running. Initialize Module is
used to initialize equipment or restore the default settings of KV-5000/3000. In a project, even if
Initialize Module is not programmed, KV-5000/3000 can still run.
So please program Initialize Module when required.
CR2008
Initialization
END
CR2008 process 2
ENDH
When a module is registered as Initialize Module, since it is unnecessary to execute the initialization
routine in the next time scanning, the scanning time for this module can then be reduced.
LADDER PROGRAMMING
Note
· Some instructions cannot be used Initialize Module.
"Unusable Instruction List", Page A-23
· For Initialize Module, the module instructions (MDSTRT/MDSTOP) cannot be used for
execution state control.
· KV-5000/3000 cannot run if only Initialize Module is provided. At least one or above Every
Scan Execution Type Module or Standby Module should also be provided.
Standby Module 3
Module
Standby Module is stopped when the operation starts. The module execution instructions (MDSTRT/
MDSTOP) can be used to control its execution state during operation.
"Module instructions", Page 3-106
Main
Execution
・・
start
R000
MDSTRT
Auto
operation
Execution
stop R000 MDSTOP
Auto
operation
・・・
END
ENDH
Note
KV-5000/3000 cannot run if only Initialization Module is provided. At least one or above Every
Scan Execution Type Module or Standby Module should also be provided.
The execution state control is the same as Every Scan Execution Type Module.
Scan once Scan once Scan once Scan once Scan once Scan once
Module B Module B
execution start execution stop
The initial state of the differential execution instruction when Standby Module is started is ON in
the up edge, and OFF in the down edge. For example, if the state before the first time scanning is
ON, the up edge differential execution condition is not detected.
Instruction State
OUB Instruction OFF
OFDL Instruction
Reset.
SHOT Instruction
C Instruction State hold.
CJ/NCJ/GOTO Instruction Not jumped.
·The operations of a ladder program in the module are the same as those when the program
is stopped or the execution condition of MC instruction is OFF only for one scanning period.
For details on instructions, please refer to "5-9 Memory Card Instructions" in the KV5000/3000/1
series Instruction Reference Manual
Fixed-Period Module
LADDER PROGRAMMING
Routines in Fixed-Period Module can be separated from ordinary scanning and executeed according to
pre-defined period. Each project can only use one Fixed-Period Module.
Module
Example
CR2002
EI
Always ON
● When the "Execute right from the start" check box is selected (default)
If EI instruction is executed, begin to execute Fixed-Period Module.
Start operation
3 Execute E1 command
Fixed cycle module
Module
● When the "Execute right from the start" check box is in selected state
In EI instruction execution state, the module instruction is used to control execution state of Fixed Period
Module.
For OFF processing, please see "Stop Standby Module", Page 3-98.
Note
Execution period is irrelevant with execution state of Fixed-Period Module, counting is started
when starting to run. After setting Fixed-Period Module to the execution state, the first
constant period is executed immediately after execution of EI instruction when EI instruction is
executed during running. Therefore, the first and second period might be incorrect.
·When all of the following conditions are met, the period fluctuation is within 70µs.
When selecting the "Enable interrupt during instruction execution" checkbox in "Fixed
period execution and user interrupt" setting of "CPU system setting"
User interrupts with a priority higher than Fixed Period Module are not used
KL-N20V, KV-CL20, KV-DN20, KV-H20, KV-H20S, KV-H40S (when used, up to 120µs) are not used
FASC instruction (when used, up to 107µs) is not programmed in the program
RFASC instruction (when used, up to 107µs) is not programmed in the program
·When fixed-period execution timing occurs in interrupt disable state (when executing DI
instruction) within the same execution period, Fixed-Period Module is executed in the
interrupt enable state (executing EI instruction), .
Fixed-Period Module is separated with the ordinary scanning in interrupt processing. For details, please
refer to "3-5 Interrupt", Page 3-31.
LADDER PROGRAMMING
Device processing at start/end is the same as ordinary interrupt processing, at start/end of Fixed-Period
Module execution, the following projects are saved/reset automatically.
·Internal register
·Calculation flag (CR2009 to CR2012)
·Index register(Z11 to Z12)
·TM0 to TM3
Relay To programed in just executed STG instruction operand
Note
CPU built-in input (R000 to R015) cannot save/reset.
3
Module
Index register Z01 to Z10 can be set to execute save/reset processing in "CPU system
setting" -> "fixed period execution and user interrupt" settings.
If the above-mentioned items need to be updated in Fixed-Period Module before END processing,
please do the following setups:
(1) through "DR" To program instruction Or To program "RFSX" instruction.
(2) through "DR" To program instructionOr To program "RFSX" instruction.
(3) To program "RFSCTH" instruction.
"About Direct Processing", Page 3-16
Note
In Fixed-Period Module, direct output cannot be enabled even if SET/RES instruction is
used to execute output to CPU built-in output (R500 to R507) .
The execution sequence within a scanning period can be set up for the modules registered in a project.
Generally, this sequence is the module arrangement sequente. However, if execution sequence of
ladder program in a scanning period has an adverse effect on the run of KV-1000 PLC, please change
execution sequence.
Open "CPU system setting" from work space, select "program settings" -> "Execute sequence of
modules" setting.
3 Sequence Module name Module type
Module
The following settings rules apply to module execution sequence within a scanning period.
· Although sequence can be changed in the initialization module, this cannot be done for other types of
module.
· Although execution sequence of Every-Scan Execution Type Module and Standby Module can be
changed, it should not be moved before initialization module.
· Sequence change cannot be made to Fixed-Period Module.(always displayed in the leading
address.)
LADDER PROGRAMMING
Example: Module Configuration
Legend
3
● Functional Configure
Module
Module programming and classification are done according to processing content, connected device,
as well as expansion unit.
By disnabling unnecessary modules, commissioning can be easier and scanning time can also be
shortened.
Modules to stop at
start of operation
* Through "module control " module, execution state of each function can be controlled.Please as required
create module control module.
- KV-5000/3000 Series User’s Manual- 3-103
3-8 Module
● Process Configuration
LADDER PROGRAMMING
Process 1
3 Process 2
Module
?
Abnormal
Process 3
monitor*
Process 5
Since module execution sequence is the execution sequence within a scanning period, then it is
unnecessary for a programmer to consider the module execution sequence during programming.
LADDER PROGRAMMING
Module Device
Module device is the device that is used to capture the module operating state.
Referencing from other module or macro is needed only when the bit is ON.
Note
Device comments cannot be attached to a module device.
Module
Bit only connects a scanning period "@CR2008" when module execution starts
It is disconnected after the second scanning period (OFF).
The bit can be refered only in self module. Every macro executed in self module can not be referred.
In KV STUDIO, this device is represented by "@CR2008".
● Bit only cuts off a scanning period "@CR2007" when module execution starts
Bit only cut off a scanning period "@CR2007" when module execution starts
Connected after the second scanning period.
The bit can be refered only in self module.Every macro executed in self module can not be refered.
In KV STUDIO, this device is represented by "@CR2007".
● Execution ON Bit
ON Bit refers to the bit to connect ON in a module execution process.
Since this bit is in self module and can be refered from other module/macro, then enable this bit (for
example) if you want to control module execution.
In KV STUDIO, this device is represented by "_ (module name)".
Example
_automatic _main
execution
Module instructions
LADDER PROGRAMMING
Available Devices
Index
Cons Indirect Local Change
Bit device Word Devices tant specifying device
Operand
MR DM EM
R DR LR T C CTC CR FM ZF T C CTH CTC Z CM #/$ #TM * @ : #/: Z
B TM W
S ∗1
- - - - - - - - - - - - - - - - - -
Operand Explanation
S Specify the module name.*1
*1 """","#" and "$" cannot be used. Please enter the module name specified in "KV STUDIO" Directly.
For half-width English letters, 24 characters can be specified, for full-width, 12 characters can be
specified.
Description of Operation
Note
· The initial state of the differential execution instruction when Standby Module is started is ON
in the up edge, and OFF in the down edge. When beginning to execute, do not test the
differential signal immediately.
· If the MDSTRT and MDSTOP instructions need to executed for many times in the same module
and scanning period, this is then done according to the finally executed module instruction.
· Please do not stop all modules. If all modules are stopped, all programs will not be executed.
Please use the following method to restore.(if program is not stopped, it cannot return.)
◆ Please power off KV-5000 /3000 PLC once, then connect power supply again.
◆ Please switch KV-5000/3000 PLC "RUN-PROG selector switch" to "PROG"
mode, then switch to "RUN" mode.
◆ In KV STUDIO, turn program RUN mode OFF, then on.
· In OFF processing, the processing with the same execution condition as "MC instruction "
LADDER PROGRAMMING
is scanned only once. For more information, please refer to "MC instruction ".
· Execution of initialization module cannot be stopped or started.
Operation flag
Module
Sample Program
If the up edge of input relay R000 is detected, the selected mode (R001 to R003) is executed ; if input relay
R009 is ON, all the modules are stopped. Do not execute other modules when a module is executed.
R003 MDSTRT
Module 3 Execute “module 3” when R001 is ON.
R009 MDSTOP
Module 1
When R009 is ON
MDSTOP
Module 1 to 3 stop
Module 2
MDSTOP
Module 3
;(mnemonics list)
LDP R000
ANB _ Module 1
ANB _ Module 2
ANB _ Module 3
MPS
AND R001
MDSTRT Module 1
MRD
AND R002
MDSTRT Module 2
MPP
AND R003
MDSTRT Module 3
LD R009
MDSTOP Module 1
MDSTOP Module 2
MDSTOP Module 3
*1 For detailed information of module execution on, please refer to "modular System Device", Page 3-105.
MEMO
LADDER PROGRAMMING
3
Module
LADDER PROGRAMMING
Overview
A macro is a ladder program section that is used again and again in a project. Programming workload can be
reduced writing a frequently used ladder routine as a macro, just like a ladder instruction. To change a
program section, you just need to modify macro data, thereby significantly reducing programming workload.
Project 1 Project 1
[Module A] [Module A] 3
Macro
Macro C
[Module B]
Macro call
[Module B] instruction
Macro C
Macro C
Same process
is registered as [Macro C]
a macro.
■ Macro Management
In KV STUDIO, the "Workspace" is used to manage each project.
In addition, for facilitating the next time use, you can register a frequently used macro in the "program
library (user))" in advance.
Workspace
3 If an argument is used, operands (device and value) in the macro can be specified in macro calling,
thereby creating a more universal macro.
Macro
● Reuse a macro
For frequently used macro, click "macro" mark number on work space, log on "program library" -> "user"
in advance, realize program reuse simply.
● Password protection
In order not to change macro content easily, set password.
If password is set, people who do not know the password cannot display or edit macro program.
Password is set in "Module/macro properties" (module/macro attribute) dialog box.
LADDER PROGRAMMING
When call macro module, create ladder program (Entities). If the same macro needs to be executed for
many times within the same scanning period, or several macros need to be executed crossing
scanning period, by using together with local device, conflict between devices and execution state of
corresponding macro may not be considered.
Macro
To use a macro, the following steps should be followed:
(2) Programming
Write ladder program in created macro.
Macro Type
There are two types of macro: subroutine macro and self-hold macro .
Sub-routine macro
● OVERVIEW
3 subroutine macro, is the same as subroutine, executes program in macro only when execution condition is ON,
according to each macro call instruction(M CALL). After execution is finished, proceed to next step of macro call
instruction.Execution when condition is OFF, do not execute program in macro, proceed to next step.
Macro
● How to use
subroutine macro, starts according to MCALL instructionfrom module.
● Description of Operation
Description of subroutine macro action is shown in the figure below.
An example of calling macro A twice in a module is shown in the figure below.
To discriminate the macro created, plus " # (management no.) " after macro name for management.
In KV STUDIO, the macro is only displayed during Monitor and Simulator.
Module 1 Individual entities (macro A#1, macro A#2) are
created individually by the MCALL instruction.
When the execution condition of the
MCALL instruction is ON, module 1 is executed,
and the respective macro is executed.
ON
MCALL Macro A
Macro A#1
OFF
MCALL Macro A
×
Macro A#2
LADDER PROGRAMMING
Subroutine macro will be executed only in a scanning period when execution condition is OFF, all
execution conditions are OFF.*
It will be stopped in the next scanning period.
Scan once Scan once Scan once Scan once Scan once
Macro
Execute condition
OFF ON ON OFF OFF
of calling macro A
Execution under
Macro A Stop Execution Execution OFF condition Stop
When macro execution stops, MC instructionexecution condition is OFF, processing will only
execute a scanning period.
For details on instructions, "KV5000/3000/1000 series Instruction Reference Manual "MC/MCR"
Self-hold macro
● Overiew
self-hold macro , is the same as subroutine macro, when execution condition is on, execute the program
in macro according to each macro call instruction ( MSTRT).Once macro starts, until after next scanning
period, macro in macro executes stop instruction (MEND), in this period, irrelevant with execution
condition of macro call instruction, continue to act.
● how to use
self-hold macro , starts according to MSTRT instructionfrom module..
● Description of Operation
LADDER PROGRAMMING
Module 1
ON
3 MSTRT Macro A
Macro
Macro A#1
MEND
ON
MSTRT Macro A
Macro A#2
MEND
To discriminate the macro created, plus " # (management no.) " after macro name for management.
In KV STUDIO, the macro is only displayed during Monitor and Simulator.
2 Once started, the execution continues irrespective the execution condition state of MSTRT instruction.
Module 1
ON
MSTRT Macro A
Macro A#1
OFF
MSTRT Macro A
Macro A#2
MEND
3 If the execution condition of a MEND instruction in macro is ON, all the execution conditions will
LADDER PROGRAMMING
be OFF in the next scanning period, and only one scanning period is executed in the macro.*
It will be stopped in the next scanning period.
Module 1
When the execution condition of the MEND instruction
turns ON, the macro is executed for one scan only
with all execution conditions OFF at the next scan.
OFF
MSTRT Macro A
3
Macro
Macro A#1
ON MEND
OFF
MSTRT Macro A
Macro A#2
ON MEND
Note
· In a self-hold macro , the MEND instruction must be included.
· To stop a macro, the macro execution condition must be OFF. If macro execution
condition is ON, macro will not stop, even if MEND instructionexecution condition is on.
Instruction State
OUB Instruction OFF
OFDL Instruction
Reset.
SHOT Instruction
C Instruction State hold.
CJ/NCJ/GOTO Instruction Not jumped.
When macro execution stops, MC instructionexecution condition is OFF, processing will only
execute a scanning period.
For details on instructions, see "KV5000/3000/1000 seriesInstruction Reference Manual "MC/MCR"
self-hold macro , only in next scanning period when macro stop instruction(MEND) is executed, execute a
scanning period taking all conditions as OFF. It will be stopped in the next scanning period.
Scan once Scan once Scan once Scan once Scan once Scan once
3 Execute condition
of calling macro A
OFF ON *1 *1 OFF*2 OFF*3
Macro
Execution under
Macro A Stop Execution Execution Execution Stop
OFF condition
LADDER PROGRAMMING
Argument Setting
■ What is argument
The so-called independent variable is device and value transferred with respect to macro Entities when
macro is called.Independent variable is designated as macro call instructionoperand.In the macro, use
transferred device or value to execute ladder program.If macro is being executed, independent variable
is refreshed once per scanning period.
Module 1 3
Macro
MCALL Macro A Call
R001 #50
Argument 1 Argument 2
Macro A
Argument 1 MOV
Argument 2 DM0
When the macro is called, the
specified devices and values
are used to execute the macro
in the ladder program within the R001 MOV
macro. #50 DM0
● Use example
LADDER PROGRAMMING
3 Argument4 :V1<-DM0
(Unit No 1)…KV-AD40 R30000 to R30115
Macro
DM10000 to DM10021
Module 1
@CR2008 ࡑࠢࡠੑҸ
ࡑࠢࡠ
MCALL Macro 1 Macro ੑҸ
instructions
#1 MR000 #1000
Argument 1 Argument 2 Argument 3
DM0
Argument 4
UMO: DM10000
URO: R30000
Call P0: MR000
V0: #1000
Macro 1 V1: #1234
R30000 R30001
UR0:#02 P0
SET
R30002 MR000
P0 MOV
#0 UM0:#4
MR000 DM10004
MOV
V1 UM0:#3
#1000
Note
When character string is used as independent variable, please use independent variable
device (P) to designate initial device of saved character string. Character string directly
designated by independent variable device (V) cannot be used.
LADDER PROGRAMMING
Macro System Device
Macro system device is the device that is used to capture module operating state.
Only the ON bit needs to be looked up from other modules or macros.
Note
Module system device does not allowe additional device notes.
Macro
● Bit only connects a scanning period when module execution starts "@CR2008"
Bit only connects a scanning period "@CR2008" when module execution starts
Disconnected after the second scanning period (OFF).
The bit can be referred only in self macro.Module in calling macro cannot be referred.
In KV STUDIO, this device is expressed by "@CR2008 ".
● Bit only cuts off a scanning period when module execution starts "@CR2007"
Bit only connects a scanning period "@CR2008" when module execution starts
Connected after the second scanning period.
The bit can be referred only in self macro.Module in calling macro cannot be referred.
In KV STUDIO, this device is expressed by "@CR2008".
Example
_Batch send_2 Parameter
arithmetic
operation _1
In order to use Execution ON Bit, each call macro needs identification number.
"Execution ON Bit", Page 3-120
Execution ON Bit
■ Overview
Executing ON Bit refers to the bit which puts the connection to ON in execution. Since this can be
referred from a module, then it is useful in controlling macro execution, for example, making reference
before macro calling.
To use the Execution ON Bit , each macro to be called needs an identification number.
In KV STUDIO, this device is programmed to "_ (macro name) _ (identification ID No.) ".
3
■ Execution ON Bit Setting
Macro
Note
If "ID No. (in exectution)" is not selected in macro template, macro executing on bit may not be used.
If the same macro is used for many times in the same project, it may be used after changing No..
Note
If the same No. Is designated in the same macro, conversion error will occur.
● Example
LADDER PROGRAMMING
Macro 5 is not executed even if R000 turns ON
while macro 4_1 and macro 4_2 are running.
@EM0 #100
Macro 4_1
@EM100 #1000 3
Macro 4_2 Macro 4_2
Macro
Execute in progress ON bit
R000 _Macro 4_1 _Macro 4_2 MCALL Macro 5
#1 #2 @FM0
Macro 4_1
Execute in progress ON bit
#0
Note
If macro executing ON is not used for programming (macro is not designated by macro call
instructionin the project), conversion error will occur.
In the same macro, macro call instructionwith identification number when without
identification number may be used together.
@EM0 #100
@EM10 #1000
Macro instruction
LADDER PROGRAMMING
MCALL MCALL
Macro call
Executes the sub-routine macro
specified.(programming in the module)
MSTRT MSTRT
Macro start Execute designated self-hold macro
.(programming in the module)
Stops execution of the self-hold type
MEND MEND
Macro end macro.(programming in self-hold
macro )
ǒ Ǔ
Macro
Available Devices
Index
Bit device Word Devices Const Indirect Local Change
ant specifying device
Operand
MR DM EM
R DR LR T C CTC CR FM ZF T C CTH CTC Z CM #/$ #TM * @ : #/: Z
B TM W
S - - - - - - - - - - - - - - ○ *2 - - - -
Operand Explanation
S Specify macro name.*3
*1 Number (0 to 10) and attribute behind the second operand might be different due to different
independent variables set in the macro currently to be executed.
Device that may be used in attributes is shown below.
Available Devices ≤♦ ≤♥ : Ονλψ συππορτ Κς−5000/3000
Indirect Index
Const Local Change
Bit device Word device∗1 ant specifyin device
Attribute g
MR DM EM
R DR LR T C CTC CR FM ZF T C CTH CTC Z CM #/$ #TM * @ : #/: Z
$B TM W
Device ○ - ○ ○ *4 ○ *4 ○ ○ ○ ○ *4 ○ *4 - - - ○ - - ○ ○ ○
Value ○ - ○ - - - ○ ○ ○ ○ ○ ○ ○ ○ ○ - ○ ○ ○
Unit - - - - - - - - - - - - - - ○ *5 - - - -
*2 don't used"""", "#"and"$".Please Input Set Module Name in "KV STUDIO" Directly.
For half-angle English number, 6 characters may be designated, for all angle, 12 characters may
be designated.
*3 When identification number is used, format is "(macro name) _ identification number". Example in
batches _2
For point parameter, please see "Execution ON Bit", Page 3-120 .
*4 According to instructionused in the macro, timer/counter processing will be different.
(For exaple) Process current value when MOV instruction. For detail, please refer to instructions
description.
*5 Designate expansion unit No..When macro template is used, select and designate source
expansion unit from list.
LADDER PROGRAMMING
Description of Operation
MCALL When execute condition is ON, S When execution condition is on, this instructionwill
be executed in each scanning period.
Designated macro begin to be executed when execution condition is OFF -> on.
When execute condition is ON -> OFF, then OFF processing is performed.
MSTRT When execute condition in ON. S When execution condition is on, this instructionwill
be executed in each scanning period. 3
Designated macro begin to be executed when execution condition is OFF -> on.
Macro
Once begin to execute, even if execution condition is OFF, continue to execute macro.
MEND when execution condition is on, the self-hold macro that uses MEMO instructionfor
programming will perform OFF processing in the next scanning, stop execution in the
next scanning.
Scan
ON
Execute condition
OFF
MEND Execution
Note
· For MCALL/MSTRT instruction, after add/delete/call out sequence change is executed, it
cannot be written in the RUN.
· In order to stop execution of self-hold macro , please use MEND instructionin the macro.
If MSTRT instructionexecution condition is always on, MEND instructionmay be omitted.
· MEND instructioncannot be programmed in module and in subroutine macro.
· MEND instructioncannot stop other macro.
· The previous state of differential execution instructionin macro is initialized when each
macro begins to be executed.(up differential: on, down differential: OFF)
· If MCALL/MSTRT instructionattribute of an operand is a value, and T/C/CTH/CTC is
designated in this operand, the following value will be transferred into macro.
T/C : 32-bit counter (current value)
CTH : 32-bit counter (current value)
CTC : Set value(32-bit counter)
· When program MCALL/MSTRT instruction between MC to MCR instructions, if in macro
execution process, MC instructionexecution condition is OFF, execute OFF processing in this
scanning, in the next scanning, stop execution.
· If MCALL/MSTRT instructionis programmed in subroutine (between SBN - RET instructions),
condition transfer (between CJ/NCJ to LABEL instructions), step (between STP to STE instructions)
or interrupt (between INT to RETI instructions), when the instructionbetween instructions in macro
execution process is not executed, macro execution will be suspended.When instructionbetween
instructions are executed again, start macro execution again.Now, the previous state of differential
execution type instructionin the macro is not initialized. ( (When programming in initialization
module, execute scanning only onces when running starts.)
- KV-5000/3000 Series User’s Manual- 3-123
3-9 Macro
instructions), STG instructionrelay is OFF during macro execution, then subroutine macro
is executed in this scanning period when all execution conditions are OFF, stops execution
in the next scanning period.Execution of self-hold macro is suspended.
· If a macro is being executed, the module programmed by MCALL/MSTRT
instructionstops, during OFF processing is executed in the module, OFF processing is also
executed in the macro simultaneously, execution stops in the next scanning period.
· For OFF processing, one scanning of "MC instruction" execution condition is in the same state as OFF.
· In the macro, MCALL instructionand MSTRT instructioncannot be used.
3 · In the macro, use subroutine, but interrupt program cannot be used.
· In the project, when execute the same macro for many times, if global device is used in
Macro
Operation flag
CR2009 Operation marking state depends on processing result in the executed macro.
CR2010 Operation marking state depends on processing result in the executed macro.
CR2011 Operation marking state depends on processing result in the executed macro.
It is ON when indirect specifying or index modification range is improper.OFF other than this.
CR2012
When indirect specifying, index modification unspecified in operand, it is not changed.
Note
Use of MEND instructioncannot change operation marking state.
MCALL When execution condition is on, this instructionwill be executed in each scanning
period.
Scan
ON
Execute condition
OFF
MCALL When execution condition is on, this instructionwill be executed in each scanning
period.
MCALL When execution condition is on, this instructionwill be executed in each scanning
period.
LADDER PROGRAMMING
Example
Take EM0 as independent variable 1, #10 as independent variable 2, when input relay R000 on,
execute subroutine macro (macro A).
At up edge of input relay R001, take #1 as independent variable 1 (unit No.) , take #10 as independent
variable 2, execute self-hold macro (macro B).
3
Macro
R001 MSTRT Macro B ;(mnemonics list)
↑ ʿˍ #10 LDP R001
MSTRT macroB #1 #10
When input relay R002 is on, stop execution of self-hold macro (macro B).
Macro B
;(mnemonics list)
LD R002
MEND
R002 MEND
The same as subroutine, macro is also operated by call instruction. Macro and subroutine action will be
compared and described below.
For the error information, see "Subroutine", Page 3-27 .
● Creation of entities
<Macro>
3 Once a macro call instruction(MCALL, MSTRT) is programmed in the module, the same quantity of
Entities will be created.
Macro
Macro A#2
Call
MCALL Macro A
Module 2
Macro A#4
Call
MCALL Macro A
·Macros that are registered in the project but not be called for even once (unused macros) will
not be transmitted to KV-5000/3000PLC. When check out project or check out according to
PLC program, unused macros will not be checked.
To discriminate the macro created, plus "# (ID no.) " after macro name for management. In KV
STUDIO, the macro is only displayed during Monitor and Simulator.
<Subroutine>
LADDER PROGRAMMING
In module/macro, subroutine is created between END instructionand ENDH instruction, is executed by
subroutine call instruction(CALL) programmed in module/macro main program.Not every call
instructioncreates Entities.
Module 1 Module 2
If use ECALL
#0 instruction, then
CALL subroutine of
other module can
#0
CALL
be executed.
3
#0
Macro
CALL
END END
SBN SBN
#0
Call
× #0
RET RET
ENDH ENDH
● Callable position
<Macro>
In module, if macro call instructionmay be programmed in any position of main program, subroutine or
interrupt program.Macro call instructioncannot be programmed in the macro.
<Subroutine>
Subroutine call instructionis valid only in the module/macro where subroutine is created.When execute
subroutine in other modules, use inter-module subroutine call instruction.
● Name
<Macro>
Macro may be named freely.
"Unusable Character String List", Page A-36
<Subroutine>
Subroutine uses No. For management.
● Argument
LADDER PROGRAMMING
<Macro>
//Settable
<Subroutine>
//Unsettable
example, device that is programmed using OUT instruction could be OFF automatically.
"Macro Type", Page 3-112
<Subroutine>
Program in the subroutine cannot execute. Programmed devices will keep the state of final execution.
<Subroutine>
It is the same as macro only when it executes for the first time. From the second execution, it is
changed into the state of previous execution.
● Action taken when calling between MC (master control) to MCR (master control reset)
instructions
·When the MC instruction condition is ON
Operation is per normal for both macros and sub-routines.
<Subroutine>
Not execution.
● Applications
LADDER PROGRAMMING
In order to keep state and value of the device used at each call place
<Macro>···○
Because Entities will be created according to each call instructionrespectively, therefore if it is used
together with local device, device conflict may not be considered, keep the state of previous execution.
<Subroutine>···△
Since execute the same program, therefore always use indirect designation etc, create push protection
and pop to restore program.
3
Macro
When you want to execute to the end of a series of action at one time
<Macro>·· ·○
self-hold macro , once begin to execute, until macro executes stop instruction(MEND), in this period act
continuously without considering execution condition state.
In addition, when execute such processing simultaneously for many times, it is unnecessary to consider
device conflict and each action state.
<Subroutine>···△
Program that is required to prevent execution of condition OFF before action is finished.
In addition, when execute such processing simultaneously for many times, it is unnecessary to consider
device conflict and each action state.
<Subroutine>···○
Since Entities will not be created for whichever times of calling, therefore the more the call times is, the
more remarkable the number of steps is reduced.
MEMO
LADDER PROGRAMMING
3
Macro
LADDER PROGRAMMING
user to manage all devices used in the program.
In KV STUDIO, for each module or macro, local devices can be processed as separate devices.
Therefore, even if a local device with the same number is used in other module or macro, it can also be
processed, thus facilitating the management and assignment of the devices which can only be used a
modul or macro.
In contrasting, devices that can be processed universally in the whole project are called "global device".
Local Device
Program Local device
(Global) device
Module B
Global device
Program
Program Local device
Macro C
When programming, a local device can be designated by adding a prefix "@" onto device name.
Example
<Global device> <Local device>
EM0 @EM0
MR0 @MR0
Note
Programed as "@+ (Device No.)" only when Device No. is specified as the operand of timer/
counter command.
Mnemonic symbol input example: TMR @0 #100
What shown in the table below is default value of quantity and range of local device and global device that
can be used when creating projects.The number of appointed local device can be changed in "CPU
system setting" -> "Entire assignment setting of local devices" on "work space".
Local device Global device Total
Device name*1 *2
Reserved quantity in the whole project Counts/range number
16000 point (1000 channel) 16000 point
3 Relay (R) *3 None.
R00000 to R99915 (1000 channel)
Internal auxiliary 8000 point (500 channel) 16000 point
Local Device
*1 Link relay (B), link register (W), file register (ZF), high-speed counter (CTH), high-speed counter comparator
(CTC), control relay (CR), control memory (CM) and index register (Z) cannot be used as local device.
When @FMxxx is used, consume work area as local device.
*2 When making new project, unifiedly ensure the area of device that can be used as local
device.(for calculation, assume to use 10 modules, call macro for 50 times.))
Reserved quantity of the devices is changed according to requirement.
*3 Use channel (ch) unit to set up use quantity.
*4 Programed as " @+ (Device No.) " only when Device No. is specified as the operand of timer/ counter command.
Mnemonic symbol input example: TMR @0 #100
Note
· If relay (R) and temporary data memory (TM) are used as local device, always set up the
quantity of relay and data memory.
· The following device must be processed as global device:
· KV-5000/3000 PLC I/O Relay List
· Expansion unit device
· Device for reference of touch panel etc external connection equipment
· Common device in the whole project
· Device that requires data transmission between modules
· Local Device shall be numbered from 0 using consecutive numbers as possible.
· Since R, DM is distributed in expansion unit, as global device, use area is required.When
use local device, please use MR or EM with priority.
· If local device or global device is used out of the specified range, conversion error might occur.
· When use various commands that designate first element as operand as well as index modification
or indirect designation, please do not exceed usable scope of local device or global device.
LADDER PROGRAMMING
Local Device Assignment
For conversion, local device can be distributed to reserved area of each device type automatically
Device area
Start
Project 1
Module A
Global device of project 1
Program Local device 3
Local Device
Convert
Global device
Module B
Preset area of
Program Local device Convert
Local device of macro C local device
Not used
Last
Note
For macro, local device will be distributed according to call times in the project.
Local device is the just like global device, can use device notes.
Although the number of local device used in a project can be pre-defined, the type of each device can
be changed. These changes can be kept in KV STUDIO for later project creation use.
Open "CPU system setting" on "Work space", select "Entire assignment setting of local devices".
3
Local Device
LADDER PROGRAMMING
Typical Local Device entry and Conversion Error
Local Device
The following is a typical example of error information that might occur when convert ladder.
If the device zone reserved for local device is currently used for global device
Tick off "Global device range" in "Entire assignment settings of local devices " dialog box.
Start Last
Assign all Global device Local device preset
Example
@DM0 @DM1999
Assign by
module/macro
Setup range @DM3000
Check out the device with "Num" etc displayed in red in "Setup local device assignment" of "Entire
assignment settings of local devices" dialog box. So as to increase reserved quantity of this device,
reduce set quantity of local device for each module/macro, let "available quantity" (local device
reserved quantity) is larger than as far as possible.
Start Last
Insufficient for
Assign all Global device Local device preset preset quantity
LADDER PROGRAMMING
Overview
File register may be divided into "ZF" that processes all areas in consecutive number mode, and "FM"
that divide the area into four memory banks (0 to 3) to process in memory bank switching mode.
File Register
FM32767 ZF65535
FM0 ZF65536
to Storage unit 2 to
FM32767 ZF98303
FM0 ZF98304
to Storage unit 3 to
FM32767 ZF131071
For example, FM0 and ZF32768 of memory bank 1 refer to the same data store part.
For detailed condition of device No. And data treatment method etc, please refer to "3-6 Device and Constant",
"File Register ZF/FM", Page 3-68.
Bank Switchover
Example
R000 CM710 FRSET When current database is not 1 ;(mnemonics list)
<> #1 LDP R000
ʿ1 MPS
File register current database Switch the current database to 1 AND<> CM710 #1
FRSET #1
MPP
MOV
Copy value in FM0 (˙ZF32768) to DM0 MOV FM0 DM0
FM0 DM0 LDP R001
MPS
AND<> CM710 #0
When current database is not 0 FRSET #0
R001 CM710 FRSET MPP
<> #0 MOV FM0 DM0
ʿ0 Switch the current database to 0
File register current database
MOV
Copy value in FM0 (˙ZF0) to DM0
FM0 DM0
Defaults
When preset the value of file register (consecutive number mode), open "device default setting" dialog
box on KV STUDIO work space to set.
3
File Register
After transmit the project set in this dialog box to CPU unit, when switch PROG -> RUN mode, read set
initial value automatically.
KV STUDIO User's Manual "Device Default Value Settings"
Use special instruction, take the memory card that is inserted into CPU unit as object, save/load the
data of file register (file register setpoint).
FRSTM instruction: save file register of designated memory bank into memory card
FRLDM instruction: read the file saved in memory card to the file register of designated memory bank
"FRSET", Page 3-143, "FRLDM", Page 3-145
FM32767
FRSTM instruction
FM0
̚
Storage unit 1
FM32767 Memory card
FM0
̚
Storage unit 2
FM32767 Max. 1000 files
FM0
̚
Storage unit 3
FM32767
Save setpoint of file register up to 1000 files in memory card ahead of time, read when required for
program switching purpose, it is unnecessary to note the number of device.
LADDER PROGRAMMING
Files saved in memory card (file register setpoint) may be edited through KV STUDIO. Open "File
Register Settings" dialog box on work space to carry out edit, new, CSV file import etc. File register
setpoint should be managed according to different projects respectively.
KV STUDIO User's Manual "File Register Settings"
File Register
■ File register set value transfer
The method to write setpoint of file register created/edited by KV STUDIO into memory card, or read file
register setpoint file in memory card is as follows.
PC CPU unit
Ladder
File register Memory card
program
Import/export
Memory card
● PLC transfer/read
LADDER PROGRAMMING
Communication of PLC during transmission/reading is the same as other project information. During transmission,
other project information is saved in CPU unit body, only file register setpoint is saved in memory card.
3
File Register
● Import/export
Connect memory card to individual computer, execute import/export operation.
LADDER PROGRAMMING
FRSET FRSET
File register
Switch current memory bank
no. of File Register to
bank switching
@FRSET FRSET determined no..
File Register
Available Devices
Index
Cons Indirect Local Change
Bit device Word Devices
Operand tant specifying device
MR DM EM
R DR LR T C CTC CR FM ZF T C CTH CTC Z CM #/$ #TM * @ : #/: Z
B TM W
n ○ - ○ - - - ○ ○ ○ ○ ○ ○ ○ ○ ○ - ○ ○ ○
Operand Explanation
n Designate switched current memory bank No.or initial device to save No.., (0 to 3)*1
Description of Operation
FRSET Whenexecution condition is on, switch current memory bank No. Of file register to
through n Designated No..
FRSET Only 1 scan period is ON at the up edge of execution condition
Operation flag
CR2009 No change in status
CR2010 No change in status
CR2011 No change in status
·( n >02) is ON.
CR2012 · It is ON, when indirect specifying, Pointer Modification range is improper
Those other than the above-mentioned are OFF
Example
At up edge of input relay R000, switch current memory bank of file register to memory bank 1.
R000 FRSET ;(mnemonics list)
#1 LDP R000
FRSET #1
3
File Register
LADDER PROGRAMMING
Save File Register inside the
FRSET FRSTM File register
saving
specified memory bank to
memory card in binary format.
Available Devices
File Register
R DR LR T C CTC CR FM ZF T C CTH CTC Z CM #/$ #TM * @ : #/: Z
B TM W
n ○ - ○ - - - ○ ○ ○ ○ ○ ○ ○ ○ ○ - ○ ○ ○
S ○ - ○ - - - ○ ○ ○ ○ ○ ○ ○ ○ ○ - ○ ○ ○
D ○ - ○ - - - ○ ○ - - - - - ○ - - ○ ○ ○
Operand Explanation
n Designate memory bank No. Or initial device to save No. (0 to 3). *1
S Designate file No. To save data or initial device to save file No(0 to 999)。. *1
D Designate first address of notice bit device.*2
*1 When the bit device is specified, continuous 16/ 32 bit is processed.
If relays other than channel start relay (R002, R106, R1012 etc.) are specified, it jumps to the
next channel for 16/32 bit processing. "Bit Device", Page 3-57
*2 If bit device is designated, continuous 2 bits will be occupied. When word device is designated,
lowest bit in continuous 2 words is used as notice bit device respectively.
Bits other than the lowest is not changed.
Description of Operation
Only 1 scan period is ON at the up edge of execution condition n test up edge of execution
condition, all file registers of memory bank No. N will be saved in memory card unifiedly in
binary format (always save to file).
File No. Is designated by value S .
File name is \FR\FR (file No. 3 digits).FRB.
Example
in S When 10 is saved, file name is \FR\FR010.FRB.
D Write end notice, D Error notice for abnormal end of write in +1.
· D It is OFF during instruction execution, ON after writting processing of memory
card. It is ON, during instruction normal end or abort.
· D +1 normal end of instruction OFF; abnormal end on.
When "FR" folder does not exist, make a new "FR" folder.
Note
· When memory card instruction execution relay (CR3214) is ON, fail to execute the
instruction. Please use CR3214, perform exclusive control.
operation flag
LADDER PROGRAMMING
Example
At up edge of input relay R000, save file register of memory bank 0 to memory card as per file No. 10.
R000 FRSTM ;(mnemonics list)
#0 #10 MR000 MPS R000
FRSTM #0 #10 MR000
LADDER PROGRAMMING
Read the data saved in memory
FRLDM FRLDM
File registerread card to file register of designated
memory bank unifiedly.
Available Devices
Index
Operand
Bit device Word Devices
Cons Indirect Local Change
tant specifying device 3
MR DM EM
File Register
R DR LR T C CTC CR FM ZF T C CTH CTC Z CM #/$ #TM * @ : #/: Z
B TM W
n ○ - ○ - - - ○ ○ ○ ○ ○ ○ ○ ○ ○ - ○ ○ ○
S ○ - ○ - - - ○ ○ ○ ○ ○ ○ ○ ○ ○ - ○ ○ ○
D ○ - ○ - - - ○ ○ - - - - - ○ - - ○ ○ ○
Operand Explanation
n Designate memory bank No. Or initial device to save No. (0 to 3). *1
S Designate file No. To read data or initial device to save file No(0 to 999). *1
D Designate first address of notice bit device.*2
*1 When the bit device is specified, continuous 16/ 32 bit is processed.
If relays other than channel start relay (R002, R106, R1012 etc.) are specified, it jumps to the
next channel for 16/32 bit processing. "Bit Device", Page 3-57
*2 If bit device is designated, continuous 2 bits will be occupied. When word device is designated,
lowest bit in continuous 2 words is used as notice bit device respectively.
Bits other than the lowest is not changed.
Description of Operation
FRLDM Up edge of execute condition, read data, file No. Saved in memory card (through FRSTM
instruction or KV STUDIO " File Register Settings") to memory bank No. Unifiedly n
Example
in S When 10 is saved, read \FR\FR010.FRB.
Note
· When memory card instruction execution relay (CR3214) is ON, fail to execute the
instruction. Please use CR3214, perform exclusive control.
Operation flag
LADDER PROGRAMMING
Example
At up edge of input relay R000, save file register of memory bank 0 to memory card as per file No. 10.
R000 FRLDM ;(mnemonics list)
#0 #10 MR000 LDP R000
FRLDM #0 #10 MR000
MEMO
LADDER PROGRAMMING
3
File Register
The procedure from KV-5000/3000 PLC installation to operation is shown in the figure below.
Operation content
Programming Skills
Time chart RL
ON
PB1 contact
OFF
ON
PB2 contact
OFF
ON PL
PL
OFF
◇Unit Configuration
When there are many I/O equipments for control, or expansion
function is used,
Consider to use expansion unit.
Please refer to User's Manual for Kv-5000/3000 Series Plc and
Program analysis Expansion Unit
◇Module Configuration
According to each processing process, function, program, conceive
module.
"Example: Module Configuration", Page 3-103
◇New a project
KV STUDIO User's Manual "New Making of Projects"
Programming
◇Set up unit
In Unit Editor, set the unit device assigned to every expansion unit.
KV STUDIO User's Manual "Chapter 3 UNIT EDITOR"
◇ Making module/program
"3-8 Module", Page3-94
"Programming Tips", Page 3-152
"Prepare Clear, Legible Program", Page 3-164
"Programming Key Points", Page 3-169
"3-9 Macro", Page3-109
KV-5000/3000/1000 Instruction Reference Manual
LADDER PROGRAMMING
When transmit to PLC for monitoring, change mode in Simulator,
convert module/program.If conversion error occurs, eliminate error
according to the prompt in output window.
"Conversion", Page 3-178
Program conversion " Input/conversion Error of Local Device", Page 3-135
KV STUIDO User's Manual "A-1 Error Message Lists"
"Programming Key Points", Page 3-169
3
Change or add program.
Programming Skills
Program change and add
Complete
Example
Global settings example
·Unit configuration and setting
·assignment of module configuration
·CPU System setting
Module execution sequence, local entire assignment, CPU unit buffer memory capacity,
action settings when error occurs etc
·Definition of common macro
·To program/tracing function assignment
·Global device/label assignment
:
Select "Monitor/simulator (n)" -> "Setup communication (t)" -> "Setup transfer range of global
device comment (T)" from KV STUDIO menu.
3
Programming Skills
(5) Each member programs the program within its own module.
By using local device or local mark number actively, avoid conflict with other device during work.
"3-10 Local Device", Page 3-131
"Label", Page 3-162
LADDER PROGRAMMING
Note
·When only transmit program, when module execution sequence settings does not exist in
PLC body, or when module designated by ECALL instruction called out in the module does
not exist in PLC body, PLC body error will occur "15 conversion error". Please confirm
inconsistent projects in the following "PLC check/synchronous" dialog box, eliminate the
cause of conversion error.
·Restriction matters when several persons execute debug are as follows.
·Real time chart monitor cannot realize communication above two persons
simultaneously.
·Interrupt function cannot realize use by more than two persons simultaneously. 3
·To Logging/Trace function can be used by several persons after ID is distributed, but
Programming Skills
but settings information cannot be written as per each ID.
From next start, begin to execute projects saved in individual computer from each member.
If one person changes global settings (unit set up information, module execution sequence settings,
Setup local device assignment, PLC unit buffer capacity settings, action when error occurs) and
executes transmission, the change will be notified to other persons under monitoring through KV
STUDIO, difference point can be confirmed in "Verify with PLC/Syncronize" dialog box.
Programming Tips
This section will explain some convenient functions required for programming, so as to reduce entry
and modification workload.
Mnemonics entry
For mnemonic symbol entry, since instruction can be entry without mouse, therefore, compared with
3 using of "Instruction/macro palette (instruction/macro template) ", programming is more quick.
Programming Skills
■ Mode entry
Use keyboard to entry the first character of instruction.
(example) entry MOV instruction
After "reduced display of direct entry box" check box in "Setup edit/key" of "Tool" -> "Options"
is selected for "Zoom out direct entry by Enter key" dialog box, display will be reduced.
For details on each instruction, KV-5000/3000/1000 Series PLC Instruction Reference Manual.
·entry designated source device and value in instruction and operand, abbreviate the entry.
LADDER PROGRAMMING
(example) A 0 -> LD R000
"A-6 Shorted input list of mnemonic symbol", Page A-24
·Press 'UE or F2 key, edit entry cell in "Mnemonic direct entry (Mnemonic direct entry)"
dialog box. In "Setup edit/key" of ("Tool" -> "options", after select "start up direct entry by
Enter key " check box, Enter key will be distributed to "Mnemonic direct entry" dialog box.)
■ Entry mnemonics
When entry mnemonic symbol, several functions are helpful for entry mnemonic symbol.
3
Programming Skills
● Display instruction list
After entry the first character of instruction, "candidate instruction" dialog box initiated by the first entry
character will be displayed, instruction can be selected.
Shortcut keys
LADDER PROGRAMMING
Use shortcut key, mouse can not be used, only use keyboard for operation.Use shortcut key to reduce
keyboard clicking times, quicken entry speed.
Typical shortcut key is described as follows.
"A-7 List of Shortcut Keys", Page A-26
■ Enter/Edit
●
3 Esc F2
Display "Mnemonic direct entry" dialog box, use mnemonic symbol to entry or edit.
Programming Skills
● Enter
● Ctrl +M
If a cell with existing entry is selected in "Operand edit (operand edit)" dialog box, notes can be edited.
● Ctrl + X / C / V
LADDER PROGRAMMING
Shortcut key for Windows application program standard edit:
Ctrl + X ........... Cut
Ctrl + C ........... Copy
Ctrl + V ........... Paste
● Ctrl + Shi f t + V
Set the number of paste, paste can be performed for many times.
In addition, included device can also be adjusted. 3
KV STUDIO User's Manual "5-1 Functions concerning Edit - Multipaste"
Programming Skills
● Ctrl + Z / Y
Shortcut key for Windows application program standard edit:
Ctrl + Z ............... Undo
Ctrl + Y ............... Redo
● Ctrl + /
Move cursor according to ladder circuit block program section.
● Ctrl +
Select the whole line containing the selected cell.
■ Insert
LADDER PROGRAMMING
● Insert
● + Delete
3 Shi f t
Delete row.
Programming Skills
● Ctrl + Enter
Insert row comments.
"Rung comments", Page 3-166
● Alt + / / /
When there is no connecting wire, draw a connecting wire according to arrow direction.
When there is connecting wire, delete connecting wire according to arrow direction.
■ Retrieve/displace
● Ctrl + F
Displays the "Search" tab of the "Search/replace"dialog box is displayed.
"Search/replace", Page 3-158
● Ctrl + H
Displays the "Replace" tab of the "Search/replace" dialog box is displayed.
● Space
■ Display
LADDER PROGRAMMING
● Ctrl + F7
● Ctrl + E
Display "Device use list" window.
Unused device can be confirmed simply.
KV STUDIO User's Manual "6-2 About View Functions - Displaying Use Status"
3
Programming Skills
Page
● Ctrl + Page
Up / Ctrl + Down
● Ctrl + Space
Switch notes display/hide in ladder editor.
Search/replace
LADDER PROGRAMMING
Search the instruction and operand that fit with the designated condition, express them.In addition,
display consistent projects in output window in list mode.
When search device, please use cross reference function that can be displayed in list mode by simply
pressing blank.
"Cross reference", Page 3-158
3 2 Right click the mouse, and select "Search (S)" from the popup menu.
Other procedure · Select "Edit (E)" -> "Search (S)" from the menu.
Programming Skills
· Ctrl + F
As object, select from "device", "label", "constant", "module/macro", "device comment", "label
comments", "reserve/disable".
Cross reference
2 Select "Edit (E)" -> "cross reference (X)" from the menu.
Display search result list in output window.
Other · key
· Select "cross reference (L)" in the menu displayed after right click
LADDER PROGRAMMING
After double click device displayed in the list, move cursor to corresponding device symbol) on the
ladder.
Other procedure · F3
· Shift + F3
Programming Skills
4 Click key, move cursor to the next search object.
5 To move the cursor focus to the previous search details, press the + keys.
Window menu
LADDER PROGRAMMING
■ Tile windows
This function is used to open several module or macro simultaneously for preparing or debugging
program.
3 Select "Window (W)” -> "Tile (T)" from the menu.
Currently opening module or macro is displayed in parallel.
Programming Skills
■ Split
If program is too long, simultaneous display of all programs is impossible.
Use split display function to split display the program in 2 parts, so as to display desired parts
simultaneously.
LADDER PROGRAMMING
The boundary
line is displayed.
Determine the
dividing position
by the mouse.
Programming Skills
2 Through click mouse, determine split position.
<Split screen>
When determine split position, default display of upper, lower frames is start part of the program.
Through right scroll bar in each split window, desired program position can be displayed in upper, lower frames.
Other procedure If mouse cursor is moved to the position in the figure below, it will change to " ", split starts once is dragged.
·Between upper, lowr frames, copy/cut and paste a part of ladder program.
·Display size can also be set respectively.
Label
LADDER PROGRAMMING
After managing device of each mark number with any corresponding additional condition, program
through mark number, when device name is not used.If it is local mark number, KV STUDIO will
distribute it to internal work area automatically, it is unnecessary to note device during programming.
When increase local mark number, also execute writing operation in RUN .
■ entry mode
3 Set mark number in "Label edit " window.
Programming Skills
Device that is registered in "Label edit (mark number edit) " window could use mark number to prepare ladder program.
(Example)
Auto operation
Start auto operation in progress R000 R500
MOV MOV
Auto operation
#1000 speed #1000 DM0
■ How to Display
After set mark number, select "Display(v)" -> "Display lable (g)" from the menu, switch display/hide of
global mark number.
Other $CEM
Ctrl + space
LADDER PROGRAMMING
Local mark number automatic distributed to local work area. Confirm used number of local work area or
change distributed number in "work area settings".
Click "Setup work area" button of "CPU system setting" -> "local entire assignment settings" on KV
STUDIO work space, to display "Setup work area".
Programming Skills
2
Under default state set to "automatic", it will be distributed automatically according to the setting of local
mark number or To program content of KV script, generally it is unnecessary to note the number.
·During monitoring, local label assignment object can be displayed. Bit is displayed in "VB"
while word is displayed in "VM".
"Display through the assignment destination of local devices/local labels", Page 3-185
· When KV script is used to execute character string processing program, if "Operation error"
occurs, please set larger number of work area for script character string.
Device Comments
local device.
R4000
Auto-start in progress
The meanings and functions of each
R30100 R30102 R4000 @R000 @R001 R4013 device can be known
MOV at a glance which
#1 comprehending
is helpful for quickly DM8
Auto/manual SW Emergency Auto-start Setup in Setup point Point abnormal the content of ladder programs.
㸼⼎⬏䴶⬾ো
stop SW in progress progress in progress standby
R4000 R1011 @R001 R30102 @R000
Note
Device notes cannot be set in index register Z.
■ Entry mode
LADDER PROGRAMMING
There are two entry methods of device notes as follows.
· Entry in "Operand edit" dialog box.( Ctrl + M )
· Entry in "Device comment edit" window.
When programming in "Device comment edit" window display state, it is very convenient to
confirm device notes and inp. 3 frames can be displayed simultaneously.
Programming Skills
■ How to Display
After set mark number, switch display/hide of device notes on ladder editor through "View (V)" ->
"Display comments (F)" in the menu.
Other procedure Ctrl + Space
Rung comments
LADDER PROGRAMMING
Row comment
3
Programming Skills
Description
of circuit
Row comment
Description
of circuit
■ Entry mode
entry rung comments in the following steps.
1 In "Ladder edit" window, move the cursor to the line to entry rung comments.
2 Right click the mouse, select "Insert rung cmnt (H)" from popup menu.
Other procedure ·Select "Edit(E)" -> "Insert(W)" -> "Rung cmnt(H)" from the menu.
· Ctrl + Enter
LADDER PROGRAMMING
Display rung comments list in "Ladder edit" window, move from list to the selected line.
Retrieve rung comments in the following steps.
Other procedure Ctrl + L
2 Right click the mouse, select "Search (S)" from popup menu.
Other procedure Select "Edit(E)" -> "Search rung cmnt(M)" from the menu.
3
Programming Skills
"Retrieve/replace" dialog box appears.
In "Ladder edit" window, move the cursor to the line to entry rung comments.
3 Double Click
Programming Skills
KV script
When To program operation or character string processing etc through ladder program, To program
redundant part by KV script.
Ladder program
Ladder program
Easy to understand procedure of program because Even though not aware of internal register,
can programming to control sentence. we can describe calculation process as
mathematic formula.
Program structuring
LADDER PROGRAMMING
In order to simplify program test or facilitate reuse, each function and each project program should be
modular, managed by popular intelligible name. In addition, frequently used circuit program sections
are converted into macros (original instruction), just like instruction, nominated by concise, memory
convenient name for entry.
"3-8 Module", Page 3-94
"3-9 Macro", Page 3-109
Device default 3
Programming Skills
After ladder program is completely To programed, redundant program of device initialization is managed
unifiedly through device initial value set up. When start to run, log on value will be written automatically.
Select "Device initial value" on work space.
Content in ladder program that should be understood in advance and precautions are described below.
In KV STUDIO, two modes can be switched, namely expanded ladder entry mode (expanded ladder
mode) and common ladder entry mode (common ladder mode).
Switch mode as per the following steps.
·When expanded ladder mode is used, a "√" will be displayed before "Expanded ladder
LADDER PROGRAMMING
3 Ladder program, as shown in the figure below, is executed according to the sequence of "from left to
right", "from top to botton".
Programming Skills
(1 (2 (4
R000 R001 R500
(3
R002
(5 (6
R003 MOV
#1000 DM0
LD R000•••••••••••••••••••••••••••• (1)
ANB R001•••••••••••••••••••••••••••• (2)
OR R002•••••••••••••••••••••••••••• (3)
OUT R500•••••••••••••••••••••••••••• (4)
LD R003•••••••••••••••••••••••••••• (5)
MOV #1000 DM0•••••••••••••••••••• (6)
·Module execution sequence is set via "Execute sequence of modules" of KV STUDIO "CPU
system setting".
" Module Execution Sequence", Page 3-102
LADDER PROGRAMMING
Typical mode of conversion error is explained as follows.
Set all contacts and coils to be on the path from the R500
power rail to the output line and prevent
disconnections on the path.
Programming Skills
TIP The ladder in the figure on the right A B
results in a conversion error as there is
a disconnection. C
R500
Output coils, timer/counter instructions, etc. cannot R500 Internal auxiliary relays R500
be programmed directly from the power rail.
When an execution condition is not required,
insert an NC contact or a control relay
CR2002 (always ON contact) from an unused ʿ10 CR2002 ʿ10
internal auxiliary relay as a dummy. T0 T0
(wrong) (right)
A B D R500 E
R500
A B C
3
Programming Skills
D R501
If create new module or macro in KV STUDIO, "END" or "ENDH" instruction will be inserted
automatically
LADDER PROGRAMMING
● A network such as that shown in the figure A B R500 C E B R500
on the right cannot be programmed.
Rewrite the network.
A
E
C D A E D
C 3
Programming Skills
● In the figure on the right, R500 cannot be A R1000 A R1000 R500
output.
Rewriting enables output for only one scan.
● When two of the same coils are used as shown A B R500 A B R500
in the figure on the right, the program towards
the back is given priority, and the front in the
front is ignored.
C E R500 C E
F F E
E R501 C E R501
■ Duplicate coil
LADDER PROGRAMMING
If in a project, the same device uses OUT/OUB instruction for more than twice, within one scanning,
the finally executed instruction has priority, other instructions are omitted.
If OUT/OUB instructions are in their separated lines or different modules or macros, take the following
method for processing.
(for example), as shown in the figure below, when R500 output instruction is used twice
R003 R500 R003 R1001
R1000 R500
Each are output once by different
devices,and grouped separately to be
output to R500 by an OR. R1001
Although conversion error will not occur to Duplicate coil, but since action is miscellaneous, therefore
please do not use.
Check whether Duplicate coil exists, please select "Convert (A)" (conversion) -> "Duplicate coil check
(D)" from KV STUDIO menu.
Note
When the same macro is called for twice and above, if OUT/OUB instruction that uses
global device is used in macro memory, it turns into Duplicate coil.
LADDER PROGRAMMING
For OUT/OUB instruction that uses global device in the macro, when its macro is called for twice and
above, dual coil can be avoided by the following measures.
(1) Set the operand of the OUT/OUB instruction in the macro to argument P.
(2) for independent variable added in (1) designated by macro call instruction, different internal auxiliary 3
relays will be designated for each call.
Programming Skills
MCALL Macro A MCALL Macro A
DM0 DM0 R1000
P1
P1
R1000 R500
R1001
■ Interlock
In the program, when one party acts, the other party cannot act, so as to prevent simultaneous action of
both, such exclusive processing composition mode is called interlock.
Although lock function is very necessary in actual application, but since it is very complicated to explain,
unnecessary details will not be given inKV-5000/3000 Series PLC instruction Reference Manual etc
example programs.
If executing ON bit is used in module or macro execution, simply prepare entry/output lock circuit.
"Execution ON Bit", Page 3-120
"Macro System Device", Page 3-119
If scanning time is long, refresh cycle of entry/output and value will be increased, reaction of machine
and device will be decreased. In addition, if scanning time exceeds 300ms, "Scanning time overtime
(CPU error No. 30)" will occur, running cannot be proceeded.
By means of the following projects, scanning time can be shortened.
When / CJ/GOTO instruction is used, preparation of circular processing program is also the same.
If it is DM/EM/FM/TM, local device should also use even No..During conversion, local device
of even No. Should always be distributed to global device of even No., local device of odd
No. Should always be distributed to global device of odd NoTherefore, device areas more
than distributed to each module or macro might be consumed.
LADDER PROGRAMMING
· Since R, DM is distributed in expansion unit, as global device, use area is required. When using local
devices, give priority to MR or EM/FM.
"3-10 Local Device", Page 3-131
For local label, see "Label", Page 3-162.
Programming Skills
<Index modify>
○Designate concise method.
△Specify device type cannot be changed.
△ Index register Z cannot be used as local device.
->If "ZPOP" and "ZPUSH" instructions are used, it is not necessary to consider available
quantity of index register, use index for modification.
<Indirect specifying>
○Specify device type can be changed.
△Specify method is complicated. (special instruction should be used when processing address).
It is advisable to use simple "Index modification" function in condition other than changing device
category.
" Index Modification", Page 3-73
Conversion
LADDER PROGRAMMING
· Ctrl + F9
3 · select "Monitor/Simulator (N)" -> "Transfer to PLC -> Monitor (C)" from the menu for
Programming Skills
Select "Convert (A)" -> "Convert individual modules/macros (M)" from the menu to convert
module/macro respectively. In case of many errors, and errors cause difficult determination,
please use this method.
Transfer
Select "Monitor/Simulator (N)" -> "Transfer to PLC (W)" from the menu to transmit converted ladder
program to KV-5000/3000 PLC.
LADDER PROGRAMMING
Note
Under default settings, when program is transmited, each module/macro stored in PLC
body will not be deleted. If you want to delete unused module when executing program
transmission, please set "Clear module/macro in PLC" check box of "Transfer program"
dialog box to selected state.
After selecting "Monitor/simulator (n)" -> "Transfer to PLC-> Monitor mode (C)" from menu, it
executes operation from conversion to transmitted automatically, and starts monitoring.
Programming Skills
Under KV-5000/3000 PLC RUN state, transmit, write ladder program.
Writing in the so-called RUN mode is rewrite function of KV-5000/3000 PLC for ladder program under
RUN state. Action fine adjustment and independent variable change can be performed without stopping
device and production line.
Extension value of scanning time written in RUN is up to 2ms.
Select when
write RUN.
Danger may occur due to the status of the control equipment connected in
WARNING KV-5000/3000 when writing in RUN mode. Caution!
Note
· When write is finished in RUN, even if ON/OFF state of execution condition changes,
differential instruction in write range will not be executed.
· Even if change timer or counter setpoint and execute writing operation in RUN, change
current value will not be changed when writing is finished.
Monitoring
3 Use monitor program to transmit the ladder program prepared using ladder editor (Ladder Editor) to
KV-5000/3000 PLC, carry out actual execution, check out action condition.
Programming Skills
To start monitoring, select "Monitor/simulator(n)" -> "Transfer to PLC -> monitor mode(C)" from the
menu. Before operation, please connect KV-5000/3000 PLC and PC in advance in communication
enable state.
· Ctrl + F8
For detailed information of the functions, please refer to KV STUDIO User's Manual "Chapter 9 monitor and simulator".
Online edit
LADDER PROGRAMMING
Use online edit function, change ladder program directly on KV STUDIO monitoring frame.Use these
convenient functions, adjust and change simple program on final debugging site for programming.
In monitoring execution process, select "Monitor/Simulator (N)" -> "Start online edit (O)", start online
edit from the menu.
Edit position will display light blue, check which cell is corrected clearly at a glance.
Programming Skills
· F10
The online edit function may serious damage or injure workers if it is used in the wrong way.
Thoroughly check the following points to ensure correct use of this function:
Before using online edit, thoroughly check the peripheral equipment, and use in a state
that will prevent physical injury or damage if equipment operate unexpectedly.
WARNING Do not add circuits (e.g. execution condition B contact circuits) that operate immediately
after a program is transferred. Doing so might cause equipment to run away.
If ON output instructions (e.g. OUT) are deleted and the ladder program is transferred,
the outputs are held in an ON state.
For online edit transmission, only write the changed circuit block in PLC body.However, in the
following condition, execute write operation for the changed module/macro as a whole.
· When several modules are changed
·When script edit exceeding local work area is executed
·When increase local mark number to exceed local work area
·After edit the program in macro (macro is transmited as a whole.)
·When individual assignment number of local device is changed
·When macro call is increased
·When ENDH instruction is edited
With respect to restriction matters and precautions for writing in RUN mode, please refer to "Write in the
RUN mode", Page 3-179".
For online edit function, please refer to KV STUDIO User's Manual , "9-9 online edit function ".
Simulator
LADDER PROGRAMMING
Use simulator, while PLC is not connected, simulate action of ladder program prepared using ladder
editor on PC.
Use this program to perform the following operation.
· Use Ladder Monitor, Registration Monitor (time sequence diagram) and Batch Monitor, check out
program operating state in real time.
· Through various execution method, simulated continuous scanning/consecutive step or single step/a
3 scanning cycle.
· Utilize single step and consecutive steps reverse execution etc convenient functions for debug work
Programming Skills
efficiently.
· Setpoint and current value of timer, counter or device etc can be changed simply.
· Forced set bit or reset can be performed for the contact.
Select "Monitor/Simulator (N)" -> "Simulator (L)" from the menu to start simulator.
· Ctrl + F2
For detailed information of the functions, please refer to KV STUDIO User's Manual, "9-11 simulation
function - execute analog simulation operation".
Please refer to KV STUDIO User's Manual, "9-11 simulator function -simulator restriction"
Monitoring functions
LADDER PROGRAMMING
In order to use monitoring and simulator more validly for debugging, functions are described below.
For detailed information of operating method of the functions, please refer to KV STUDIO User's Manual.
Programming Skills
Note
During monitoring, timer/counter contact and external I/O relay cannot execute ON/OFF
operation.
To forcibly turn external I/O relays ON/OFF during monitoring, select "Debug(D)" -> "forced
set/reset register(X) or Inhibit input refreshing(F)" from the menu.
Display "Batch change (device value change) " window.If several cells are selected, click F2 key,
display all devices included in the selected range.
Through entry a new value, change current value.
If select use index modification or indirectly designated instruction, display the reference device.
In order to register the device in Registration Monitor and Batch Monitor, select the instruction
containing monitoring device, when aligning with the cell in " " state, drag and drop the device into
"Registration Monitor" dialog box.
3
Programming Skills
·/if several cells are selected, perform drag and drop operation, all devices within the selected
range will be registered.
·In "Registration Monitor" dialog box, device can also be entry directly..
● Watch window
All devices contained in the circuit block with selected CELL execute monitoring function automatically.
To hide/show the screen, select "Monitor/Commission" -> "Hide/show monitoring window" from the
menu bar.
LADDER PROGRAMMING
Display the local device/local mark number prepared ladder program in monitor or simulator by
assignment object device distributed during conversion.
Select “Tool (t)"-> "Option (o)" from the menu, open "Setup option" dialog box, set Set display mode, set
"Display local assign devices during monitor" check box to selected state.
Mark.
3
Programming Skills
Local mark number distributed to local work area.
"Local label assignment", Page 3-163
Right click "KV-5000/3000" on " work space ", select "Customize monitor (c)" from displayed menu,
display "Select custom monitor" dialog box. Select monitoring function, press "display" button, display
customized monitoring for the functions.
Other procedure Select "View(V)" -> "Custom Monitor(P)" from the menu.
3
Programming Skills
Note
In simulator execution process, there is restriction for part function and device action.
Please refer to KV STUDIO User's Manual, "9-10 simulator function -simulator restriction"
LADDER PROGRAMMING
On "work space", after select "Unit monitor (c)" from right click menu of the "units", display "unit
monitor" dialog box.
Other procedure ·Select "Display(V)" -> "Unit monitor(J)" from the menu.
· When monitoring through unit editor, after the units are selected, display from right click
menu.
Programming Skills
Note
Display is unavailable when simulator runs.
Interrupt function
The so-called interrupt (Break) is the function to interrupt ladder program execution for the purpose of
checking certain instant state in continuously processed ladder program execution process.Use
interrupt function, it is unnecessary to add ladder circuit block for preparing state checkout.
In KV STUDIO, according to device state and value etc, "device interrupt" and "line interrupt" can be used.
Break functions during monitoring may cause a major hazard depending on the states of control
WARNING devices currently connected to the KV-5000/3000 as execution of the ladder program is aborted
once the break condition is established. Pay full attention to this before starting execution.
Note
During monitoring, please pay attention to the following points:
· When interrupt function is used, it is impossible to read and write ladder program
(including write in RUN mode).
· When power supply is OFF, operating mode RUN->PROG is switched, monitoring stops/ends
(including communication is abnormal), PLC error occurs, all interrupt settings will be deleted.
·Perform interrupt settings in PROG state, after changing to RUN state, check out action.
·In monitoring process, when use interrupt function to entry interrupt state, if output relay is
OFF, turn CR2302 on.
■ Device interrupt
LADDER PROGRAMMING
According to state change of bit device and the value of work device, interrupt might occur.
In monitoring process, set up an interrupt condition; in analog simulation process, set up 16 interrupt
conditions simultaneously.
Select "Debug (D)" -> "Setup device break (B)" from the menu, set interrupt condition in the popped
"Setup device break" dialog box.
3
Programming Skills
If condition is established, interrupt occurs, "Break information" dialog box will be displayed, program
execution is interrupted.Click "OK" button, program is still interrupted.
If interrupt is applied, and PLC run is interrupted, during monitoring, also execute " execute 1 step
(F8)" and " a scanning execute 1 scan (F9)". When restart to run, click " RUN/Cont scan
(F5)".
LADDER PROGRAMMING
Note
· CR/CM/Z/CTH/CTC cannot be set as condition.
· During monitoring, interrupt condition is only limited to device consistency/inconsistency.
· During monitoring, if interrupt condition is established, the following parts will also execute
interrupt.
· In the end of scanning ... Cursor moves to the first line in mnemonic symbol list of
originally executed module.
· instruction of processing object device ... If it is bit device, word processing instruction
containing object bit device channel, and instruction of the same channel for
processing other bits will execute interrupt. 3
· During monitoring, in the following conditions, even if interrupt condition is established,
Programming Skills
instruction of processing object device will not execute interrupt.
· When designating condition by double word, only process one word instruction on
upper bit or lower bit
· When designating condition via bit device, execute word processing instruction for
channels containing this bit and channels before and after that simultaneously.
■ Row interrupt
Designate the part of ladder program to be interrupted. Up to 4 points can be set simultaneously during
monitoring, up to 16 points can be set simultaneously during simulation.
Double click
row No.
Display "Mnemonic list" dialog box. Selected step consistent with the selected line.
2 In the "Mnemonic list" dialog box, double-click the rung (step) to perform the break at.
LADDER PROGRAMMING
Other procedure After selecting a line, select "Set/cancel rung break (S)" from right click menu.
Indicates position of
current row executed. Select corresponding
mnemonics.
3
Display “?” after
Programming Skills
Note
For simulator, during scanning execution (continuous/one scanning) line interrupt cannot be
added. When scanning is finished, cursor is moved to the top line in mnemonic symbol list
of the first module in execution sequence..
BREAK コスウ Number of BREAK instructions Occur during conversion.Please control the number of
14
BREAK Number exceeds the limit. BREAK instructions between FOR to NEXT within the limit.
コンバート Occur during conversion.Cause of conversion failure
15 Conversion fails. during KV STUDIO conversion.Please transmit the
Convert
program to body after cause is eliminated.
オブジェクトサイズ Project size of the program
19
Object Size exceeds capacity. Please reduce the size of program.
コードサイズ The code size of program The size of program can be checked via KV STUDIO
20
Code Size exceeds the limit.
マクロネスト Number of macro nests in multiple Please reduce macroinstruction in interrupt
22
MACRO nest interrupt exceeds the limit. program.
フセイナワリコミ
23
Illegal Interrupt
フセイナマクロ
24 Please connect power again after
Illegal Macro
カンセツシテイエラー troubleshooting.
25 System error.
Illegal Pointer Please contact the nearest office in case of
フセイナアドレス frequent occurrence.
26
Illegal Address
フセイナオブジェクト
27
Illegal Object
スキャンタイム Please correct program according to the following
APPENDICES
ユニット チェックサム
50*1 Expansion unit setting damaged.
Unit Checksum
Please use KV STUDIO or memory card to
ユニット セッテイ
Unit setting information not transfer the unit setting information to the PLC.
51 ジョウホウ
set.
Unit Setup Information
Expansion unit is logged on Please firstly cut off system power supply, use
ユニット ミセツゾク
52 in unit set up information, unit editor to connect already set expansion
カクチョウバス
Please remove noise source.
ツウシン Bus communication may
56*1 Please contact the nearest office in case of
Extend Bus Comm stop due to noise.
frequent occurrence.
Error
エンドユニット
57 ミセツゾク End unit not connected. Please disconnect system power, connect end unit.
No End Unit
ユニット バージョン Connect the expansion unit that Please firstly cut off system power supply, use unit editor to
59*1
Unit Version cannot be connected to the CPU unit. connect already set expansion unit.
FLASH ROM
イジョウ
80 Flash ROM abnormal.
FLASH ROM
Please contact the nearest office.
Damaged
SRAM イジョウ
81 Hardware fault.
SRAM Damaged
デンチ ヲ コウカン
Backup battery voltage
83 シテクダサイ Please replace backup battery.
lower.
Low Battery
シテクダサイ RAM contents (current values of execute SRAM eliminate.Only delete device
84
CM,DM, EM, FM, R,B,CR, LR, T, value, alarm limit.Ladder program will be not
SRAM Backup
C,CTH, CTC) are destroyed. deleted.
APPENDICES
RTC デンアツ テイカ Due to voltage lower of backup Please replace backup battery, check clock
85
RTC Low Voltage battery, clock data may lose. data, if required, reset clock.
C:\WINDOWS>CHKDSK E:
メモリカード ガ
Please remove memory card according to
ヌカレマシタ The card is pulled out during
88 correct operation steps.
Memory Card memory card accessing.
"Used on the KV-5000/3000", Page 2-45
Removed
メモリカード
Power is disconnected Please use memory card according to correct
アクセスチュウ オフ
89 during memory card operation steps.
Memory Card Power
accessing. "Used on the KV-5000/3000", Page 2-45
OFF
メモリカード Accessing other memory
Please terminate memory card access before
90 カンリョウマチ cards occurs during memory
operation.
Memory Card Busy card accessing.
イーサコントローラ
APPENDICES
スタック オーバーフロー
121
Stack Overflow
System error.
システムエラー
122
System Error Please connect power again after
デバイス ハンイ troubleshooting.
123 Out Of Device
Please contact the nearest office in case of
Range
frequent occurrence.
フォーマット
131 FlashROM format abnormal
FLASH ROM
After clearing all, please connect power again.
Format
"All Clear Mode", Page 2-37
ラダーファイル Program saved in flash
132 フセイ memory is abnormal.
Illegal Ladder File
Control relay (CR0000 - CR3915) may realize confirmation of CPU unit action state, settings or monitoring of built-in functions etc.
Control relay reversed in the system cannot be used.
Attribute
Device No. Function
APPENDICES
R: Read only
Blank: R/W
CR/CM list
CR0006 to CR0007 - Logging/tracing Reserved for system
CR0008 R function (IDO) Logging/tracing error
CR0009 R Record/follow-up memory card capacity insufficient error
CR0010 R Record/follow-up device, trigger set up abnormal
CR0011 R Tracing file save trigger monitor
CR0012 R Tracing data capture complete
CR0013 R Record/track write setting
CR0014 to CR0015 - Reserved for system
Logging/tracing
CR0100 to CR0915 (same as CR0000 to CR0015)
function(ID1 to ID9)
Real-time chart
CR1000 to CR1015 (same as CR0000 to CR0015)
monitor(ID10)
CR1100 to CR2001 - Reserved for system
CR2002 R Always ON
CR2003 R Always OFF
CR2004 R +10ms clock pulse (Duty ratio 50%)
CR2005 R 100ms clock pulse (Duty ratio 50%)
CR2006 R 1s clock pulse (Duty ratio 50%)
CR2007 R When running starts, cut off a scanning cycle
CR2008 R When running starts, connect a scanning cycle
CR2009 On when the operation result is negative or overflow
CR2010 R ON when the operation result is 0
CR2011 R On when the operation result is positive
CR2012 R ON when calculation operation error
CR2013 to CR2015 - Reserved for system
CR2100 R CTH0 dedicated internal clock (1µs)
CR2101 R CTH0 dedicated internal clock (10µs)
CR2102 R CTH0 dedicated internal clock (100µs)
Attribute
Device No. R: Read only Function
Blank: R/W
Single phase
High-speed 1Single 2Single 4Single 2pulse
Without direction With direction
counter CTH0
CR2113 to CR2115 CR2113 OFF ON OFF ON OFF ON
count input
CR2114 OFF OFF ON ON OFF OFF
mode selection
CR2115 OFF OFF OFF OFF ON ON
Attribute
Device No. R: Read only Function
Blank: R/W
APPENDICES
not to alarm)
CR2306 R When backup battery abnormal ON
CR2307 Clear Min./Max. value of scan time
CR2308 Set END processing time (ON: enable, OFF: disable)
CR2309 to CR2315 - Reserved for system
CR/CM list
CR2401 OFF OFF ON ON
Attribute
Device No. R: Read only Function
Blank: R/W
CR2513 CTH1 comparator matching output relay switch (ON: R505 OFF: R501)
CR2514 Designate frequency pulse output (CTH0) (ON: proceed, OFF: not proceed)
CR2515 Specify frequency pulse(CTH1)output error
APPENDICES
CR2602,CR2603 INT R000 interrupt polarity (the same with CR2600, CR2601)
CR2604,CR2605 INT R001 interrupt polarity (the same with CR2600, CR2601)
CR2606,CR2607 INT R003 interrupt polarity (the same with CR2600, CR2601)
CR2608,CR2609 INT R004 interrupt polarity (the same with CR2600, CR2601)
CR/CM list
CR2610,CR2611 INT R005 interrupt polarity (the same with CR2600, CR2601)
CR2612,CR2613 INT R006 interrupt polarity (the same with CR2600, CR2601)
CR2614,CR2615 INT R007 interrupt polarity (the same with CR2600, CR2601)
CR2700,CR2701 INT R008 interrupt polarity (the same with CR2600, CR2601)
CR2702,CR2703 INT R009 interrupt polarity (the same with CR2600, CR2601)
CR2704 to CR2715 - Reserved for system
CR2800 Send interrupt signal (when ON)
CR2801 R Scan once ON when receiving text data
CR2802 R Text data read error
Serial
CR2803 R Scan once ON when receiving text data error
communication
CR2804 Start sending text data( send in progress ON)
CR2805 Use bit unit to receive text data (ON: proceed, OFF: not proceed)
CR2806 Use word unit to send text data (ON: proceed, OFF: not proceed)
CR2807 to CR2813 - Reserved for system
Zero suppression during execution of ASC command (full postfix), FASC command
CR2814
(ON: proceed, OFF: not proceed)
The sign "+" is not used when DASC.S, DASC.L and FASC instructions are executed
CR2815
(ON: proceed, OFF: not proceed)
CR2900 user message display 1 (ON: display OFF: not display)
Access window
CR2901 user message display 2 (ON: display OFF: not display)
CR2902 to CR2915 - Reserved for system
Attribute
Device No. R: Read only Function
Blank: R/W
APPENDICES
CR3004 R Origin return in progress
CR3005 R Origin return complete
CR3006 Positioning complete relay
CR3007 CPU Positioning Error/error clear
CR3008 function X axis Warning/clear warning
CR/CM list
CR3010 Driver operation start
CR3011 Current value change request (level detection)
CR3012 Operation speed change request (level detection)
CR3013 Comparator 2 consistency relay
CR3014 -
Reserved for system
CR3015 -
CR3100 Limit switch CW direction input
CR3101 Limit switch CCW direction input
CR3102 Origin sensor input
CR3103 Stop sensor input
CR3104 R Origin return in progress
CR3105 R Origin return complete
CR3106 Positioning complete relay
CR3107 CPU Positioning Error/error clear
CR3108 function Y axis Warning/clear warning
Attribute
Device No. R: Read only Function
Blank: R/W
Control Memory CM
Control memory (CM0000 - CM5999) may realize confirmation of CPU unit action state, settings or
monitoring of built-in functions etc.
Control memory reversed in the system cannot be used.
APPENDICES
Attribute
Device No. R: Read only Function
Blank: R/W
CR/CM list
CM0200, CM0201 Set up 1st line display attribute
CM0202, CM0203 Set up 2nd line display attribute
Operation panel
CM0204, CM0205 Set up 3rd line display attribute
KV-D30
CM0206, CM0207 Set up 4th line display attribute
0 Pages
CM0208 Setup module 1
CM0209 Setup module 2
CM0210 to CM0399 Page 1 to 19 (same as CM0200 to CM0209)
CM0400 For conversion enable/disnable setting
CM0401 For settings of page conversion
CM0402 Operation panel Current display page
CM0403 to CM0409 KV-D30 Reserved for system
CM0410 to CM0415 Direct access function
CM0416 to CM0499 - Reserved for system
CM0500 to CM0699 - Reserved for system
CM0700 R (year)
CM0701 R (month)
CM0702 R (day)
Read from
CM0703 R (hour)
calendar timer
CM0704 R (Minute)
CM0705 R (s)
CM0706 R (week)
CM0707 - Reserved for system
CM0708, CM0709 R Free Run Counter (32-bit, 1ms)
CM0710 R Current memory No.of FM
CM0711 - Reserved for system
CM0712 R Execution time of constant cycle module (10µs unit)
CM0713 to CM0715 - Reserved for system
CM0716 Maximum exeuction time (10µs unit) for Fixed Period Module
CM0717 to CM0719 - Reserved for system
CM0720 R Scan time measuring value (10µs unit)
CM0721 Fixed scanning time run set value (10µs unit)
CM0722 R Exceeds scanning time set up (-fixed scanning time running/END processing time settings) scanning time (10µs unit)
CM0723 END processing time measured value (10µs unit)
CM0724 to CM0725 - Reserved for system
CM0726 R Maximum fixed scanning time (10µs unit)
CM0727 R Minimum fixed scanning time (10µs unit)
CM0728 END processing time set value (10µs unit)
CM0729 Exceeds scanning time set up (-fixed scanning time running/END processing time settings) scanning time (10µs unit)
CM0730 to CM1479 - Reserved for system
CM1480, CM1481 R Frequency measuring result(Hz or rpm)
Frequency counter
CM1482 1Number of placed pulse
function (CTH0)
CM1483 Scan times
Attribute
Device No. R: Read only Function
Blank: R/W
function (CTH1)
CM1493 Scan times
CM1494, CM1495 Specify frequency Setup frequency (Hz)
CM1496 pulse output function. Duty ratio (0 to 100%)
CM1497 to CM1593 - Reserved for system
CM1594 CTH0 change direction detection constant
CM1595 CTH01 change direction detection constant
CM1596, CM1597 Lower limit of CTH0 ring counter
CM1598, CM1599 Lower limit of CTH1 ring counter
CR/CM list
Attribute
Device No. R: Read only Function
Blank: R/W
APPENDICES
CM1903 minute
CM1904 second
CM1905 to CM1999 Power ON log (2 to 20 records, same as CM1800 to CM1804)
CM2000 I/O setting
CM2001 Start sensor
CM2002, CM2003 Comparator 0
CM2004, CM2005 Comparator 1
CM2006 Origin return: starting speed
CR/CM list
CM2007 Zero return: acceleration/deceleration time
CM2008, CM2009 Origin return: running speed
CM2010 JOG operation: starting speed
CM2011 CPU JOB operation: acceleration/deceleration time
CM2012, CM2013 Positioning JOG operation: running speed
CM2014, CM2015 function Current value change setting value
CM2016, CM2017 X axis Operation speed change setting value
CM2018 Set up the origin return detail
CM2019 Operation in progress point No.(M code)
CM2020, CM2021 R Current position
CM2022, CM2023 R Current speed
CM2024 Error code
CM2025 Specify point No.
CM2026, CM2027 Resting position coordinate setpoint
CM2028, CM2029 Comparator 2
CM2030 I/O setting
CM2031 Start sensor
CM2032, CM2033 Comparator 0
CM2034, CM2035 Comparator 1
CM2036 Origin return: starting speed
CM2037 Zero return: acceleration/deceleration time
CM2038, CM2039 Origin return: running speed
CM2040 JOG operation: starting speed
CM2041 CPU JOB operation: acceleration/deceleration time
CM2042, CM2043 Positioning JOG operation: running speed
CM2044, CM2045 function Current value change setting value
CM2046, CM2047 Y axis Operation speed change setting value
CM2048 Set up the origin return detail
CM2049 Operation in progress point No.(M code)
CM2050, CM2051 R Current position
CM2052, CM2053 R Current speed
CM2054 Error code
CM2055 Specify point No.
CM2056, CM2057 Resting position coordinate setpoint
CM2058, CM2059 Comparator 2
CM2060, CM2061 CPU Target value/amount of movement
CM2062 Positioning Startup speed
CM2063 Acceleration/deceleration time
function
CM2064, CM2065 Operation speed
Point parameter
CM2066 Operation mode
CM2067 Specified pulse number for stop sensor
CM2068, CM2069 0 Reserved for system
Attribute
Device No. R: Read only Function
Blank: R/W
Interrupt times (INT0 to INT3, CTC2, CTC3, CTC0, CTC1, positioning X axis,
CM2400 to CM2416
positioning Y axis, INT4 to INT9, fixed cycle module)
CM2417 to CM2999 - Reserved for system
CM3000 Number of received texts
CM3001 to CM3999 Text received data (1998-byte)
CM4000 Number of sending texts
CM4001 to CM4999 Text send data (1998-byte)
Year month (decimal number, lower two 2 digits represent month,
CR/CM list
APPENDICES
3 Improper simple indirect specifying
4 Beyond operand range
5 Floating real number overflow
6 Improper device specifying
7 ROOT operand is negative
8 No ENCO instruction ON bit
9 Floating-point real number error
CR/CM list
10 Trigonometric function operand error
11 data cannot be converted
12 Improper table specifying
13 Time comparison instruction operand error
14 Cam switch operand error
15 Frequency counter instruction operand error
16 0 division operation
17 Record ID illegal
18 Direct Processing Error
19 The units cannot direct processed
20 Subroutine does not exist for transfer target
21 Writing during RUN, cannot execute command
22 Expansion unit special command object error (unit No.)
Extension information1 2 00H fixed
Extension information1 3 Step number high bit error
Extension information1 4 Step number low bit error
Extension information 5 to 20 Use SJIS to store module name.(the part other than module name is 00H)
High 4 bits
0 1 2 3 4 5 6 7 8 9 A B C D E F
APPENDICES
N D S
0 U
L
L
E P 0 ˜ P ˼ p ࠲ ࡒ
S D
1 O
H
C
1 ʽ 1 A Q a q DŽ ࠕ ࠴ ࡓ
S D
2 T
X
C
2 ” 2 B R b r Nj ࠗ ࠷ ࡔ
E D
3 T
X
C
3 ʿ 3 C S c s nj ࠙ ࠹ ࡕ
B E
7 E
L
T
B ’ 7 G W g w ࠔ ࠠ
B CA
8 S N ˄ 8 H X h x ࠖ ࠢ ࡀ
9 HT EM ˅ 9 I Y i y ࠘ ࠤ ࡁ ࡞
A LF UB ˆ ˖ J
S
Z j z ࠚ ࠦ ࡂ
B VT SC ˇ ˗ K ˷ k ̗
E
ࠜ ࠨ ࡅ ࡠ
C FF → ˈ ˘ L \ l ̘ ࡖ ࠪ ࡈ ࡢ
D CR ← ˙ M ˹ m ̙ ࡘ ࠬ ࡋ ࡦ
E SO ↑ ˊ ˚ N ˺ n ̚ ࡚ ࡎ ࠐ
D
F SI ↓ ˋ ? O ˻ o E
L ࠶ ࠰ ࡑ °
Ex
ec
uti Descr
on
Sorting mnemonics Sign Instruction function co iption
nd
iti Page
on
n
LOGE Logging enabled for specified log ID. 2-64
LOGE
Instruction List
n
Log
n
TRGD Capture log data of ID specified. 2-66
TRGD
S1 S2 D
ABSENC
ABSENC S1 S2 D1 Use absolute type encoder, operate the cam. 2-144
D2
INCENC
INCENC S1 S2 S3 Use incremental encoder, operate the cam. 2-148
D1 D2
Exe
cuti Descr
Sorti mnemonics Sign Instruction function on
iption
ng con
ditio
n Page
Positioning instructions
Ladder control
n
PLSX Start Trapezoidal control of X axis.
PLSX
APPENDICES
2-186
PLSY n Start trapezoidal control of Y-axis.
PLSY
JOGX
JOG operation
Instruction List
CCW
HIGH
Origin returning
2-190
ORGY ORGY Start origin return on the Y-axis.
Teaching
2-194
HOMEY HOMEY Start moving to home position of Y-axis.
S
CHGSPX Change the operation speed of X-axis.
CHGSPX
2-196
S
CHGSPY Change the operation speed of Y-axis.
CHGSPY
2-198
RFSPSY Refresh current value and speed of Y-axis to the
RFSPSY
updated value.
Exe
cuti Descr
Sorti on
ng mnemonics Sign Instruction function con iption
ditio
n Page
High-speed processing instructions
Input time constant
HSP D 3-46
response characteristic.
D
DIC Set up interrupt disnable range. 3-48
Instruction List
Interrupt
DIC
RETI
RETI Indicates the end of the interrupt program. - 3-50
Module instructions
MDSTRT
MDSTRT S Start to execute specified module.
Module
3-106
MDSTOP
MDSTOP S Stop to execute specified module.
Macro instruction
MCALL
MCALL Ѣ㽕ᠻ㸠ⱘᅣ Executes the sub-routine macro specified.
Macro
MSTRT
MSTRT Ѣ㽕ᠻ㸠ⱘᅣ Execute specified self-hold type macro. 3-122
MEND
MEND Stops execution of the self-hold type macro.
APPENDICES
ANP/ANF AND pluse/AND pulse fall
ORP/ORF OR pulse/OR pulse fall
Contact Instructions
LDPB/LDFB Load pulse/load pulse fall
ANPB/ANFB AND bar pulse/AND bar pulse fall
ORPB/ORFB OR bar pulse/OR bar pulse fall
DIFU/DIFD Differential UP / Differential DOWN
Basic Instructions
● Macro
* To describe MEND (macro end) command in self-hold type macro.It cannot be used in module or subroutine type macro.
● Subroutine
● Instruction
Instruction Abbreviation
LD,AND A,X
APPENDICES
LDB,ANB B,LDI,LDNOT,ANI,ANDNOT,/ *3
Contact Instructions ORB ORI,ORNOT
LDP,ANP P
LDF,ANF F
BLD,BAND BA
Bit contact instructions
BLDB,BANB BB
LD=,AND= =
LD<,AND< <
Mnemonics Abbreviation
LD>,AND> >
Compare instruction
LD<=,AND<= <=
LD>=,AND>= >=
LD<>,AND<> <>
OUT O,Y
OUB OB
SET S
Output instructions
RES R,RST
DIFU U,PLS
DIFD D,PLF
BOUT BO
BOUB BOB
Bit output instructions
BSET BS
BRES BR
TMR T,TIM,OUTT
TMH TH,TIMH,OUTH
Timer/counter
*1
TMS TS,OUTS
instructions
C CNT
UDC CNTR
END E,FEND
Connection/end Instruction
ENDH H
W-ON WON
W-OFF WOFF
Stage instruction
W-UE WU, WUE
W-DE WD,WDE
MC IL
Flow instructions
MCR ILC
UREAD FROM
Buffer memory instructions
UWRIT TO
INC ++
Arithmetic/comparison
DEC --
instructions
ROOT SQRT
Logic operation EORA XOR,XORA
instructions ENRA XNORA
Instruction Abbreviation
DASC DSTR
RDASC DVAL
Text processing HASC HSTR
instructions RHASC HVAL
FASC FSTR
RFASC FVAL
APPENDICES
CAL+ +
CAL- -*2
CAL* *
CAL/ / *3
Simple operation CAL& &,WAND
instructions CAL | | ,WOR
CAL~ ~, WXOR
Mnemonics Abbreviation
CAL^ ^,NOT,CML
CAL>> >>,SFR
CAL<< <<,SFL
High-speed processing INT I
instructions RETI IRET
*1 Timer/counter command may realize input of command and device No. Without blank.
(For example) TMR 0002 DM00001 -> 2 D1
*2 When input "-" in " ladder edit " window directly, input transverse connecting wire.
After entering "-" in the "Direct Entry" dialog box, ( Esc )you can enter "CAL-instruction".
*3 After entering "/" in the "Ladder Edit" window, you can enter "LDB instruction".
After entering "-" in the "Direct Entry" dialog box, ( Esc )you can enter "CAL/instruction".
● Device name
● File ● Window
APPENDICES
KL address setting +
+ _ _
Display unit move
_
● Display Input
Unit setting display Input/confirm
UNIT MONITOR + + Cancel
Customize monitor + +
● Information area operation
Buffer memory monitor + +
Move cursor _
Unit editor "Slave Settings Screen (slave station set up frame) " effective shortcut key
● File Copy +
Close + Delete
Input unit/slave comments + +
● Edit
Unit/slave reservation +
Cut +
APPENDICES
Unit and slave setting Move cursor _ _ _
content Add selected unit
● Display
Workspace +
Output window +
● File ● Edit
New a project + Undo +
Open a project + Redo +
Save project Cut +
+
Save Copy +
Print +
Paste +
Paste-selected + +
Find +
Operand replacement +
Create cross reference
DIFU ◆ +
bookmark Setting + +
DIFD ◆ +
+ +
Release MOV ◆ +
◆ +
LDA
+
Select rung ( + )*1 STA ◆ +
( + )*2 LDP ◆ +
+ + ● Script
Next cell ◆ *
+ Insert area script +
+ + Insert frame script +
Previous cell ◆ *
+ Convert selected script +
Increase device number + + Hide/show ladder +
Decrease device number + +
Script function list +
APPENDICES
* Effected only when the Ladder Edit window is split.
+ +
Script tip
● Display
Workspace +
● Convert
Output window +
Convert ◆ +
Instruction/macro + +
module/macro single
selection panel ◆ ( )* +
conversion ◆
PLC read ◆ +
Display comments ◆ +
Online edit
Display unit device +
Start ◆
Edit window switching + Simulator +
● Help
Instruction help
Instruction Reference Manual +
+
Start Monitor Manual
End + + +
Monitor mode ◆
Previous
+ Start online edit
block
Next block +
Previous
Jump + ● Debug
symbol
Only 1 scan
Next symbol
Execute continuous steps +
rung start
Execute single step
rung end
Execute reverse
Change previous block + + +
consecutive steps
Change next block + +
Execute reverse single step
Create cross reference
Pause
Previous cross reference +
Next cross reference ● Help
Rung list + Instruction help
Contact ON/OFF switch Instruction Reference
+
Manual
● Display
Workspace +
Output window +
Ladder display zoom in +
Ladder display zoom out +
Label display +
Display comments ◆ +
Display unit device +
A-30 - KV-5000/3000 Series User’s Manual-
7 List of Shortcut Keys
APPENDICES
Cut + Connecti
Input/delete
Copy + ng line + /
longitudinal
Paste + edit +
connecting line
Paste-selected + + Input/delete
+ /
Find + transversal
+
Operand replacement + connecting line
Start + + +
Insert folder Ladder Diagram
LDP ◆ +
Insert + +
◆ +
DIFU
bookmar
Setting + + DIFD ◆ +
k
+ +
Release LDF ◆ + +
Select rung +
ORP ◆ + +
transversal connecting
line input◆
Connecti transversal connecting ORF ◆ + +
( )
ng line line input◆
MOV ◆ +
edit transversal connection line
+ LDA ◆ +
to rung end
( + ) ◆ +
transversal connecting line STA
Contact b.
Direct input/current ● Monitor and simulator
value change Return to Editor ◆ +
● Display + +
Monitor mode ◆
Workspace +
Start Monitor*
Output window +
List of Shortcut Keys
Stop Monitor* +
Instruction/macro + +
Transference
selection panel ◆ ( )*
Online edit Cancel +
Comment edit window +
Setting
Device use list +
Simulator +
Display zoom in +
*The short-cut keys cannot be used in Online Edit.
Display zoom out +
Label display + ● Help
◆ +
Display comments
Instruction help
Display unit device +
Instruction Reference Manual +
Move to next
Not required Next cell + + +
cross reference
PLC transfer-> Monitor mode
Monitor mode Display comments +
Read PLC Not required Instruction/macro
+ +
Start online edit + input panel
APPENDICES
Returning to Editor
Next cell + + +
/ (slash)
·SET,RSET
/ (slash)
List of Shortcut Keys
·Up, down
/ (slash)
·Suffix
/ (slash) / (slash)
/ (slash) / (slash)
/ (slash)
● If this button is pressed when no insturction is entered in CELL, Contact b will be entered.
/ (slash)
MEMO
APPENDICES
List of Shortcut Keys
+ - 0 1 2 3 4 5 6 7 8 9 _
beginning
Character or character string that
_ _0 _1 _2 _3 _4 _5 _6 _7 _8 _9
cannot be used at the end
Illegal text strings Global(case insensitve)
! " # $ % & ‘ ( ) * + , - . / : ; < = > ? @ [ \
Unavailable characters
] ^ _ ’ { | } ~ (space)
Character that cannot be used at the
0 1 2 3 4 5 6 7 8 9
beginning
Global
(the same name as command)
Illegal text strings (Device name)
· alphabet character + R or M+ number
· Letter 1 character + number
Number C
APPENDICES
32-bit internal register ••••••••••••••••••••••••••••••3-84 Candidate command ••••••••••••••••••••••••••••••3-153
Can't read •••••••••••••••••••••••••••••••••••••••••••• 3-14
Change device value window •••••••••••••••••••3-183
A Change the current value or status of device 3-183
Character code ••••••••••••••••••••••••••••••••••••• 3-92
Character that cannot be used in mark ••••••••• A-36
About contact protection •••••••••••••••••••••••••••• 1-8 Checking the Content of the Package ••••••••••••1-2
About the Connector •••••••••••••••••••••••••••••••1-10 CHGSPX Instruction •••••••••••••••••••••••••••••2-196
About the memory card ••••••••••••••••••••••••••••2-42 CHGSPY Instruction •••••••••••••••••••••••••••••2-196
ABSENC Instruction •••••••••••••••••••••••••••••• 2-144 CM ••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-73
Index
AC power unit ••••••••••••••••••••••••••••••••••••••••1-35 condition control ••••••••••••••••••••••••••••••••••••••3-4
Outline Dimensions •••••••••••••••••••••••••••••1-37 Configure as per process ••••••••••••••••••••••••3-104
Name and function of each part •••••••••••••••1-35 Connection line edit •••••••••••••••••••••••••••••••3-156
Specification •••••••••••••••••••••••••••••••••••••••1-36 Connector assembly and wiring •••••••••••••••••••1-9
How to Wire the power unit ••••••••••••••••••••1-37 Connector wiring •••••••••••••••••••••••••••••••••••• 1-11
Access window setup ••••••••••••••••••••••••••••••2-34 Constant ••••••••••••••••••••••••••••••••••••••• 3-56, 3-82
Contrast ••••••••••••••••••••••••••••••••••••••••••••2-34 Contrast •••••••••••••••••••••••••••••••••••••••••••••• 2-34
Display language •••••••••••••••••••••••••••••••••2-35 Control memory •••••••••••••••••••••••••••••• 1-17, 3-73
Access window setup ••••••••••••••••••••••••••••••2-34 Control relay•••••••••••••••••••••••••••••••••••••••••• 3-66
Contrast ••••••••••••••••••••••••••••••••••••••••••••2-34 Convert result ••••••••••••••••••••••••••••••••••••••• 3-11
Display language •••••••••••••••••••••••••••••••••2-35 Counter operation •••••••••••••••••••••••••••••••••• 3-65
Access window ••••••••••••••••••••••••••••••••••••••• 2-2 Counter •••••••••••••••••••••••••••••••••1-17, 3-64, 3-72
Access window •••••••••••••••••••••••••••••••••••• 2-2 CPU Monitor ••••••••••••••••••••••••••••••••••••••••• 2-22
Name of each part of the access window •••• 2-6 CPU positioning parameter comparator 2 interrupt 3-35
Function list ••••••••••••••••••••••••••••••••••••••••• 2-3 CPU unit •••••••••••••••••••••••••••••••••••••••••••••• 1-20
Access window ••••••••••••••••••••••••••••••••••••••• 2-2 5V output •••••••••••••••••••••••••••••••••••••••••• 1-27
Access window •••••••••••••••••••••••••••••••••••• 2-2 Derate •••••••••••••••••••••••••••••••••••••••••••••• 1-26
Name of each part of the access window •••• 2-6 Outline Dimensions(CPU) ••••••••••••••••••• 1-34
Function list ••••••••••••••••••••••••••••••••••••••••• 2-3 Outline Dimensions (Start unit, End unit) ••• 1-34
Action during power off ••••••••••••••••••••••••••••1-18 Name and function of each part •••••••••••••• 1-21
Action when calling between MC to MCR Output specification ••••••••••••••••••••••••••••• 1-27
commands ••••••••••••••••••••••••••••••••••••••• 3-128 I/O Wiring Diagram •••••••••••••••••••••••••••••• 1-32
Action when execution condition is OFF ••••• 3-128 Input specification ••••••••••••••••••••••••••••••• 1-24
All Clear •••••••••••••••••••••••••••••••••••••••••••••••2-37 CR ••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-66
Argument ••••••••••••••••••••••••••••••••••••••••••• 3-117 Create Entities •••••••••••••••••••••••••••••••••••••3-126
ASCII code •••••••••••••••••••••••••••••••••••••••••••3-92 CTC Instruction ••••••••••••••••••••••••••••••••••• 2-114
ASCII code •••••••••••••••••••••••••••••••••••••••••••3-92 CTC •••••••••••••••••••••••••••••••••••••••••••• 3-66, 3-72
CTH Instruction ••••••••••••••••••••••••••••••••••• 2-114
CTH ••••••••••••••••••••••••••••••••••••••••••••••••••• 3-72
B
B ••••••••••••••••••••••••••••••••••••••••••••••••••••••••3-59
D
Basic System Configuration •••••••••••••••••••1-2, 1-4
Batch monitor •••••••••••••••••••••••••••••••••••••• 3-184 Data Memory ••••••••••••••••••••••••••••••••• 1-17, 3-67
BCD ••••••••••••••••••••••••••••••••••••••••••••••••••••3-88 DEC ••••••••••••••••••••••••••••••••••••••••••••••••••• 3-87
BIN •••••••••••••••••••••••••••••••••••••••••••••••••••••3-87 DEC(Decimal) ••••••••••••••••••••••••••••••••••••••• 3-87
BIN •••••••••••••••••••••••••••••••••••••••••••••••••••••3-87 Decimal constant ••••••••••••••••••••••••••••••••••• 3-82
Binary Coded Decimal •••••••••••••••••••••••••••••3-88 Default setting of difference execution type command ••3-128
Binary data ••••••••••••••••••••••••••••••••••••••••••3-86 Device interrupt ••••••••••••••••••••••••••••••••••••3-188
Bit connects a scanning cycle only when macro Device mode ••••••••••••••••••••••••••••••••••••••••••2-9
execution starts ••••••••••••••••••••••••••••••••• 3-119 Names and Functions of Setting/Operation Keys •• 2-9
Bit device ON/OFF •••••••••••••••••••••••••••••••• 3-183 Changing device values
Bit device processing of word device •••••••••••3-81 (T, C, CTH/CTC, TRM) ••••••••••••••••••••••••• 2-15
Bit only cuts off a scanning cycle when module Changing device values (when device values are
execution starts ••••••••••••••••••••••••••••••••• 3-105 ON/OFF display) •••••••••••••••••••••••••••••• 2-13
Bit only cuts off a scanning cycle when module Changing device values
execution starts ••••••••••••••••••••••••••••••••• 3-105 (when device values are numerical values) •• 2-14
Bit period a scanning cycle only when macro Device name/comment display ••••••••••••••• 2-12
execution starts•••••••••••••••••••••••••••••••••• 3-119 Method of Operation in the Device Mode ••• 2-10
Bit unit processing of bit device ••••••••••••••••••3-80 Moving to the Device mode •••••••••••••••••••• 2-10
bytes ••••••••••••••••••••••••••••••••••••••••••••••••••• 3-11 Devices That Can be Displayed and Whose
- KV-5000/3000 Series User’s Manual - A-37
9 Index
E F
APPENDICES
Index register ••••••••••••••••••••••••• 1-17, 3-73, 3-74 Macro argument device •••••••••••••••••••••••••• 3-117
Indirect specification •••••••••••••••••••••••3-75, 3-177 Macro Management •••••••••••••••••••••••••••••••3-109
Infinitely ••••••••••••••••••••••••••••••••••••••••••••••3-91 Macro system device ••••••••••••••••••••••••••••• 3-119
Initialize module ••••••••••••••••••••••••••••• 3-96, A-23 Macro type •••••••••••••••••••••••••••••••••••••••••• 3-112
Input mnemonics •••••••••••••••••••••••••••••••••• 3-153 Main routine ••••••••••••••••••••••••••••••••••••••••• 3-27
Input relay ••••••••••••••••••••••••••••••••••••••••••••1-17 Maintenance ••••••••••••••••••••••••••••••••••••••••• 1-58
Input relay ••••••••••••••••••••••••••••••••••••••••••••3-57 Max. count speed of counter ••••••••••••••••••••• 3-65
Installation direction ••••••••••••••••••••••••••••••••1-14 Max. count speed ••••••••••••••••••••••••••••••••••• 3-65
Installation position •••••••••••••••••••••••••••••••••1-14 Max. number of connected units ••••••••••••••••••1-4
Installing environment ••••••••••••••••••••••••••••••1-38 Maximal I/O point ••••••••••••••••••••••••••••••••••• 1-17
Index
Instruction ••••••••••••••••••••••••••••••••••••••••••• A-24 MCALL Instruction ••••••••••••••••••••••••••••••••3-122
INT Instruction ••••••••••••••••••••••••••••••••••••••3-50 MCMP Instruction •••••••••••••••••••••••••••••••••2-140
Internal auxiliary relay •••••••••••••••••••••• 1-17, 3-59 MDSTOP Instruction •••••••••••••••••••••••••••••3-106
Internal register •••••••••••••••••••••••••••••• 3-56, 3-84 MDSTRT Instruction ••••••••••••••••••••••••••••••3-106
Internal work consumption ••••••••••••••••••••••••3-12 Memory card instructions ••••••••••••••••••••••••• 2-51
Interrupt function •••••••••••••••••••••••••••••••••• 3-187 Memory card operation •••••••••••••••••••••••••••• 2-28
Interrupt programs ••••••••••••••••••••••••••••••••••3-28 MEND Instruction •••••••••••••••••••••••••••••••••3-122
Interrupt •••••••••••••••••••••••••••••••••••••••••••••••3-31 Mnemonics list ••••••••••••••••••••••••••••••• 3-8, 3-190
External input interrupt setting •••••••••••••••••3-34 Mnemonics •••••••••••••••••••••••••••••••••••••••••••••3-8
External input interrupt ••••••••••••••••••••••••••3-34 modular system device •••••••••••••••••••••••••••3-105
High-speed counter comparer based interrupt •••3-35 Module configuration example ••••••••••••••••••3-103
Unusable command in interrupt program ••••3-37 Module execution sequence •••••••••••••••••••••3-102
Input capture ••••••••••••••••••••••••••••••••••••••3-35 Module type •••••••••••••••••••••••••••••••••••••••••• 3-96
Item attribute •••••••••••••••••••••••••••••••••••••••••3-13 Monitor CPU built-in function •••••••••••••••••••3-186
Item label •••••••••••••••••••••••••••••••••••••••••••••3-13 Monitor expansion unit •••••••••••••••••••••••••••3-187
Mounting onto the DIN Rail •••••••••••••••••••••••••1-6
MR ••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-61
J MSTRT Instruction ••••••••••••••••••••••••••••••••3-122
Removing the Memory Card ••••••••••••••••••••••2-45 Unit device list ••••••••••••••••••••••••••••••••••••••• 3-68
Removing the terminal block ••••••••••••••••••••••1-13 Unit editor "Slave Settings Screen (slave station set
Replace battery ••••••••••••••••••••••••••••••••••••••1-58 up frame) " effective shortcut key ••••••••••••• A-26
Steps for replacing battery •••••••••••••••••••••1-59 Unit Monitor ••••••••••••••••••••••••••••••••••••••••••••2-6
When battery power is lower •••••••••••••••••••1-58 Functions of Setting/Operation Keys •••••••••••2-6
During battery off •••••••••••••••••••••••••••••••••1-58 Method of Operation (example: on I/O Unit) •••••••2-7
Reserved area ••••••••••••••••••••••••••••••••••••• 3-133 Unusable character string list •••••••••••••••••••• A-36
RETI Instruction ••••••••••••••••••••••••••••••••••••3-50 Unusable character string list •••••••••••••••••••• A-36
RFSCTH Instruction ••••••••••••••••••••••••••••• 2-118 Unusable instruction list ••••••••••••••••••••••••••• A-23
RFSPSX Instruction ••••••••••••••••••••••••••••• 2-198 Use PC ••••••••••••••••••••••••••••••••••••••••••••••• 2-44
RFSPSY Instruction ••••••••••••••••••••••••••••• 2-198 Use situation ••••••••••••••••••••••••••••••••••••••••3-129
Row interrupt ••••••••••••••••••••••••••••••••••••••• 3-189 User Messages ••••••••••••••••••••••••••••••••••••• 2-38
RUN-PROG Switch •••••••••••••••••••••••••••••••••1-28 How to Display User Messages ••••••••••••••• 2-38
Display example ••••••••••••••••••••••••••••••••• 2-38
User Messages 1 •••••••••••••••••••••••••••••••• 2-38
S User Messages 2 •••••••••••••••••••••••••••••••• 2-39
Address setup window operation ••••••••••••• A-27
Window •••••••••••••••••••••••••••••••••••••••••••• A-27
Search method of line notes •••••••••••••••••••• 3-167 Local configuration area operation ••••••••••• A-27
Self-hold macro •••••••••••••••••••••••••••••••••••• 3-113 Display ••••••••••••••••••••••••••••••••••••••••••••• A-27
Sequence control •••••••••••••••••••••••••••••••••••• 3-4 File •••••••••••••••••••••••••••••••••••••••••••••••••• A-26
Service ••••••••••••••••••••••••••••••••••••••••••••••••1-58 Help •••••••••••••••••••••••••••••••••••••••••••••••• A-27
Set display modes •••••••••••••••••••••••••••••••• 3-185 Convert •••••••••••••••••••••••••••••••••••••••••••• A-27
Setting Inhibited Operation ••••••••••••••••••••••••2-39 Edit ••••••••••••••••••••••••••••••••••••••••••••••••• A-26
Setting Inhibited Operation ••••••••••••••••••••••••2-39 Unit setup window operation •••••••••••••••••• A-27
Shift JIS code ••••••••••••••••••••••••••••••••••••••••3-92 Unit Selection window operation •••••••••••••• A-27
Shorted input list of mnemonic symbolt •••••••• A-24
Shorted input •••••••••••••••••••••••••••••••••••••••• A-24
Sign •••••••••••••••••••••••••••••••••••••••••••••••••••3-87 V
Simple indirect specify •••••••••••••••••••••••••••••3-78
simulator mode
Effective shortcut key ••••••••••••••••••••••••••• A-30 Value exceeding maximum value, minimum value
Debug ••••••••••••••••••••••••••••••••••••••••••••• A-30 changes ••••••••••••••••••••••••••••••••••••••••••• 3-91
Display •••••••••••••••••••••••••••••••••••••••••••• A-30 Value expression ••••••••••••••••••••••••••••••••••• 3-87
Help •••••••••••••••••••••••••••••••••••••••••••••••• A-30
Edit ••••••••••••••••••••••••••••••••••••••••••••••••• A-30
Monitor/simulator •••••••••••••••••••••••••••••••• A-30 W
Special-purpose crimping tool ••••••••••••••••••••• 1-9
Split •••••••••••••••••••••••••••••••••••••••••••••••••• 3-160
SRAM Clear ••••••••••••••••••••••••••••••••••••••••••2-36 W •••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-70
Wiring to terminal block unit ••••••••••••••••••••••••1-8
Standby module •••••••••••••••••••••••••••••••••••••3-97
Word Devices ••••••••••••••••••••••••••••••••••••••• 3-67
Subroutine macro ••••••••••••••••••••••••••••••••• 3-112
Subroutine ••••••••••••••••••••••••••• 3-27, 3-126, A-23
Suffix •••••••••••••••••••••••••••••••••••••••••••••••••••3-93
System Configuration ••••••••••••••••••••••••••••••• 1-2
Z
Z ••••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-73
T ZF •••••••••••••••••••••••••••••••••••••••••••••••••••••• 3-68
MEMO
APPENDICES
Index