Y_CamFileSelect
Y_CamFileSelectloads a cam table from a CSV file into the motion memory.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_INPUT | ||||
| V | File | STRING | File name of cam table. See Notes and Example for supported format. See "Memory area available for user files in ic92xx" for path where cam file can be stored. Additional information is available in the notes and example below. | (Empty String) |
| B | Execute | BOOL | The Execute input on the Y_CamFileSelect block should be interlocked with the busy output so that the Execute input will not see a rising edge while the busy output is set. | FALSE |
| 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. | |
| B | 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. |
|
| B | CamTableID | UINT | A reference to the cam memory in the motion engine. |
|
| V | MasterCycle | LREAL | Difference between the last and first master positions in the table. |
|
| V | SlaveCycle | LREAL | Difference between the last and first slave positions in the table. |
|
Notes
- Supported File Naming Convention: 8.3 format.
- Supported File format: .CSV file - simple master slave pairs with linear interpolation between the points
- Default directory for user cam files is defined in Memory area available for user files in ic92xx . Filenames without paths will be searched in this directory.
- Other paths mappings are available:
- "data/cam/*" --> /opt/plcnext/user/data/cam
- "tempData/cam/*" --> /media/ramdisk/user/data/cam/
- Any absolute path (beginning with "/") will be treated as such
1. This file has an optional header with the following values:
- ‘MasterIncremental’ (case insensitive): If ‘TRUE’ (case insensitive) or ‘1’, then the master values are incrementally defined. In other words, each value represents an addition to the previous value. The default is false.
- ‘SlaveIncremental’ (case insensitive): If ‘TRUE’ (case insensitive) or ‘1’, then the slave values are incrementally defined. In other words, each value represents an addition to the previous value. The default is false.
- ‘Rows’ (case insensitive): Specifies the number of rows to read. Defining this value speeds up reading the file. This header parameter is optional.
2. If incrementally defined, the start of each table is assumed to be zero.
- Once the file is loaded into the motion memory, the CamTableID (and the cam table it refers to) will be valid until is executed or the controller power is cycled (rebooted). Only the CSV file may be stored in flash memory. The cam data transferred to the motion memory resides in RAM. Y_ReleaseCamTable
- To modify the existing cam data (CamTableID already obtained), use and in the application program. Y_ReadCamTable Y_WriteCamTable
- CamTableID can be used by more than one master/slave relationship. Modifying the cam table (via and ) will affect all relationships. Y_ReadCamTable Y_WriteCamTable
- If a CamTableID is no longer needed, the application program should release the cam memory using . Y_ReleaseCamTable
- Refer to Cam Data Managementfor more information regarding cam file creation.
Error Description
See the
Function Block ErrorID List
Example 1
This is an example of how this FB should be used in the application. File path points to the temporary location in the iCube Controller.
The cam file is located on the controller at the following location.
Example 2
Example 3
Cam file path not specified.
Location:
Example 4
File Path to the permanent location in the controller.