S
MART
AXIS P
RO
/ L
ITE
U
SER
'
S
M
ANUAL
FT9Y-B1378
13-15
13: S
CRIPTS
Other
This section describes definitions for constant, device, temporary device, and comment.
■
Constant
Constant can be defined as decimal or hexadecimal number.
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 inside the script. It can store a value and can be used as a variable.
It is defined with a device symbol "
@
" followed by address (1 – 32).
Definition of the temporary device
Sample definition
Note:
All the values for temporary devices are set to "
0
" when the execution of the script is started.
■
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 written after "
//
".
Definition of comment
Sample definition
Notes:
Describing comments to explain the contents of the script is useful especially when another person works on the scripts or when some time
has passed after editing the scripts.
Comments are ignored (not executed) when the script is executed, so they can be defined freely without interfering the execution time.
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 (float).
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 and address]
(Space between the device symbol and address is not required.)
[D0100]
@address
(Space between the device symbol "
@
" and address is not required.)
@2
Temporary device number 2
// Arbitrary note
// Store the initial value to calculation data [D0100] for process A
[D0100] = 1234;
:
:
←
This line is not executed.
Summary of Contents for SmartAXIS FT9Z-1A01
Page 1: ...FT9Y B1378 7...
Page 10: ...TABLE OF CONTENTS Preface 9 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378...
Page 212: ...7 DEVICE ADDRESSES 7 16 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378...
Page 230: ...8 INSTRUCTIONS FUNCTION BLOCKS REFERENCE 8 18 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378...
Page 344: ...13 SCRIPTS 13 36 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378...
Page 386: ...APPENDIX Appendix 16 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378 Japanese Font JIS X0201...
Page 393: ......