FB_PrintMarkControl

 

FB_PrintMarkControl - General Information

Overview

Type:

Function block

Available as of:

V1.0.3.0

Inherits from:

-

Implements:

-

Task

Measurement of the registration mark position. Providing the values to adjust the product flow. The function block is used to implement a tendentious correction.

Description

The registration mark is detected using a Touchprobe. The function block compares the position of the connected logical encoder to a reference position i_lrReferencePosition at a rising edge at the input i_ifTouchProbe. Afterwards the function block calculates correction values for controlling purposes.

The function block reports the registration mark position q_lrPrintMarkPosition, the distance between two registration marks q_lrPrintMarkDistance, the deviation q_lrPrintMark­Difference from the reference position i_lrReferencePosition and a correction velocity q_lrCorrVelocity which can be transferred to the master encoder as offset velocity. The values to be used for your application (indexed or synchronous) depend on your requirements.

Touchprobe signals are only accepted within the range i_lrReferencePosition +/- i_lrWindow.

The POU does not carry out an active correction but only delivers measurements which can be used for a correction.

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_ifTouchProbe

IF_TouchProbe

Measured input by which the registration marks are detected. The input detects the rising edge of the Touchprobe.

i_lrReferencePosition

LREAL

Reference position of the registration marks to be detected in units,

value range >= 0 and <= i_lrReferenceDistance

i_lrReferenceDistance

LREAL

Reference distance of the registration marks to be detected in units,

value range > 0.

Here, the normal registration mark distance is to be set, as this value is used internally for the calculation of q_ lrCorrVelocity and the correction of q_lrPrintMarkPosition.

i_lrWindow

LREAL

Window within which registration marks are accepted.

i_lrReferencePosition +/- i_lrWindow in units, value range > 0

i_lrMaxCorrVel

LREAL

Maximum permitted correction velocity in units/sec, value range > 0.

Excessive values may cause the maximum velocity of the drive to be exceeded.

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 for TP signals.

FALSE: The POU is not ready.

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_lrPrintMarkPosition

LREAL

Position of a valid registration mark in units.

If i_lrReferencePosition lies at the upper or lower edge of the value range, it is possible that the registration mark originates from the previous or next period.

The POU recognizes this and calculates the correct position.

q_lrPrintMarkDifference

LREAL

Deviation of the detected, valid registration mark from the reference position i_lrReferencePosition in units

q_lrPrintMarkDistance

LREAL

Deviation of the measured distance to the reference distance i_lrReferenceDistance in units.

q_lrCorrVelocity

LREAL

Correction velocity which can be used as offset velocity

This is calculated so the correction is done in a cycle.

q_lrCorrVelocity:= q_lrPrintMarkDifference * iq_lencMaster.Velocity/i_lrReferenceDistance;

q_xNoValidTp

BOOL

TRUE: A detected registration mark is invalid and outside the window i_lrReferencePosition +/- i_lrWindow

The output is set to FALSE as soon a new valid TP signal is detected.

FALSE: A detected registration mark is valid and inside the window i_lrReferencePosition +/- i_lrWindow

q_udiNumberOfTps

UDINT

Number of the recognized registration marks, inside and outside of the i_lrWindow.

In connection with q_xNoValidTp, the application can execute an appropriate evaluation. If the value range is exceeded, the counting recommences at 0.

Input/Output

Data type

Description

iq_lencMaster

L_ENC

Logical encoder which is coupled to the master axis.

Examples

The following examples show in detail how the registration marks are regulated via FB_PrintMarkControl:

oIndexed application with tendentious correction

oSynchronized application with tendentious correction

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

WaitForTouchProbeSignal

167

Waiting for Touchprobe signal.

InputParameterInvalid

LencInvalid

162

The connected logical encoder is invalid.

InputParameterInvalid

TouchProbeInvalid

163

The connected Touchprobe is invalid.

InputParameterInvalid

TouchProbeNotActive

166

The Touchprobe is not active.

InputParameterInvalid

TouchProbeVirtual

165

The connected Touchprobe is virtual.

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.

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.

LencInvalid

Enumeration name:

LencInvalid

Enumeration value:

162

Description:

The connected logical encoder is invalid.

Issue

Cause

Solution

-

At the input iq_lencEncoder, no encoder has been applied.

At the input iq_lencEncoder, a separate logical encoder 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.

WaitForTouchProbeSignal

Enumeration name:

WaitForTouchProbeSignal

Enumeration value:

167

Description:

Waiting for Touchprobe signal.

The Touchprobe signals are being searched for and evaluated.