SMC_Interpolator2Dir (FB)ΒΆ
FUNCTION_BLOCK FINAL SMC_Interpolator2Dir
This function block is similar to function block SMC_Interpolator, regarding function and allocation of inputs and outputs, but it is able to interpolate a path also in the opposite direction.
Reverse interpolation:
If dOverride has a negative value,
SMC_Interpolator2Dir interpolates in the opposite direction.
For example, if this input is assigned to an analog velocity input
of a hand wheel, you can move forward and backward with the desired
velocity.
The use of the function block depends on the following preconditions:
If input
bStartAtEndisTRUE, the path has to be stored completely in structurepoqDataIn.If the path does not fit completely, you can define how many elements of the queue are reserved for moving backward. (SMC_QueueSetReservedEntries) For example, if you want to move 10 elements backwards, you must reserve 13 (10 + 3) elements (three elements are reserved as a safety buffer). The queue needs to be large enough, because the reserved elements are no longer available for the look ahead.
The use of
SMC_Interpolator2Dirrequires the additional call of SMC_Interpolator2Dir_SlowTask in a task with lower priority.
See SMC_Interpolator for a description of all inputs and outputs.
- InOut:
Scope
Name
Type
Initial
Input
bExecuteBOOLpoqDataInPOINTER TO SMC_OUTQUEUE
bSlow_StopBOOLbEmergency_StopBOOLbWaitAtNextStopBOOLdOverrideLREAL1
iVelModeTRAPEZOID
dwIpoTimeDWORDdLastWayPosLREALbAbortBOOLbSingleStepBOOLbAcknMBOOLbQuick_StopBOOLdQuickDecelerationLREAL0
dJerkMaxLREALdQuickStopJerkLREALbStartAtEndBOOLbSuppressSystemMFunctionsBOOLOutput
bEndOfPathBOOLbBusyBOOLbErrorBOOLwErrorIDSMC_ERRORpiSetPositioniStatusIPO_INIT
bWorkingBOOLiActObjectSourceNoDINT-1
dActObjectLengthLREALdActObjectLengthRemainingLREALdVelLREALvecActTangentSMC_VECTOR3DiLastSwitchINTdwSwitchesDWORDdWayPosLREALnDirectionwMWORDadToolLengthARRAY [0..2] OF LREAL
ipo
Structure: