Skip to main content

POW

Raises Value to Power and stores the result in Result.

Ladder Representation

POW block

Block Structure

Variable TypeNameData TypeDescription
VAR_INPUTENBOOLBlock enabling.
VAR_INPUTValueREALOperation base.
VAR_INPUTPowerREALOperation power.
VAR_OUTPUTDoneBOOLEnd of operation.
VAR_OUTPUTResultREALVariable that stores the operation result.

Operation

When EN is TRUE, the block writes the value of Value raised to Power to Result.

If the operation completes without errors, Done is set. If an operation error occurs, Done remains FALSE and Result keeps its previous value.

When EN is FALSE, Result remains unchanged and Done remains FALSE.

Execution Flowchart

POW execution flowchart

Examples

POW ladder example 1

This example raises VALUE to POWER and stores the final result in RESULT. The block completes successfully and activates Done.

POW ladder example 2

This example raises VALUE to POWER and stores the final result in RESULT. The block completes successfully and activates Done.

POW ladder example 3

This example raises VALUE to POWER and stores the final result in RESULT. Because the result is greater than the maximum value supported by REAL, the block reports an error and disables Done.