Station Object
The Station object provides a fixed location for a Mover to stop at until it is ready to be released. A Station is a type of Objective, and provides a handle to the Mover object that is currently docked with the Station, allowing further motion commands to be issued to the Mover.
Setup & Execution
1 2 |
|
1 2 3 4 |
|
1 2 3 4 |
|
Mover Registration
Unlike other types of Objectives, Stations manage mover registration automatically. Any mover that is commanded with a MoveToStation is also automatically registered with that station. As an example, this implementation would be redundant:
1 2 |
|
Stations also automatically unregister movers that have been redirected with another move command, even if that command's destination is the same as the Station.
1 2 |
|
Here, the Station will not report MoverInPosition.
Methods
Cyclic
Cyclic()
Stations require a cyclic call in the Main program. This allows the station to automatically unregister movers from its Tracked list who have been redirected and are no longer destined for this Station.
1 2 3 |
|
Properties
.MoverInPosition
Status boolean indicating that a mover is currently docked with the Station
.CurrentMover
Reference variable that refers to the Mover that is docked with the Station
When no mover is present in the Station, .CurrentMover is an invalid reference. In this case, an ErrorMover will replace the invalid reference. The user will receive notifications when this happens in the TwinCAT Event Logs.
It is recommended that all evaluations are nested inside IF checks for .MoverInPosition.
.TrackedMoverCount
Simply reports the number of Movers that are currently registered with the Station. Because Stations automatically deregister movers that are not currently destined for this Station, this value also represents the current number of incoming movers.
.Position
Current placement of the Station along the track
.TrackId
DINT
Track that the station is assigned to when using track management. See the Track object.
Extra Examples
1 2 3 4 5 6 7 8 9 10 |
|
1 2 3 4 |
|