1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-27 01:56:14 +01:00
CommandStation-EX/Release_Notes/CommandRef.md
2023-03-24 00:24:03 +00:00

4.7 KiB

This file is being used to consolidate the command reference information.

General points:

  • Commands below have a single character opcode and parameters. Even is actually read as
  • Keyword parameters are shown in upper case but may be entered in mixed case.
  • value parameters are decimal numeric (unless otherwise noted)
  • [something] indicates its optional.
  • Not all commands have a response, and broadcasts mean that not all responses come from the last commands that you have issued.

Startup status Return status like <iDCC-EX V-4.2.22 / MEGA / STANDARD_MOTOR_SHIELD G-devel-202302281422Z> also returns defined turnout list: <H id 1|0> 1=thrown

Track power management. After power commands a power state is broadcast to all throttles.

<1> Power on all <1 MAIN|PROG|JOIN> Power on MAIN or PROG track <1 JOIN> Power on MAIN and PROG track but send main track data on both. <0> Power off all tracks <0 MAIN|PROG> Power off main or prog track

Basic manual loco control Throttle loco. speed in JMRI-form (-1=ESTOP, 0=STOP, 1..126 = DCC speeds 2..127) direction 1=forward, 0=reverse For response see broadcast

<F locoid function 1|0> Set loco function 1=ON, 0-OFF For response see broadcast

<!> emergency stop all locos <T id 0|1|T|C> Control turnout id, 0=C=Closed, 1=T=Thrown response broadcast <H id 0|1>

DCC accessory control <a address subaddress activate [onoff]>

Turnout definition Note: Turnouts are best defined in myAutomation.h where a turnout description can also be provided ( refer to EXRAIL documentation) or by using these commands in a mySetup.h file.

Valid commands respond with

Direct pin manipulation (replaces <Z commands, no predefinition required) Set pin HIGH <z -vpin> Set pin LOW Set pin analog value Set pin analog with profile set pin analog with profile and value

Sensors (Used by JMRI, not required by EXRAIL) define a sensor to be monitored. Responses and as sensor changes

Decoder programming - main track POM write value to cv on loco POM write bit to cv on loco

Decoder Programming - prog track Clear consist and write new cab id (includes long/short settings) Responds or <W -1> for error Write value to cv

Read cv value, much faster if prediction is correct. Read CV bit

Read drive-away loco id. (May be a consist id) <D ACK ON|OFF> <D ACK LIMIT|MIN|MAX|RETRY value>

Advanced DCC control

<#> <-> <- cabid>

EEPROM commands These commands exist for backwards JMRI compatibility. You are strongly discouraged from maintaining your configuration settings in EEPROM.

Diagnostic commands <D CMD ON|OFF> <D WIFI ON|OFF> <D ETHERNET ON|OFF> <D WIT ON|OFF> <D LCN ON|OFF> <D EXRAIL ON|OFF> <D SERVO|ANOUT vpin position [profile]> <+ cmd> <+>

User defined filter commands <U ....> <u ....>

Track Management <=> <= track DCC|PROG|OFF> <= track DC|DCX cabid>

Turntable interface <D TT vpin steps [activity]>

Fast clock interface

Advanced Throttle access to features


EXRAIL Commands


</> </START cab sequence> </START sequence> </KILL taskid> </KILL ALL> </RESERVE|FREE blockid> </LATCH|UNLATCH latchid> </RED|AMBER|GREEN signalid>

Obsolete commands/formats V command is much faster if prediction is correct. V command is much faster if prediction is correct. (use <z) Define an output pin that JMRI can set by id (use <z) Activate an output pin by id

Broadcast responses Note: broadcasts are sent to all throttles when appropriate (usually because something has changed)

Diagnostic responses These are not meant to be software readable. They contain diagnostic information for programmers to identify issues. <* ... *>