JMRI : CBUS Console Tool

Initial Merg Cbus Console Tool Screen

JMRI provides a communications monitor window so you can see what's happening on the layout network.

Once you open a Console window, it will automatically display all traffic.
The left part contains the raw CAN frames. The right part interprets their CBUS meaning.

If the CBUS event table is running, the event table will be queried for event and node names.

You can open multiple console windows, whereby an instance number is added to the title bar.
This number is also added to any Filter, Highlight or event Capture windows which are opened via the console.

You can drag the window boundaries between these to suit your display.

The vertical scrollbar synchronises both windows.

Short CBUS events appear in the Console with a node number of 00.

Buttons

Merg Cbus Console Tool Screen Expanded
Clear Screen
Erases the log area at the top of the screen.
Freeze Screen
Stops acquiring new information, so that the captured information stops scrolling up.

Checkboxes

Timestamps
Normally, the program just displays the data from the communication link. If you'd like each message to be preceded by the time it was sent or received, check this box.
Priorities
If you'd like each message to be preceded by the CBUS priorities used in sending the message, check this box.
Direction
Displays a visual clue to network flow.
CanID
Displays the Can ID of the message sender.
RTR
Displays the RTR status of the CAN message.
OPC
Displays the OPC of the message.
OPC Extra
Displays extra information on the OPC.
Address
Displays the CBUS short an ID of the message.
You can use this to enter as a CBUS hardware address for sensor inputs or turnout and light outputs.
CAN
Displays the CAN message as appears in left side of main console.
Enables Including the CAN message in your log files.

Logging To A File

Sometimes, it's helpful to capture what's happening. For example, you might encounter a bug (!!), and want to send a copy of what's happening to the people who are trying to fix it.

Small amounts of data can be copied from the log window with your computers "copy" command (e.g. ctrl-C or cmd-C), and then pasted into an email.

CBUS Console Logging to File

If you want to capture more, you can have the window write a log file on your computer's disk. To do this:

  1. Click "Choose log file". A file-chooser window will open. Navigate to where you want to store the file, enter a name for the new log file, and click "Save".
    Note that if you pick a file that already exists, it will be overwritten.
  2. When you're ready to capture the data you want, click "Start logging" on the monitor window.
  3. When you're done, click "Stop logging" to store the data and close the file.

You can view contents of the log file by clicking on the Open Log File Button.

If you'd like to annotate the message log with your own comments, enter a comment and press ENTER or click the Add to Log button.

Statistics

CBUS Console Statistics

This part of the window shows some CAN Frame statistics.

The statistics show Frames from the Console opening.

The Reset button resets the values to zero and resets the timer for average calculations.

  • Sent - Frames Sent
  • Received - Frames Received
  • Total - Total Sent and Received Frames
  • Events - Number of Event Frames
  • DCC - Number of DCC Frames
  • CAN / Sec - Frames within previous Second of value update.
  • Avg / Sec - Mean Frames per Second
  • Max / Sec - Maximum number of Frames within 1 Second of each other.

Note that there is upstream buffering of CAN Frames within JMRI before the Console receives them, so values may not necessarily reflect those on the actual CAN.

Packets

CBUS Console Packets

This displays the most recent packet received from the layout, along with a send packet tool.
The individual elements displayed are dynamic and minor priority, the first data byte which is the CBUS opcode and the remaining, up to seven, data bytes.

Copy
Copies the most recently received packet into the send packet data fields.
Send
Sends the packet.
Decimal Data Entry/Display
Normally, the packets display data in hexadecimal and treats data entered as hexadecimal. To change the default to decimal, check this box.

Send Event

CBUS Console Send Event

At the bottom part of the Console, you can construct an Event packet to be sent to the layout. For normal operation, do not edit the preloaded values in the dynamic and normal priority fields.
Enter the opcode and the correct number of data bytes (depending upon the opcode).

If the decimal data entry/display checkbox is not selected then data entry will, by default, be treated as hexadecimal. If the decimal data entry/display checkbox is selected then data entry will, by default, be treated as hexadecimal.

At any time, you may force data entered to be treated as hexadecimal, decimal or binary by adding a "0x", "0d" or "0b" prefix. For example "0x20", "0d32" and "0b00100000" all donate a decimal value of 32.

Send
Checks the packet entered and sends it to the layout or reports any error condition detected (e.g. the number of data bytes does not match the opcode).
Clear
Clears the data entry fields and preloads the priority values.
Decimal Data Entry/Display
When the decimal data entry/display checkbox is not selected (hexadecimal mode), any value with three or more digits will be treated as binary. When the decimal data entry/display checkbox is selected (decimal mode), any value with four or more digits will be treated as binary.

Filter

The filter logic works from top-to-bottom, following the order of the list for any applicable categories.

CBUS Filter

The filter listens for new nodes heard on the network, when a new node is heard it is listed under Nodes and is filterable.

The minimum and max event ( device ) number filter also applies to data device numbers.

The node filter works for all OPCs with a 2 byte node value, including node programming.

To see which OPC's are included mouse-over the sub-category.
( You can set the time the tooltip is displayed for in Main Prefernces > Display ).

OPC's are not modified to a short event if no node number is detected.
( You could identify these by filtering short events, passing long events, and then filter by node number less than 1 ).

When a filter is changed between pass and filter, this is displayed in the console log.

Changing the settings takes effect instantly.

Filter Categories

CBUS Event Filter
  • Incoming
  • Outgoing
  • Events
    • Min. Event
    • Max. Event
    • On Events
    • Off Events
    • Short Events
    • Long Events
    • Standard Events
    • Request Events
    • Response events
    • Event + No Data
    • Event + Data 1
    • Event + Data 2
    • Event + Data 3
  • Nodes
    • Min. Node ( select minimum )
    • Max. Node ( select maximum )
    • Any nodes heard on the network will be added to the main filter list here.
  • Data
    • ACDAT
    • DDES
    • RQDAT
    • ARDAT
    • DDRS
    • RQDDS
    • Cabdata ( Experimental )
  • Command Station CBUS Node Filter
    • Acquire / Release / Consist
    • Keep-Alive
    • Speed / Direction
    • Functions
    • Programming
    • Layout Commands
    • Command Station Control
  • Node Configuration
    • General Node Setup
    • Node Variables
    • Node events
    • Node Number
  • Misc.
    • Network Commands
    • Fast Clock
    • Others
    • Unknown

Event Highlighter

CBUS Event Highlighter

This window can be accessed from the Display options at top of the main console.

It can highlight a specific node or event CBUS message, both on and off options.

You will need at least 1 type ( or / off ) and 1 direction ( in / out ) to activate the highlight.

CBUS Event Highlighter Output

Event Capture

You can open a new Event Capture window from within the Console tool. The capture tool will share an event highlighter or filter with the console it was opened with.

Event Capture Tool Title

For more information, see the Event Capture Tool.

This window will close when the main console window is closed.

Supported Operation Codes

All OPCs supported, additional OPC information available.

Received OPCS can be from either other JMRI components, or from an external CBUS connection.

Very minor changes to OPC description text for increased screen readability.

JMRI Help

You can view this help page within JMRI by selecting Help > Window Help in the top bar of the CBUS Console window.

Main JMRI CBUS Help page.

CBUS® is a registered trade mark of Dr Michael Bolton