Connect

Connect 1:

Stores a reference to an existing cam table object. The cam table must have been previously linked to McToPlc, or the object ID must be passed as parameter.
Returns 0 on success or a non-zero error code.

Syntax

Definition:

METHOD Connect : UDINT
VAR_INPUT
    OptionalOid : OTCID;
END_VAR

Connect 2: Inputs

Name

Type

Description

OptionalOid

OTCID

Cam table object ID, used when McToPlc is not linked. If both are set, McToPlc takes priority.

Connect 3: Return value

UDINT

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

0x8120

33056

Environment

Invalid configuration for object (e.g., in TwinCAT 3 Engineering (XAE)). The static configuration of the object (parameters, init values, linked symbols) is incomplete or invalid, so the object cannot reach the target state.

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