Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 582

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Double-precision Floating-point Instructions
Description
Flags
Precautions
Area
Indirect DM addresses
in binary
Indirect DM addresses
in BCD
Constants
Data Registers
Index Registers
Indirect addressing
using Index Registers
COSD(852) calculates the cosine of the angle (in radians) expressed as a
double-precision (64-bit) floating-point value in words S to S+3 and places the
result in words D to D+3.
(The floating point source data must be in IEEE754 format.)
COS(
S+3
S+2
S+1
Specify the desired angle (–65,535 to 65,535) in radians in words S to S+3. If
the angle is outside of the range –65,535 to 65,535, an error will occur and the
instruction will not be executed. For information on converting between
degrees and radians, see 3-15-9 DOUBLE DEGREES TO RADIANS:
RADD(849) or 3-15-10 DOUBLE RADIANS TO DEGREES: DEGD(850).
The following diagram shows the relationship between the angle and result.
Name
Label
Error Flag
ER
Equals Flag
=
Overflow Flag
OF
Underflow Flag
UF
Negative Flag
N
The source data in words S to S+3 must be in IEEE754 floating-point data for-
mat.
S
@ D0 to @ D32767
*D0 to *D32767
---
---
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
S
)
D+3
D+2
S: Angle (radian) data
R
R: Result (cosine)
Operation
ON if the source data is not a number (NaN).
ON if the absolute value of the source data exceeds
65,535.
OFF in all other cases.
ON if both the exponent and mantissa of the result are 0.
OFF in all other cases.
Unchanged
Unchanged
ON if the result is negative.
OFF in all other cases.
Section 3-15
D
D+1
D
549

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents