2-18
Section
Mathematical Function
274
tent is non-zero. (When the denominator is specified from the Support Tool, an
error message will be displayed if you attempt to specify 0.)
•
Overflow
An error will occur if the calculation result exceeds the maximum value that can
be stored in the number of words in the result. The maximum value that can be
stored depends upon the data type and number of words set in the memory
table or host. (See the following table for allowed ranges.)
•
Underflow
An error will occur if the calculation result is below the minimum value that can
be stored in the number of words in the result. The minimum value that can be
stored depends upon the data type and number of words set in the memory
table or host. (See the following table for allowed ranges.)
Data type
Number of words
Allowed range
BCD
1
–999 to 9,999*
2
–9,999,999 to 99,999,999*
Binary
1
8000 to 7FFF hexadecimal
y
2
8000 0000 to 7FFF FFFF hexadecimal
* When the host is notified, the leftmost digit is set to F to indicate a negative value.
For example, –999 is expressed as F999 and –9,999,999 is expressed as
F999 9999.
The mathematical function reads all of the operands before starting to perform
the calculations, so calculation results from one calculation cannot be used in a
later calculation in the same cycle.
Mathematical table 0
Mathematical table 7
C = A + B
E = C + D
A calculation result cannot be used as a
later calculation’s operand.
Mathematical table 7 uses the value of C that was
read before mathematical table 0 was executed.
The mathematical function’s processing cycle does not match the PC’s cycle
time, so results from two calculations may not be from the same processing
cycle.
It is possible to specify the same numeral memory table or PC word for both the
operands and calculation result. For example, the operation
D02000 = 1 increments the contents of D02000 by 1 each time that
the operation is repeated. Since the calculations are always executed while the
PT is operating, D02000 will be incremented each processing cycle while the PT
is operating.
Using Calculation
Results in Later
Calculations
Recursive Operations
electronic components distributor
Summary of Contents for NT21 Series
Page 3: ...iv Downloaded from Elcodis com electronic components distributor...
Page 5: ...vi Downloaded from Elcodis com electronic components distributor...
Page 463: ...Downloaded from Elcodis com electronic components distributor...
Page 465: ...Downloaded from Elcodis com electronic components distributor...