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
Next revision Both sides next revision
usage:nodes:atc_controller [2019-11-06 14:50]
blockhead [Conditional statements] Finish notes on nested conditional equality
usage:nodes:atc_controller [2020-01-22 10:53]
admin ↷ Links adapted because of a move operation
Line 1: Line 1:
 ====== ATC controller ====== ====== ATC controller ======
-{{ http://git.bananach.space/advtrains.git/plain/advtrains_train_track/textures/advtrains_dtrack_atc_placer.png?nolink&50 }}+{{ :usage:nodes:advtrains_dtrack_atc_placer.png?80 }}
 //Unleash the full power of Advtrains by sending Automatic Train Control commands.// //Unleash the full power of Advtrains by sending Automatic Train Control commands.//
  
-//Note: this page has been written for Advtrains 2.0.1 TSS and Minetest 5.1.0. Examples and practices described in this page don't take advantage of improvements introduced in later releases.//+//Note: this page has been written for Advtrains 2.1.0 and Minetest 5.1.0. Examples and practices described in this page don't take advantage of improvements introduced in later releases.//
  
 ===== Properties ===== ===== Properties =====
Line 35: Line 35:
 In ATC commands, spaces are ignored and can be inserted as needed. In ATC commands, spaces are ignored and can be inserted as needed.
  
-==== Simple directives ====+==== Speed commands ====
 === S<speed> === === S<speed> ===
  
Line 41: Line 41:
  
 ''<speed>'' can be either: ''<speed>'' can be either:
-  * a number constituted only of digits. This represents an [[usage:trains#advtrains_speed_unit|Advtrains speed unit]], 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 50: Line 50:
 Brakes until the train speed reaches ''<speed>''. The train applies brakes if slower than current speed, and does nothing if not. Brakes until the train speed reaches ''<speed>''. The train applies brakes if slower than current speed, and does nothing if not.
  
-''<speed>'' should be a number constituted only of digits, representing an [[usage:trains#advtrains_speed_unit|Advtrains speed unit]].+''<speed>'' should be a number constituted only of digits, representing speed in metres per second. 
 + 
 +Execution of the ATC command continues **immediately**. 
 + 
 +=== BB === 
 + 
 +Activates the emergency brake. In this mode, the deceleration is higher than with standard brake (i.e. ''B0'').
  
 Execution of the ATC command continues **immediately**. Execution of the ATC command continues **immediately**.
Line 63: Line 69:
  
 Reverses movement direction of train. Has only effect while the train is standing. Reverses movement direction of train. Has only effect while the train is standing.
 +
 +==== Door commands ====
  
 === OL, OR === === OL, OR ===
Line 98: Line 106:
 === <, <=, >, >= === === <, <=, >, >= ===
  
-Compares the current train speed to the given speed. That speed should be a number constituted only of digits, representing an [[usage:trains#advtrains_speed_unit|Advtrains speed unit]].+Compares the current train speed to the given speed. That speed should be a number constituted only of digits, and in metres per second.
  
 It is not currently possible to test directly the speed for equality or inequality. It is not currently possible to test directly the speed for equality or inequality.
Line 114: Line 122:
 </code> </code>
  
-Unfortunately the command <code>I+I<=8I>=8B0</code> can't be parsed and the parser complains. For now you will have to not nest I+ commands inside I< commands.+Unfortunately the command <code>I+I<=8I>=8B0;;;</code> can't be parsed and the parser complains. For now you will have to not nest I+ commands inside I< commands. 
 + 
 +==== Specific commands ==== 
 + 
 +=== A<enable_interlocking> === 
 +Either enables (''A1'') or disables (''A0'') interlocking on the train.   
 +When disabled, the train will not trigger automatic route setting on signals based on ARS. 
 + 
 +**This command is available only in the ''[[http://git.bananach.space/advtrains.git/tree/?h=luaatc-extensions|luaatc-extensions]]'' branch of Advtrains.** 
 + 
 +===== Examples =====
  
-==== Examples ==== +==== S, B ====
-=== S, B ===+
  
   * ''SM'': accelerate to maximum speed   * ''SM'': accelerate to maximum speed
Line 125: Line 142:
   * ''S0 B3'' or ''B3 S0'': brake to 3, then roll to stand.   * ''S0 B3'' or ''B3 S0'': brake to 3, then roll to stand.
  
-=== W, R ===+==== W, R ====
  
   * ''S5 W'': set target speed to 5 (~ 18 km/h), and wait for speed to be 5   * ''S5 W'': set target speed to 5 (~ 18 km/h), and wait for speed to be 5
Line 131: Line 148:
   * ''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
  
-=== OL, OR, OC ===+==== OL, OR, OC ====
  
   * ''B0 W OL D10 OC D1 SM'': example of train stopping at a standard station with doors opening on the left   * ''B0 W OL D10 OC D1 SM'': example of train stopping at a standard station with doors opening on the left
   * ''B0 W OL R D20 OC D1 SM'': example of train stopping at a terminus station, with returning in opposite direction   * ''B0 W OL R D20 OC D1 SM'': example of train stopping at a terminus station, with returning in opposite direction
  
-=== 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
usage/nodes/atc_controller.txt · Last modified: 2022-06-27 04:32 by blockhead