Navigation:  Equipments (Devices) > SCA06 > Ladder > Math > Math Trigonometry >

ASIN

Previous pageReturn to chapter overviewNext page

Block that calculates the arcsine of Value, storing the result in Angle.

 

Ladder Representation

 

ASIN_block

 

Block Structure

 

Variable Type

Name

Data Type

Description

VAR_INPUT

EN

BOOL

Block enabling

Value

REAL

Value of sine

VAR_OUTPUT

Done

BOOL

End of operation

Angle

REAL

Value of the angle whose sine is equal to Value (in radians)

 

Operation

 

When this block has a TRUE value in EN, it sends to the Angle output the arcsine of Value. If no errors, the Done variable is set. If there is any error in the operation, Done is not set, staying in FALSE status, while Angle remains with its value unchanged.

 

When EN has FALSE value, Angle remains unchanged and Done remains in FALSE.

 

Block Flowchart

 

ASIN_flowchart

 

Example in Ladder

 

ASIN_example01

 

The above example calculates the arc, in radians, whose sine is the VALUE variable, storing the final result in ANGLE. The block ends with success and Done output is activated.

 

ASIN_example02

 

The above example calculates the arc, in radians, whose sine is the VALUE variable, storing the final result in ANGLE. The block generates a runtime error, since VALUE has value superior to 1, and Done output is disabled.

 

Example in ST

 

 The example below displays the instructions for applying the example above in the ST language.

 

 

VAR

   VALUE : REAL := -1.0;

   ANGLE : REAL;

END_VAR

 

ANGLE := FB_ASIN(EN:=DI1, Value:=VALUE, Done=>DO1);