FB_ControlAxisByPosCnc - General Information

Overview

Type:

Function block

Available as of:

V1.0.3.0

Inherits from:

-

Implements:

-

Description

This function block is used to write target positions to a drive and to monitor for gaps.

 WARNING
UNINTENDED EQUIPMENT OPERATION
  • Do not execute the function blocks MC_SetPosition and MC_Superimposed while the function block FB_ControlAxisByPosCnc is running (output bBusy = TRUE).
  • Verify that the values for the inputs fGapVelocity, fGapAcceleration, fGapDeceleration, fGapJerk, fMaxAcceleration, fMaxDeceleration, and fMaxVelocity of the function block FB_ControlAxisByPosCnc are within the permissible ranges of the mechanical system of your machine.
Failure to follow these instructions can result in death, serious injury, or equipment damage.

Compensation Movement

If the sequence of target positions sent to the axis requires velocities higher than the set limits, the output bStopIpo of the function block is set to TRUE. This stops the connected SMC interpolator and allows the axis to perform a compensation movement with the acceleration, velocity, deceleration, and jerk values set at the corresponding inputs to remain within the physical limits of the axis. Once the compensation movement is completed, the output bStopIpo is reset to FALSE and the initial movement can be resumed.

Interface

Input

Data type

Description

Axis

MOIN.IF_axis

Reference to axis.

See Motion Interface Library Guide for details.

iStatus

SM3_CNC.SMC_INT_STATUS

Sets the status of an SMC_Interpolator instance. It is connected to the output iStatus of the function block SMC_Interpolator (see SM3_CNC.SMC_INT_STATUS in the SM3 CNC Library Guide).

bEnable

BOOL

Default value: FALSE

If this input is set to TRUE, the function block starts to control the axis.

FB_ControlAxisByPosCnc remains active until one of the following conditions is true:

  • The function block is interrupted by another motion function block.

  • An error is detected.

  • Enable is set to FALSE. In this case, the function block stops the ongoing movement before releasing the control of the axis.

If the input remains FALSE for three consecutive cycles while ET_Result is ExecuteWithGap or ExecuteWithoutGap, the function block transitions to the state Halt.

bAvoidGaps

BOOL

Default value: TRUE

If this input is set to TRUE, position and velocity are monitored. If the velocity exceeds the limit, the output bStopIpo is set to TRUE and the axis moves to the position at the input fSetPosition according to the values set via the inputs fGapVelocity, fGapAcceleration, fGapJerk, and fGapDeceleration. After that, the output bStopIpo is reset to FALSE.

fSetPosition

LREAL

Value range: Any LREAL value

Default value: 0

Target position for the axis. Typically, this input is connected to an output of a transformation function block, or directly to an output of a function block SMC_Interpolator.

fGapVelocity

LREAL

Value range: Any positive LREAL value

Default value: 1

Velocity for bridging of gap.

fGapAcceleration

LREAL

Value range: Any positive LREAL value

Default value: 1000

Acceleration for bridging of gap.

fGapDeceleration

LREAL

Value range: Any positive LREAL value

Default value: 1000

Deceleration for bridging of gap, and for stopping if bAvoidGaps is FALSE and bEnable is set to FALSE.

fGapJerk

LREAL

Value range: Any positive LREAL value and 0

Default value: 0

Jerk for bridging of gap, and for stopping if bAvoidGaps is FALSE and bEnable is set to FALSE.

fMaxVelocity

LREAL

Value range: Any positive LREAL value

Default value: 1000

Maximum velocity of axis.

fMaxAcceleration

LREAL

Value range: Any positive LREAL value

Default value: 100000

Maximum acceleration of axis.

fMaxDeceleration

LREAL

Value range: Any positive LREAL value

Default value: 100000

Maximum deceleration of axis.

Output

Data type

Description

bBusy

BOOL

TRUE = Execution of function block is not finished.

FALSE = Execution of function block is finished.

bCommandAborted

BOOL

TRUE = Command has been aborted by a different command.

FALSE = Command has not been aborted by a different command.

bError

BOOL

TRUE = Error detected in execution of the function block.

TRUE = No error detected in execution of the function block.

q_etResult

ET_Result

Indicates the type of diagnostics information.

If bError is FALSE: Status information.

If bError is TRUE: Information on detected error.

q_sResultMsg

STRING(80)

Provides a diagnostics message.

bStopIpo

BOOL

TRUE = FB_ControlAxisByPosCnc has detected a gap condition and the axis performs a movement to close the gap. Connect this output to the input EmergencyStop of SMC_Interpolator so that the interpolator waits until the axis has repositioned.

FALSE = No gap condition detected by FB_ControlAxisByPosCnc