S
MART
AXIS P
RO
/ L
ITE
U
SER
'
S
M
ANUAL
FT9Y-B1378
13-25
13: S
CRIPTS
Example 5.5
Inversion
Script
Operation Description
If the bitwise logical OR operation on the value of D0002.01 and the result of the bitwise logical AND operation on the value of
D0000.01 and the inverted result of the value of D0001.01 is 1, then D0003.01 is changed to 1.
If the bitwise logical OR operation on the value of D0002.01 and the result of the bitwise logical AND operation on the value of
D0000.01 and the inverted result of the value of D0001.01 is 0, D0003.01 is changed to 0.
The operation is the same as the following ladder diagram.
Example 5.6
Left shift
Script
Operation Description
The value of D0100 is shifted to the left by the value of D0200 and the result is stored in D0300.
For example, if the value of D0100 is 1 and the value of D0200 is 3, 1 is shifted 3 bits to the left, and the result of 8 is stored in
D0300.
Example 5.7
Right shift
Script
Operation Description
The value of D0100 is shifted to the right by the value of D0200 and the result is stored in D0300.
For example, if the value of D0100 is 8 and the value of D0200 is 3, 8 is shifted 3 bits to the right, and the result of 1 is stored in
D0300.
if (([D0000.01] & ~[D0001.01]) | [D0002.01])
{
SET([D0003.01]);
}
else
{
RST([D0003.01]);
}
D0000.01
D0003.01
D0002.01
D0001.01
[D0300] = [D0100] << [D0200];
[D0300] = [D0100] >> [D0200];
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: ......