MC_ReadParameter_BkPlcMc (from V3.0)
This function block reads the non-boolean parameters of an axis. The function block MC_ReadBoolParameter_BkPlcMc is available for boolean parameters.
Inputs
VAR_INPUT
Enable: BOOL;
ParameterNumber: INT;
END_VAR
Name | Type | Description |
---|---|---|
Enable | BOOL | A reading process is initiated by a rising edge at this input. |
ParameterNumber | INT | This code number specifies the parameter that is to be read. Only named constants from E_TcMCParameter should be used. |
Inputs/outputs
VAR_IN_OUT
Axis: AXIS_REF_BkPlcMc;
END_VAR
Name | Type | Description |
---|---|---|
Axis | AXIS_REF_BkPlcMc | Here, the address of a variable of type AXIS_REF_BkPlcMc should be transferred. |
Outputs
VAR_OUTPUT
Busy: BOOL;
Valid: BOOL;
Error: BOOL;
ErrorID: UDINT;
Value: LREAL;
END_VAR
Name | Type | Description |
---|---|---|
Busy | BOOL | Indicates that a command is being processed. |
Valid | BOOL | Successful execution of the reading process is indicated here. |
Error | BOOL | The occurrence of an error is indicated here. |
ErrorID | UDINT | An encoded indication of the cause of the error is provided here. |
Value | LREAL | The value of the parameter is made available here. |
Behavior of the function block
On a rising edge at Enable the function block checks the transferred axis interface. A number of problems can be detected and reported during this process:
- If an unsupported value is given to ParameterNumber the system responds with Error and ErrorID:=dwTcHydErrCdNotSupport.
The desired parameter value is made available at Value, and Done is asserted if these checks can be carried out without problems.
A falling edge at Enable clears all the pending output signals.
![]() | This function block requires no time for executing its tasks. The output Busy will never assume the value TRUE and only exists for compatibility reasons. |