MCV_ReadParamValue
Read parameter value
This function block reads the parameter values from the original list or work list of a selected parameter set. If the parameter searched for is in the original list that still exists, it is returned as the "old parameter". If a work list exists and contains the parameter value, it is returned as the "new parameter".
Notice
The parameter value effective in the controller may differ from the two parameter values read in if the parameter value was corrected in the controller due to a warning when interpreting the original or work list.
After activation without a warning, the parameter value in the work list is active in the controller. Otherwise, the value of the original list is taken.
Block diagram
FB parameters
VAR_IN_OUT | ||
Variable name | Data type | Description |
Axis | AXIS_REF | Axis reference |
VAR_INPUT | ||
Variable name | Data type | Description |
Execute | BOOL | The changed parameters are saved on the rising edge. |
NCListTypeIn | STRING | Identifier for parameter or list type |
NCParamSetIDIn | UINT | Number of the parameter set from which the parameter value is to be read. |
NCParamIdentIn | STRING | Identifier of the parameter whose value is to be read, |
VAR_OUTPUT | ||
Variable name | Data type | Description |
Valid | BOOL | Is TRUE when the change parameters were saved successfully. |
Busy | BOOL | Is TRUE if the FB is still active. |
NCListTypeOut | STRING | Identifier for parameter or list type |
NCParamSetIDOut | UINT | Number of the parameter set which was read from the parameter value. |
NCParamIdentOut | STRING | Identifier for parameter or list type |
NCOldParamValueRead | BOOL | Is TRUE if the parameter identifier was in the original list. |
NCOldParamValueOut | STRING | Parameter value from the original list. |
NCNewParamValueRead | BOOL | Is TRUE if the parameter identifier was in the work list. |
NCNewParamValueOut | STRING | Parameter value from the work list. |
NCWarning | BOOL | Is TRUE if a warning occurred in the ISG-MCP. |
NCError | BOOL | Is TRUE if an error occurred in the MCE when a parameter value is read. |
NCErrorCode | UDINT | Error code of the error or warning occurring in the ISG-MCP. |
Error | BOOL | Is TRUE if the FB is in error state. Saving the changed parameters was not successful. |
ErrorID | WORD | Error code |
1) Availability is dependent on the MCE used.
Behaviour of the FB:
- The FB is in an error state if "Error" = TRUE. The parameter value could not be read correctly. An error occurred either in the function block itself or in the ISG-MCP. The "NCError" output parameter indicates whether an error occurred in the ISG-MCP.
- The ISG-MCP returns an error if the parameter value is not in any of the lists.
- If the value of a parameter is determined from the active parameter set, the code of the active parameter set is first determined by an instance of the MCV_ReqParamSetID. This code is applied to the “NCParamSetIDIn” input of the MCV_ReadParamValue The parameter value from the active parameter set is then applied to the “NCOldParamValueOut” output and is valid when the “NCOldParamValueRead” output = TRUE. If a work list exists at the same time, the value from it is indicated at the “NCNewParamValueOut” output.