User Tools

Site Tools


usage:nodes:atc_controller

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
usage:nodes:atc_controller [2019-12-18 13:09]
mlaunois added new commands (BB and A0); updated inventory image
usage:nodes:atc_controller [2022-06-27 04:32] (current)
blockhead [Speed commands] grammar
Line 38: Line 38:
 === S<speed> === === S<speed> ===
  
-Sets the target speed of driving train to ''<speed>''. The train accelerates if faster than current speed, rolls if slower, and does nothing if at the same speed.+Sets the target speed of driving train to ''<speed>''. The train accelerates if slower than target speed, rolls down to a slower speed if faster, and does nothing if at the same speed.
  
 ''<speed>'' can be either: ''<speed>'' can be either:
   * a number constituted only of digits. This represents the speed in metres per second (1 m/s = 3.6 km/h), or   * a number constituted only of digits. This represents the speed in metres per second (1 m/s = 3.6 km/h), or
-  * the special value **M**, which represents the maximal speed of the train as defined by the entity definition passed to [[reference:advtrains:register_wagon|advtrains.register_wagon]].+  * the special value **M**, which represents the maximal speed of the train as defined by the entity definition passed to [[dev:core:funref:register_wagon|advtrains.register_wagon]].
  
 Execution of the ATC command continues **immediately**. Execution of the ATC command continues **immediately**.
Line 83: Line 83:
  
 Close doors previously opened by ''OL'' or ''OR''. Close doors previously opened by ''OL'' or ''OR''.
 +
 +=== K ===
 +
 +Kicks all passengers (except drivers) out of the train. Door must be opened to do this. Useful at terminal stations.
 +
 +==== Other Commands ====
 +
 +=== Cpl ===
 +
 +Temporarily switch the train to "Autocouple" mode and wait for coupling.
 +
 +This command makes the train continue at its current speed until it hits another standing wagon or train. Then, it couples to this train and ATC command execution continues.
 +
 +After coupling, the train retains its current target speed. If you do not include a ''B0'' command after ''Cpl'', the train will immediately start moving again.
 +
 +**Note to LuaATC users:** When using this command, the train running the ATC command is guaranteed to retain its Train ID. The Train ID of the standing train that it is coupled to becomes invalid.
 +
 +//Note: This command is unique in that its command code is a 3-letter code. Future ATC extensions should also introduce multi-letter codes to avoid exhaustion of letter space for single-letter codes.//
  
 ==== Conditional statements ==== ==== Conditional statements ====
Line 147: Line 165:
   * ''B0 W R'': brake to stand, wait for speed to be 0, and reverse direction of train   * ''B0 W R'': brake to stand, wait for speed to be 0, and reverse direction of train
   * ''B0 W D10 SM'': brake to stand, wait 10 seconds after the train stopped, and reverse direction of train   * ''B0 W D10 SM'': brake to stand, wait 10 seconds after the train stopped, and reverse direction of train
 +
 +==== Cpl ====
 +
 +  * ''S2 Cpl B0 W D2 R S4'': Drives a locomotive towards a group of wagons, couple to them, wait 2 seconds and then pull the wagons in the opposite direction with speed 4.
  
 ==== OL, OR, OC ==== ==== OL, OR, OC ====
Line 155: Line 177:
 ==== I, +/-, </<=/>/>= ==== ==== I, +/-, </<=/>/>= ====
  
-  * ''I + S2;'': if the train is going in the right direction, set target speed to 2 +  * ''I+S2;'': if the train is going in the right direction, set target speed to 2 
-  * ''I + SM E B0;'': if the train is going in the right direction, accelerate, otherwise stop +  * ''I+SMEB0;'': if the train is going in the right direction, accelerate, otherwise stop 
-  * ''I <8 S8;'': if the train is slower than 8 (~ 30 km/h), set target speed to 8+  * ''I<8S8;'': if the train is slower than 8 (~ 30 km/h), set target speed to 8
  
 ===== Trivia ===== ===== Trivia =====
usage/nodes/atc_controller.1576670964.txt.gz · Last modified: 2019-12-18 13:09 by mlaunois