Y_GP_WritePFFile
Y_GP_WritePFFile
is used within Pendant_Driver as a method to write a file containing part frame data to the controller's flash memory.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | AxesGroup | AXES_GROUP_REF | A logical reference to a group of axes, which contains several additional substructures pertaining to the group. | |
| V | UserAppData | Yt_GP_UserApplicationData | Structure containing the information of the Part Frame to be saved in the file. | |
| VAR_INPUT | ||||
| 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 | FrameSet | Yt_String32 | Name of the .FS file to be stored in the flash memory of the controller. | 'MyUserFrames' |
| VAR_OUTPUT | ||||
| B | Done | BOOL | Indicates that the function is operating normally and the outputs of the function are valid. | |
| B | Busy | BOOL | Set high upon the rising edge of the Execute input, and reset when Done, 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 | ErrorRow | INT | If applicable, indicates the row in the file which generated the error. | |
| V | ErrorCol | INT | If applicable, indicates the column in the file which generated the error. | |
Notes
-
UserAppData.PartFrame will be stored to the file for each part frame's pertinent information.
-
The .FS files are written to the following path in the controller
/opt/plcnext/user/data, which is the available memory for user files (see more details in
Memory area available for user files in ic92xx).
Error Description
See the Function Block ErrorID List.
Example
Writing the information inU
serAppData.PartFrame tothe file 'PFFile.FS' in the flash memory of the controller. Notice that the file extension nor the path of the file are given in the 'FrameSet' input, just the file name. For reading files see
Y_GP_ReadPFFile.