Scalable curves
This library is used to generate scalable curves for an axis and to move them synchronously to a master position. This can also be used to carry out superimposed additional positioning.
TB_CamAdd
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.
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_xxbd00 or higherTECH_TYPES_xxbd05 or higherTECH_TOOLS_xxbd00 or higher
Eingänge
| 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. |
Ausgänge
| 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. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| a_CamTable | CAM_TABLE | Data point table of the normalized cams. |

TB_CamAdd
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.
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_xxbd00 or higherTECH_TYPES_xxbd05 or higherTECH_TOOLS_xxbd00 or higher
Eingänge
| 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. |
Ausgänge
| 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. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| a_CamTable | CAM_TABLE | Data point table of the normalized cams. |

TB_CamGetPos
This module determines the axis position of a cam at a specified master position.
The axis position of a cam at a specified master position is determined. The axis can thus traverse to this position, and then the cam can be started directly with the TB_CamStretch module. The master encoder must be at a standstill here!
The cam can thus be continued directly after a disturbance. Example: The machine has been stopped via an emergency stop, the axes (including the master) were without torque and changed their position. After acknowledgement of the emergency stop, all axes are brought under control. The valid cam position is then determined (TB_CamGetPos) for each axis and then assumed (TB_PosAbs). The cams are now restarted (TB_CamStretch).
A positive edge at x_Execute executes the calculation. Ensure here, that the offsets (di_xOffs and di_yOffs) and the stretch factors (di_xFact, di_yFact) correspond with the respective movement. The cam used (ui_CamId, i_kEndZ and ui_kEndN) must also be specified correctly.
Before the module can be used, the cam table is to be initialized by the TB_NormCamCreate module.
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.
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_xxbd00 or higherTECH_TYPES_xxbd05 or higherTECH_TOOLS_xxbd00 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Execute | BOOL | Positive edge starts the cam. |
| 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_kEndZ | INT | Slope numerator of the normalized cam at cam end. |
| ui_kEndN | UINT | Slope denominator of the normalized cam at cam end. |
| di_xPos | DINT | Position of the master axis in user units. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Error | BOOL | TRUE: The module has identified an error. |
| w_ErrorId | WORD | TRUE: The module has identified an error. |
| 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. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| a_CamTable | CAM_TABLE | Data point table of the normalized cams. |

TB_CamGetPos
This module determines the axis position of a cam at a specified master position.
The axis position of a cam at a specified master position is determined. The axis can thus traverse to this position, and then the cam can be started directly with the TB_CamStretch module. The master encoder must be at a standstill here!
The cam can thus be continued directly after a disturbance. Example: The machine has been stopped via an emergency stop, the axes (including the master) were without torque and changed their position. After acknowledgement of the emergency stop, all axes are brought under control. The valid cam position is then determined (TB_CamGetPos) for each axis and then assumed (TB_PosAbs). The cams are now restarted (TB_CamStretch).
A positive edge at x_Execute executes the calculation. Ensure here, that the offsets (di_xOffs and di_yOffs) and the stretch factors (di_xFact, di_yFact) correspond with the respective movement. The cam used (ui_CamId, i_kEndZ and ui_kEndN) must also be specified correctly.
Before the module can be used, the cam table is to be initialized by the TB_NormCamCreate module.
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.
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_xxbd00 or higherTECH_TYPES_xxbd05 or higherTECH_TOOLS_xxbd00 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Execute | BOOL | Positive edge starts the cam. |
| 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_kEndZ | INT | Slope numerator of the normalized cam at cam end. |
| ui_kEndN | UINT | Slope denominator of the normalized cam at cam end. |
| di_xPos | DINT | Position of the master axis in user units. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Error | BOOL | TRUE: The module has identified an error. |
| w_ErrorId | WORD | TRUE: The module has identified an error. |
| 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. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| a_CamTable | CAM_TABLE | Data point table of the normalized cams. |

TB_CamStretch
With this module, synchronous movements can be generated from scalable cams. The axis then moves in sync to a master position.
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.
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_xxbd00 or higherTECH_TYPES_xxbd05 or higherTECH_TOOLS_xxbd00 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Enabling of the module. |
| x_Execute | BOOL | Positive edge starts the cam. |
| x_Break | BOOL | TRUE: Cam execution is canceled immediately. |
| di_yPosAdd | DINT | An additional setpoint in 1/100th units of the axis can be connected here. The TB_PosAdd and TB_CamAdd modules are available for this purpose. |
| 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. |
| di_yEnd | DINT | End position of the cam in user units. If the input is not connected, di_yEnd = di_yOffs + di_yFact is set. The input must only then be used if the maximum position is not at the end of 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. |
| di_xSetPos | DINT | Set value of the position of the master axis in user units of the master axis. |
| di_ySetPos | DINT | Set value of the position of the axis in user units. |
| us_SetPosMode | USINT | Specifies how the positions are to be changed. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module is enabled (x_Enable = TRUE) and active. |
| x_CamActive | BOOL | TRUE: Cam being processed. |
| x_CamDone | BOOL | TRUE: Cam ended. x_CamDone is TRUE for exactly one cycle |
| di_Vel | DINT | Setpoint velocity of the axis in 1/100th user units/Ts. Ts is the cycle time of the setpoint event task. |
| di_Acc | DINT | Setpoint velocity of the axis in 1/100th user units/Ts2. Ts is the cycle time of the setpoint event task. |
| x_Error | BOOL | TRUE: The module has identified an error. |
| w_ErrorId | WORD | Error number of the module. See table below. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| di_xPos | DINT | Position of the master axis in user units. |
| di_yPos | DINT | Position of the master axis in user units. |
| a_CamTable | CAM_TABLE | Data point table of the normalized cams. |

TB_CamStretch
With this module, synchronous movements can be generated from scalable cams. The axis then moves in sync to a master position.
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.
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_xxbd00 or higherTECH_TYPES_xxbd05 or higherTECH_TOOLS_xxbd00 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Enable | BOOL | TRUE: Enabling of the module. |
| x_Execute | BOOL | Positive edge starts the cam. |
| x_Break | BOOL | TRUE: Cam execution is canceled immediately. |
| di_yPosAdd | DINT | An additional setpoint in 1/100th units of the axis can be connected here. The TB_PosAdd and TB_CamAdd modules are available for this purpose. |
| 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. |
| di_yEnd | DINT | End position of the cam in user units. If the input is not connected, di_yEnd = di_yOffs + di_yFact is set. The input must only then be used if the maximum position is not at the end of 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. |
| di_xSetPos | DINT | Set value of the position of the master axis in user units of the master axis. |
| di_ySetPos | DINT | Set value of the position of the axis in user units. |
| us_SetPosMode | USINT | Specifies how the positions are to be changed. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Active | BOOL | TRUE: Module is enabled (x_Enable = TRUE) and active. |
| x_CamActive | BOOL | TRUE: Cam being processed. |
| x_CamDone | BOOL | TRUE: Cam ended. x_CamDone is TRUE for exactly one cycle |
| di_Vel | DINT | Setpoint velocity of the axis in 1/100th user units/Ts. Ts is the cycle time of the setpoint event task. |
| di_Acc | DINT | Setpoint velocity of the axis in 1/100th user units/Ts2. Ts is the cycle time of the setpoint event task. |
| x_Error | BOOL | TRUE: The module has identified an error. |
| w_ErrorId | WORD | Error number of the module. See table below. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| di_xPos | DINT | Position of the master axis in user units. |
| di_yPos | DINT | Position of the master axis in user units. |
| a_CamTable | CAM_TABLE | Data point table of the normalized cams. |

TB_Curve_RT
...
Empfohlene Task: EVENT
Verwendete Bibliotheken: TECH_TYPES_xxbd06 or higher
Eingänge
| Marking: | Data type: | Default: | Data range: | Description: |
|---|---|---|---|---|
| x_Enable | BOOL | ... | ... | TRUE: Enabling of the module. |
| ud_Pos_Master | UDINT | ... | ... | ... |
| us_Res_Master | USINT | ... | ... | ... |
| us_Res_Cam | USINT | ... | ... | ... |
| di_CamOffset | DINT | ... | ... | ... |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| di_Delta_Pos_Master | DINT | ... |
| di_Pos_Table | DINT | ... |
| di_Delta_Pos_Slave | DINT | ... |
| w_Error | WORD | ... |
Ein-/Ausgänge
| Marking: | Data type: | Default: | Data range: | Description: |
|---|---|---|---|---|
| a_Cam_Table | DINT_16384_ARRAY | ... | ... | Table of normalized cam data points |
TB_PosRel
This module carries out relative positioning with the specified max. acceleration/deceleration and velocity. The movement parameters are specified in user units. A positive edge at the x_Start input executes relative positioning of the axis. The movement occurs smoothly with 5th degree polynomials. The max. acceleration is achieved, but never exceeded; the max. velocity can be reached, but is also never exceeded. If the travel range is short, the max. velocity is not reached. The cam table is loaded after the initial run-through of the module after program start. This process lasts approx. 1 ms (BM4_O_PLC01).
Attention: The TM_PosRel function module can only be used in a synchronized setpoint event task
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_PLC01_xxbd00 or higherMotion_Control_xxbd00 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Execute | BOOL | Pos. edge starts movement. |
| x_Break | BOOL | Positive edge stops the movement immediately. Stopping occurs with di_BreakDec. |
| di_Distance | DINT | Travel range in user units |
| di_MaxVel | DINT | Max. velocity in user units/s |
| di_MaxAcc | DINT | Max. acceleration in user units/s2 |
| di_MaxDec | DINT | Max. deceleration in user units/s2 |
| di_BreakDec | DINT | Max. deceleration upon cancellation in user units/s2 |
| i_T_Cycle | INT | Cycle time of setpoint event task in ms. 1, 2, 4 or 8 ms can be specified. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Running | BOOL | TRUE: Movement in progress |
| x_Done | BOOL | TRUE for one cycle: Movement complete |
| di_Vel | DINT | Setpoint velocity of the axis in 1/100th user units/Ts. Ts: Cycle time of setpoint event task |
| di_Acc | DINT | Setpoint acceleration of the axis in 1/100th user units/Ts2. Ts: Cycle time of setpoint event task |
| x_Errorr | BOOL | TRUE: Error detected |
| w_ErrorId | WORD | Error number. See error table |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| di_Pos | DINT | Setpoint mechanical position of the axis in user units. |

TB_PosRel
This module carries out relative positioning with the specified max. acceleration/deceleration and velocity. The movement parameters are specified in user units. A positive edge at the x_Start input executes relative positioning of the axis. The movement occurs smoothly with 5th degree polynomials. The max. acceleration is achieved, but never exceeded; the max. velocity can be reached, but is also never exceeded. If the travel range is short, the max. velocity is not reached. The cam table is loaded after the initial run-through of the module after program start. This process lasts approx. 1 ms (BM4_O_PLC01).
Attention: The TM_PosRel function module can only be used in a synchronized setpoint event task
Empfohlene Task: EVENT
Verwendete Bibliotheken: ARITHMETIC_PLC01_xxbd00 or higherMotion_Control_xxbd00 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Execute | BOOL | Pos. edge starts movement. |
| x_Break | BOOL | Positive edge stops the movement immediately. Stopping occurs with di_BreakDec. |
| di_Distance | DINT | Travel range in user units |
| di_MaxVel | DINT | Max. velocity in user units/s |
| di_MaxAcc | DINT | Max. acceleration in user units/s2 |
| di_MaxDec | DINT | Max. deceleration in user units/s2 |
| di_BreakDec | DINT | Max. deceleration upon cancellation in user units/s2 |
| i_T_Cycle | INT | Cycle time of setpoint event task in ms. 1, 2, 4 or 8 ms can be specified. |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Running | BOOL | TRUE: Movement in progress |
| x_Done | BOOL | TRUE for one cycle: Movement complete |
| di_Vel | DINT | Setpoint velocity of the axis in 1/100th user units/Ts. Ts: Cycle time of setpoint event task |
| di_Acc | DINT | Setpoint acceleration of the axis in 1/100th user units/Ts2. Ts: Cycle time of setpoint event task |
| x_Errorr | BOOL | TRUE: Error detected |
| w_ErrorId | WORD | Error number. See error table |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| di_Pos | DINT | Setpoint mechanical position of the axis in user units. |

TB_Spline
This module creates a data point table with normalized cam data points from given points. A cubic spline is used for this purpose. It is ensured that each data point is reached. This data point table can then be executed with TB_CamStretch.
The data points take the form of x/y positions. Here, x is the master position and y the accompanying axis position. The module then creates a normalized data point table with 512 data points from this. This can then be executed directly with TB_CamStretch. The cubic spline used ensures jerk-free traversal and the reaching of every data point.
Calculation occurs in one cycle and requires approx. 10 ms (SH03-30 and 10 data points). The calculation should occur in a cyclical task. A new cam can be calculated and accepted online.
Note: A new cam should only be transferred to TB_CamStretch at the beginning (with x_Execute), as it uses the connected data points (not a local copy) directly. Otherwise, a jerk or impact can occur during setpoint generation.
Empfohlene Task: Cyclic
Verwendete Bibliotheken: TECH_TYPES_xxbd05 or higherTECH_TOOLS_xxbd00 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Execute | BOOL | A positive edge starts the cam calculation and executes it in one cycle. The execution time is approx. 10 ms with an SH03-30 and 10 data points. |
| ui_CamId | UINT | Position of the first normalized cam data point in a_CamTable. 512 data points are generated. The position can be selected between 8192 and 15872. It makes sense to use a multiple of 512. |
| di_k1_Num | DINT | Numerator of cam slope at beginning of cam. |
| di_k1_Denum | DINT | Denominator of cam slope at beginning of cam |
| di_knNum | DINT | Numerator of cam slope at end of cam. |
| di_knDenum | DINT | Denominator of cam slope at end of cam. |
| di_yMax | DINT | Max value of cam (for scaling) |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Done | BOOL | TRUE: Calculation was successful. Normalized cam data points created. |
| x_Error | BOOL | TRUE: An error was identified during calculation. |
| w_ErrorId | WORD | Error number. See error table. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _Spline | SPLINE_DATA | Table of cam points. The x-values must be specified in ascending order. The y-values can be selected as desired. Both values are specified in the selected user units. Up to 256 points can be specified. The x-points do not need to be equidistant. In the following example, a spline cam is generated, which positions the axis from 0 degrees to 360° and back while the master has moved from 0 to 100 mm. |
| a_CamTable | CAM_TABLE | Data point table of the normalized cams. |

TB_Spline
This module creates a data point table with normalized cam data points from given points. A cubic spline is used for this purpose. It is ensured that each data point is reached. This data point table can then be executed with TB_CamStretch.
The data points take the form of x/y positions. Here, x is the master position and y the accompanying axis position. The module then creates a normalized data point table with 512 data points from this. This can then be executed directly with TB_CamStretch. The cubic spline used ensures jerk-free traversal and the reaching of every data point.
Calculation occurs in one cycle and requires approx. 10 ms (SH03-30 and 10 data points). The calculation should occur in a cyclical task. A new cam can be calculated and accepted online.
Note: A new cam should only be transferred to TB_CamStretch at the beginning (with x_Execute), as it uses the connected data points (not a local copy) directly. Otherwise, a jerk or impact can occur during setpoint generation.
Empfohlene Task: Cyclic
Verwendete Bibliotheken: TECH_TYPES_xxbd05 or higherTECH_TOOLS_xxbd00 or higher
Eingänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Execute | BOOL | A positive edge starts the cam calculation and executes it in one cycle. The execution time is approx. 10 ms with an SH03-30 and 10 data points. |
| ui_CamId | UINT | Position of the first normalized cam data point in a_CamTable. 512 data points are generated. The position can be selected between 8192 and 15872. It makes sense to use a multiple of 512. |
| di_k1_Num | DINT | Numerator of cam slope at beginning of cam. |
| di_k1_Denum | DINT | Denominator of cam slope at beginning of cam |
| di_knNum | DINT | Numerator of cam slope at end of cam. |
| di_knDenum | DINT | Denominator of cam slope at end of cam. |
| di_yMax | DINT | Max value of cam (for scaling) |
Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| x_Done | BOOL | TRUE: Calculation was successful. Normalized cam data points created. |
| x_Error | BOOL | TRUE: An error was identified during calculation. |
| w_ErrorId | WORD | Error number. See error table. |
Ein-/Ausgänge
| Marking: | Data type: | Description: |
|---|---|---|
| _Spline | SPLINE_DATA | Table of cam points. The x-values must be specified in ascending order. The y-values can be selected as desired. Both values are specified in the selected user units. Up to 256 points can be specified. The x-points do not need to be equidistant. In the following example, a spline cam is generated, which positions the axis from 0 degrees to 360° and back while the master has moved from 0 to 100 mm. |
| a_CamTable | CAM_TABLE | Data point table of the normalized cams. |
