WriteData

WriteData 1:

Calculates the entire cam table from a new set of data points.
Returns 0 on success or a non-zero error code.

Syntax

Definition:

METHOD WriteData : UDINT
VAR_INPUT
    SourceAddress         : Pointer To MotionFunctionPoint;
    NumberOfPoints        : UDINT;
    Periodic              : BOOL;
    ContinuityRequirement : EContinuity;
END_VAR

WriteData 2: Inputs

Name

Type

Description

SourceAddress

Pointer To MotionFunctionPoint

Pointer to the new set of data points.

NumberOfPoints

UDINT

Number of data points in the source array.

Periodic

BOOL

TRUE for a periodic cam table.

ContinuityRequirement

EContinuity

Minimum continuity requirement. The higher the requirement, the stricter the point validation.

WriteData 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: