Skip to main content

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

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_EnableBOOLTRUE: Enabling of the module.
x_ExecuteBOOLPositive edge starts the cam.
di_xPosDINTCurrent master position in user units.
ui_CamIdUINTSpecifies 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_xOffsDINTStart position of the master axis for movement in user units.
di_yOffsDINTOffset 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_xFactDINTStretch factor of the master axis in user units of the master axis. Specification of the master path while the cam is executed.
di_yFactDINTStretch factor of the axis in user units. Specification of the axis path to be traversed with the cam.
i_kEndNumINTSlope numerator of the normalized cam at cam end.
ui_kEndDenumUINTSlope denominator of the normalized cam at cam end.

Ausgänge

Marking:Data type:Description:
x_ActiveBOOLTRUE: Module is active and waits until the master position reaches the start position di_xOffs.
x_CamActiveBOOLTRUE: Movement execution is started. The axis movement is dependent on the master movement.
di_yPosDINTSetpoint 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_ErrorBOOLTRUE: The module has identified an error.
w_ErrorIdWORDTRUE: The module has identified an error.

Ein-/Ausgänge

Marking:Data type:Description:
a_CamTableCAM_TABLEData point table of the normalized cams.
Representation in FBD

TB_CamAdd

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_EnableBOOLTRUE: Enabling of the module.
x_ExecuteBOOLPositive edge starts the cam.
di_xPosDINTCurrent master position in user units.
ui_CamIdUINTSpecifies 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_xOffsDINTStart position of the master axis for movement in user units.
di_yOffsDINTOffset 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_xFactDINTStretch factor of the master axis in user units of the master axis. Specification of the master path while the cam is executed.
di_yFactDINTStretch factor of the axis in user units. Specification of the axis path to be traversed with the cam.
i_kEndNumINTSlope numerator of the normalized cam at cam end.
ui_kEndDenumUINTSlope denominator of the normalized cam at cam end.

Ausgänge

Marking:Data type:Description:
x_ActiveBOOLTRUE: Module is active and waits until the master position reaches the start position di_xOffs.
x_CamActiveBOOLTRUE: Movement execution is started. The axis movement is dependent on the master movement.
di_yPosDINTSetpoint 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_ErrorBOOLTRUE: The module has identified an error.
w_ErrorIdWORDTRUE: The module has identified an error.

Ein-/Ausgänge

Marking:Data type:Description:
a_CamTableCAM_TABLEData point table of the normalized cams.
Representation in FBD

TB_CamGetPos

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_ExecuteBOOLPositive edge starts the cam.
ui_CamIdUINTSpecifies 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_xOffsDINTStart position of the master axis for movement in user units.
di_yOffsDINTOffset 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_xFactDINTStretch factor of the master axis in user units of the master axis. Specification of the master path while the cam is executed.
di_yFactDINTStretch factor of the axis in user units. Specification of the axis path to be traversed with the cam.
i_kEndZINTSlope numerator of the normalized cam at cam end.
ui_kEndNUINTSlope denominator of the normalized cam at cam end.
di_xPosDINTPosition of the master axis in user units.

Ausgänge

Marking:Data type:Description:
x_ErrorBOOLTRUE: The module has identified an error.
w_ErrorIdWORDTRUE: The module has identified an error.
di_yPosDINTSetpoint 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_CamTableCAM_TABLEData point table of the normalized cams.
Representation in FBD

TB_CamGetPos

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_ExecuteBOOLPositive edge starts the cam.
ui_CamIdUINTSpecifies 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_xOffsDINTStart position of the master axis for movement in user units.
di_yOffsDINTOffset 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_xFactDINTStretch factor of the master axis in user units of the master axis. Specification of the master path while the cam is executed.
di_yFactDINTStretch factor of the axis in user units. Specification of the axis path to be traversed with the cam.
i_kEndZINTSlope numerator of the normalized cam at cam end.
ui_kEndNUINTSlope denominator of the normalized cam at cam end.
di_xPosDINTPosition of the master axis in user units.

Ausgänge

Marking:Data type:Description:
x_ErrorBOOLTRUE: The module has identified an error.
w_ErrorIdWORDTRUE: The module has identified an error.
di_yPosDINTSetpoint 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_CamTableCAM_TABLEData point table of the normalized cams.
Representation in FBD

TB_CamStretch

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_EnableBOOLTRUE: Enabling of the module.
x_ExecuteBOOLPositive edge starts the cam.
x_BreakBOOLTRUE: Cam execution is canceled immediately.
di_yPosAddDINTAn 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_CamIdUINTSpecifies 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_xOffsDINTStart position of the master axis for movement in user units.
di_yOffsDINTOffset 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_xFactDINTStretch factor of the master axis in user units of the master axis. Specification of the master path while the cam is executed.
di_yFactDINTStretch factor of the axis in user units. Specification of the axis path to be traversed with the cam.
di_yEndDINTEnd 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_kEndNumINTSlope numerator of the normalized cam at cam end.
ui_kEndDenumUINTSlope denominator of the normalized cam at cam end.
di_xSetPosDINTSet value of the position of the master axis in user units of the master axis.
di_ySetPosDINTSet value of the position of the axis in user units.
us_SetPosModeUSINTSpecifies how the positions are to be changed.

Ausgänge

Marking:Data type:Description:
x_ActiveBOOLTRUE: Module is enabled (x_Enable = TRUE) and active.
x_CamActiveBOOLTRUE: Cam being processed.
x_CamDoneBOOLTRUE: Cam ended. x_CamDone is TRUE for exactly one cycle
di_VelDINTSetpoint velocity of the axis in 1/100th user units/Ts. Ts is the cycle time of the setpoint event task.
di_AccDINTSetpoint velocity of the axis in 1/100th user units/Ts2. Ts is the cycle time of the setpoint event task.
x_ErrorBOOLTRUE: The module has identified an error.
w_ErrorIdWORDError number of the module. See table below.

Ein-/Ausgänge

Marking:Data type:Description:
di_xPosDINTPosition of the master axis in user units.
di_yPosDINTPosition of the master axis in user units.
a_CamTableCAM_TABLEData point table of the normalized cams.
Representation in FBD

TB_CamStretch

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_EnableBOOLTRUE: Enabling of the module.
x_ExecuteBOOLPositive edge starts the cam.
x_BreakBOOLTRUE: Cam execution is canceled immediately.
di_yPosAddDINTAn 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_CamIdUINTSpecifies 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_xOffsDINTStart position of the master axis for movement in user units.
di_yOffsDINTOffset 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_xFactDINTStretch factor of the master axis in user units of the master axis. Specification of the master path while the cam is executed.
di_yFactDINTStretch factor of the axis in user units. Specification of the axis path to be traversed with the cam.
di_yEndDINTEnd 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_kEndNumINTSlope numerator of the normalized cam at cam end.
ui_kEndDenumUINTSlope denominator of the normalized cam at cam end.
di_xSetPosDINTSet value of the position of the master axis in user units of the master axis.
di_ySetPosDINTSet value of the position of the axis in user units.
us_SetPosModeUSINTSpecifies how the positions are to be changed.

Ausgänge

Marking:Data type:Description:
x_ActiveBOOLTRUE: Module is enabled (x_Enable = TRUE) and active.
x_CamActiveBOOLTRUE: Cam being processed.
x_CamDoneBOOLTRUE: Cam ended. x_CamDone is TRUE for exactly one cycle
di_VelDINTSetpoint velocity of the axis in 1/100th user units/Ts. Ts is the cycle time of the setpoint event task.
di_AccDINTSetpoint velocity of the axis in 1/100th user units/Ts2. Ts is the cycle time of the setpoint event task.
x_ErrorBOOLTRUE: The module has identified an error.
w_ErrorIdWORDError number of the module. See table below.

Ein-/Ausgänge

Marking:Data type:Description:
di_xPosDINTPosition of the master axis in user units.
di_yPosDINTPosition of the master axis in user units.
a_CamTableCAM_TABLEData point table of the normalized cams.
Representation in FBD

TB_Curve_RT

TB_Curve_RT

...

Empfohlene Task: EVENT

Verwendete Bibliotheken: TECH_TYPES_xxbd06 or higher

Eingänge

Marking:Data type:Default:Data range:Description:
x_EnableBOOL......TRUE: Enabling of the module.
ud_Pos_MasterUDINT.........
us_Res_MasterUSINT.........
us_Res_CamUSINT.........
di_CamOffsetDINT.........

Ausgänge

Marking:Data type:Description:
di_Delta_Pos_MasterDINT...
di_Pos_TableDINT...
di_Delta_Pos_SlaveDINT...
w_ErrorWORD...

Ein-/Ausgänge

Marking:Data type:Default:Data range:Description:
a_Cam_TableDINT_16384_ARRAY......Table of normalized cam data points

TB_PosRel

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_ExecuteBOOLPos. edge starts movement.
x_BreakBOOLPositive edge stops the movement immediately. Stopping occurs with di_BreakDec.
di_DistanceDINTTravel range in user units
di_MaxVelDINTMax. velocity in user units/s
di_MaxAccDINTMax. acceleration in user units/s2
di_MaxDecDINTMax. deceleration in user units/s2
di_BreakDecDINTMax. deceleration upon cancellation in user units/s2
i_T_CycleINTCycle time of setpoint event task in ms. 1, 2, 4 or 8 ms can be specified.

Ausgänge

Marking:Data type:Description:
x_RunningBOOLTRUE: Movement in progress
x_DoneBOOLTRUE for one cycle: Movement complete
di_VelDINTSetpoint velocity of the axis in 1/100th user units/Ts.
Ts: Cycle time of setpoint event task
di_AccDINTSetpoint acceleration of the axis in 1/100th user units/Ts2.
Ts: Cycle time of setpoint event task
x_ErrorrBOOLTRUE: Error detected
w_ErrorIdWORDError number. See error table

Ein-/Ausgänge

Marking:Data type:Description:
di_PosDINTSetpoint mechanical position of the axis in user units.
Representation in FBD

TB_PosRel

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_ExecuteBOOLPos. edge starts movement.
x_BreakBOOLPositive edge stops the movement immediately. Stopping occurs with di_BreakDec.
di_DistanceDINTTravel range in user units
di_MaxVelDINTMax. velocity in user units/s
di_MaxAccDINTMax. acceleration in user units/s2
di_MaxDecDINTMax. deceleration in user units/s2
di_BreakDecDINTMax. deceleration upon cancellation in user units/s2
i_T_CycleINTCycle time of setpoint event task in ms. 1, 2, 4 or 8 ms can be specified.

Ausgänge

Marking:Data type:Description:
x_RunningBOOLTRUE: Movement in progress
x_DoneBOOLTRUE for one cycle: Movement complete
di_VelDINTSetpoint velocity of the axis in 1/100th user units/Ts.
Ts: Cycle time of setpoint event task
di_AccDINTSetpoint acceleration of the axis in 1/100th user units/Ts2.
Ts: Cycle time of setpoint event task
x_ErrorrBOOLTRUE: Error detected
w_ErrorIdWORDError number. See error table

Ein-/Ausgänge

Marking:Data type:Description:
di_PosDINTSetpoint mechanical position of the axis in user units.
Representation in FBD

TB_Spline

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_ExecuteBOOLA 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_CamIdUINTPosition 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_NumDINTNumerator of cam slope at beginning of cam.
di_k1_DenumDINTDenominator of cam slope at beginning of cam
di_knNumDINTNumerator of cam slope at end of cam.
di_knDenumDINTDenominator of cam slope at end of cam.
di_yMaxDINTMax value of cam (for scaling)

Ausgänge

Marking:Data type:Description:
x_DoneBOOLTRUE: Calculation was successful. Normalized cam data points created.
x_ErrorBOOLTRUE: An error was identified during calculation.
w_ErrorIdWORDError number. See error table.

Ein-/Ausgänge

Marking:Data type:Description:
_SplineSPLINE_DATATable 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_CamTableCAM_TABLEData point table of the normalized cams.
Representation in FBD

TB_Spline

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_ExecuteBOOLA 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_CamIdUINTPosition 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_NumDINTNumerator of cam slope at beginning of cam.
di_k1_DenumDINTDenominator of cam slope at beginning of cam
di_knNumDINTNumerator of cam slope at end of cam.
di_knDenumDINTDenominator of cam slope at end of cam.
di_yMaxDINTMax value of cam (for scaling)

Ausgänge

Marking:Data type:Description:
x_DoneBOOLTRUE: Calculation was successful. Normalized cam data points created.
x_ErrorBOOLTRUE: An error was identified during calculation.
w_ErrorIdWORDError number. See error table.

Ein-/Ausgänge

Marking:Data type:Description:
_SplineSPLINE_DATATable 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_CamTableCAM_TABLEData point table of the normalized cams.
Representation in FBD