Y_ReadMultipleParameters
This function will read a number of controller parameters at once. The parameters must be an LREAL type. Populate the parameter numbers into the ParamStruct, and the function block will supply the values to the requested parameters.
Refer to parameters with LREAL Data Type in the Axis Parameter List.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | Axis | AXIS_REF | Logical axis reference. This value can be located on the Configuration tab in the Hardware Configuration (logical axis number). | |
| V | ParamStruct | Yt_ParamStruct | Structure containing a list of parameter numbers to be read and their corresponding values. | |
| VAR_INPUT | ||||
| B | Enable | BOOL | The function will continue to execute every scan while Enable is held high and there are no errors. | FALSE |
| VAR_OUTPUT | ||||
| B | Valid | BOOL | Indicates that the function is operating normally and the outputs of the function are valid. | |
| E | Busy | BOOL | Set high upon the rising edge of the Execute input, and reset when Done, CommandAborted, or Error is true. In the case of a function block with an Enable input, a Busy output indicates the function is operating, but not ready to provide Valid information. (No Error) | |
| B | Error | BOOL | Set high if an error has occurred during the execution of the function block. This output is cleared when 'Execute' or 'Enable' goes low. | |
| E | ErrorID | UINT | If Error is true, this output provides the Error ID. This output is reset when 'Execute' or 'Enable' goes low. | |
| V | ErrorPrm | UINT | If there was an error while attempting to read one of the parameters listed in the ParamStruct, this output will contain the offending parameter number. | |
Notes
- Refer to parameters with LREAL Data Type in the Axis Parameter List. Only LREAL type parameters can be read with Y_ReadMultipleParameters.
- PrmStruct.LastPrm is the quantity of parameters to be read, which will be one less than the last array index value, because the array is zero based.
- BOOL parameters cannot be read with this function block. Use MC_ReadBoolParameter.
Error Description
See the
Function Block ErrorID List
Example
The ParamStruct is populated with the following Values for all of the ParamData indices: