MC_ReadBoolParameter
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
Inputs
|
Name |
Type |
Default |
Description |
|---|---|---|---|
|
Axis |
|
Reference to the axis | |
|
Enable |
BOOL |
|
Triggers a read on rising edge (EReadMode.Once) or every cycle while TRUE (EReadMode.Cyclic). |
|
ParameterId |
|
Identifier of the parameter to read. | |
|
Mode |
Once |
Once: read once at rising edge of Enable. Cyclic: read every cycle while Enable is TRUE. |
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.AxisStateInformationen zu den einzelnen Zuständen sind im Abschnitt Zustandsdiagramm zusammengefasst.
Versionsinformation
- TwinCAT Standard >= v3.1.4026.23.1
- TF5500 MC3 Base >= v4.0.6