Programming Scripts - IDEC MICROSmart FC6A Series Ladder Programming Manual

Automation organizer windldr
Hide thumbs Also See for MICROSmart FC6A Series:
Table of Contents

Advertisement

26: S
CRIPT

Programming Scripts

Format List
This section describes the notation for control statements, operators, functions, data type designations, 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
Examples" on page 26-19.
Control Statements
Conditional expressions are written here as
Executable lines are written as
■Conditional branch
Format
if (
{
if (
{
else
if
{
else
else if
if (
{
else if (
{
else
{
switch (
{
switch
case
default
}
■Repeat
Format
while (
{
while
}
26-12
,
,
)
Execution line is executed if the conditional expression is satisfied.
; }
)
Execution line 1 is executed if the conditional expression is satisfied.
; }
Execution line 2 is executed if it is not satisfied.
; }
)
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.
; }
)
case constant 1:
;
Execution line 1 is executed if the value of conditional expression matches constant 1.
break;
Execution line 2 is executed if the value of conditional expression matches constant 2.
case constant 2:
Execution line 3 is executed if the value of conditional expression does not match
;
constant 1 nor constant 2.
break;
default:
:
break;
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.
FC6A S
MICROS
ERIES
,
,
.
and so on.
L
P
MART
ADDER
ROGRAMMING
Description
Description
M
FC9Y-B1726
ANUAL

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents