SMC_TrackSetValues (FB)¶
FUNCTION_BLOCK SMC_TrackSetValues
This function block tracks a given signal. The axis will try to follow the signal as closely as possible while repecting the given maximum velocity, acceleration, deceleration, and jerk. The tracked signal is given in form of the position, velocity, acceleration, and jerk at the end of each bus task cycle.
In contrast to SMC_FollowPosition, SMC_FollowPositionVelocity, and SMC_FollowSetValues, the given set position, velocity, acceleration and jerk is not simply applied to the axis. Instead, the axis tries to reach the desired values in the shortest time. At the same time, it will respect the input Velocity, Acceleration, Deceleration, and Jerk.
During execution, the axis is in state synchronized_motion. The function block will keep ownership of the axis until it is aborted by another movement. The ownership is kept even if the tracked signal is stationary and the function block is in sync.
The position of the tracked signal (fSetPosition
) may either
be linear or modulo, with the modulo period given in input
SignalModuloPeriod
.
Independently, the axis may either be finite or modulo. The modulo
period of the signal and the axis may be different.
- InOut:
Scope
Name
Type
Comment
Inout
Axis
Input
bExecute
BOOL
Rising edge: Starts the execution of the function block.
fSetPosition
LREAL
Set position in [u]
fSetVelocity
LREAL
Set velocity in [u/s]
fSetAcceleration
LREAL
Set acceleration in [u/s²]
fSetJerk
LREAL
Set jerk in [u/s³]
Velocity
LREAL
Maximum velocity in technical units per second [u/s]. Must be positive. This input may change each call. Changes are taken into account continuously, not only on a rising edge of
bExecute
.Acceleration
LREAL
Maximum acceleration in [u/s²]. Must be positive. This input may change each call. Changes are taken into account continuously, not only on a rising edge of
bExecute
.Deceleration
LREAL
Maximum magnitude of deceleration in [u/s²]. Must be positive. This input may change each call. Changes are taken into account continuously, not only on a rising edge of
bExecute
.Jerk
LREAL
Maximum magnitude of jerk in [u/s³]. Must be positive if the axis has a jerk limited velocity profile. This input may change each call. Changes are taken into account continuously, not only on a rising edge of
bExecute
.SignalModuloPeriod
LREAL
The modulo period of the signal or 0 if the signal is linear. Must not be negative.
Output
bBusy
BOOL
TRUE
: Execution of the function block is not finished.bCommandAborted
BOOL
TRUE
: Command has been aborted by another command.bError
BOOL
TRUE
: Error has occurred within the function block.iErrorID
SMC_ERROR
Error identification
bInSync
BOOL
Whether the axis is in sync with the given set values.