MC_ReadDriveAddress

MC_ReadDriveAddress 1:

The function block MC_ReadDriveAddress reads the ADS access data for a drive device connected to the axis. This information is required for accessing the device, e.g. for special parameterization.

MC_ReadDriveAddress 2: Inputs

VAR_INPUT
    Execute : BOOL; (* B *)
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge.

See also: General rules for MC function blocks

MC_ReadDriveAddress 3: Inputs/outputs

VAR_IN_OUT
    Axis : AXIS_REF;
END_VAR

Name

Type

Description

Axis

AXIS_REF

Axis data structure that unambiguously addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state.

MC_ReadDriveAddress 4: Outputs

VAR_OUTPUT
    Done         : BOOL; (* B *)
    Busy         : BOOL; (* E *)
    Error        : BOOL; (* B *)
    ErrorID      : DWORD; (* B *)
    DriveAddress : ST_DriveAddress; (* B *)
END_VAR

Name

Type

Description

Done

BOOL

TRUE if the command was executed without errors.

Busy

BOOL

TRUE as soon as the command is started with Execute and as long as the command is processed. If "Busy" is FALSE, the function block is ready for a new order.

Error

BOOL

TRUE, if an error occurs.

ErrorID

DWORD

If the error output is set, this parameter supplies the error number.

DriveAddress

ST_DriveAddress

ADS access data of a drive device connected to the axis.

See also: General rules for MC function blocks

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.0.0

PC or CX (x86 or x64)

Tc2_MC2