
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
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.
Ladder diagram
⇔
Script
M0100
M0101
[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
Содержание MICROSmart FC6A Series
Страница 1: ...B 1726 7 FC6A SERIES Ladder Programming Manual ...
Страница 8: ...Preface 7 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 32: ...1 OPERATION BASICS 1 20 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 96: ...3 INSTRUCTIONS REFERENCE 3 18 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 130: ...4 BASIC INSTRUCTIONS 4 34 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 158: ...6 DATA COMPARISON INSTRUCTIONS 6 10 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 192: ...9 SHIFT ROTATE INSTRUCTIONS 9 12 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 216: ...10 DATA CONVERSION INSTRUCTIONS 10 24 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 248: ...11 WEEK PROGRAMMER INSTRUCTIONS 11 32 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 272: ...12 DISPLAY INSTRUCTIONS 12 24 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 284: ...14 REFRESH INSTRUCTIONS 14 6 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 288: ...15 INTERRUPT CONTROL INSTRUCTIONS 15 4 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 294: ...16 COORDINATE CONVERSION INSTRUCTIONS 16 6 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 374: ...18 PULSE OUTPUT INSTRUCTIONS 18 78 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 Setting ...
Страница 450: ...20 DUAL TEACHING TIMER INSTRUCTIONS 20 4 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 502: ...25 DATA LOG INSTRUCTIONS 25 22 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 546: ...26 SCRIPT 26 44 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 574: ...27 FLOW CALCULATION INSTRUCTIONS 27 28 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 583: ...FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 28 9 28 USER DEFINED MACRO INSTRUCTION ...
Страница 584: ...28 USER DEFINED MACRO INSTRUCTION 28 10 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 598: ...APPENDIX A 14 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...