JMRI® connects to...
EX-CommandStation (DCC-EX)
Supported Hardware
Devices, command stations, networks, and protocols:
Applications
By the community of JMRI.org:
Tools
JMRI tools for working with your layout:
Layout Automation
Use JMRI to automate parts of your layout and operations:

JMRI Help:

Contents Index
Glossary FAQ

Donate to JMRI.org

EX-CommandStation (DCC-EX) Lights

DCC-EX lights support two output modes, selectable per-light in the Light Table. The Mode column only appears in the table when a DCC-EX connection is active.

Output Modes

Accessory Decoder (default)

The default mode. JMRI sends a DCC accessory decoder command (<a dcc-address subaddress activate>) to turn the light on or off. Use this for any light or relay connected to a DCC accessory decoder on the track.

The Hardware Address is the DCC accessory address.

CS VPIN (DCC-EX v4.2.35+)

CS VPIN mode drives a VPIN directly using the <z vpin> / <z -vpin> command - no pre-configuration in the Base Station's output table is needed. The command station resolves the VPIN via the EX-HAL layer at runtime, so it works with raw GPIO pins, I2C expanders, and any other HAL device.

Set the Hardware Address to the VPIN number. ON sends <z vpin> (HIGH) and OFF sends <z -vpin> (LOW). State updates optimistically on send with no reply from the command station.

On ESP32-based hardware (EX-CSB1), VPINs 0-39 map directly to GPIO numbers with no extra HAL configuration. For other devices use the VPIN assigned in your myHal.cpp.

Adding a Light and Setting its Mode

  1. Open the Light Table (Tools > Tables > Lights).
  2. Click Add...
  3. Make sure "DCC-EX" is selected in the System Name chooser.
  4. Enter the Hardware Address (DCC address, or VPIN number for CS VPIN mode).
  5. Click OK.
  6. In the new row, use the Mode dropdown to select "Accessory Decoder" or "CS VPIN".

The mode is saved with your panel file and restored on the next load.

General Notes

CS VPIN mode requires EX-CommandStation firmware v4.2.35 or later. Earlier firmware does not support the lowercase <z> command.

The <z> command is fire-and-forget - the command station does not send a reply. For applications that need confirmed state, use Accessory Decoder mode with a feedback sensor instead.