MC_ReadBoolParameter

MC_ReadBoolParameter 1:

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

Syntax

Definition:

FUNCTION_BLOCK MC_ReadBoolParameter
VAR_INPUT
    Axis        : Type_PtpReadWriteParameter;
    Enable      : BOOL;
    ParameterId : EAxisParameterId;
    Mode        : EReadMode;
END_VAR
VAR_OUTPUT
    Valid       : BOOL;
    Busy        : BOOL;
    Error       : BOOL;
    ErrorId     : UDINT;
    Value       : BOOL;
END_VAR

MC_ReadBoolParameter 2: Inputs

Name

Type

Default

Description

Axis

Type_PtpReadWriteParameter

 

Reference to the axis

Enable

BOOL

 

Triggers a read on rising edge (EReadMode.Once) or every cycle while TRUE (EReadMode.Cyclic).

ParameterId

EAxisParameterId

 

Identifier of the parameter to read.

Mode

EReadMode

Once

Once: read once at rising edge of Enable. Cyclic: read every cycle while Enable is TRUE.

MC_ReadBoolParameter 3: Outputs

Name

Type

Description

Valid

BOOL

Valid output available at function block.

Busy

BOOL

Function block is not finished. Always FALSE with ReadMode Once.

Error

BOOL

Error occurred within function block.

ErrorId

UDINT

Error identifier

Value

BOOL

Last successfully read value of the parameter.

Weiterführende Informationen

Alternativ kann der Achszustand aus der PLC über die AXIS_REF Struktur ausgelesen werden.

myAxis.McToPlc.Std.AxisState

Informationen zu den einzelnen Zuständen sind im Abschnitt Zustandsdiagramm zusammengefasst.

Versionsinformation

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