MC_ReadCamInfo

MC_ReadCamInfo 1:

This function block reads information about active and buffered cam table couplings on a slave axis.

Syntax

Definition:

FUNCTION_BLOCK MC_ReadCamInfo
VAR_INPUT
    Slave                  : Type_Camming1D;
    Execute                : BOOL;
    CouplingInfo           : Pointer To CamCouplingInfo;
    NumberOfCouplings      : UDINT;
END_VAR
VAR_OUTPUT
    Done                   : BOOL;
    Busy                   : BOOL;
    Error                  : BOOL;
    ErrorId                : UDINT;
    NumberOfCouplingsFound : UDINT;
END_VAR

MC_ReadCamInfo 2: Inputs

Name

Type

Description

Slave

Type_Camming1D

Reference to the slave axis

Execute

BOOL

Read cam coupling information at rising edge

CouplingInfo

Pointer To CamCouplingInfo

Pointer to array of CamCouplingInfo structures to fill

NumberOfCouplings

UDINT

Capacity of the CouplingInfo array.

MC_ReadCamInfo 3: Outputs

Name

Type

Description

Done

BOOL

TRUE when the cam coupling information has been read successfully

Busy

BOOL

TRUE while the function block is executing

Error

BOOL

TRUE if an error occurred

ErrorId

UDINT

Error code

NumberOfCouplingsFound

UDINT

Number of cam table couplings found on the slave axis (at most 8).
This can be larger than NumberOfCouplings, in which case only the first NumberOfCouplings of them were written to CouplingInfo.

Possible error codes

For this function block, the following values, among others, are possible for the ErrorId output:

Error(Hex)

Error(Dec)

Error type

Description

0x8145

33093

Function Block

Mapping of cyclic interface between NC and PLC is missing (e.g., AXIS_REF, AXES_GROUP_REF, ...). A reference used by the function block (e.g., to an axis, group, mover or other motion object) is not linked to the corresponding NC object, or its cyclic mapping is incomplete.

0x8148

33096

Function Block

Invalid input value. At least one input of the function block is outside its allowed range or inconsistent with the other inputs.

0x8151

33105

State

Command is not allowed in current axis state. If the axis has no controller enable, is in error or has been added to a group, some commands are not permitted.

An overview of all NC error codes can be found here:

Version information

  • TwinCAT Standard >= v3.1.4026.23.1
  • TF5550 MC3 Camming >= v4.0.19 (includes TF5500 MC3 Base >= v4.0.19)

Required License

TC3 MC3 Camming