Arc Sine (ASIN)
When enabled, the ASIN instruction takes the arc sine of the Source value and stores the result in the Destination (in radians).
The ASIN operator/function computes the arc sine of the Source and returns the floating point result. The Source must be greater than or equal to -1 and less than or equal to 1. The resulting value in the Destination is greater than or equal to -pi /2 and less than or equal to pi /2 (where pi = 3.141593). If Source is smaller than -1 or greater than 1 then Destination is set to NAN.
Available Languages
Ladder Diagram
FactoryTalk Design Studio
DSL - Ladder DiagramOperands
IMPORTANT | Unexpected operation may occur if:
|
There are data conversion rules for mixing numeric data types within an instruction. See Data conversions.
Ladder Diagram
Operand | Data Type | Format | Description |
---|---|---|---|
Source | SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL | Immediate tag | Value to convert to arc sine |
Destination | SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL | tag | Tag to store result of the instruction |
Operator Aspects
The ASIN operator can be used in various RLL expressions.ASIN returns a floating point result containing the arc sine of the Source. Depending on the context this value may then be type converted if appropriate.
Affects Math Status Flags
Conditional, see Math status flags.
Major/Minor Faults
None specific to this instruction. See Index through arrays for array-indexing faults.
Execution
Ladder Diagram
Condition/State | Action Taken |
---|---|
Prescan | N/A |
Rung-condition-in is false | Set Rung-condition-out to Rung-condition-in. |
Rung-condition-in is true | Set Rung-condition-out to Rung-condition-in. Dest = arc sine value of the Source. |
Postscan | N/A |
Example
Ladder Diagram
Provide Feedback