Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

The following example for the ACOS instruction is for when In is REAL#−1.0. The value of variable
abc will be REAL#3.141592.
LD
REAL#-1.0
The ACOS instruction finds the arccosine of In.
The arccosine of −1.0 is 3.141592, so the value of abc will be REAL#3.141592.
In
REAL#-1.0
Additional Information
Use the RadToDeg and DegToRad instructions (page 2-196) to convert between degrees and radians.
Precautions for Correct Use
• If In is not between −1.0 and 1.0 for the ASIN or ACOS instruction, the value of Out is nonnumeric
data. That also applies when the value of In is negative infinity, positive infinity, or nonnumeric data.
• If the value of In is nonnumeric data for the ATAN instruction, the value of Out is nonnumeric data.
• If you pass an integer parameter to In, the data type is converted as follows:
Data type of parameter that is
passed to In
USINT, UINT, SINT, or INT
UDINT or DINT
ULINT or LINT

NY-series Instructions Reference Manual (W560)

ST
ACOS
EN
ENO
abc
In
Arccosine found.
Out=abc
Data type of In
REAL
LREAL
A building error will occur.
2 Instruction Descriptions
abc:=ACOS(REAL#-1.0);
REAL#3.141592
2
2-203

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents