WindO/I-NV4 User’s Manual
20-1
20
Sc
rip
t
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-NV4 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
HG5G-V HG4G-V
HG3G-V
HG2G-V
HG2G-5T
HG4G
HG1G HG1P
HG2J-7U
LM100
LM101
• By using the Script Editor, conditional expressions, operators, and functions can be inserted by selecting
them from a list, and an error in the script can be checked as well. 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-12.
• Script Manager can manage the script collectively by adding, deleting, organizing, importing, exporting,
etc., the script created by the Script Editor. For details, refer to “2.2 Script Manager” on page 20-7.
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
// 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;
}
Summary of Contents for WindO/I-NV4
Page 1: ...B 1701 16 User s Manual...
Page 108: ...5 WindO I NV4 Common Operations and Settings 2 76 WindO I NV4 User s Manual...
Page 256: ...7 BACnet Communication 3 148 WindO I NV4 User s Manual...
Page 372: ...6 Screen Restrictions 5 32 WindO I NV4 User s Manual...
Page 390: ...5 Part Library Function 6 18 WindO I NV4 User s Manual...
Page 420: ...3 Text 7 30 WindO I NV4 User s Manual...
Page 628: ...2 Multi State Lamp 9 34 WindO I NV4 User s Manual...
Page 924: ...4 Meter 11 76 WindO I NV4 User s Manual...
Page 990: ...7 Timer 12 66 WindO I NV4 User s Manual...
Page 1030: ...4 Using Data and Detected Alarms 13 40 WindO I NV4 User s Manual...
Page 1098: ...4 Using the Data 15 22 WindO I NV4 User s Manual...
Page 1248: ...5 Restrictions 22 18 WindO I NV4 User s Manual...
Page 1370: ...2 Monitoring on the MICRO I 25 28 WindO I NV4 User s Manual...
Page 1388: ...4 Restrictions 26 18 WindO I NV4 User s Manual...
Page 1546: ...5 Module Configuration Dialog Box 30 36 WindO I NV4 User s Manual...
Page 1614: ...3 Settings 34 14 WindO I NV4 User s Manual...
Page 1726: ...5 Text Alignment A 10 WindO I NV4 User s Manual...