FC_DriveInit

 

FC_DriveInit - General Information

Overview

Type:

Function

Available as of:

1.0.5.0

Versions:

current version

Task

The function serves for initializing the used axes. The function must be called up once for every used axis.

Description

The function checks whether the interface is valid. Subsequently, the lookup table is filled with the input data using the logical address of the drive. If the maximum number of drives is exceeded or the drive is already a part of the table, an error is set.

Interface

Input

Data type

Description

i_ifAxis

SystemConfigurationItf.IF_Drive

Drive that is to be added to the lookup table

i_xRotaryAxis

BOOL

TRUE = Rotary, periodic axis

FALSE = Linear, non-periodic axis

i_lrPeriod

LREAL

For rotary, periodic axes only

i_lencEncoder

SystemConfiguration.L_ENC

Logical encoder required for MC_CamIn and MC_GearIn

Output

Data type

Description

q_etDiag

GD.ET_Diag

General, library-independent statement on the diagnostic.

A value unequal to GD.ET_Diag.Ok corresponds to a diagnostic message.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = GD.ET_Diag.Ok -> status message

q_etDiag <> GD.ET_Diag.Ok -> diagnostic message

q_sMsg

STRING[80]

Event-triggered message which gives more detailed information on the diagnostic state.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

InputParameterInvalid

DriveInvalid

26

The connected drive is invalid.

DriveInvalid

Enumeration name:

DriveInvalid

Enumeration value:

26

Description:

The connected drive is invalid.

Issue

Cause

Solution

-

No drive has been applied at the input i_ifAxis.

A valid drive must be transferred to the input i_ifAxis.

-

Too many axes were applied.

Increase the parameter constant Gc_uiMaxNumberOfDrives.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The axis has been initialized successfully.