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.
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 |
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 |
Input |
Data type |
Description |
---|---|---|
i_xInForwardDirection |
BOOL |
If i_xInForwardDirection is set to TRUE, the carrier index numbers are determined in forward 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. |
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 |
Provides diagnostic and status information as a numeric value. |
|
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. |