FB_VarioPosTp

 

FB_VarioPosTp - General Information

Overview

Type:

Function block

Available as of:

V1.0.3.0

Inherits from:

-

Implements:

-

Versions:

Current version

Task

Carry out positioning motion with correction of the target position using a reference signal.

Description

A motion (positioning) to a position is possible using the function block. In doing so, the axis with a defined velocity and acceleration/deceleration is moved. The velocity profile of the motion development is trapezoidal as a default.

Velocity profile of the FB_VarioPosTp function block.

G-SE-0068887.1.gif-high.gif

 

 

Function block FB_VarioPosTP / i_etPosMode = 0 (endless)

G-SE-0068884.1.gif-high.gif

 

 

Function block FB_VarioPosTP / i_etPosMode = 1 (relative)

G-SE-0068885.1.gif-high.gif

 

 

Function block FB_VarioPosTP / i_etPosMode = 3 (absolute)

G-SE-0068886.1.gif-high.gif

 

 

Interface

Input

Data type

Description

i_xEnable

BOOL

A rising edge FALSE -> TRUE activates the POU, a falling edge TRUE -> FALSE deactivates the POU.

A deactivated POU does not execute any actions.

i_ifDrive

IF_Drive

Input for the axis that shall be controlled.

i_ifTouchProbe

IF_TouchProbe

Digital measure input of the PacDrive system, into which the reference signal is fed.

i_xPosEdge

BOOL

TRUE: Positive edge of the input signal i_ifTouchProbe

FALSE: Negative edge of the input signal i_ifTouchProbe

i_xStart

BOOL

FALSE -> TRUE: Start of the motion according to set parameters.

i_xStop

BOOL

FALSE -> TRUE: Stops a running positioning with the deceleration i_lrDec.

i_lrMaxDistance

LREAL

Travel distance or targets of the motion in units are a function of i_etPosMode if no valid reference signal i_ifTouchProbe is detected.

i_etPosMode

ET_PosMode

There are the following modes for positioning:

oEndless

The position counter is set to zero before positioning. Then, positioning to the value specified in i_lrMaxDistance is executed.

oRelative

Positioning is performed relative to the position counter. That is, the position counter is not reset before positioning.

oAbsolute

Positioning is absolute. The position counter is not reset before positioning.

i_lrOffset

LREAL

Offset between reference signal and target position.

i_lrLowLimit

LREAL

Lower limit of the position relative to the start position at which the reference signal is valid.

i_lrHighLimit

LREAL

Upper limit of the position relative to the start position at which the reference signal is valid.

i_lrVel

LREAL

Velocity (change of position) in units/s.

i_lrAcc

LREAL

Acceleration (change of velocity) in units/s2.

i_lrDec

LREAL

Deceleration (change of velocity) in units/s2.

i_lrJerk

LREAL

Jerk (change of acceleration/deceleration) in units/s3.

Output

Data type

Description

q_xActive

BOOL

TRUE: The POU is active and has to be executed further.

FALSE: The POU is inactive.

q_xReady

BOOL

TRUE: The POU is ready to operate and can accept user commands.

FALSE: The POU is not ready to accept user commands.

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value not equal to ET_Diag.Ok corresponds to an diagnostic message.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = ET_Diag.Ok -> Status message

q_etDiag <> ET_Diag.Ok -> Diagnostic message

q_sMsg

STRING[80]

Event-triggered message which gives more detailed information on the diagnostic state.

q_xMotionInstructionActive

BOOL

TRUE: The axis is processing a motion command. The output is also set if the motion command defines that the axis is at stand still.

q_xInPosition

BOOL

TRUE: The axis is at the target (i_lrMaxDistance or corrected position reached via the reference signal). If positioning is interrupted, q_xInPosition is only set when the original target is approached.

q_xTPOk

BOOL

TRUE: q_xInPosition and valid reference signal detected at i_ifTouchProbe.

q_lrPosition

LREAL

Position (RefPosition) of the axis.

q_lrTPPosition

LREAL

Position of the axis during recognition of the valid reference signal.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Disabled

9

The POU is disabled.

OK

Initializing

4

The POU is being initialized.

OK

WaitForStart

5

Waiting for starting command.

OK

WaitForStopRelease

238

Waiting for the stop command to be taken back.

OK

WaitForTouchProbeSignal

167

Waiting for Touchprobe signal.

OK

WaitUntilDisabled

8

Waiting until the POU is deactivated.

OK

WaitUntilOffsetReached

225

Waiting until the offset position has been reached.

OK

WaitUntilPositioningStarted

245

Waiting until positioning has been started.

OK

WaitUntilStopped

159

Waiting until the drive has stopped.

DriveConditionInvalid

DriveNotReady

10

The drive is not ready for motion commands.

InputParameterInvalid

AccRange

12

Acc is outside the valid range.

InputParameterInvalid

DecRange

13

Dec is outside the valid range.

InputParameterInvalid

DriveInvalid

3

The connected drive is invalid.

InputParameterInvalid

JerkRange

14

Jerk is outside the valid range.

InputParameterInvalid

TouchProbeInvalid

163

The connected Touchprobe is invalid.

InputParameterInvalid

TouchProbeNotActive

166

The Touchprobe is not active.

InputParameterInvalid

TouchProbeVirtual

165

The connected Touchprobe is virtual.

InputParameterInvalid

VelRange

11

Vel is outside the valid range.

SercosConditionInvalid

SercosNotInPhaseFour

19

The Sercos bus is not in phase 4.

UnexpectedProgramBehavior

UnexpectedFeedback

1

An unintended detected error occurred during execution.

UnexpectedProgramBehavior

UnknownState

2

The POU is in an undefined state.

AccRange

Enumeration name:

AccRange

Enumeration value:

12

Description:

Acc is outside the valid range.

Issue

Cause

Solution

-

At the input i_lrAcc, an invalid value has been transferred.

The following must hold: 0 < i_lrAcc < drive parameter MaxAcc

For the valid value range for i_lrAcc, see output q_sMsg

DecRange

Enumeration name:

DecRange

Enumeration value:

13

Description:

Dec is outside the valid range.

Issue

Cause

Solution

-

At the input i_lrDec, an invalid value has been transferred.

The following must hold: 0 < i_lrDec < drive parameter MaxAcc

For the valid value range for i_lrDec, see output q_sMsg

Disabled

Enumeration name:

Disabled

Enumeration value:

9

Description:

The POU is disabled.

The function block is disabled and executes no actions whatsoever. i_xEnable and q_xActive are set to FALSE

DriveInvalid

Enumeration name:

DriveInvalid

Enumeration value:

3

Description:

The connected drive is invalid.

Issue

Cause

Solution

-

At the input i_ifDrive, no drive was applied.

At the input i_ifDrive, a valid drive must be transferred.

-

The connected drive does not support all required functionalities.

Establish which functionalities are not supported by the drive by means of output q_sMsg.

Use a drive which supports all required functionalities.

DriveNotReady

Enumeration name:

DriveNotReady

Enumeration value:

10

Description:

The drive is not ready for motion commands.

Issue

Cause

Solution

-

The axis is not in position control.

Verify the state of the axis.

-

The parameter State of the SERCOS bus is not 4.

Set the SERCOS bus parameter PhaseSet to 4.

Verify the SERCOS bus for errors.

Initializing

Enumeration name:

Initializing

Enumeration value:

4

Description:

The POU is being initialized.

The function block is being initialized and thus is not yet ready to receive commands at its inputs.

The function block will signalize that it is ready for operation with the signal q_xReady = TRUE.

JerkRange

Enumeration name:

JerkRange

Enumeration value:

14

Description:

Jerk is outside the valid range.

Issue

Cause

Solution

-

At the input i_lrJerk, an invalid value has been applied.

At the input i_lrJerk, a value greater than 0 and smaller than or equal to Gc_lrMaxJerk must be transferred.

SercosNotInPhaseFour

Enumeration name:

SercosNotInPhaseFour

Enumeration value:

19

Description:

The Sercos bus is not in phase 4.

Issue

Cause

Solution

-

The parameter State of the SERCOS bus is not 4.

Set the SERCOS bus parameter PhaseSet to 4.

Verify the SERCOS bus for errors.

TouchProbeInvalid

Enumeration name:

TouchProbeInvalid

Enumeration value:

163

Description:

The connected Touchprobe is invalid.

Issue

Cause

Solution

-

The input i_ifTouchProbe is not connected with a valid Touchprobe.

Ensure that a valid Touchprobe has been transferred at the input i_ifTouchProbe.

TouchProbeNotActive

Enumeration name:

TouchProbeNotActive

Enumeration value:

166

Description:

The Touchprobe is not active.

Issue

Cause

Solution

-

The Touchprobe functionality of the input on a Lexium62 is not enabled.

Ensure that the parameter IOx_Mode of the input group (LXM62IO_InOutTP) has been set to Touchprobe / 1.

TouchProbeVirtual

Enumeration name:

TouchProbeVirtual

Enumeration value:

165

Description:

The connected Touchprobe is virtual.

Issue

Cause

Solution

-

The used touchprobe is not real.

Ensure that the Touchprobe does not belong to a virtual device. (e.g. virtual Lexium62)

UnexpectedFeedback

Enumeration name:

UnexpectedFeedback

Enumeration value:

1

Description:

An unintended detected error occurred during execution.

Issue

Cause

Solution

-

An error occurred in the internal execution.

Please inform the support team about this error.

UnknownState

Enumeration name:

UnknownState

Enumeration value:

2

Description:

The POU is in an undefined state.

Issue

Cause

Solution

-

An error occurred in the internal execution.

Please inform the support team about this error.

VelRange

Enumeration name:

VelRange

Enumeration value:

11

Description:

Vel is outside the valid range.

Issue

Cause

Solution

-

At the input i_lrVel, an invalid value has been applied.

Apply a value greater than 0 and smaller than the axis parameter MaxVel to i_lrVel.

WaitForStart

Enumeration name:

WaitForStart

Enumeration value:

5

Description:

Waiting for starting command.

The function block has completed its initialization and is waiting for a positive edge at the input i_xStart before continuing the processing.

WaitForStopRelease

Enumeration name:

WaitForStopRelease

Enumeration value:

238

Description:

Waiting for the stop command to be taken back.

In order to proceed, the input i_xStop must be FALSE.

WaitForTouchProbeSignal

Enumeration name:

WaitForTouchProbeSignal

Enumeration value:

167

Description:

Waiting for Touchprobe signal.

The Touchprobe signal is waited for while the axis is moved.

WaitUntilDisabled

Enumeration name:

WaitUntilDisabled

Enumeration value:

8

Description:

Waiting until the POU is deactivated.

The function block is disabled. All internal states are reset and connected resources (e.g. axes) are transferred to a safe state. The function block has to be called up continuously until it reports q_xActive = FALSE.

WaitUntilOffsetReached

Enumeration name:

WaitUntilOffsetReached

Enumeration value:

225

Description:

Waiting until the offset position has been reached.

The Touchprobe signal has been detected. The axis is moved further by the offset value.

WaitUntilPositioningStarted

Enumeration name:

WaitUntilPositioningStarted

Enumeration value:

245

Description:

Waiting until positioning has been started.

The function block waits for the axis to start its positioning.

WaitUntilStopped

Enumeration name:

WaitUntilStopped

Enumeration value:

159

Description:

Waiting until the drive has stopped.

The axis is stopped.