This module generates cyclical setpoint positions in user units and can execute additional positioning in conjunction with technology modules such as TB_CamStretch.
Cams can be added with this module. The added cam may not extend past the end of the basic cam. Several additional cams can be grouped together. The last added cam must end with a rest.
To avoid jerks and impacts, it must be ensured that the positions and slopes at the end and beginning are the same via the scales and offsets of the cams.
Note: Before the module can be executed, the cam data points of the normalized cam must be created. The TB_NormCamCreate module can be used for this purpose.
| Recommended task: | EVENT |
| Libraries used: | ARITHMETIC_xxbd00 or higher TECH_TYPES_xxbd05 or higher TECH_TOOLS_xxbd00 or higher |
| Marking: | Data type: | Description: |
|---|---|---|
| a_CamTable | CAM_TABLE | Data point table of the normalized cams. |
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Enabling of the module. |
| x_Execute | BOOL | Positive edge starts the cam. |
| di_xPos | DINT | Current master position in user units. |
| ui_CamId | UINT | Specifies the cam to be executed. User cams can also be saved in the a_CamTable data point table. The first cam should be saved from position 8192. The position of the first data point is then specified at ui_CamId. A cam must fulfill the following criteria: It must be normalized to 0 to 16,777,216 in the x- and y-directions. The curve at the beginning and end must be zero. 512 data points for the x-positions 0, 32,768, 65,536, …, 16,744,448 are specified, and the accompanying y-value is saved in the _SyncCam table. The x-value is not saved. |
| di_xOffs | DINT | Start position of the master axis for movement in user units. |
| di_yOffs | DINT | Offset of the axis up to start of the cam in user units. The current position of the axis should be specified for di_yOffs so that the axis does not change its position abruptly after the cam start. |
| di_xFact | DINT | Stretch factor of the master axis in user units of the master axis. Specification of the master path while the cam is executed. |
| di_yFact | DINT | Stretch factor of the axis in user units. Specification of the axis path to be traversed with the cam. |
| i_kEndNum | INT | Slope numerator of the normalized cam at cam end. |
| ui_kEndDenum | UINT | Slope denominator of the normalized cam at cam end. |
| ui_CamId | Description: | k_EndNum | k_EndDenum |
|---|---|---|---|
| 0 | Rest-in-rest cam with no velocity plateau | 0 | 1 |
| 1 | Start cam. Rest-in-velocity | 2 | 1 |
| 2 | Straight | 1 | 1 |
| 3 | Stop cam, velocity-in-rest | 0 | 1 |
| 4 | Rest-in-rest cam with 1/3 acceleration, 1/3 const. velocity and 1/3 deceleration | 0 | 1 |
| 5-15 | Reserved | ||
| 8192 | 1st User cam | ||
| 8704 | 2nd User cam | ||
| : | : | ||
| 15872 | 16th User cam |
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module is active and waits until the master position reaches the start position di_xOffs. |
| x_CamActive | BOOL | TRUE: Movement execution is started. The axis movement is dependent on the master movement. |
| di_yPos | DINT | Setpoint position of the axis in 1/100th user units. This position can be connected directly to the di_yPosAdd input of the technology module TB_SyncLin or TB_SyncRot, for example. |
| x_Error | BOOL | TRUE: The module has identified an error. |
| w_ErrorId | WORD | TRUE: The module has identified an error. |
| w_ErrorId | Description: |
|---|---|
| 0 | No error active. |
| 2 | Cam data error. TM_NormCamCreate must be executed and the cam table connected before use. |
| 3 | di_xFact negative. The x-factor must be positive. |
| 999 | No technology license. Use PLC with technology license. |