Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 800

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
• These instructions calculate the cosine of the angle specified by (s), and store the sign of the operation result in the word
device specified by (d) and the operation result in the word devices specified by (d)+1 and (d)+2.
(d)
COS (s) =
(d): Sign
(d)+1: Integral part
(d)+2: Decimal part
• For the value to be specified in (s), set a value from 0 to 360(in the DEG. unit) as a BCD value.
• For the sign of the operation result to be stored in the device specified by (d), 0 is stored when the operation result is
positive and 1 is stored when the operation result is negative.
• The operation result to be stored in the devices specified by (d)+1 and (d)+2 is a BCD value in the range from -1.000 to
1.000.
• The operation result is a value whose 5th decimal place is rounded off.
Operation error
Error code
Description
(SD0)
3405H
An out-of-range value is set to (s).
• The specified data is not a BCD value.
• The specified data is out of the range, 0 to 360.
7 APPLICATION INSTRUCTIONS
798
7.9 Real Number Instructions
(d)+1
(d)+2
.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents