You are on page 1of 4

NEW Complete Range of Features: Volume 1

KV-5000/3000 Series

For All Your Mathematical Operation Needs

KV-5000/3000 Series
Application examples
Unit conversion and data analysis for analog measurement data
Calculating production line availability factors (%)
and failure rates (ppm)
Calculating angles for alignment control

Conventional PLCs

Increases in scan time make executing complex mathematical


operations on a PLC unreliable. 1

When not processing mathematical operations Scan time Mathematical operation


processing time

When processing mathematical operations Scan time

The functions of mathematical operations are difficult to understand


when written in ladder programs. 2 3 4

Failure rate (ppm) = Failure count ×1000000 ÷ Production count Mathematical expressions are difficult to
D1004 = D1002 ÷ 1000000 / D1000 understand without comment
(statement) lines.
MO
FLT D1002 D2000
Execute Failure count For temporary
mathematical cache 1
operation to
calculate E∗ D2000 E1000000 D2002 The failure count and the production
failure rate in For temporary For temporary count need to be temporarily stored in a
parts per cache 1 cache 2 separate device while processing the
million (ppm).
mathematical operation.
DFLT D1000 D2004
Production For temporary
count cache 3

E/ D2002 D2004 D1004


For temporary For temporary Failure rate
cache 2 cache 3 (ppm)

Some PLCs use difficult general-purpose script languages, which


make them difficult to use. 2 4 5
Can’t be used with ladder programs.

Require label (variable) definitions.

Mathematical operation errors result if there are different types of variables.




The KV-5000/3000 Series eliminates these problems...


KV-5000/3000 Series
Process mathematical operations at ultra high-speeds with
1 a dedicated ladder program execution engine.

KV-5000/3000 Series models come with an upgraded version of


KEYENCE’s renowned KV-Veloce, a dedicated ladder program
execution engine. KV-Veloce can execute a 60,000-step ladder
program in 1 ms—the fastest execution cycle time available.

Full 32-bit Almost no loss of speed even with extensive use of 32-bit
processing : mathematical operation commands such as 2-word or real-number
floating decimal point operations.

Built-in FPU : A built-in FPU (floating-point unit: a dedicated unit for floating-point
real-number operations) gives KV-5000/3000 Series models vastly
superior real-number mathematical operation ability.

The KV-5000/3000 Series can process complex mathematical


operations at high speeds that were not possible with
conventional PLCs, eliminating the need for a dedicated
mathematical operation processor PC or board.

2 Use KV Script to enter mathematical expressions directly.

MO
D0 = (D10000 + 5 ) / 10 ∗ 10
Execute
rounding.

An execution condition can be Enter mathematical expressions directly in the comment


entered in the ladder program. (statement) lines in the script.

3 Use scripts and ladder programs together.

X00 X01 Y50

Sensor 1 Sensor 2 Lamp


X02 Box script
Enter the execution condition
Sensor 3 in the ladder program.
X00
D2.F = TOF(D0) / (D0 + D1) ∗ 100
Sensor 1

Area script
IF D15 〈 2000 THEN Has no execution condition,
D20.T = “Normal”
ELSE
so it is always executed.
D20.T = “Error”
END IF

Write small processes in ladder programs. Makes the functions of processes


easier to understand intuitively.
Write word processes in scripts. Reduces the number of lines.
❙ Makes mathematical expressions and text strings easier to understand intuitively.
❙ Eliminates the need to know the priority sequence of mathematical operations.
❙ Eliminates the need to store intermediate steps in mathematical operation processes.
KV-5000/3000 Series Complete Range of Features: Volume 1

4 KV Script makes mathematical operations easy to implement.

1 Enter the execution condition in the ladder program editor, then


click the cell to create a box script. Area script
1 2 3 4 5 6 7 8 9 10 The shortcut key for creating an area
X00 script is Ctrl + R .
00001
Execution Select a cell. Box script is created in this area.
condition 1

Ctrl B

2 Write the program. The box script is inserted. Entering comments


1 2 3 4 5 6 7 8 9 10 Script text starting with a single
quotation mark (‘) is processed as a
X00 1
2 comment. When a line starts with a
00001 3
Execution 4 single quotation mark, the entire line
condition 1 5 is processed as a comment. Entering a
single quotation mark at the end of a
mathematical expression lets the user
Ctrl T enter a footnote for it.

Convert script being edited. Example


‘This entire line is processed as a
comment.
No special knowledge is needed to implement KV Script — use
D0 = D1 + D2 ‘Sum of D1 and D2
it as an extension of standard ladder programming.

5 KV Script has a highly intuitive user interface.

❚ Input guidance ❚ Watch window ( Alt + 3 )

Ctrl (SPACE)

Monitors all of the devices


in the ladder block at the
Select a function from the “Script current cursor position.
Function List”.

BMOV ([execution condition,] transfer source,


transfer destination, number of data)

“Script Function Hints” provides brief


syntax descriptions. Watch window

F1 Creating and debugging mathematical operation processes in a


ladder program is time-consuming. Using KV Script with the
The help window for ‘BMOV’ opens
directly from here. KV-5000/3000 Series makes programming easy.
6 Program variables without having to know device numbers.
KV Script supports local variables (labels) that don’t interfere with other modules.
Variables can be defined with meaningful labels, without having to know PLC-specific device numbers.
❚ Local variable usage example
‘Calculate the angle from three items of displacement data
IF Measurement timing THEN
Angle A = DEG( ATAN( Distance AB between displacement A and displacement B / ( Displacement A = Displacement B ) ) )
Angle B = DEG( ATAN( Distance BC between displacement B and displacement C / ( Displacement B = Displacement C ) ) )
Angle C = DEG( ATAN( Distance CA between displacement C and displacement A / ( Displacement C = Displacement A ) ) )
END IF
‘Evaluate whether the angles are all horizontal
IF ( Angle A = 0 ) AND ( Angle B = 0 ) AND ( Angle C = 0 ) THEN
Horizontal evaluation result = ON
ELSE
Horizontal evaluation result = OFF
END IF

❚ Procedure for using local variables


Write/edit script Register the entered labels
Convert the script. End
using labels. as local labels.

❚ Registration of all local variables


All the variables entered in the
script are registered
automatically. Data formats are
changed as needed.

❚ Array variables supported


‘Continuous operation Array variables are supported
IF LDP(Positioning finished) AND Next point < 10 THEN and are useful when processing
Command coordinate X = Coordinate [Next point , 0] large volumes of data sets all at
Command coordinate Y = Coordinate [Next point , 1] once, such as XY table
MDSTRT( "Startup" ) coordinate data. Arrays can be
Next point = Next point + 1 defined with up to
8 dimensions.
END IF

www.keyence.com

Copyright (c) 2009 KEYENCE CORPORATION. All rights reserved. KV-WW-GB1-E 0079-1 600601

You might also like