IDEC SmartAXIS FT9Z-1A01 User Manual page 334

Table of Contents

Advertisement

13: S
CR I P TS
6. Bit Functions
Example 6.1
Set a bit
Script
SET([D0000.01]);
Operation Description
Turns D0000.01 to 1. The result is the same as
Example 6.2
Reset a bit
Script
RST([D0000.01]);
Operation Description
Turns D0000.01 to 0. The result is the same as
Example 6.3
Invert a bit
Script
REV([D0000.01]);
Operation Description
Inverts 1 and 0 in D0000.01. The result is the same as
7. Word Functions
Arithmetic operations
Example 7.1
Maximum value
Script
[D0200] = MAX([D0100], [D0110], [D0120], [D0130], [D0140]);
Operation Description
Out of the values stored in D0100, D0110, D0120, D0130, and D0140, the maximum value is stored in D0200.
Up to 15 arguments can be used.
Example 7.2
Mininum value
Script
[D0200] = MIN([D0100], [D0110], [D0120], [D0130], [D0140]);
Operation Description
Out of the values stored in D0100, D0110, D0120, D0130, and D0140, the minimum value is stored in D0200.
Up to 15 arguments can be used.
Example 7.3
Exponential function
Script
[D0010] = EXP([D0020]);
Operation Description
Calculates the exponential function of the value of D0020 and the result is stored in D0010.
Only the data type F (float) can be used.
13-26
[D0000.01] = 1
[D0000.01] = 0
[D0000.01] = ~[D0000.01]
S
A XI S P
/ L
U
'
M AR T
R O
I TE
SER
S
.
.
.
M
FT9Y-B 1378
ANUAL

Advertisement

Table of Contents
loading

Table of Contents