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 ;
}
Содержание FT1A-B12RA
Страница 1: ...FT9Y B1378 5 ...
Страница 2: ......
Страница 208: ...7 DEVICE ADDRESSES 7 16 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378 ...
Страница 226: ...8 INSTRUCTIONS FUNCTION BLOCKS REFERENCE 8 18 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378 ...
Страница 340: ...13 SCRIPTS 13 36 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378 ...
Страница 384: ...APPENDIX A 18 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378 European Font ISO 8859 1 Cyrillic Font ANSI 1251 ...
Страница 385: ...SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378 A 19 APPENDIX Japanese Font JIS X0201 ...
Страница 386: ...APPENDIX A 20 SMARTAXIS PRO LITE USER S MANUAL FT9Y B1378 ...