MC_WriteBoolParameter

MC_WriteBoolParameter 1:

This function block writes a boolean parameter value to the axis.
The command is typically processed synchronously.

Syntax

Definition:

FUNCTION_BLOCK MC_WriteBoolParameter
VAR_INPUT
    Axis        : Type_PtpReadWriteParameter;
    Execute     : BOOL;
    ParameterId : EAxisParameterId;
    Value       : BOOL;
END_VAR
VAR_OUTPUT
    Done        : BOOL;
    Busy        : BOOL;
    Error       : BOOL;
    ErrorId     : UDINT;
END_VAR

MC_WriteBoolParameter 2: Inputs

Name

Type

Default

Description

Axis

Type_PtpReadWriteParameter

 

Reference to the axis

Execute

BOOL

 

Trigger the command with rising edge.

ParameterId

EAxisParameterId

Invalid

Identifier of the parameter to write.

Value

BOOL

 

Value of the parameter to write.

MC_WriteBoolParameter 3: Outputs

Name

Type

Description

Done

BOOL

Parameter value has been successfully written.

Busy

BOOL

Function block is not finished.

Error

BOOL

Error occurred within function block.

ErrorId

UDINT

Error identifier

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.

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

Version information

  • TwinCAT Standard >= v3.1.4026.23.1
  • TF5500 MC3 Base >= v4.0.6