EasyManuals Logo
Home>IDEC>Controller>FT1A Series

IDEC FT1A Series User Manual

IDEC FT1A Series
393 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #321 background imageLoading...
Page #321 background image
S
MART
AXIS P
RO
/L
ITE
U
SER
'
S
M
ANUAL
FT9Y-B1378 13-17
13: S
CRIPTS
Example 1.5 Conditional branch
Script
Operation Description
If the value of D0100 is 0, then 0x1234 is stored in D0102.
If the value of D0100 is 1, then 0x5678 is stored in D0102.
If the value of D0100 is not 0 nor 1, then 0x9999 is stored in D0102.
Example 1.6 Conditional branch
Script
Operation Description
If the value of D0100, D0102, and D0103 are all not 0, then 100 is stored in D0104.
If the values of D0100 and the value of D0102 are not 0 and the value of D0103 is 0, then 200 is stored in D0104.
If either the value of D0100 or D0102 is 0, then nothing is executed regardless of the value of D0103.
Example 1.7 Iteration
Script
Operation Description
If the value of D0100 is larger than 0, then 1 is repeatedly added to the value of D0102 and 1 is repeatedly subtracted from the
value of D0100.
In the script example above, when the while statement repeats ten times, the value of D0100 becomes 0 and the while statement
ends.
After this script is executed, the value of D0100 is 0 and the value of D0102 is 20.
if ([D0100] == 0)
{
[D0102] = 0x1234;
}
else if ([D0100] == 1)
{
[D0102] = 0x5678;
}
else
{
[D0102] = 0x9999;
}
if ([D0100])
{
if ([D0102])
{
if ([D0103])
{
[D0104] = 100;
}
else
{
[D0104] = 200;
}
}
}
[D0100] = 10;
[D0102] = 10;
while (0 < [D0100])
{
[D0102] = [D0102] + 1;
[D0100] = [D0100] - 1;
}

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IDEC FT1A Series and is the answer not in the manual?

IDEC FT1A Series Specifications

General IconGeneral
BrandIDEC
ModelFT1A Series
CategoryController
LanguageEnglish

Related product manuals