SMC_GroupReadRemainingTrajectoryDuration (FB)ΒΆ

FUNCTION_BLOCK SMC_GroupReadRemainingTrajectoryDuration

Function block that enables reading the duration of the current trajectory, until the next standstill is reached. The next standstill position is either before the next buffered movement starts, or at the end of the last movement, whichever comes first. A valid duration can only be read if the remaining duration of the trajectory is within the CurrentPlanningForecast reported by MC_GroupReadStatus. The maximum forecast can be configured by changing fPlanningForecastDuration of SMC_TuneCPKernel.

Note

  • The trajectory duration cannot be read while MC_GroupHalt or MC_GroupStop are active. The output Valid is FALSE in this case.

  • The trajectory duration cannot be read while an MC_GroupInterrupt is active or the axis group stops due to SMC_GroupInterruptAt. The output Valid is FALSE in this case.

  • The trajectory duration cannot by read while an MC_GroupSetOverride with VelFactor = 0 or PathVelFactor = 0 is active. The output Valid is FALSE in this case.

  • When the axis group has reached standstill and will not immediately start moving again (e.g. because an SMC_GroupWait is active, or there is no followup movement), the output Valid is FALSE.

InOut:

Scope

Name

Type

Comment

Inout

AxisGroup

AXIS_GROUP_REF_SM3

Reference to a group of axes

Input

Enable

BOOL

The trajectory duration is read continuously while enabled.

Output

Valid

BOOL

TRUE if the RemainingDuration and MovementId are valid.

Busy

BOOL

The FB has not finished.

RemainingDuration

LREAL

The remaining duration until the next standstill in seconds.

MovementId

SMC_Movement_Id

The ID of the last movement of the trajectory.

Error

BOOL

Signals that an error has occurred within the function block

ErrorID

SMC_ERROR

Error identification