RCK_RegistrationBuffer (FB)

FUNCTION_BLOCK RCK_RegistrationBuffer

This function block is implemented to collect and store registrations which are marked on the cut material to show the proper cut position. the maximum amount of registration can be stored is specified by the global constant variable gciRegistrationBufferSize.

An external function block or program should be used to capture registrations, then done signal and result after captured should be correspondingly connected to inputs RegistrationDetected and DetectedPosition.

The detected registration will be ignored if it`s distance to the last one is greater than ExpectedInterval+MaxUpperOffset or lesser than ExpectedInterval-MaxLowerOffset when ExpectedInterval is greater than zero. One step further, the value that the position of last resgistration + ExpectedInterval+MaxUpperOffset will be stored as the newest registration if the moved distance of material is greater than ExpectedInterval+MaxUpperOffset but no new registration found.

Note

The unit of ExpectedInterval, MaxUpperOffset, MaxLowerOffset, DetectedPosition of registration must be the same unit as the unit of circumference of cutter set in RCK_Parameter.

InOut:

Scope

Name

Type

Initial

Comment

Input

Enable

BOOL

FALSE

Enable the function block with Enable = TRUE

ExpectedInterval

LREAL

0.0

[u] The expected interval of each registration, usually it is the same as the cut length. Range: >=0

MaxUpperOffset

LREAL

0.0

[u] The maximum acceptable upper offset when the actual interval is greater than the expected interval. Range: > 0 and < ExpectedInterval/2

MaxLowerOffset

LREAL

0.0

[u] The maximum acceptable lower offset when the actual interval is lesser than the expected interval. Range: > 0 and < ExpectedInterval/2

RegistrationDetected

BOOL

FALSE

The signal from external to indicate that a new registration is deteced

DetectedPosition

LREAL

0.0

[u] the detected position of registration

Output

Stored

BOOL

Shows the new registration has been stored

Busy

BOOL

Indicates that the function block is not finished

Error

BOOL

Signals that error has occurred within function block

AppErrorID

ERROR_ID

Error identification. For error details refer to Enumeration ERROR_ID

StoredRegistrations

UDINT

Shows the number of registrations that are currently stored in buffer

TotalStoredRegistrations

UDINT

Shows the number of registrations that are accepted after Enable is set True

ConsecutiveLostRegistrations

UDINT

Shows the number of registrations that consecutively lost in the zone ExpectedInterval-MaxLowerOffset to ExpectedInterval+MaxUpperOffset

TotalLostRegistrations

UDINT

Shows the number of registrations that lost in the zone ExpectedInterval-MaxLowerOffset to ExpectedInterval+MaxUpperOffset after Enable is set True

Inout

FeedAxis

Axis_Ref

Reference to feed axis