Testing your EX-CommandStation¶
(LOTS OF TODO in this file)
(LOTS OF TODO in this file)
Ways you can test your EX-CommandStation include:
- Testing use EX-WebThrottle
- Testing with a Serial Monitor
- Testing over WiFi with a Smart Device
Testing with EX-WebThrottle¶
TODO Initial Testing with EX-WebThrottle
See Connecting a USB Throttle to your EX-CommandStation and see EX-WebThrottle
Testing with a Smart Device over WiFi¶
DIY - Testing over WiFi
Testing over WiFi of an Arduino Mega Self Build (DIY) EX-CommandStation is only practical if you have installed a WiFi Shield as part of your build.
You can test your EX-CommandStation to some degree using a smart device (phone or tablet) running a throttle app. While this will tell you if it is working it provided limited capability for diagnosing problems if they arise. See Connecting a WiFi Throttle to your EX-CommandStation
The EX-ToolBox Android app also provides similar capabilities for testing over WiFi.
TODO basic steps for initial testing with a Smart Device over WiFi
- connect A to track
- confirm track power is on (4 LEDS). Turn on if necessary.
- connect to the EX-CS WiFi in your smart device network settings (See throttle connecting page)
- open the throttle app and connect to the server (see appropriate page)
- put a loco on the track
- acquire the loco in the throttle app (see appropriate page)
- control the loco
TODO what to do if any of the initial testing steps fail
Serial Monitors¶
The most direct testing method is to use a serial monitor to talk directly to the USB connection of your EX-CommandStation. This is a fundamental aspect of the Arduino system and thus avoids issues such as WiFi connections. Indeed, this is the only way to see what's going wrong if your problems are WiFi or Ethernet related.
There are several serial monitors available:
- Built in to EX-Installer
- Built in to the EX-WebThrottle
- Built in to JMRI or other train control software
- Built in to VSCode is you are using that as an IDE
- Built in to the Arduino IDE (Not recommended)
- built into the EX-ToolBox Android app
See Serial Monitors for more information.
TODO Instructions on using Device Monitor.
Test an internal link to EX-IOExpander
Whichever you use, please ensure the baud rate is set to 115200 so that it matches that used by the EX-CommandStation. (Installer anf WebThrottle do this automatically)
Its important to note that only one program on your PC can be connected to the EX-CommandStation via USB. It is a common cause of error messages if you try and open a serial monitor when one of the other programs is still running.
In most cases, connecting a serial monitor causes the EX-CommandStation to restart.
Simple testing commands (Main track)¶
Commands are entered as shown, complete with the < > markers. Case is important because <T is a completely different command to <t
Check communication and version¶
<s> Will instruct the EX_CommandStation to provide information about itself
TODO... pic - Check communication and version
Turn on track power¶
<1> will turn on all 4 leds that lie behind the track output sockets.
<0> Will turn the tracks off.
Move a loco¶
You can only drive a loco if you know the loco DCC address. For a brand new loco or decoder this is normally preset to 3. If you don't know the loco address, then you can find out using the simple programming commands.
Assuming you know the loco address is 3, the following commands may be useful:
<!> Emergency stop all locos
<t 3 50 1> Move loco 3 speed 50 forward.
<t 3 20 0> Move loco 3 speed 20 reverse.
<t 3 0 1> Stop loco 3 (decoder may stop loco realistically)
<t 3 -1 1> Emergency Stop loco 3
Test loco functions¶
<F 3 0 1> Turn on loco 3 function 0
<F 3 0 0> Turn off loco 3 function 0
Things to remember¶
The commands <t and <F will normally reply with a <l response when something about a loco is changed. This response is designed for throttles to share information and not generally for human reading.
A response of <X> indicates the command was not understood by the EX-CommandStation, so check your typing as <T and <f are not the same as <t and <F.
DCC generally has no way of knowing whether the loco exists, is listening or has dirty wheels. If you get no movement the first thing to do is check the track is clean.