Chapter 20 script, 1 about the script function, 1 overview of the script function – IDEC High Performance Series User Manual
Page 965: What is the script function, About the script function -1, Overview of the script function -1, Chapter 20, Script, 1about the script function
![background image](/manuals/350385/965/background.png)
WindO/I-NV2 User’s Manual
20-1
20
Script
This chapter explains the script function, editing and management of the script, definition method, and definition
sample.
1.1 Overview of the Script Function
●
What is the script function?
Complex processes such as conditional branching, logical operation, arithmetic operation, functions, etc., can be
programmed in a text format using Script Function.
As an example, the logical product (AND) calculation described as
in a ladder diagram is described as
[LM 100] & [LM 101]
in text format in the script.
■
Description and management of the script
The script is programmed by WindO/I-NV2 script editor, and managed by Script Manager.
■
Example of using the script
As an example, when reading the data from the external device and displaying on the MICRO/I, the load on the
external device can be reduced for processes such as conditional branching or function calculation, which apply a
heavy load on the external device, by processing it with a script on the MICRO/I.
Chapter 20
Script
1
About the Script Function
HG3G
HG2G-5F
HG2G-5S
HG2G-S
HG4G HG1F HG2F HG2S HG3F HG4F
LM100
LM101
• By using the Script Editor, conditional expressions, operators, and functions can be described by selecting
them from a list, and an error in the script can also be determined. The script can also be exported as a
text file, so the script can be edited by a text editor such as Notepad, and the edited script can be
imported back into the Script Editor by saving it as a text file.
For details, refer to “2.3 Script Editor” on page 20-8.
• Script Manager can manage the script collectively by adding, deleting, organizing, etc., the script created
by the Script Editor.
For details, refer to “2.2 Script Manager” on page 20-7.
// Change the additional value
// depending on the value of D10
if ([D 10] <= 9)
{
[D 10] = [D 10] + 10; }
else
{
[D 10] = [D 10] + 20; }
// Change the additional value
// depending on the value of D11
if ([D 11] <= 19)
{
[D 11] = [D 11] + 20; }
else
{
[D 11] = [D 11] + 40; }
// Change the additional value
// depending on the value of D12
if ([D 12] <= 29)
{
[D 12] = [D 12] + 30; }
else
{
[D 12] = [D 12] + 60; }
// Change the additional value
// depending on the value of D13
if ([D 13] <= 39)
{
[D 13] = [D 13] + 40; }
else
{
[D 13] = [D 13] + 80; }
MICRO/I
External device
Get the result by processing with script
D10 0
→
10
D11 10 → 30
D12 30 → 90
D13 50 →
130
D10 0
D11 10
D12 30
D13 50
Read the data not processed
Write the result
Process with script to decrease
the load of external device.
D10 10
D11 30
D12 90
D13 130