FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726 26-3
26: S
CRIPT
Script Function Overview
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.
For example, the logical AND operation is written as follows.
■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 26-8.
• 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 26-7.
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.
Notes:
• The data type is configured in Script Editor. For how to configure it, see "Script Editor" on page 26-8.
• Scripts can also be written that designate the data type for processing enclosed in curly brackets "{ }".
• Scripts can also be written that designate data types in executable line units. See "Programming Scripts" on page 26-12.
Data Types
The following five data types can be processed in a script. For details about data types in ladder, see "Data Types for Advanced
Instructions" on page 3-7.
Note: Some functions cannot be used if the data type is different. Check the function in the notation list.
See "Programming Scripts" on page 26-12.
← The script is programmed as text.
[M0100]
&&
[M0101]
Data Type Symbol Bits
Quantity of Data
Registers Used
Range of Decimal Values
Word (Unsigned 16 bits) W 16 bits 1 0 to 65,535
Integer (Signed 16 bits) I 16 bits 1 –32,768 to 32,767
Double Word (Unsigned 32 bits) D 32 bits 2 0 to 4,294,967,295
Long (Signed 32 bits) L 32 bits 2 –2,147,483,648 to 2,147,483,647
Float (Floating point) F 32 bits 2 –3.402823×10
38
to 3.402823×10
38