Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There will be an instance of this SCChart for each train. The train gets a pre-calculated path and the direction for each track in the path (forward or reverse). Once the path is loaded it selects a small portion of it, that allows the train to drive and the environment to keep track of it. The portion is then outputted combined with the wanted track speed.

Inputs

NameTypeLengthDescription
in_aiPathint arrayPATH_LENGHTThe path containing all track numbers in correct order from start to finish. The end of the path is specified with -1 (INVALID)
in_aiTrackDirectionsint arrayPATH_LENGTHThe direction of each track (FORWARD/REVERSE) in the path.
in_iTrainPositionint
The position of the train on the track.
in_sUpdatePathsignal
Signals that the train con copy the path from the input into memory and start driving.
in_sAbortsignal
Signals to abort the driving process and wait for the new path to be available. Used for dynamical rerouting (NOT IMPLEMENTED)
in_bFacingBackwardsbool
Specifies whether the train initially faces forward or backward.
HAS_TRACK_CONTACTSbool arrayNUM_TRACKSSpecifies whether a track has contacts.
CONTACTSbool arrayNUM_TRACKS, 2Hold information of triggered contacts.

Outputs

NameTypeLengthDescription
out_aiOccupiedTracksint arayMAX_OCCUPIED, 2
out_iTrainStatusint

out_bFacingBackwards


Methods

Grap