FB_ReadDriveInfo

FB_ReadDriveInfo 1:

The FB_ReadDriveInfo function block can be used to read basic information for communication with a Beckhoff servo hardware.

FB_ReadDriveInfo 2: Inputs

VAR_INPUT
   Execute  :  BOOL;
END_VAR

Name

Type

Description

Execute

BOOL

The function block is enabled via a positive edge at this input.

FB_ReadDriveInfo 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.

FB_ReadDriveInfo 4: Outputs

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

Name

Type

Description

Done

BOOL

TRUE if the command was executed successfully.

Busy

BOOL

This output is set when the function block is activated, and remains set until a feedback is received.

Error

BOOL

This output is set after the Busy output has been reset when an error occurs in the transmission of the command.

ErrorID

UDINT

In the event of a set error output returns the ADS error code.

DriveInfo

ST_DriveInfo

Data structure with basic information to communicate with a Beckhoff servo hardware.

Requirements

Development environment

Target platform type

PLC libraries to include

Firmware version

Revision

TwinCAT ≥4024.48

PC or CX (x86 or x64)

Tc2_MC2_Drive ≥V3.3.34.0

 

≥0032