504
COSD, COSDP
Program
E
xamp
l
e
(1) The following program performs a COS operation on the angle data designated by the 4 BCD digits from X20 to X2F, and
stores results as 32-bit floating decimal point type real numbers at D0 and D1.
[Ladder Mode]
[List Mode]
[Operations involved when X20 to X2F designate a value of 60]
: Angle data of which the COS (cosine) value is obtained or head number of the devices where the angle data is stored (real number)
: Head number of the devices where the operation result will be stored (real number)
COSD, COSDP
COS operation on floating-point data (Double precision)
7.12.4
COSD, COSDP
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
E
Other
Bit
Word
Bit
Word
––
––
––
––
––
––
––
Inputs an angle used for COS
operation ( ).
Con
v
erts the input angle into
a 32-bit floating-point real
number ( ).
Con
v
erts the con
v
erted angle into
a radian
v
alue ( ).
Executes COS operation
using the con
v
erted radian
v
alue ( ).
1
2
3
4
Step
Instruction
De
v
ice
Con
v
ersion to radian
32-bit floating-point
real number
D21
D20
RAD
COS operation
32-bit floating-point
real number
D11
D10
COS
32-bit floating-point
real number
D1
D0
X2F
BCD
v
alue
0
D30
0 6 0
X20
Con
v
ersion to BIN
BIN
b15
b0
BIN
v
alue
Con
v
ersion to floating-point
FLT
60
6 0
1 . 0 4 7 1 9 8
0 . 5 0 0 0 0 0
Universal
LCPU
Bas
i
c
Hi
gh
performance
Process
Redundant
Command
Command
COSDP
COSD
COSDP
COSD
S
D
S
D
S
D
S
D