MC_DigitalCamSwitch

 

MC_DigitalCamSwitch - General Information

Overview

Type:

Function Block

Available as of:

1.0.5.0

Versions:

current version

Task

A cam switch for outputs is to be attached to the axis.

Description

One or several tracks are allocated to the axis, which are managed in the MC_Track_Ref structure. Each track switches a digital output Switches that are managed in the MC_Cam_Switch_Ref structure are placed on the tracks. Depending on the position of the axis, the switches set or reset the digital output of the track to which they are allocated.

Interface

Input

Data type

Description

Axis

SystemConfigurationItf.IF_Drive

The axis to which the cam switch is to be attached.

Switches

MC_Cam_Switch_Ref

The structure in which the switches are managed.

TrackOptions

MC_Track_Ref

The structure in which the tracks are managed.

Enable

BOOL

Releases the Switches outputs

EnableMask

WORD

16 bits of BOOL Releases various tracks The less relevant the data, the lower the track number. The respective track number is released using the data SET (to 1 or TRUE).

Output

Data type

Description

InOperation

BOOL

The outputs of the enabled tracks are set.

Busy

BOOL

The function block is not finished and new output values are still pending.

Error

BOOL

Signalizes a detected error within the function block

ErrorId

DWORD

Error identification

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

Busy

1

The order is executed.

OK

InOperation

7

The order is executed.

OK

Ok

0

Ok

InputParameterInvalid

AxisInvalid

25

The connected drive is not supported.

InputParameterInvalid

DriveInvalid

26

The connected drive is invalid.

InputParameterInvalid

DriveNotInitialised

27

The connected drive is not initialized.

AxisInvalid

Enumeration name:

AxisInvalid

Enumeration value:

25

Description:

The connected drive is not supported.

Issue

Cause

Solution

-

No drive has been applied at the input Axis.

A valid drive must be transferred to the input Axis.

Busy

Enumeration name:

Busy

Enumeration value:

1

Description:

The order is executed.

The cam switch is attached.

DriveInvalid

Enumeration name:

DriveInvalid

Enumeration value:

26

Description:

The connected drive is invalid.

Issue

Cause

Solution

-

The drive connected at the input Axis does not support all required functionalities.

The drive must support the SystemConfigurationItf.IF_RefActualValuesPosition interface.

The drive must support the SystemConfigurationItf.IF_RefActualValuesVelocity interface.

DriveNotInitialised

Enumeration name:

DriveNotInitialised

Enumeration value:

27

Description:

The connected drive is not initialized.

Issue

Cause

Solution

-

The function FC_DriveInit was not activated for the drive at the input Axis.

Before using the POU, the drive must be initialized using the function FC_DriveInit.

InOperation

Enumeration name:

InOperation

Enumeration value:

7

Description:

The order is executed.

The cam switch is enabled.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The POU is waiting for jobs.