FB_MultiPos

 

FB_MultiPos - General Information

Overview

Type:

Function block

Available as of:

V1.0.3.0

Inherits from:

-

Implements:

-

Versions:

Current version

Task

Execute sequential positioning motions from the table

Description

Positioning tasks are processed from a table using the function block. The function is based on the FB_MultiCam function block.

It is used in applications that only have positioning tasks in an axis and require relatively simple control logic. The main advantage is the simple programming of motion processes by filling a table.

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_xStart

BOOL

FALSE -> TRUE: Positioning start with i_diStartStep. The table runs sequentially through the steps and at the end jumps to the beginning of the table and continues processing.

TRUE -> FALSE: Processing stops at the end of the current step.

i_xStop

BOOL

TRUE: Stops a running positioning with the deceleration StopDec (axis parameter). The table is set on the first step.

i_diStartStep

DINT

Startstep (start positioning from the table).

oi_diStartStep = 0

A rising edge at the input i_xStart always starts the next step. During the first start after i_xEnable = TRUE, it is started in the first step.

oi_diStartStep > 0

A rising edge at the input i_xStart always starts the Startstep.

i_xSingleStepMode

BOOL

TRUE -> Single step mode: For every step (individual positioning from the table), a rising edge (FALSE -> TRUE) at the input i_xStart is necessary.

 The single step mode can be activated and deactivated during operation.

i_byStartCondition

BYTE

Using i_byStartCond a starting condition can be formulated. This step is only executed if the input i_byStartCond and the table value byStartCond are equal or if the table value byStartCond = 0.

i_byJumpCondition

BYTE

Jump condition

oi_byJumpCond = 0

Jump is always executed.

oi_byJumpCond <> 0

Jump is executed if the input i_byJumpCond and the table value byJumpCond are equal.

i_pstMultiPosStep

POINTER TO ST_MultiPosStep

Pointer on the first element of the positioning table.

i_diNumberOfSteps

DINT

Number of positionings from the table.

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_xTableActive

BOOL

TRUE: Positionings in accordance with the table are processed.

Stays active until the last positioning from the table has been ended.

q_lrPosition

LREAL

Position (RefPosition) of the axis.

q_diActualStep

DINT

Number of current positioning from the table.

q_byOutput

BYTE

A bit pattern can be set per step. This is specified by g_byOutPut in the table. It is set at the beginning of the step and remains active until being overwritten by another step.

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

WaitForStartCondition

243

Waiting for start condition.

OK

WaitForStopRelease

238

Waiting for the stop command to be taken back.

OK

WaitUntilDisabled

8

Waiting until the POU is deactivated.

OK

WaitUntilDwellTimeOver

241

Waiting until the dwell time is over.

OK

WaitUntilPositionReached

242

Waiting until position has been reached.

OK

WaitUntilStopped

159

Waiting until the drive has stopped.

DriveConditionInvalid

SercosNotInPhaseFour

19

The Sercos bus is not in phase 4.

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

JumpStepInvalid

244

JumpStep is invalid.

InputParameterInvalid

NumberOfStepsRange

191

NumberOfSteps is outside the valid range.

InputParameterInvalid

PointerMultiPosStepInvalid

239

The pointer MultiPosStep is invalid.

InputParameterInvalid

PosModeRange

322

PosMode is out of range

InputParameterInvalid

StartStepInvalid

240

StartStep is invalid.

InputParameterInvalid

VelRange

11

Vel is outside the valid range.

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

-

In the parameter lrAcc of the current table step, an invalid value has been transferred. (The table steps are transferred at the input i_pstMultiPosStep)

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

For the valid value range for lrAcc, see output q_sMsg

DecRange

Enumeration name:

DecRange

Enumeration value:

13

Description:

Dec is outside the valid range.

Issue

Cause

Solution

-

In the parameter lrDec of the current table step, an invalid value has been transferred. (The table steps are transferred at the input i_pstMultiPosStep)

The following must hold: 0 < lrDec < parameter MaxAcc of the drive

For the valid value range for 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 lrJerk of the i_pstMultiPosStep sequencer, an invalid value has been applied.

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

JumpStepInvalid

Enumeration name:

JumpStepInvalid

Enumeration value:

244

Description:

JumpStep is invalid.

Issue

Cause

Solution

-

One of the diJumpStep parameters of the i_pstMultiPosStep sequencer is invalid.

Ensure that each jump command diJumpStep is linked to an element of the sequencer.

NumberOfStepsRange

Enumeration name:

NumberOfStepsRange

Enumeration value:

191

Description:

NumberOfSteps is outside the valid range.

Issue

Cause

Solution

-

At the input i_diNumberOfSteps, a value which is too small has been applied.

At the input i_diNumberOfSteps, a value greater than 0 must be transferred.

PointerMultiPosStepInvalid

Enumeration name:

PointerMultiPosStepInvalid

Enumeration value:

239

Description:

The pointer MultiPosStep is invalid.

Issue

Cause

Solution

-

At the input i_pstMultiPosStep, a null pointer has been transferred.

At the input i_pstMultiPosStep, the address of the memory containing the sequencer must be transferred.

PosModeRange

Enumeration name:

PosModeRange

Enumeration value:

322

Description:

PosMode is out of range

Issue

Cause

Solution

-

At the input i_pstMultiPosStep^.etPosMode, an invalid value has been transferred.

For i_pstMultiPosStep^.etPosMode, one of the values SystemInterface.ET_PosMode.Absolute, SystemInterface.ET_PosMode.Relative or SystemInterface.ET_PosMode.Endless has to be given. The pos mode SystemInterface.ET_PosMode.Increment or other values are forbitten.

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.

StartStepInvalid

Enumeration name:

StartStepInvalid

Enumeration value:

240

Description:

StartStep is invalid.

Issue

Cause

Solution

-

At the input i_diStartStep, a value which is too high has been applied.

At the input i_diStartStep, a value smaller than or equal to the value at the input i_diNumberOfSteps must be applied.

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

-

The axis cannot move at the velocity of a positioning step.

For every parameter lrVel of a positioning step of the list i_pstMultiPosStep, a value between 0 and the axis parameter MaxVel must be specified.

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.

WaitForStartCondition

Enumeration name:

WaitForStartCondition

Enumeration value:

243

Description:

Waiting for start condition.

Processing is continued as soon as the start condition of the step is fulfilled.

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.

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.

WaitUntilDwellTimeOver

Enumeration name:

WaitUntilDwellTimeOver

Enumeration value:

241

Description:

Waiting until the dwell time is over.

The function block is waiting for the end of a parameterized dwell time.

WaitUntilPositionReached

Enumeration name:

WaitUntilPositionReached

Enumeration value:

242

Description:

Waiting until position has been reached.

The axis is being moved to its target position.

WaitUntilStopped

Enumeration name:

WaitUntilStopped

Enumeration value:

159

Description:

Waiting until the drive has stopped.

The axis is stopped.