Omron NY532-1500 Reference Manual page 44

Ny-series industrial pc platform
Hide thumbs Also See for NY532-1500:
Table of Contents

Advertisement

1 Introduction to Motion Control Instructions
Data Processing
The floating-point decimal format is an approximate expression of a value, with a slight error from
the actual value. There is a limit to the valid range of the value. For these reasons, the following pro-
cess should be used for calculation.
Rounding
If the actual value exceeds the effective digits of the mantissa, the value must be rounded according
to the following rules.
• Of the values that can be expressed in floating-point decimal format, the value that is closest to
the actual value is taken as the calculation result.
• If there are two values that are equally close to the actual value that can be expressed in floating-
point decimal format, the value with the lowest significant 0 bit is taken as the calculation result.
When there are two values that are equally close to the actual value, the actual value is exactly in
the middle of the two values.
Overflows and Underflows
When the true absolute value exceeds the values that can be expressed by a floating-point data
type, it is called an overflow. On the other hand, if the value is smaller than the values that can be
expressed by a floating-point decimal data type, it is called an underflow.
• If the sign of the true value is positive, the processing result will be positive infinity when an over-
flow occurs. If the sign of the true value is negative, the processing result will be negative infinity
when an overflow occurs.
• If the sign of the true value is positive, the processing result will be +0 when an underflow occurs.
If the sign of the true value is negative, the processing result will be −0 when an overflow occurs.
Calculating with Special Numbers
The following rules apply when calculating with special numbers. For details on special values, refer
to Special Numbers on page 1-14.
• Adding positive infinity and negative infinity results in nonnumeric data.
• Subtracting infinity from infinity with the same signs results in nonnumeric data.
• Multiplying +0 by infinity or −0 by infinity results in nonnumeric data.
• Dividing +0 by +0, −0 by −0, or infinity by infinity results in nonnumeric data.
• Adding +0 and −0 results in +0.
• Subtracting +0 from +0, or −0 from −0 results in +0.
• Basic arithmetic operations including nonnumeric data results in nonnumeric data.
• Comparison instructions such as the CMP instruction treat +0 and −0 as the same value.
• If a nonnumeric number is included in a comparison, the comparison instruction always returns
"not equal."
Precautions for Correct Use
Precautions for Correct Use
Floating-point decimal (LREAL) variables are used to set electronic gears, target positions, and
other parameters of motion control instructions in the MC Function Module. For this reason, cal-
culation results contain rounding errors. For example, if the MC_MoveRelative (Relative Position-
ing) instruction is repeatedly executed, following error will accumulate. If the accumulated error
becomes a problem, set the command unit to pulses, or specify an absolute position with the
MC_MoveAbsolute (Absolute Positioning) instruction.
1-16
NY-series Motion Control Instructions Reference Manual (W561)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ny512-1500Ny532-1400Ny512-1400Ny512-1300Ny532-1300

Table of Contents