IDEC FT1A Series User Manual page 319

Hide thumbs Also See for FT1A Series:
Table of Contents

Advertisement

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
1234
-1234
12.34
There are 2 ways to define hexadecimal numbers.
Sample definition of hexadecimal numbers
0x12AB
12ABh
■Device Address
Device Address is defined with the device symbol and address within "[" and "]".
Definition of the device
[Device symbol and address]
Sample definition
[D0100]
■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
@address
Sample definition
@2
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
// Arbitrary note
Sample definition
// Store the initial value to calculation data [D0100] for process A
[D0100] = 1234;
:
:
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.
Define the numeric value directly.
Define the negative number with a "-" (minus) symbol at the beginning.
Decimal number can be defined for real numbers (float).
Define a "." (period) between the whole numbers and decimal numbers.
Define "0" (zero) and "x" (lower case x) at the beginning of the value.
Append "h" at the tail of the value.
(Space between the device symbol and address is not required.)
(Space between the device symbol "@" and address is not required.)
Temporary device number 2
S
AXIS P
/L
U
'
MART
RO
ITE
SER
S
M
FT9Y-B1378
ANUAL
13: S
CRIPTS
← This line is not executed.
13-15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents