SmartAXIS Touch User’s Manual
20-21
4 Script Definition Method
20
Scr
ipt
●
Other
This section provides definitions for constant, device, temporary device, and comment.
■
Constant
Constant can be defined as decimal or hexadecimal numbers.
Sample definition of decimal numbers
There are 2 ways to define hexadecimal numbers.
Sample definition of hexadecimal numbers
■
Device Address
Device Address is defined with the device symbol and address within “[” and “]”.
Definition of the device
Sample definition
■
Temporary Device
Temporary device is a device that can be used only with the script. It can store a value and can be used as a variable.
It is defined with a device symbol “@” followed by address (HMI function: 1 to 16, Control function: 1 to 32).
Definition of the temporary device
Sample definition
■
Comment
A note defined in the script is called a comment. The line with “//” defined at the beginning of a line will become a comment.
“//” is defined with a single-byte. Double-byte characters can be used after “//”.
Definition of comment
Sample definition
1234
Define the numeric value directly.
-1234
Define the negative number with a “-” (minus) symbol at the beginning.
12.34
Decimal number can be defined for real numbers (float32).
Define a “.” (period) between the whole numbers and decimal numbers.
0x12AB
Define “0” (zero) and “x” (lower case x) at the beginning of the value.
12ABh
Append “h” at the tail of the value.
[Device symbol address]
(“ ” represents a space.)
[LDR 100]
@Address
(Space between the device symbol “@” and address is not required.)
@2
Temporary device number 2
All the values for temporary devices are set to “0” when the execution of the script is started.
// Arbitrary note
// Store the initial value to calculation
data [LDR 100] for process A
[LDR 100] = 1234;
:
:
←
This line is not executed.
• It will be useful to use comments to explain the contents of the script (especially when the editor of the
script has changed or some time has passed since editing).
• Comments are ignored (not executed) when the script is executed, so they can be defined freely without
worrying about the execution time.
Содержание SmartAXIS Touch FT1A Series
Страница 1: ...FT1A Series FT9Y B1390 4 SmartAXIS Touch User s Manual ...
Страница 22: ...Contents Preface 21 SmartAXIS Touch User s Manual ...
Страница 240: ...6 Using Library Screens 4 36 SmartAXIS Touch User s Manual ...
Страница 416: ...2 Multi State Lamps 8 26 SmartAXIS Touch User s Manual ...
Страница 558: ...9 Calendar 9 142 SmartAXIS Touch User s Manual ...
Страница 668: ...6 Timer 11 52 SmartAXIS Touch User s Manual ...
Страница 754: ...4 Using Data and Detected Alarms 13 34 SmartAXIS Touch User s Manual ...
Страница 792: ...4 Using the Data 14 38 SmartAXIS Touch User s Manual ...
Страница 810: ...4 Using the Data 15 18 SmartAXIS Touch User s Manual ...
Страница 870: ...3 Text Manager 19 16 SmartAXIS Touch User s Manual ...
Страница 924: ...6 Important Notes 20 54 SmartAXIS Touch User s Manual ...
Страница 1036: ...5 User Communication 22 74 SmartAXIS Touch User s Manual ...
Страница 1092: ...2 Monitoring on the Touch 24 26 SmartAXIS Touch User s Manual ...
Страница 1142: ...2 Word Devices 27 18 SmartAXIS Touch User s Manual ...
Страница 1186: ...2 Analog Cartridge 29 34 SmartAXIS Touch User s Manual ...
Страница 1194: ...3 Handling Problems 30 8 SmartAXIS Touch User s Manual ...