MC_MoveJoySticked_BkPlcMc (from V3.0)

MC_MoveJoySticked_BkPlcMc (from V3.0) 1:

This function block starts and monitors the movement of an axis.

MC_MoveJoySticked_BkPlcMc (from V3.0) 2:

This function is currently only supported by axes, which are controlled by a function block of type MC_AxRuntimeCtrlBased_BkPlcMc (in preparation: MC_AxRunTimeTimeRamp_BkPlcMc). Such a function block is selected by specifying the corresponding constant from E_TcMcProfileType under nProfileType in ST_TcHydAxParam.

MC_MoveJoySticked_BkPlcMc (from V3.0) 3: Inputs

VAR_INPUT
    Execute:        BOOL;
    JoyStick:       LREAL;
    Acceleration:   LREAL;
    Deceleration:   LREAL;
    Jerk:           LREAL;
END_VAR

Name

Type

Description

Execute

BOOL

The movement is initiated by a rising edge at this input.

JoyStick

LREAL

[1] The velocity specified via the control unit, normalized to the range ±1.0.

Acceleration

LREAL

[mm/s2] The required acceleration in actual value units of the axis per square second.

Deceleration

LREAL

[mm/s2] The required deceleration in actual value units of the axis per square second.

Jerk

LREAL

[mm/s3] reserved.

MC_MoveJoySticked_BkPlcMc (from V3.0) 4: 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_MoveJoySticked_BkPlcMc (from V3.0) 5: Outputs

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

Name

Type

Description

Busy

BOOL

Indicates that a command is being processed.

CommandAborted

BOOL

Abortion of the movement is indicated here.

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:

The movement begins if these checks can be carried out without problems. To this end the motion algorithm is set to state iTcHydStateExtGenerated and the axis to state McState_Synchronizedmotion. The axis velocity is specified through JoyStick and ST_TcHydAxParam.fRefVelo. Changes in velocity are accompanied by ramp limitation to ST_TcHydAxParam.fMaxAcc. If the axis moves towards an active software limit switch, the velocity is limited, depending on the remaining distance, such that the limit switch is approached correctly.

A falling edge at Execute offset puts motion algorithm in state iTcHydStateTcDecP or iTcHydStateTcDecM and the axis in state McState_Standstill. If the axis is in motion at this point in time, it is decelerated with a stop ramp and assumes state iTcHydStateIdle.