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

ALOG10

Previous pageReturn to chapter overviewNext page

Block that calculates the antilogarithm (exponent with base 10) of the Value value, storing the result in Result.

 

Ladder Representation

 

ALOG10_block

 

Block Structure

 

Variable Type

Name

Data Type

Description

VAR_INPUT

EN

BOOL

Block enabling

Value

REAL

Reference variable for the operation

VAR_OUTPUT

Done

BOOL

End of operation

Result

REAL

Variable that stores the result of the operation

 

Operation

 

When this block has a TRUE value in EN, it sends to the Result output the antilogarithm of the Value variable. 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 Result remains with its value unchanged.

 

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

 

Block Flowchart

 

ALOG10_flowchart

 

Example in Ladder

 

ALOG10_example01

 

The above example calculates the antilogarithm of the VALUE variable, storing the final result in RESULT. The block ends with success and Done output is activated.

 

ALOG10_example02

 

The above example calculates the antilogarithm of the VALUE variable, storing the final result in RESULT. The indicated value is the minimum input value for which the block revolutions a nonzero result. The block ends with success and Done output is activated.

 

ALOG10_example03

 

The above example calculates the antilogarithm of the VALUE variable, storing the final result in RESULT. Below the minimum values cause the block to return a null value. The block ends with success and Done output is activated.

 

ALOG10_example04

 

The above example calculates the antilogarithm of the VALUE variable, storing the final result in RESULT. The indicated value is the maximum input value for which the block revolutions a valid result. The block ends with success and Done output is activated.

 

ALOG10_example05

 

The above example calculates the antilogarithm of the VALUE variable, storing the final result in RESULT. Values higher than the maximum cause the block to generate an error, the RESULT output remains unchanged 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 := 38.53183;

   RESULT : REAL;

END_VAR

 

RESULT := FB_ALOG10(EN:=DI1, Value:=VALUE, Done=>DO1);