FB_PreCalcMultiCam

 

FB_PreCalcMultiCam - General Information

Overview

Type:

Function block

Available as of:

V1.0.3.0

Inherits from:

-

Implements:

-

Versions:

Current version

Task

The function block receives the same input data as with a MultiCam function block and creates the data for the Intelligent Line Shaft so that the axis moved by the MultiCam function block can be monitored as an ILS slave axis.

Description

After a positive edge on i_xEnable or i_xNewCam the function block generates the motion profile from the data from iq_stMultiCamDat and calculates the scaling (YMax) of the front axis of the Intelligent Line Shaft. The function block writes both into the data structure iq_stIlsData from where it is read out by the function block FB_EndlessFeedIls.

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_xNewCam

BOOL

Starts a new motion profile based on the current motion profile

i_diSlaveNumber

DINT

Number of slave axis that have to be monitored.

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.

Input/Output

Data type

Description

iq_stMultiCamData

ST_MultiCam

Information about the course of the cam (ST_MultiCam structure).

iq_stIlsData

ST_IlsData

Information for the motion sequence of the slave axes as well as the parameterized limits and feedback variables.

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

Working

99

The POU is active.

InputParameterInvalid

BoundaryConditionInvalid

125

The boundary conditions are invalid.

InputParameterInvalid

NumberOfCamPointsRange

121

NumberOfCamPoints is outside the valid range.

InputParameterInvalid

RangeK

129

K is outside the valid range.

InputParameterInvalid

RangeM

130

M is outside the valid range.

InputParameterInvalid

SlaveNumberRange

197

SlaveNumber is outside the valid range.

InputParameterInvalid

UnknownCamType

126

The cam type is indeterminable.

InputParameterInvalid

XFactorTooSmall

122

XFactor is too small.

InputParameterInvalid

YFactorTooSmall

124

YFactor is too small.

UnexpectedProgramBehavior

ProfileAlreadyInUse

116

The profile is already in use.

UnexpectedProgramBehavior

ProfileMemoryFull

127

The memory for tables from system profiles is full.

UnexpectedProgramBehavior

ProfileTableFull

123

The system profile table is full.

UnexpectedProgramBehavior

UnexpectedFeedback

1

An unintended detected error occurred during execution.

BoundaryConditionInvalid

Enumeration name:

BoundaryConditionInvalid

Enumeration value:

125

Description:

The boundary conditions are invalid.

Issue

Cause

Solution

-

When defining the motion profile in iq_stMultiCamData, the set boundary conditions cannot be complied with.

Verify the definition of the motion profile and particularly the boundary conditions of the sub-segments.

As an alternative, select different profiles for the sub-segments to be able to comply with all desired boundary conditions.

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

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.

NumberOfCamPointsRange

Enumeration name:

NumberOfCamPointsRange

Enumeration value:

121

Description:

NumberOfCamPoints is outside the valid range.

Issue

Cause

Solution

-

At the input iq_stMultiCamData.diNumberOfCamPoints, an invalid value has been transferred.

At the input iq_stMultiCamData.diNumberOfCamPoints, a value greater than 0 and smaller than or equal to SystemInterface.MAX_NO_OF_SEG + 1 must be transferred.

ProfileAlreadyInUse

Enumeration name:

ProfileAlreadyInUse

Enumeration value:

116

Description:

The profile is already in use.

Issue

Cause

Solution

-

The motion profile is already in use.

Verify the motion data.

ProfileMemoryFull

Enumeration name:

ProfileMemoryFull

Enumeration value:

127

Description:

The memory for tables from system profiles is full.

Issue

Cause

Solution

-

The system profile memory is full.

Delete any profiles that are no longer needed using the SystemInterface.FC_ProfileDelete function

ProfileTableFull

Enumeration name:

ProfileTableFull

Enumeration value:

123

Description:

The system profile table is full.

Issue

Cause

Solution

-

The maximum number of system profiles has been exceeded.

Delete any profiles that are no longer needed using the SystemInterface.FC_ProfileDelete function

RangeK

Enumeration name:

RangeK

Enumeration value:

129

Description:

K is outside the valid range.

Issue

Cause

Solution

-

At the input iq_stMultiCamData.astCamPoint[ ].lrK, an invalid value has been applied.

Verify the values for iq_stMultiCamData.astCamPoint[ ].lrK

RangeM

Enumeration name:

RangeM

Enumeration value:

130

Description:

M is outside the valid range.

Issue

Cause

Solution

-

At the input iq_stMultiCamData.astCamPoint[ ].lrM, an invalid value has been applied.

Verify the values for iq_stMultiCamData.astCamPoint[ ].lrM

SlaveNumberRange

Enumeration name:

SlaveNumberRange

Enumeration value:

197

Description:

SlaveNumber is outside the valid range.

Issue

Cause

Solution

-

The number of slave axes i_diSlavenumber is smaller than 1 or

the number of slave axes i_diSlavenumber is greater than iq_stIlsData.i_stConfig.diNumberOfSlaves, or

The number of slave axes iq_stIlsData.i_stConfig.diNumberOfSlaves is greater than Gc_diMaxNumberOfSlaves

At the input i_diSlavenumber, a positive value smaller than iq_stIlsData.i_stConfig.diNumberOfSlaves and smaller than Gc_diMaxNumberOfSlaves must be transferred.

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.

UnknownCamType

Enumeration name:

UnknownCamType

Enumeration value:

126

Description:

The cam type is indeterminable.

Issue

Cause

Solution

-

The cam type of a point iq_stMultiCamData.astCamPoint is assigned with an invalid cam profile.

The cam types etCamType of all used cam points at the input iq_stMultiCamData.astCamPoint must be assigned with an element of the enumeration ET_CamType.

Working

Enumeration name:

Working

Enumeration value:

99

Description:

The POU is active.

The precalculations are being performed.

XFactorTooSmall

Enumeration name:

XFactorTooSmall

Enumeration value:

122

Description:

XFactor is too small.

Issue

Cause

Solution

-

Two successive cam points iq_stMultiCamData.astCamPoint[ ].lrX have a distance of less than 0.1 units.

Verify the definition of the cam and, if necessary, remove cam profiles that are too short.

YFactorTooSmall

Enumeration name:

YFactorTooSmall

Enumeration value:

124

Description:

YFactor is too small.

Issue

Cause

Solution

-

A cam profile requiring a motion of the slave axis is to be used with identical start and end points.

At the input iq_stMultiCamData.astCamPoint[i-1].etCamType, a cam profile of type ModSinCom has been applied. The value of the difference between its start point iq_stMultiCamData.astCamPoint[i-1].lrY and its end point iq_stMultiCamData.astCamPoint[i].lrY is smaller than Gc_lrZeroTolerance. This type of profile requires a motion of the slave cam.

At the input iq_stMultiCamData.astCamPoint[i-1].etCamType, a cam profile of type ModAccTrCom has been applied. The value of the difference between its start point iq_stMultiCamData.astCamPoint[i-1].lrY and its end point iq_stMultiCamData.astCamPoint[i].lrY is smaller than Gc_lrZeroTolerance. This type of profile requires a motion of the slave cam.

At the input iq_stMultiCamData.astCamPoint[i-1].etCamType, a cam profile of type HarmoComb has been applied. The value of the difference between its start point iq_stMultiCamData.astCamPoint[i-1].lrY and its end point iq_stMultiCamData.astCamPoint[i].lrY is smaller than Gc_lrZeroTolerance. This type of profile requires a motion of the slave cam.

At the input iq_stMultiCamData.astCamPoint[i-1].etCamType, a cam profile of type SinStraightComb has been applied. The value of the difference between its start point iq_stMultiCamData.astCamPoint[i-1].lrY and its end point iq_stMultiCamData.astCamPoint[i].lrY is smaller than Gc_lrZeroTolerance. This type of profile requires a motion of the slave cam.