26: S
CRIPT
26-18
FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
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
Notes:
• All the values for temporary devices are set to "
0
" when the execution of the script is started.
• The processing inside the curly brackets "{ }" for the data type designation cannot use temporary devices.
■
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 MICROSmart FC6A Series
Page 1: ...B 1726 7 FC6A SERIES Ladder Programming Manual ...
Page 8: ...Preface 7 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 32: ...1 OPERATION BASICS 1 20 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 96: ...3 INSTRUCTIONS REFERENCE 3 18 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 130: ...4 BASIC INSTRUCTIONS 4 34 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 192: ...9 SHIFT ROTATE INSTRUCTIONS 9 12 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 272: ...12 DISPLAY INSTRUCTIONS 12 24 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 284: ...14 REFRESH INSTRUCTIONS 14 6 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 502: ...25 DATA LOG INSTRUCTIONS 25 22 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 546: ...26 SCRIPT 26 44 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 598: ...APPENDIX A 14 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...