Function block providing general methods for the handling of carriers with regard to the individual stations as well as the interaction between the stations.
The function block FB_CoreStation is the core element of the MulticarrierStation library.
The function block FB_CoreStation implements the interface IF_CoreStation for enabling the assignment of stations to other stations and provides the method SetTargetStationForCarrierHandling for the assigning task.
A user-defined station can inherit the function block FB_CoreStation and use the method SetTargetStationForCarrierHandling for defining the target station.
FUNCTION_BLOCK FB_SimpleStation EXTENDS MCRS.FB_CoreStation
For defining the target stations for the individual stations of a track, proceed as follows:
Instantiate the required number of stations:
fbSimpleStation1 : FB_SimpleStation;
fbSimpleStation2 : FB_SimpleStation;
fbSimpleStation3 : FB_SimpleStation;
Assign the appropriate station as the target station with the method SetTargetStationForCarrierHandling:
fbSimpleStation1.SetTargetStationForCarrierHandling(i_ifCorestation := fbSimpleStation2);
fbSimpleStation2.SetTargetStationForCarrierHandling(i_ifCorestation := fbSimpleStation3);
fbSimpleStation3.SetTargetStationForCarrierHandling(i_ifCorestation := fbSimpleStation1);
For handing over carriers to the target station, you can use the method HandoverCarriersToTargetStation.
Name |
Data type |
Accessing |
Description |
---|---|---|---|
lrHandoverTargetGap |
LREAL |
Read/Write |
With the property lrHandoverTargetGap, you can set a target gap for carriers that are sent to the station. If the carrier is sent to the target station with the move command MoveGapControl, use this target gap. For more information on the move command MoveGapControl, refer to the Multicarrier library . |
lrHandoverTargetPosition |
LREAL |
Read/Write |
With the property lrHandoverTargetPosition, you can set the target position for carriers that are sent to the station. If the carrier is sent to the target station with a move command, use this target position. For the available move commands, refer to the enumeration ET_MoveCommand in the Multicarrier library . |
raudiCarrierIndexArray |
REFERENCE TO ARRAY [1..MCR.GPL.Gc_udiMaxNumberOfCarriers] OF UDINT |
Read |
Array specifying the carriers in the station by their index numbers. This property indicates which carriers are assigned to the station. For more information, refer to the global parameter list of the Multicarrier library . |
sName |
STRING [80] |
Read/Write |
With the property sName, you can set the name of the station. This name is also used when the method RegisterLoggerPoint (see RegisterLoggerPoint) is used to register the function block to the . If the property sName is not set, the instance name of the function block FB_CoreStation is used. |
udiNumberOfCarriersInStationStanding |
UDINT |
Read |
Indicates the number of assigned carriers that are in standstill in the station. |
udiNumberOfCarriersInStationTotal |
UDINT |
Read |
Indicates the number of carriers that are assigned to the station. |
udiStationId |
UDINT |
Read |
Indicates the ID of the station. |
xActivateAPLEntriesForMovedCarriers |
BOOL |
Write |
If xActivateAPLEntriesForMovedCarriers is set to TRUE, messages are written for the carriers assigned to the station. As a precondition, the property xEnableActivationOfAPLEntriesForCarriers must be set to TRUE.
NOTE: The property xActivateAPLEntriesForMovedCarriers overwrites the corresponding property xApplicationLoggerEntriesActive of the Multicarrier library .
|
xEnableActivationOfAPLEntriesForCarriers |
BOOL |
Write |
If xEnableActivationOfAPLEntriesForCarriers is set to TRUE, the property xActivateAPLEntriesForMovedCarriers is enabled and the logging of carriers via the can be activated or deactivated. For an application example of the properties xEnableActivationOfAPLEntriesForCarriers and xActivateAPLEntriesForMovedCarriers, refer to the description of Station-based Carrier Logging in the Lexium™ MC multi carrier Example Guide. |
The methods and properties of the function block FB_CoreStation are assigned the access specifier FINAL
. This helps to protect the methods and properties from being overwritten. When an attempt is made to overwrite a method or property, an error message is displayed.
In addition, some methods are also assigned the access specifier PROTECTED
. They can only be called and displayed in function blocks inheriting the function block FB_CoreStation.