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 bStartAtEnd is TRUE, the path has to be stored completely in structure poqDataIn.

  • 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_Interpolator2Dir requires 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

bExecute

BOOL

poqDataIn

POINTER TO SMC_OUTQUEUE

bSlow_Stop

BOOL

bEmergency_Stop

BOOL

bWaitAtNextStop

BOOL

dOverride

LREAL

1

iVelMode

SMC_INT_VELMODE

TRAPEZOID

dwIpoTime

DWORD

dLastWayPos

LREAL

bAbort

BOOL

bSingleStep

BOOL

bAcknM

BOOL

bQuick_Stop

BOOL

dQuickDeceleration

LREAL

0

dJerkMax

LREAL

dQuickStopJerk

LREAL

bStartAtEnd

BOOL

bSuppressSystemMFunctions

BOOL

Output

bEndOfPath

BOOL

bBusy

BOOL

bError

BOOL

wErrorID

SMC_ERROR

piSetPosition

SMC_POSINFO

iStatus

SMC_INT_STATUS

IPO_INIT

bWorking

BOOL

iActObjectSourceNo

DINT

-1

dActObjectLength

LREAL

dActObjectLengthRemaining

LREAL

dVel

LREAL

vecActTangent

SMC_VECTOR3D

iLastSwitch

INT

dwSwitches

DWORD

dWayPos

LREAL

nDirection

SMC_Direction

wM

WORD

adToolLength

ARRAY [0..2] OF LREAL

ipo

SMC_Interpolator

Structure: