Y_VerifyParameters
This Function Block compares the current parameters in the drive with the parameter file stored in the controller.
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). | |
| VAR_INPUT | Default | |||
| B | Execute | BOOL | Upon the rising edge, all other function block inputs are read and the function is initiated. To modify an input, change the value and re-trigger the execute input. | FALSE |
| V | File | STRING | Optional, but if specified it is relative to /opt/plcnext/projects/PCWE/Plc/DriveParam/ on the controller. If the file name is not specified, then it defaults to {AxisName}DrivePn.xml, which is written to the controller when a project is written to the controller using iCube Engineer. | AXIS#DrivePn.xml |
| VAR_OUTPUT | ||||
| B | Done | BOOL | Set high when the commanded action has completed successfully. If another block takes control before the action is completed, the Done output will not be set. This output is reset when Execute goes low. | |
| 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 | Matches | BOOL | Set to True when the current drive parameters match the parameter file. | |
| V | InvalidParameter | UINT | If Matches is False, this is set to the first drive parameter number that does not match. | |
| V | Expected | DINT | If Matches is False, Expected will contain the value in the parameter file. | |
| V | Actual | DINT | If Matches is False, Actual contains the actual value on the drive. | |
Notes
- This function is useful to determine if a device/servo has been replaced in the field. A check between the parameters saved on the controller and the parameters currently active on the device/servo is performed.
-
Parameter files are installed at this path on the controller's filesystem:
- Default: /opt/plcnext/projects/PCWE/Plc/DefaultDriveParam/{axisname}DrivePn.xml
- User: /opt/plcnext/projects/PCWE/Plc/DriveParam/{axisname}DrivePn.xml
Related Function Blocks
Error Description
See the
Function Block ErrorID List
Example
Using
Y_VerifyParameters
to compare the ServoPack parameter list saved in the controller flash and in the Servopack.