MC_WriteBoolParameter

MC_WriteBoolParameter 1:

Boolean parameters for the axis can be written with the function block MC_WriteBoolParameter.

MC_WriteBoolParameter 2:

In this case "axis" refers to the TwinCAT NC axis and its parameters, and not the drive.

MC_WriteBoolParameter 3: Inputs

VAR_INPUT
    Execute         : BOOL;
    ParameterNumber : MC_AxisParameter;
    Value           : BOOL;
END_VAR

Name

Type

Description

Execute

BOOL

The command is executed with a rising edge.

ParameterNumber

MC_AxisParameter

Number of the parameter to be written.

Value

BOOL

Boolean value that is written.

MC_WriteBoolParameter 4: Inputs/outputs

VAR_IN_OUT
    Axis : AXIS_REF;
END_VAR

Name

Type

Description

Axis

AXIS_REF

Axis data structure that unambiguously addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state.

MC_WriteBoolParameter 5: Outputs

VAR_OUTPUT
    Done    : BOOL;
    Busy    : BOOL;
    Error   : BOOL;
    ErrorID : UDINT;
END_VAR

Name

Type

Description

Done

BOOL

TRUE if the parameters were written successfully.

Busy

BOOL

TRUE as soon as the command is started with "Execute" and as long as the command is processed. If "Busy" is FALSE, the function block is ready for a new order. At the same time, one of the outputs "Done" or "Error" is set.

Error

BOOL

TRUE, if an error occurs.

ErrorID

UDINT

If the error output is set, this parameter supplies the error number.

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v3.0.0

PC or CX (x86 or x64)

Tc2_MC2