13: S
CRIPTS
13-10
S
MART
AXIS P
RO
/ L
ITE
U
SER
'
S
M
ANUAL
FT9Y-B1378
Programming Scripts
Format List
This section describes the notation for control statements, operators, functions, and other elements, and it also describes their
operation.
Except for comments, enter everything as single-byte characters. For specific programming examples, see "Script Programming
Control Statements
Conditional expressions are written here as
,
,
.
Executable lines are written as
,
,
and so on.
■
Conditional branch
■
Repeat
Format
Description
if
else
else if
if
(
)
{
; }
Execution line is executed if the conditional expression is satisfied.
if (
)
{
; }
else
{
; }
Execution line 1 is executed if the conditional expression is satisfied.
Execution line 2 is executed if it is not satisfied.
if (
)
{
; }
else if
(
)
{
; }
else
{
; }
Execution line 1 is executed if the conditional expression 1 is satisfied.
Conditional expression 2 is evaluated if conditional expression 1 is not satisfied,
and execution line 2 is executed if conditional expression 2 is satisfied.
Execution line 3 is executed if conditional expression 2 is not satisfied too.
switch
case
default
switch
(
)
{
case
constant 1:
;
break;
case
constant 2:
;
break;
default:
:
break;
}
Execution line 1 is executed if the value of conditional expression matches constant 1.
Execution line 2 is executed if the value of conditional expression matches constant 2.
Execution line 3 is executed if the value of conditional expression does not match
constant 1 nor constant 2.
Format
Description
while
while
(
)
{
;
}
Execution line is repeatedly executed while the conditional expression is satisfied.
The execution will go into an infinite loop when the conditional expression is always
satisfied, so do not use fixed values or devices that do not change as the conditional
expression.
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: ......