JMRI LocoIO Programmer Tools
JMRI contains tool to simplify programming the LocoIO accessory input/output/controller board.This tool was greatly updated by John Plocher for JMRI release 1.8. The first section of this page is John's description of this new programmer. The second part of the page are the instructions for the older programmer, which is still available.
This version ONLY deals with SV1 & SV2 (address/subaddress) and SV3-SV50 (primary mode,value1 and value2 for ports 1-16. In particular, it does NOT address SV0 (board level configuration), SV51-SV98 (alternate Opcodes) or SV101-124 (servo config).
Usage model:
- Enter a LocoIO address and sub-address
- Click on "probe" button
- If a locoIO is found at that address, its firmware version is displayed (the Monitor Loconet window will show all the LocoIOs that responded to the probe request if you need to refresh your memory)
- If you wish to change the address of a locoIO board, you MUST ensure that it is the ONLY locoIO-based board connected to the LocoNet, as the address is set via a broadcast message. A popup will remind you of this. If you ignore it, then ALL of the locoIOs on your loconet will be reprogrammed with the same new address.
- "read all" reads all the CV values from the LocoIO specified. "write all" writes them all out
- The individual read/write buttons do the same, but for only one port at a time.
- "capture" extracts the address out of the next turnout or occupancy sensor loconet message it sees and uses it as the address of the selected port.
To-Do list:
- Need UI to configure the various SV0 states.
- Write a "change address" routine that takes both the old and new addresses and does the change without using a broadcast address.
- Write a set of config data out to a text file in the form used by Hans's programmer, and reread it back when requested.
Instructions for Older Programmer
There was an older LocoIO programmer, which is still available in JMRI. This section contains the instructions for that programmer.
The programmer provides a table-based interface for configuring John Jabour's LocoIO board, a powerful component for building CTC boards and control panels. (More information on the board is available at http://www.locobuffer.com/LocoIO.htm)
A LocoIO board has 16 signal pins, each of which can be programmed as an input or output, and to do a number of different things. The board is also sometimes described as having 16 channels.
The channels are configured via LocoNet messages. The LocoIO programmer uses a table to represent the configuration of each channel.
The "Action" column is used to select how the channel behaves. Click in a cell to be given a menu of available choices. Currently, the choices are:
- "Toggle switch controls turnout"
Generate a OPC_SW_REQ to close/throw a turnout when a toggle switch changes state. When the input goes high, a "close" command is sent; when the input goes low, a "throw" command is sent. The channel configuration value is 0x0F.
- "Input low flips turnout"
Generate a OPC_SW_REQ LocoNet message when the input goes low. This is intended for use with a momentary pushbutton. The command sent will alternate the position of the addressed turnout or signal; if "close" was last sent, a "throw" will be sent now and vice-versa. The channel configuration value is 0x2F.
- "Input high flips turnout"
Generate a OPC_SW_REQ LocoNet message when the input goes high. This is intended for use with a momentary pushbutton. The command sent will alternate the position of the addressed turnout or signal; if "close" was last sent, a "throw" will be sent now and vice-versa. The channel configuration value is 0x6F.
- "Status message sets output"
-
Drive an output from OPC_INPUT_REP input status messages on the LocoNet. The output goes high when an "input high" message is received, and goes low when an "input low" message is received. These messages are also used for block occupancy status; the output will go high when the block is occupied, and low when its empty. The channel configuration value is 0XC0.
- "Turnout close cmd sets output"
-
Drive an output on the LocoIO board from received OPC_SW_REQ commands. The channel configuration value is 0x80. This adjusts the address field to look for a command that sets the turnout "closed".
- "Turnout throw cmd sets output"
-
Drive an output on the LocoIO board from received OPC_SW_REQ commands. The channel configuration value is 0x80. This adjusts the address field to look for a command that sets the turnout "thrown".
The "Hex Value1,Value2" column sets the address that the LocoIO board will use for LocoNet communications. This contains a hexadecimal representation of the two configuration values described in John Jabour's LocoIO programming guide. You generally won't need to figure out these addresses, as the buttons will find them for you.
We're also planning to have a "User Address" column that will show the human-readable address for turnouts and sensors. For turnout messages, this is the same number that you would use on your throttle. For block occupancy messages, this is the block number. For input status messages, this is the input number, which is twice the number of the associated turnout, plus one if its a DS54 "switch" input.
The button reads from the LocoIO board via the LocoNet and shows the current configuration for that pin. The button stores the current settings to the LocoIO board.
The button provides an easier way to find a needed LocoNet address. Configure the input and output for a particular pin, then press the button. The address in the next LocoNet message of the right type will be put in the address column.
For example, if you have a channel set to act when a "Turnout closed status message" is received, press the button and use your throttle to command the correct turnout closed.
As another example, if the channel is configured to send a "Send throw turnout command", press the button and use your throttle to command the correct turnout thrown.
At the bottom of the table are some general controls. The LocoIO address field sets the address of the board being programmed. LocoIO processors are sent with an address of 1051 programmed; see below for how to change that. Address "0" is a global address which any LocoIO board will respond to; make sure you have only one connected when you use that!
The button will use the global address to configure a specific address into a LocoIO board. Again, make sure you have only one connected. (This button is disabled in the current version while we sort out a problem)
The and buttons are not yet implemented. They will eventually allow you to load and store configuration files.
The and buttons read or write all of the channels, and are just a convenience.
Status messages during capture/read/write are displayed at the bottom of the window. If no response is heard from the LocoIO unit, the operation will be retried until it succeeds or until you close the window.