MOVE

Copies the input value to the output (assignment).

Signature

    ┌─────────┐
IN ─┤  MOVE   ├─ OUT
    └─────────┘
FUNCTION MOVE : ANY
  VAR_INPUT
    IN : ANY;
  END_VAR
END_FUNCTION

The return type matches the input type. MOVE accepts any type (ANY); IronPLC supports SINT, INT, DINT, LINT, USINT, UINT, UDINT, ULINT, REAL, LREAL.

Inputs

Name

Type

Description

IN

ANY

The value to copy.

Outputs

Name

Type

Description

Return value

ANY

A copy of IN. Same type as IN.

Description

Copies the value of IN to the output. MOVE is the functional form of the := assignment operator. It is useful when an explicit function call is preferred over the assignment syntax, for example as an argument to other functions.

Example

result := MOVE(42);       (* result = 42 *)

See Also

  • SEL — binary selection

  • LIMIT — clamp to range

References