This tutorial is for people who are using a programmable logic controller
for the first time. It extracts frequently used commands from the User's
Manual and describes them accordingly.
In addition, it is possible to input commands to the KV-5000/3000
and do programming based on the explanations in this book.
However, if you want to try it without connecting to the
KV-5000/3000, please replace the R000 to R005 with MR000 to
MR005, etc. and perform the contacts' ON/OFF operation using
the ladder diagram software. (When operation is based on a
simulator, it can also be performed without changing the R000 to
R005.)
Please read this tutorial in combination with the actual KV-5000/3000.
KEYENCE Corporation
Control System Division
Content
Chapter 1 What is KV-5000/3000?
What is the KV-5000/3000? ...........................P2
Control in FA ................................................P3
What is Sequential Program Control? ............P4
Functions of the KV-5000/3000......................P5
Chapter 2 Programming of the KV-5000/3000
What is a Ladder Program? ...........................P6
Programs of the KV-5000/3000......................P7
Structure of Devices of the KV-5000/3000 ......P8
Startup of the KV STUDIO ...........................P9
New Programming Method with Ladder Diagram
and Initial Setting of the Units .......................P10
Simulator Function ......................................P37
- 1 -
Chapter 1 What is the KV-5000/3000?
[What is KV-5000/3000?]
KV-5000/3000 is a programmable logic controller with a built-in CPU and memory.
It is a device that can conveniently and freely control external output devices (such as
indicator lights or cylinder shape coils) through the operation of various external input
devices (push buttons, limit switches, etc.) equipped on the control panel and
equipment.
From a PC with the dedicated ladder support software (KV STUDIO) installed,
programs can be written into the internal memory of the KV-5000/3000.
Various external input devices
Push button
Switchover switch
Memory
Output circuit
Limit switch
Relay contact
Photoelectric
sensor
Proximity sensor
Various sensors
Other
Control section
Micro
Computer
KV-5000/3000
★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
To use the KV-5000/3000, computer knowledge is not
necessary. Simply imagine the KV-5000/3000 as a box
which contains a large number of relays, timers, and
counters.
☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
Indicator light
Digital indicator
Cylinder shape
coil
Solenoid valve
Electromagnetic
clutch
Contactor
Motor
Other
Various external output devices
- 2 -
[Control in FA]
Control in FA is briefly described below.
What is "FA"? = Factory Automation
To make manufacturing systems automatic, labor saving, and
unattended.
What is "Control"? = The operation that is performed to make the
machinery/devices keep their target status.
Why should we strive for automation?
The following are some advantages of automation:
・ Reduction in production costs
・ Increase in production output
・ Extended running time
・ Decrease in the rate of defects.
★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
"Control" mentioned in FA industry refers to:
"Sequential Program Control"
Sequence Control
(Continuous) (To realize desired operationtate)
Control is performed according to a sequence determined in
advance.
☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
- 3 -
[What is Sequential Program Control?]
The flow of sequential program control will be explained by using a real-life example of
a piece of equipment.
Example
■ When playing a claw machine ■ When using a fully automatic
game in an arcade. washing machine.
① Determine the object ① Inject water
② Align the horizontal position ② Wash
③ Align the back and forth position ③ Drain water
Grab the presents ④④ Inject water
⑤ Wash
⑥ Drain water
⑦ Dry
★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
The PLC will verify the condition changes under the above-mentioned
sequential program control, and is responsible for performing control
tasks until the next process. It is referred to as a “programmable
controller".
☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
[What is a PLC?]
"PLC" is short for "Programmable Logic Controller".
It means "a logic controller device that can be programmed". To put it simply, it is a
computer that is used in a factory.
- 4 -
L
-net
g
[Functions of the KV-5000/3000]
The KV-5000/3000 Series are PLCs with high performance and high expansibility.
In this tutorial, we will only discuss the basic aspects of the controller. However, it can
also be used in the following controls, in order to deepen the understanding of the
KV-5000/3000 PLCs.
■ An example of the functions/expansibility of the KV-5000/3000 Series
CPU functions
●Ethernet function
Communication with PC/external
equipment communication used for
production management or operation
management etc., possible to realize
the communication between the field
PLC and PC.
Also possible to realize a high speed
connection to multiple touch panels and
image sensors.
●FL-net function
It is possible to realize a high speed/high
volume data connection to PLCs of various
manufacturers using the CPU unit.
● Logging/tracking function
Through the built-in memory card slot in
the main unit, it is possible to write data
onto a memory card.
Ethernet
F
Other PLCsOther PLCs
Functions that can be realized
throu
● Analog control
Through super high conversion speed of
25 μ s/ch and analog control with a
resolution of 1/20000, the measurement
data of the displacement sensor can be
loaded into the PLC in real time.
Flowmeter
● Positioning control
It is possible to control the motor used for
positioning. Possible to perform correct
positioning control of the XY table etc.
(CPU unit also has a built-in positioning
function.)
h special units
Displacement
sensor
Pressure
sensor
- 5 -
Chapter 2 Programming of the KV-5000/3000
To make the PLC perform controller operation, a program is required.
This program is called a “ladder program”.
In Chapter 2, we will describe the steps for actual programming.
[What is a Ladder Program?]
A ladder program is a program in which the wiring diagram has been simplified.
What steps need to be taken to complete a ladder program?
Please look at the following diagram.
Wiring diagram of units Sequential program diagram Ladder program
First, verify the wiring diagram of units. This is the wiring diagram for a battery
and a switch that we have tested in previous physical experiments.
Actually, this switch may be a sensor or a limit switch, and the light may be a solenoid
valve, a motor, etc. In such a case, the actual unit wiring is relatively hard to view.
We can then put the "+" and "-" end of the battery on the left and right side
respectively, and represent the switch (PB) and the light (PL) using symbols,
then a easy-to-view sequential program diagram is completed. A sequential
program diagram is composed of graphs and symbols developed in order to
simplify the wiring diagram when performing relay sequential program control.
However, it is necessary to further simplify it when performing control through a PLC.
The reason is that the actual inputs and outputs are not limited to PB (push buttons) or
PL (indicator lights), a variety of other equipment may also be included. No matter what
equipment is connected, they all can be represented only by the connected terminal
numbers.
The R000 or R500 shown in the diagram is the number for the PLC.
★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
The shape of the completed program is like a ladder, so it is called
"ladder program".
☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
PB1
+ -
PL1
R000
R500
END
ENDH
- 6 -
[Programs of the KV-5000/3000]
A program of KV-5000/3000 is written using many commands.
These commands are composed of an instruction (symbol) and a device number
(element number), and are divided into basic commands, application commands,
arithmetic commands, etc.
Generally, basic commands can be used to write a program, and application
commands can be used to simplify a program or to perform more complicated control.
A device number (element number) refers to the number of an input relay, an
output relay, a timer, a counter, or an internal auxiliary relay, etc. It can freely
use any number within the number range in the KV-5000/3000 PLC.
★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
For the range of device numbers that can be used, please refer to the
list of devices in section "1-3 Devices and Constants" in the
"KV-5000/3000/1000 Instruction Reference Manual".
☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
R000 R500
Device no.
Instruction
(symbol)
- 7 -
[Structure of Devices of the KV-5000/3000]
The main devices of the KV-5000/3000 are divided into the following types.
Please verify according to each device.
◆Bit device◆
【Input relay】 R
The device used to load ON/OFF information from external equipment.
【Output relay】 R
The device used to output ON/OFF information from external equipment.
【Internal auxiliary relay】 MR
The device that can only be used inside a CPU
※ When a relay circuit is used and the same relay contact is used many
times in the circuit, sometimes multiple relays with the corresponding
number of times of use have to be used. Since the internal auxiliary relay
functions only on the program level, it completely eliminates the
complexity of the relay circuit, making circuit design easier.
【Control relay】 CR
The device used to control functions of the PLC or get its states.
※ The control relay has been assigned with special functions in advance
according to the device number.
【Timer】 T
1ms/10ms/100ms down timer and 10ms up/down timer
※ It is possible to assign settings respectively according to different devices.
The number of counts that can be used is 4000.
【Counter】 C
Up counter/up and down counter
※ It is possible to assign settings respectively according to different devices.
In addition, there are also latching relay (LR), link relay (B), etc.
The number of counts that can be used is 4000.
◆Word device◆
【Data memory】 DM
The device used to store digital data in the PLC. Data will be processed in
16-bit unit.
※ For example, it is used when performing arithmetic operation in the PLC.
The data stored in the data memory will be kept even if the PLC is turned
off.
【Control memory】 CM
The device used to control functions of the PLC or get its states.
※ The control memory has been assigned with special functions in advance according to
In addition, there also expansion data memory (EM), file register (FM), link register (W)
and index register (Z), etc.
the device number.
★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Bit Only processes ON/OFF
Word Processes numerical value 1 word = 16 bit (to process
☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
16
2
=65535)
- 8 -
[Startup of the Ladder Support Software "KV STUDIO"]
A ladder program is written through the dedicated ladder support software.
The ladder support software installed on the KV-5000/3000 Series PLCs is "KV
STUDIO".
Here, we will actually start the KV STUDIO support software.
★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
For the installation procedure of the software, please refer to Chapter
1 of the "KV STUDIO User's Manual".
☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
After installation, let’s start the software!
① Double click the KV STUDIO icon on the desktop to start the KV STUDIO.
The title screen of KV STUDIO
② After the title screen appears, the edit screen will be displayed.
Let’s try to write an actual ladder diagram.
The edit screen after startup
- 9 -
[New Programming Method with Ladder Diagram and
Initial Setting of the Units]
Before writing a ladder program with KV STUDIO, set up the unit first.
Follow the instructions below.
① Click the "New project" icon.
② Enter the project name.
The project name is the name that
corresponds to the file name of the ladder
program.
Please enter suitable names for
equipment/objects.
③ A "Setup initial unit configuration?" message
will appear. Select "Yes(Y)".
・ If you select "Yes", the Unit Editor will be started, and you can perform initial setup for
the units in it.
・ If you select "No", the edit screen will be displayed. You can also start the Unit
Editor while editing the ladder program.
・ If you select "Read unit configuration", the unit configuration information will
be read from the KV-5000/3000. At this point, the PC (with KV STUDIO) should
be connected to the KV-5000/3000.
- 10 -
④ Start the Unit Editor.
Here, you can perform unit setup of the KV-5000/3000 Series PLC.
What is unit setup? To specify the units that need to be added to the
KV-5000/3000 and perform basic settings for the units
(the range and functions of the device number used).
The operation of unit addition is done by dragging/dropping
and connecting the CPU unit from the "Unit selection(1)" tag
on the right of the Unit Editor screen, and the added units
can be set up through the "Unit setting(2)" tag.
⑤ To perform assignment setting of relays/DMs,
click the icon below.
Here, you can perform unit setup of the
KV-5000/3000 Series PLC.
What is the assignment setting of relays/DMs? To setup the leading device
number of each unit.
For the CPU, it is fixed within R000-R015
(input)/R500-R507 (output); For the added units,
it can be set up freely in the range of R1000
(10ch)-R99900 (999ch) for both inputs and
outputs.
※ The initial value uses R30000 (300ch)-。
⑤ The initial setup is now complete. Click "Close" icon to exit
the Unit Editor.
- 11 -
[Writing a Ladder Program ①(LD OUT)]
After the initial setting of the units is completed, an actual ladder program will be
written as follows.
■ Example 1:a program for LD+OUT
We will write a basic program first.
・ When R000 is ON, the light R500 will be ON (light up).
For the convenience of operation, program input can be done without many input
methods. The method used in this example is the "direct input method" in which
instructions are input directly using the keyboard.
In this case, move the green cursor on the KV STUDIO screen to the position where an
instruction is to be input (a cell), and input directly using the keyboard.
By pushing - , enter a connection
line.
Draw the connection line up to the
right end with the Alt + Enter key.
END and ENDH commands represent the end of the ladder program.
They have to be entered at the very end of the ladder program.
※ When writing a new module, the END/ENDH commands will be added
automatically at the end of the program.
★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
"A_0" is the short form for "LD_0". "LD" stands for "LOAD", and has the
same meaning as a-contact (normally open contact).
In addition, the OUT (output) command can also be abbreviated into "O_500".
Since they are commonly used commands, please memorize them through
unique input forms.
For the short input forms for other commands, please refer to the
"KV-5000/3000/1000 Command Reference Manual".
Attention
!
_ refers to a space. It is actually blank.
☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
Input A (blank) 0 Enter .
(Processed as "LD_0'" in the program, so the result is the same as that of
entering LD (blank) 0 Enter. )
(Processed as "OUT_500" in the program.
"O" is the short input form of "OUT".
- 12 -
Loading...
+ 29 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.