TB_TimeToTravel

Representation in FBD

General Information

To compensate for or pre-control dead times, it is necessary to calculate the path covered by an axis during a specified time in advance. The TB_TimeToTravel function calculates this path (UDINT type). In conjunction with the TB_MasterEngine function module, the path can also be calculated exactly during the acceleration and braking phases.

The function calculates the travel range in units covered by an axis during a specified time.

Real master axis:
If a real master axis is used, for example, only the current velocity is available. Since no information on the duration of the acceleration is available, the calculation is only precise for constant operation; an error occurs during acceleration. Only the di_VelAct_s input can be connected.

Virtual master axis:
Since the velocity to be reached and the level and duration of acceleration are known when a virtual master axis is used (TB_MasterEngine function module), calculation of the travel range occurs without incident. All inputs must be used; they are available at the TB_MasterEngine function module.

Recommended task: Event
Libraries used: -

InOut Parameter

none

Input Parameter

Marking: Data type: Description:
u_Time_ms UINT Time in ms for which the path is calculated in units. Maximum times up to 5,000 ms are possible. If a larger value is connected, it is limited to 5,000 ms internally.
ud_TimeAcc_ms UDINT Remaining acceleration time of the virtual master in ms (TB_MasterEngine function module output).
di_VelSet_s DINT Setpoint velocity of the virtual master in units/s (TB_MasterEngine function module output).
di_VelAct_s DINT Actual velocity of the real or virtual master in units/s (TB_MasterEngine function module output).

Output Parameter

Marking: Data type: Description:
TB_TimeToTravel DINT Calculated path in units covered by the axis in the specified time u_Time_ms.