Chapter 16 PLC Function ApplicationsMS300 (High Speed Model)
16-77
API
COS
Binary floating point number COS operation
131
D P
Bit device Word device
16-bit command
- - - -
32-bit command (9 STEP)
DCOS Continuous
execution type
DCOSP Pulse
execution type
Flag signal: none
X Y M K H KnX KnY KnM T C D
S
* *
*
D
*
Notes on operand usage:
Please refer to the function specifications table for each device in
series for the scope of device usage
S: the designated source value. D: the COS value result.
The source designated by S can be given as radians or an angle; this is
decided by flag M1018.
When M1018=Off, the operation is in radians mode, where the radians (RAD)
value is equal to (angle ×π/180).
When M1018=On, the operation is in the angle mode, where the angular range is
0°≤ angle <360°.
When calculation results yield 0, M1020=On.
The COS obtained from the source value designated by S is stored in D.
The following figure displays the relationship between the arc and SIN results:
R
S
-2
3
2
-2 2
3
2
2
2
-
1
-1
0
-
When X0=On, the COS value of the designated binary floating point number (D1,
D0) in radians will be stored in (D11, D10), with the content consisting of a binary
floating point number.
X0
DCOS D0 D10
D 1 D 0
D 1 D 10
COS
value
binary floating point
binary floating point
RAD value ( x 180)