EasyManua.ls Logo

IDEC SmartAXIS Touch FT1A Series

IDEC SmartAXIS Touch FT1A Series
1232 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SmartAXIS Touch User’s Manual 20-1
20
Script
This chapter describes 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.
The scripts can be executed in a Script Command, a Global Script, a ladder program, or a FBD program.
For ladder program and FBD program details, refer to the following.
Ladder program: SCRPT instruction
F "SmartAXIS Ladder Programming Manual" - Chapter 27 "Scripts"
FBD program: Script FB
F "SmartAXIS FBD Programming Manual" - Chapter 17 "The script FB"
As an example, the logical product (AND) calculation described as in a ladder diagram is described as
[L M
100]
&
[L M
101]
in text format in the script.
Description and management of the script
The script is programmed by WindO/I-NV3 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 Touch, 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 Touch.
Chapter 20 Script
1 About the Script Function
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; }
Tou ch
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

Table of Contents

Related product manuals