Attention

IronPLC can only run very simple programs. The steps described are accurate but many language features are not yet supported.

EXPT

Returns the result of raising a base to an exponent.

IEC 61131-3

Section 2.5.1.5.2

Support

Supported

Signatures

#

Input (IN1)

Input (IN2)

Return Type

Support

1

SINT

SINT

SINT

Supported

2

INT

INT

INT

Supported

3

DINT

DINT

DINT

Supported

4

LINT

LINT

LINT

Not yet supported

5

REAL

REAL

REAL

Supported

6

LREAL

LREAL

LREAL

Supported

Description

Returns IN1 raised to the power IN2. EXPT(a, b) computes ab. For integer types, the exponent must be non-negative. The operator form is **.

Example

result := EXPT(2, 10);       (* result = 1024 *)
value := 3 ** 4;             (* value = 81, operator form *)

See Also

  • EXP — natural exponential (ex)

  • SQRT — square root

  • ABS — absolute value