Hide thumbs Also See for FT1A Series:
Table of Contents

Advertisement

13: S
CRIPTS
Introduction
A script is a function for programming complicated processing with conditional branch, logical operations, arithmetic operations,
and functions as text.
The programmed scripts can be executed in a ladder program or an FBD program. When the programming language is ladder,
scripts are executed with the SCRPT instruction. For details, see "SmartAXIS Ladder Programming Manual" - Chapter 27 "Script".
When the programming language is FBD, scripts are executed with the SCRPT FB. For details, see "SmartAXIS FBD Programming
Manual" - Chapter 17 "The script FB".
For example, the logical AND operation is written as follows.
Ladder diagram
M0100
M0101
■Script Programming and Management
Scripts are programmed using the Script Editor dialog box in WindLDR and managed with the Script Manager dialog box.
Notes:
In Script Editor, you can program scripts by selecting conditional expressions, operators, and functions from a list, and you can also check
them for errors. The scripts can also be exported as text files, so they can be edited using a text editor such as Notepad. If you save an
edited script as a text file, it can be imported into Script Editor.
For details, see "Script Editor" on page 13-6.
In Script Manager, you can manage the scripts as a group by adding scripts created in Script Editor or deleting them. For details, see "Script
Manager" on page 13-5.
Script Data Type
The data type for the range of data that will be handled in the script must be configured by taking into consideration the details of
the processing in the script including the maximum and minimum values of data that will be handled and whether negative
numbers and real numbers are required.
Note: The data type is configured in Script Editor. For how to configure it, see "Script Editor" on page 13-6.
Data Types
The following five data types can be processed in a script. For details about data types in ladder, see Chapter 4 "Instructions
Reference" - "Data Types for Advanced Instructions" in the "SmartAXIS Ladder Programming Manual". For details about data types
in FBD, see Chapter 4 "FB Reference" - "Data types" in the "SmartAXIS FBD Programming Manual".
Data type
Abbreviation
W
I
D
L
F
Note: Some functions cannot be used if the data type is different. Check the function in the notation list.
See "Programming Scripts" on page 13-10.
Script
[M0100] && [M0101]
data registers
Name
Word
Integer
Double word
Long
Float
S
AXIS P
MART
← The script is programmed as text.
Used
Processable unit
1
Unsigned 16 bits
1
Signed 15 bits
2
Unsigned 32 bits
2
Signed 31 bits
2
Signed 32 bits
/L
U
'
M
FT9Y-B1378
RO
ITE
SER
S
ANUAL
Data range
0 to 65,535
-32,768 to 32,767
0 to 4,294,967,295
-2,147,483,648 to 2,147,483,647
-3.402823E+38 to -1.175495E-38
0
1.175495E-38 to 3.402823E+38
13-1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents