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

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Floating-point Math Instructions
Description
Flags
Area
Index Registers
Indirect addressing
using Index Registers
TAN(462) calculates the tangent of the angle (in radians) expressed as a 32-
bit floating-point value in S+1 and S and places the result in R+1 and R.
(The floating point source data must be in IEEE754 format.)
TAN
S+1
R+1
Specify the desired angle (–65,535 to 65,535) in radians in S+1 and S. 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 from degrees to
radians, see 3-14-9 DEGREES TO RADIANS: RAD(458).
If the absolute value of the result is greater than the maximum value that can
be expressed as floating-point data, the Overflow Flag will turn ON and the
result will be output as
The following diagram shows the relationship between the angle and result.
R
Name
Label
Error Flag
ER
Equals Flag
=
Overflow Flag
OF
S
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Source (32-bit floating-point data)
S
R
Result (32-bit floating-point data)
.
S: Angle (radian) data
R: Result (tangent)
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.
OFF
Section 3-14
R
499

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents