SMC_ControlAxisByPosVel (FB)

 

FUNCTION_BLOCK SMC_ControlAxisByPosVel

This function block writes the set position fSetPosition and the set velocity fSetVelocity to the axis drive structure and monitors axis for jumps in a similar way to SMC_ControlAxisByPos. SMC_ControlAxisBy­PosVel is mostly used with CNC and an instance of the SMC_Interpo­lator.

Note

For direct checking of the set value of the axis, one of the SMC_­Follow* blocks should be used.

See also: SMC_ControlAxisByPos

InOut:

Scope

Name

Type

Initial

Comment

Inout

Axis

AXIS_REF_SM3

Reference to axis

See also: AXIS_REF_SM3

Input

iStatus

SMC_INT_STATUS

Status of the instance of SMC_Interpolator

bEnable

BOOL

TRUE: Starts execution

bAvoidGaps

BOOL

TRUE

TRUE: Monitoring of position and velocity

If the velocity exceeds the limit value fSWMaxVelocity which is set in Axis and configured in the drive dialog with the maximum values setting, then bStopIpo is set to TRUE. The axis is moved with the values fGapVelocity, fGapAcceleration, fGapDeceleration and fGapJerk to the set position and brought to the set velocity. On reaching the set values bStopIpo is set to FALSE.

fSetPosition

LREAL

Set position of the axis. Typically connected to the output of the transformation block.

fSetVelocity

LREAL

Set velocity in [u/s]

fGapVelocity

LREAL

Velocity for the bypassing of the jump in [u/s]

fGapAcceleration

LREAL

Acceleration for the bypassing of the jump in [u/s2]

fGapDeceleration

LREAL

1E+15

Deceleration for the bypassing of the jump in [u/s2]

Note: also used if bAvoidGaps is FALSE, for stopping when disabled

fGapJerk

LREAL

1E+16

Jerk for the bypassing of the jump in [u/s3]

Note: also used if bAvoidGaps is FALSE, for stopping when disabled

Output

bBusy

BOOL

TRUE: Function block operating

bCommandAborted

BOOL

TRUE: Execution was interrupted by another function block instance operating on Axis.

bError

BOOL

TRUE: Error has occurred

iErrorID

SMC_ERROR

Error identification

bStopIpo

BOOL

TRUE: Jump in velocity or position occurred and adaptation to new position is running

If bStopIpo is connected to the EmergencyStop input of the SMC_Interpolator instance, the interpolator waits until the axis is correctly positioned.

See also: SMC_ERROR