[POW_FNCT] Power functions

Function block POW_FNCT calculates the power for a base and an exponent.

POW_FNCT calculates the power value for a natural, binary, decimal, or any base and the exponens configured on the inputs.

Functioning

The calculation mode [CalcMod] determines the base [Base] in the calculation and thus the type of power function. Input [Base] is configured as the base for calculating in calculation mode 4. The result is provided at the output [Out].

Calculation mode

Power for base

Function

Condition

1

e (Euler's number)

Out = eln 

-

2

2

Out = 2ln

-

3

10

Out = 10ln

-

4

Any

Out = Baseln

Base > 0.0

Pins

Input

Description

Data type

Default value
Value range

In

Input

Real

0.0

Base

Base

Real

10.0

CalcMod

Calculation mode

Determines the type of power function.

Integer

1: Natural

1…4

1: Natural - Euler's number e
2: Base 2
3: Base 10
4: Base X

 

Output

Description

Data type

Default value
Value range

Out

Output

Real

0.0

Troubleshooting

Output [Out] is set to 0.0 if a faulty value is set on one of the inputs [CalcMod], [Base]or [In]. The input [Base] for any base ([CalcMod] = 4) cannot be 0.0 or negative. The maximum permissible real value is set on the output, if the maximum permissible real value is exceeded mathematically when calculating the result.

Error

Cause of fault

Correcting the fault

Result on output:
[Out] = 0.0

Impermissible input values:
[CalcMod] < 1

[CalcMod] > 4

For [CalcMod] = 4
[Base] <= 0.0

Set permissible input values:
[CalcMod] = 1…4

For [CalcMod]  = 4
[Base] > 0.0