MC_SetPosition_BkPlcMc (from V3.0)

MC_SetPosition_BkPlcMc (from V3.0) 1:

The function block sets the actual position of an axis.

MC_SetPosition_BkPlcMc (from V3.0) 2: Inputs

VAR_INPUT
    Execute:    BOOL;
    Position:   LREAL;
    Mode:       BOOL;
END_VAR

Name

Type

Description

Execute

BOOL

A rising edge at this input sets the actual position of the axis.

Position

LREAL

[mm] The new actual position of the axis.

Mode

BOOL

This parameter specifies the operating mode. If Mode = TRUE, the actual position is changed by Position, if Mode = FALSE, the actual position is set to Position.

MC_SetPosition_BkPlcMc (from V3.0) 3: Inputs/outputs

VAR_INOUT
    Axis:       Axis_Ref_BkPlcMc;
END_VAR

Name

Type

Description

Axis

Axis_Ref_BkPlcMc

Here, the address of a variable of type Axis_Ref_BkPlcMc should be transferred.

MC_SetPosition_BkPlcMc (from V3.0) 4: Outputs

VAR_OUTPUT
    Done:       BOOL;
    Busy:       BOOL;
    Error:      BOOL;
    ErrorID:    UDINT;
END_VAR

Name

Type

Description

Done

BOOL

This indicates successful processing of the command.

Busy

BOOL

This output is TRUE while the command is being processed.

Error

BOOL

The occurrence of an error is indicated here.

ErrorID

UDINT

An encoded indication of the cause of the error is provided here.

Behavior of the function block

On a rising edge at Execute the function block checks the transferred axis interface. A number of problems can be detected and reported during this process:

MC_SetPosition_BkPlcMc (from V3.0) 5:

This function block may cause the actual position and/or the target position of the currently processed motion to be moved after an active software limit switch. This is not monitored by the function block.

If these checks could be performed without problem, all other affected elements in ST_TcHydAxRtData are automatically updated. This function block can therefore also be activated for axes, which perform an active motion. The successful execution of the function is indicated with Done. A falling edge at Execute clears all the pending output signals.