LocoNet addressing
LocoNet systems address input sensors and output turnouts using numbers. This page talks about how those numbers are defined in JMRI, and how they relate to the numbers in other systems.Addressing LocoNet turnouts in JMRI
Inside packets on the LocoNet, output turnouts are addressed with numbers from 0 to 4095. Throttles, however, address these with numbers from 1 to 4096. To avoid user confusion, JMRI uses the same numbering as the throttles: LT1 to LT4096.Note that when the LocoNet monitor panel shows the contents of the LocoNet packets in text, it uses the same addressing, hence 1 to 4096. This is then different from the raw bytes that are displayed, but at least it's consistent with what users expect to see. We agree that's confusing, but there has to be some confusion somewhere, given the way this was set up.
The Turnout Table
The JMRI Turnout Table shows a table of turnout which JMRI is aware of. Every time JMRI sees a LocoNet message which specifies a turnout, JMRI updates an existing entry in the table or creates a new entry if one does not already exist. Each turnout in the table can be assigned a "User name".
The Turnout table provides a useful snapshot of the current state of all known turnouts, and allows the user to change the state of those turnouts.
Additional information on Turnouts and the Turnout Table may be found at the main Turnouts page.
Addressing LocoNet sensors in JMRI
Inside packets on the LocoNet, sensors are addressed with numbers from 0 to 4095. Digitrax documentation refers to these as 1 to 4096, however. Just like turnouts, we use the documentation numbering to define the sensor names: LS1 to LS4096.The simplest way to find the right number for a given block is to open a "LocoNet monitor" window, and drop a locomotive onto the block you're interested in. You'll see the LocoNet message, complete with number, in the window that looks something like this:
General sensor input report: contact 161 (DS54 switch 81 Aux input) (BDL16 11,1) is HiThe contact number, 161 in this case, is the address of the sensor. Prefix that with LS that to get the sensor name, e.g. LS161 in this case.
If you wish to manually enter in the hardware address to the system you can do it
by enter in the board number, followed by the channel number seperated by a ":"
So for a sensor on board 11, channel 1 you would enter into the Hardware Address field :
11:1
If you want to calculate the address of a BDL168 input, you can use
number = 16 * (board number) + (channel number) - 16
where "channel number" runs from 1 to 16. For example, the first circuit
(number 1) on board 11 has number:
number = 16 * (11) + (1) - 16 = 161
as we saw in the example above.
If you want to calculate the address of a DS54 aux input, use:
number = 2 * (turnout number - 1) + 1
For example, the aux input associated with turnout 81 has number:
number = 2 * (81 - 1) + 1 = 161
If it's the switch input, you add one more to that:
number = 2 * (turnout number - 1) + 2
For example, the switch input associated with turnout 12 has number:
number = 2 * ( 12 - 1 ) + 2 = 24
The Sensor Table
The JMRI Sensor Table shows a table of sensors which JMRI is aware of. Every time JMRI sees a LocoNet message which specifies a sensor, JMRI updates an existing entry in the table or creates a new entry if one does not already exist. Each sensor in the table can be assigned a "User name".
The Sensor table provides a useful snapshot of the current state of all known sensors.
Additional information on Sensors and the Sensor Table may be found at the main Sensors page.
Addressing Transponding in JMRI
Digitrax transponding is handled via the Reporter mechanism in JMRI. Reporters gather information from the layout and make it available when it changes. JMRI refers to reporters using the name LRx where x is a number which corresponds to a detection zone
The transponding zones are numbered sequentially from 1 to 4096. Current BDL16x hardware implements only odd-numbered transponding zones. The first transponding zone of a BDL16x board is reported as reporter number (1 +(board address -1) * 16). The second transponding zone of a BDL16x board is reported as reporter number (1 +(board address -1) * 16) + 2.
Reporter numbering is summarized in the table below:
| Board Address | Zone | Reporter Number |
| 1 | A | LR1 |
| B | LR3 | |
| C | LR5 | |
| D | LR7 | |
| E | LR9 | |
| F | LR11 | |
| G | LR13 | |
| H | LR15 | |
| 2 | A | LR17 |
| B | LR19 | |
| C | LR21 | |
| D | LR23 | |
| E | LR25 | |
| F | LR27 | |
| G | LR29 | |
| H | LR31 | |
| 3 | A | LR33 |
| B | LR35 | |
| C | LR37 | |
| D | LR39 | |
| E | LR41 | |
| F | LR43 | |
| G | LR45 | |
| H | LR47 | |
| ... | ||
| 256 | A | LR4081 |
| B | LR4083 | |
| ... | ||
| H | LR4095 | |
The Reporter Table
The JMRI Reporter Table shows a table of reporters which JMRI is aware of. JMRI creates an entry in this table for each new transponding zone for which it sees a transponding message. Each reporter in the table can be assigned a "User name".
Once you have the transponding hardware installed and at least one locomotive transponding properly, it is simple to fill in the reporter table for each transponding zone by running the transponding locomotive through all transponding-capable zones. It may be convenient to fill in a "User Name" in the JMRI Repoter Table at the same time when the locomotive first enters each transponding zone
Additional information on Reporters and the Reporter Table may be found at the main Reporter page.