EXPT_REAL
When the first argument is "base" and the second argument is "exponent", the EXPT_REAL instruction calculates the Real result of the base exponent.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
EXPT_REAL

Parameter | Parameter Type | Data Type | Description |
---|---|---|---|
EN | Input | BOOL | When set to true, the instruction is enabled.
|
IN | Input | REAL | Real number to be raised. |
EXP | Input | REAL | Power (exponent). |
EXPT_REAL | Output | REAL | (IN EXP) 1.0 if IN is not 0.0 and EXP is 0.0 0.0 if IN is 0.0 and EXP is negative 0.0 if both IN and EXP are 0.0 0.0 if IN is negative and EXP does not correspond to an integer. |
ENO | Output | BOOL | Enables output. Applies to ladder diagram programs. |
EXPT_REAL examples
EXPT_REAL function block diagram example

EXPT_REAL ladder diagram example

EXPT_REAL structured text example

(* ST Equivalence: *) result := EXPT_REAL (xval, power);
Results

Provide Feedback