13: S
CRIPTS
13-22
S
MART
AXIS P
RO
/ L
ITE
U
SER
'
S
M
ANUAL
FT9Y-B1378
3. Logical Operators
Example 3.1
Logical AND
Script
Operation Description
If the value of D0100 is equal to the value of D0200, and if the value of D0300 is equal to the value of D0400 and D0500 added
together, then 100 is stored in D0600.
If either ([D0100] == [D0200]) or ([D0300] == [D0400] + [D0500]) is false, the processing in the brackets “{ }” is not executed.
Example 3.2
Logical OR
Script
Operation Description
If the value of D0100 is not 0 or the value of D0102 is not 0, then 100 is stored in D0300.
If either one of them is true, the processing in the brackets “
{
}
” is executed.
Example 3.3
Logical inversion
Script
Operation Description
If the value of D0100 is not equal to 0x1234, then 100 is stored in D0300.
Example 3.4
Logical inversion
Script
Operation Description
If the value of D0100 is 0, then 100 is stored in D0300.
This is the same as the code "if (0==[D0100]))".
if (([D0100] == [D0200]) && ([D0300] == [D0400] + [D0500]))
{
[D0600] = 100;
}
if ((0 != [D0100]) || (0 != [D0200]))
{
[D0300] = 100;
}
if (!([D0100] == 0x1234))
{
[D0300] = 100;
}
if (!(0 !=[D0100]))
{
[D0300] = 100 ;
}
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: ......