Y_CA_CamTableUpdate
This function block aids with cam file management when on the fly changes to the table data are required. It supports two tables: one which may be actively running in the motion engine, and one that may be recalculated and transferred to the motion engine. It contains the Y_CamStructSelect and Y_WriteCamTable function blocks.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | Slave | AXIS_REF | A logical reference to the slave axis. | |
| B | CamTable | Yt_MS_CamStruct | Cam data structure. Can be downloaded to the motion engine using Y_CamStructSelect. | |
| V | TableIDs | Yt_CA_TableIDStruct | Contains an Active and Inactive TableID | |
| 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 |
| 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. | |
Notes
• If both TableIDs in the TableIDs input are zero, then this block automatically uses Y_CamStructSelect to send the first CamTable and obtain the CamTableID.
• If the event causing the cam tables to update is fired too frequently, this block limits the cam table transfer and swap by holding in a Busy state while the previous table transferred is still waiting to become the active table. In this way, it helps to stage the table swapping so that the application does not resort to writing over an active table, which can cause the slave to jump.
Error Description
Refer to the Function Block ErrorID List .
Example 1:
In this example, assume that some event has occurred which triggers the need for a new cam table to be generated using Y_CA_CamGenerator . CamGenerator in turn fires CamTableUpdate to send the new CamTable to the motion engine. CamTableUpdate manages the active and inactive TableIDs, which can then be used with Y_CamIn. The Table.Active variable will contain the TableID of the last table transferred, so the next time the rising edge of Y_CamIn is triggered, the new table will be used. This can be done while camming is currently engaged.
Example 2: Using Two Cam Tables
• One will be actively running the motion
• One will be "on deck" to take new changes