Calculating The Cosine Of Single-Precision Real Number - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

Calculating the cosine of single-precision real number

COS(P)/DCOS(P)
These instructions calculate the cosine of the angle specified by (s), and store the operation result in the device specified by
(d).
The COS(P) instructions can also be used as DCOS(P).
Ladder diagram
(s)
(d)
*1 The COS instruction is not supported by the ST language. Use COS of the standard function.
Page 772 COS(_E)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
Angle data or head device number where the angle data is
stored
(d)
Head device number for storing the operation result
■Applicable devices
Operand
Bit
X, Y, M, L,
U\G T, ST,
SM, F, B, SB
(s)
(d)
Processing details
• These instructions calculate the cosine of the angle specified by (s), and store the operation result in the device specified
by (d).
(s)+1
(s)
COS (
)
Single-precision real number
• Set the angle data in radians (angle180).
• The table below shows the related devices.
Device
Name
SM700
Carry
SM8020
Zero
SM8021
Borrow
SM8022
Carry
Operation error
Error code
Description
(SD0/SD8067)
The specified device value is -0, denormalized number, NaN (not a number), or .
3402
Range
Word
T, ST, C, D,
U\G
C, LC
W, SD, SW, R
(d)+1
(d)
Single-precision real number
Description
Condition
The absolute value of the operation result
The operation result is true "0".
(The mantissa part is "0").
The absolute value of the operation result < 2
The absolute value of the operation result
*1
Structured text
ENO:=COSP(EN,s,d);
Data type
Single-precision real number
Single-precision real number
Double word Indirect
specification
Z
LC
LZ
Operation
128
2
The value of (d) is the maximum value (2
numbers and the carry flag SM700 turns on.
The zero flag SM8020 turns on.
-126
The value of (d) is the minimum value (2
numbers and the borrow flag SM8021 turns on.
128
2
The value of (d) is the maximum value (2
numbers and the carry flag SM8022 turns on.
7 APPLICATION INSTRUCTION
Data type (label)
Single-precision real number
Single-precision real number
Constant
Others
K, H
E
$
128
) of 32-bit real
-126
) of 32-bit real
128
) of 32-bit real
441
7.7 Real Number Instruction
7

Advertisement

Table of Contents
loading

Table of Contents