FC_OrderOfCarriersToTargetPosition - General Information

Overview

Type:

Function

Available as of:

V1.0.0.0

Task

Providing the order of carriers in relation to a given target position.

Description

The function FC_OrderOfCarriersToTargetPosition provides a numbered order of carriers in relation to a given target position, considering the moving direction of the carriers.

This information can be used to add carriers in the right order to a station within a Lexium™ MC multi carrier track. For more information on station handling, refer to the MulticarrierStation library.

Closed track (example)

Moving direction of the carriers: from left to right (clockwise). The target position is marked with a green line.

The resulting carrier order in forward direction (i_xInForwardDirection = TRUE) is as follows:

Order number

Carrier index

1

4

2

5

3

6

4

7

5

1

6

2

7

3

Open track (example)

Moving direction of the carriers: from left to right (clockwise). The target position is marked with a green line.

The resulting carrier order in forward direction (i_xInForwardDirection = TRUE) is as follows:

Order number

Carrier index

1

5

2

6

3

7

Inputs

Input

Data type

Description

i_xInForwardDirection

BOOL

If i_xInForwardDirection is set to TRUE, the carrier index numbers are determined in forward direction.
If i_xInForwardDirection is set to FALSE, the carrier index numbers are determined in backward direction.

i_lrTargetPosition

LREAL

Specifies the target position for determining the carrier index numbers for the related carriers.

i_ifMulticarrier

IF_Multicarrier

Interface for assigning the function block FB_Multicarrier.

Outputs

Output

Data type

Description

q_xError

BOOL

Indicates TRUE if an error has been detected. For details, refer to q_etResult and q_sResultMsg.

q_etResult

ET_Result

Provides diagnostic and status information as a numeric value.
If q_xError = FALSE, q_etResult provides status information.
If q_xError = TRUE, q_etResult provides diagnostic/error information.

q_sResultMsg

STRING [255]

Provides additional diagnostic and status information as a text message.

q_audiOrderOfCarriers

ARRAY [1..GPL.Gc_udiMaxNumberOfCarriers] OF UDINT

The array provides the index numbers of the carriers directed to the target position specified by the input i_lrTargetPosition.

The order of the carriers depends on the input i_xInForwardDirection.

q_udiNumberOfCarriersFound

UDINT

The number of carriers on the track directed toward the target position.