1720 lines
85 KiB
Plaintext
1720 lines
85 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy for HTML5 for Apple macOS version 5.8.0">
|
|
<title>JMRI Hardware Support - Chubb Computer/Model Railroad Interface (C/MRI)</title>
|
|
<meta name="author" content="Bob Jacobsen, Egbert Broerse, Chuck Catania">
|
|
<meta name="keywords" content=
|
|
"Bruce Chubb C/MRI Computer interface java model railroad JMRI install windows">
|
|
<!--#include virtual="/help/en/parts/Style.shtml" -->
|
|
</head>
|
|
<body>
|
|
<!--#include virtual="/help/en/parts/Header.shtml" -->
|
|
|
|
<div id="mBody">
|
|
<!--#include virtual="Sidebar.shtml" -->
|
|
|
|
<div id="mainContent">
|
|
<h1 id="contents">Hardware Support: Chubb Computer/Model Railroad Interface (C/MRI)</h1>
|
|
|
|
<ul class="snav">
|
|
<!-- Pull out links to items on PanelPro CMRI Menu -->
|
|
|
|
<li>
|
|
<a href="#L215">Establish Connection</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L258">Manage Nodes</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L391">I/O Bits</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L450">Create Objects</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L562">Network Management Tools</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L624">Diagnostics</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L106">Full TOC</a>
|
|
</li>
|
|
</ul>
|
|
<!-- +++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
|
|
<h2 id="top">Using C/MRI with JMRI</h2>
|
|
|
|
<p>This documentation describes how C/MRI hardware (including microcontrollers emulating
|
|
C/MRI hardware) can be used with JMRI. It also provides guidance on connecting a C/MRI system
|
|
to JMRI. It assumes a basic knowledge of JMRI and some familiarity with C/MRI.</p>
|
|
|
|
<p>If you are using C/MRI hardware, it is highly recommended that you have access to Bruce
|
|
Chubb's <a href="https://www.jlcenterprises.net/pages/downloads" target="_blank">C/MRI User
|
|
Manual, Version 3.0</a> which contains detailed hardware documentation not available
|
|
elsewhere. Since JMRI takes the place of the control software described, you can skip over
|
|
computer programming details in the manual. Excellent descriptions of various signaling
|
|
systems and model railroad layout device controls are also presented in Dr. Chubb's
|
|
manuals.</p>
|
|
|
|
<p>If you are using microcontrollers such as the <a href="https://www.arduino.cc" target=
|
|
"_blank">arduino</a> to emulate C/MRI hardware, additional information on their use with JMRI
|
|
can be found on the <a href="../arduino/index.shtml">Using Arduinos with JMRI</a> help
|
|
page.</p>
|
|
|
|
<p>The network over which C/MRI hardware communicates with JMRI is called <em>CMRInet</em>.
|
|
The CMRInet protocol definition is published by the <a href="https://www.nmra.org" target=
|
|
"_blank">NMRA</a> under the Standards and Recommendations Section, <a href=
|
|
"https://www.nmra.org/sites/default/files/standards/sandrp/Other_Specifications/lcs-9.10.1_cmrinet_v1.1.pdf"
|
|
target="_blank">Layout Control Specifications: LCS-9.10 C/MRI Introduction v1.0 (2014.12.01)
|
|
and LCS-9.10.1 CMRInet v1.1 (2014.12.01).</a><br></p>
|
|
|
|
<p>Note: <em>C/MRI</em> and <em>CMRI</em> (without the slash) are used interchangeably. The
|
|
C/MRI communication protocol is referred to as <em>CMRInet</em>.</p>
|
|
|
|
<ul>
|
|
<li>This CMRI/JMRI documentation is divided into sections which can be accessed by clicking
|
|
items in the list:</li>
|
|
</ul>
|
|
|
|
<div id="L106" class="toc">
|
|
<ul>
|
|
<li>
|
|
<a href="#L170">Introduction to C/MRI on JMRI</a>
|
|
<ul>
|
|
<li>
|
|
<a href="#L46">Types of C/MRI Nodes</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L145">Supported Hardware</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L164">Limitations</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L215">Establishing a C/MRI System Connection in JMRI</a>
|
|
<ul>
|
|
<li>Serial connection</li>
|
|
|
|
<li>Network connection</li>
|
|
|
|
<li>Simulator</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L258">Managing Nodes</a>
|
|
<ul>
|
|
<li>
|
|
<a href="#L268">Configuring C/MRI Nodes</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L281">Adding a Node Definition</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L296">Creating a SMINI Node Definition</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L323">Creating a USIC/SUSIC Node Definition</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L352">Creating a CPNODE Node Definition</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L353">Creating a CPMEGA Node Definition</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L363">Editing a Node Definition</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L391">C/MRI Input and Output Bits</a>
|
|
<ul>
|
|
<li>
|
|
<a href="#L395">Inputs - Sensor Table</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L405">Outputs - Turnout Table</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L419">Outputs - Light Table</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L429">Unique Output Bits</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L001">Forming a JMRI System Name for a C/MRI Bit</a>
|
|
<ul>
|
|
<li>
|
|
<a href="#L447">Alternate Numbering Scheme for C/MRI System Names</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L450">Creating JMRI Objects to Use With C/MRI</a>
|
|
<ul>
|
|
<li>
|
|
<a href="#L459">Creating a Sensor Input</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L484">Creating a Turnout Output</a>
|
|
<ul>
|
|
<li>
|
|
<a href="#L519">Turnout Control Options</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L547">Creating a Light Output</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L562">CMRInet Network Management Tools</a>
|
|
<ul>
|
|
<li>
|
|
<a href="#L568">CMRInet Manager</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L580">CMRInet Monitor</a>
|
|
<ul>
|
|
<li>
|
|
<a href="#L590">Interpreting Hexadecimal in C/MRI Monitor Output</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L597">CMRInet Network Metrics</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L609">Listing C/MRI Bit Assignments</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L624">Diagnostics</a>
|
|
<ul>
|
|
<li>
|
|
<a href="#L625">Output Test</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L626">Loopback Test</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L627">Send Commands</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L632">CMRInet Network Connections</a>
|
|
<ul>
|
|
<li>
|
|
<a href="#L652">Using An Ethernet Network Connection</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L662">Running JMRI when disconnected from your C/MRI system</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L676">PanelPro Signaling Example Using C/MRI</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="#L739">JMRI and Third Party Help</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<!-- +++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
<a id="L170"></a>
|
|
<h2 id="intro">Introduction to C/MRI on JMRI</h2>
|
|
|
|
<p>C/MRI is an object control system of digital input and output lines that can connect a
|
|
computer to a model railroad layout, allowing computer monitoring and control of various
|
|
objects on the layout such as turnouts, sensors, signals, lights, and even animations. You
|
|
may run C/MRI with any train control system, whether DC or DCC. If you are controlling your
|
|
trains with a train control system that JMRI supports, you can connect your C/MRI system and
|
|
your train control system to JMRI simultaneously.</p>
|
|
|
|
<p>Most C/MRI users who use JMRI run with connections to both their C/MRI and their train
|
|
control system. There are many advantages to doing so. JMRI allows you to "mix and match" how
|
|
you control and monitor things on your layout. For example, you can switch your Turnouts
|
|
(track switches) using static decoders on your train control system, and simultaneously use
|
|
C/MRI inputs to provide Turnout Feedback to JMRI. JMRI is designed to make both connected
|
|
systems work smoothly together.</p>
|
|
|
|
<p>PanelPro is the JMRI application most often used to manage a C/MRI system, and is the one
|
|
used in the examples below. Since all JMRI applications use the same underlying library, it
|
|
is also possible to run C/MRI functions from DecoderPro. Access to C/MRI system-specific
|
|
features is via a menu pulldown titled for the specific hardware connection. The picture
|
|
below shows the C/MRI specific menu pulldown from the <strong>PanelPro main
|
|
screen.</strong></p>
|
|
|
|
<p><img alt="" src="images/menu_CMRI.png" width="672" height="217">
|
|
</p>
|
|
|
|
<p>Devices providing the digital input and output lines are called "nodes." Nodes connect to
|
|
the computer using a serial network or a USB interface. Microcontrollers can be programmed to
|
|
emulate C/MRI nodes and connect to a computer in a similar manner.</p>
|
|
|
|
<p>C/MRI inputs are defined in JMRI as 'Sensors', and C/MRI outputs can be defined as JMRI
|
|
'Turnouts' or JMRI 'Lights' (<a href="#L395">see below</a>). Note that C/MRI inputs and
|
|
outputs are sometimes called 'bits', 'pins', or 'lines'; all refer to the same things.</p>
|
|
|
|
<p>CMRInet is a polled master/slave system, which means that communicating with C/MRI nodes
|
|
requires that a "master" computer (in this case, JMRI) periodically sends a message asking
|
|
each of its "slave" nodes to transmit the status of its input bits (Sensors to JMRI). JMRI
|
|
allows multiple C/MRI connections to be defined, thus creating multiple "masters" that
|
|
communicate only with the slave nodes defined specifically to each. JMRI begins to poll a
|
|
node on a particular C/MRI connection when at least one Sensor has been set up to refer to an
|
|
input bit on that node. It is this polling action that keeps the network traffic activity
|
|
LEDs on the nodes flashing at a high rate. JMRI will also transmit data (Turnout and Light
|
|
state) to nodes to change the state of output bits for that node.</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
<!-- +++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
|
|
<h3 id="L46">Types of C/MRI Nodes</h3>
|
|
<!-- FOURTH TYPE OF NODE IN PULLDOWN MENU: CPMEGA TBD 2020/12/08 -->
|
|
|
|
<p>There are three types of C/MRI nodes; USIC/SUSIC, SMINI, and cpNode [more may be added in
|
|
the future]. The USIC/SUSIC and SMINI are Classic nodes. The cpNode and other Open Source/DIY
|
|
offerings, which comply with the CMRInet protocol, are referred to as Open Source Nodes
|
|
(OSN).</p>
|
|
|
|
<p>The SUSIC (Super Universal Serial Interface Card) and USIC (Universal Serial Interface
|
|
Card) are serial controller boards for a large digital I/O systems. A motherboard supports up
|
|
to 32 digital input and digital output cards, with either 24 or 32 input or output lines per
|
|
card. The USIC is an older version of the SUSIC.</p>
|
|
|
|
<p>The SMINI (Super Mini-node) card is a stand-alone serial node providing a fixed 24 input
|
|
lines and 48 output lines.</p>
|
|
|
|
<p>Software is generally available for microcontrollers to emulate SMINIs and SUSICs of any
|
|
size. See <a href="../arduino/index.shtml#CMRI">Emulating a CMRI node</a> for
|
|
more information.</p>
|
|
|
|
<p>The CPNODE (cpNode) is a standalone serial node which provides 16 to 144 input and output
|
|
lines. The cpNode uses an Arduino Leonardo style microcontroller and is an Open Source Node
|
|
(OSN).</p>
|
|
|
|
<p>A number of hardware interface boards are available as part of C/MRI. They all connect to
|
|
your computer via an SMINI, a SUSIC/USIC, or cpNode. For example, C/MRI's DCCOD occupancy
|
|
detector board connects to an input port on a node.</p>
|
|
|
|
<p>Layouts which use C/MRI will commonly have several SMINI's located at different places on
|
|
the layout, and perhaps one or two SUSIC's located at CTC panels. cpNodes are small physical
|
|
footprint nodes, which can be distributed around a layout to provide connection to devices
|
|
clustered in an area. All C/MRI node types, including microcontrollers emulating any of these
|
|
types, may coexist and interoperate within a CMRInet network.</p>
|
|
|
|
<p>JMRI libraries have built-in support for C/MRI serial hardware using the SUSIC/USIC,
|
|
SMINI, and cpNode. Each SUSIC/USIC, SMINI, or cpNode is a serial node capable of
|
|
communicating independently with a computer via serial I/O. Several C/MRI nodes may be
|
|
connected together using the RS-485 communication protocol in a daisy chain configuration so
|
|
that only one serial line into your computer is required. For this to work, each node must
|
|
have a different unique address set into the address switches on its board, defined in the
|
|
cpNode Kernel sketch, or specified in the emulation software of a microcontroller. You will
|
|
need a C/MRI RS-232 to RS-422/485 conversion card or USB to RS-422/485 interface between the
|
|
RS-422/485 bus connecting the cards and the RS-232 or USB port on your computer (see <a href=
|
|
"#L632">CMRINet Network Connections</a> below). More than one chain can be defined to JMRI as
|
|
well with each chain requiring a separate designation within JMRI (see <a href=
|
|
"#L215">Establishing a C/MRI System Connection in JMRI</a> below).</p>
|
|
|
|
<p>Each node (SUSIC/USIC, SMINI, or cpNode) needs to receive an initialization string before
|
|
it can communicate with a computer. JMRI will automatically create and transmit the required
|
|
initialization string when it starts up, but to make this possible, you need to tell JMRI the
|
|
details of how your C/MRI hardware is set up. The process of doing this is called
|
|
"configuring" your C/MRI Node (<a href="#L268">see below</a>).</p>
|
|
|
|
<h3 id="L145">Supported Hardware</h3>
|
|
|
|
<ul>
|
|
<li>Chubb C/MRI USIC</li>
|
|
|
|
<li>Chubb C/MRI SMINI</li>
|
|
|
|
<li>Chubb C/MRI SUSIC</li>
|
|
|
|
<li>Model Railroad Control Systems (MRCS) CPNODE</li>
|
|
|
|
<li>Model Railroad Control Systems (MRCS) CPMEGA</li>
|
|
</ul>
|
|
|
|
<p>Note: Some C/MRI output boards can be configured in whole or in part as either ‘current sinking’
|
|
or ‘current sourcing’, and you will have to keep track of that to successfully use the outputs. Note
|
|
also that Current Sinking Outputs are not compatible with the inputs, and will thus cause errors in the
|
|
CMRI wraparound test available in JMRI.
|
|
</p>
|
|
|
|
<h3 id="L164">Limitations</h3>
|
|
|
|
<p>Original Chubb IBEC and UBEC interfaces for older PC system buses (ISA, PCI) are not
|
|
supported.</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
<!-- +++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
|
|
<h2 id="L215">Establishing a C/MRI System Connection in JMRI</h2>
|
|
|
|
<p>Before C/MRI objects can be defined, a <strong>CMRInet system connection</strong> needs to
|
|
be defined within JMRI. This is done from the <strong>Preferences</strong> window. A CMRInet
|
|
connection can be a physical hardware connection via a serial interface (including USB), a
|
|
network connection via TCP/IP (wired or wireless), or a simulated connection. More than one
|
|
JMRI system connection can be defined if you have multiple CMRINet connections to your
|
|
computer (including multiple connections of the same type).</p>
|
|
|
|
<h3>Serial Connection</h3>
|
|
|
|
<p>To create a CMRInet serial connection, open the Preferences window. Click on
|
|
<strong>Connections</strong> in the left selection box.</p>
|
|
<img alt="CMRI Prefs - Serial" src="images/cmripreferencesserial-rel4-21-3.png" width="834"
|
|
height="502">
|
|
<p>Select <strong>C/MRI</strong> in the <strong>System manufacturer</strong> menu popup.
|
|
Select <strong>Serial</strong> from the <strong>System connection</strong> menu popup.</p>
|
|
|
|
<p>Under <strong>Settings</strong>, select the name of the physical serial port on the
|
|
computer. Either an RS-232 or USB port known to the system can be selected.</p>
|
|
|
|
<p>"C" is the default <strong>Connection Prefix</strong> for C/MRI. That is, C/MRI objects
|
|
will automatically use that prefix in their system name. For example, a C/MRI sensor will
|
|
have a system name beginning with "CS" ("S" for sensor). The default can be changed if
|
|
necessary. If you have more than one C/MRI connection, you must use different connection
|
|
prefixes for each, such as "C2", "C3", etc.</p>
|
|
|
|
<p>Click on <strong>Additional Connection Settings</strong>, select the network line speed
|
|
rate that the C/MRI nodes are configured for.</p>
|
|
|
|
<p>Click <strong>Save</strong> to create the serial connection. JMRI will present a dialog
|
|
window asking if you want to restart.<br>
|
|
Click <strong>Yes</strong>.</p>
|
|
|
|
<h3>Network Connection</h3>
|
|
|
|
<p>To create a CMRInet network connection, open the Preferences window. Click on
|
|
<strong>Connections</strong> in the left selection box.</p>
|
|
|
|
<p class="important">As of Release 4.21.2, problems have been reported in some circumstances
|
|
using the Network Interface to C/MRI. If you have any issues using this capability, please
|
|
post them to the <a href="https://groups.io/g/jmriusers" target="_blank">JMRI User Group</a>
|
|
on groups.io.</p>
|
|
<img alt="CMRI Prefs - Network" src="images/cmripreferencesnetwork-rel4-21-3.png" width="835"
|
|
height="505">
|
|
<p>Select <strong>C/MRI</strong> in the <strong>System manufacturer</strong> menu popup.
|
|
Select <strong>Network Interface</strong> from the <strong>System connection</strong> menu
|
|
popup.</p>
|
|
|
|
<p>Under <strong>Settings</strong>, enter the IP Address or Host name of the network
|
|
connected device. For example, if an arduino is broadcasting C/MRI information via TCP/IP
|
|
wireless over address "192.168.0.123" enter that. If you have defined a Host Name, say
|
|
"TrainNode1" for that IP address, then enter that host name.</p>
|
|
|
|
<p>"C" is the default <strong>Connection Prefix</strong> for C/MRI. That is, C/MRI objects
|
|
will automatically use that prefix in their system name. For example, a C/MRI sensor will
|
|
have a system name beginning with "CS" ("S" for sensor). The default can be changed if
|
|
necessary. If you have more than one C/MRI connection, you must have different connection
|
|
prefixes for each, such as "C2", "C3", etc.</p>
|
|
|
|
<p>Click on <strong>Additional Connection Settings</strong> and specify the TCP/UDP Port that
|
|
the CMRINet is broadcasting on. Output interval can be varied if communications problems
|
|
arise.</p>
|
|
|
|
<p>Click <strong>Save</strong> to create the network connection. JMRI will present a dialog
|
|
window asking if you want to restart.<br>
|
|
Click <strong>Yes</strong>.</p>
|
|
|
|
<h3>Simulator</h3>
|
|
|
|
<p>A Simulator connection is very useful if you are creating a PanelPro panel and do not have
|
|
actual C/MRI hardware in place or want to test without being connected to your layout. Once
|
|
you define a C/MRI simulator connection, you can define any JMRI objects as C/MRI objects. As
|
|
with other connection types, "C" is the default <strong>Connection Prefix</strong>. A
|
|
physical and simulator connection using the same Connection Prefix may be defined at the same
|
|
time, but only one may be active at a time. Use the <strong>Disable Connection</strong>
|
|
checkbox to enable or disable a connection.</p>
|
|
|
|
<p>If you have more than one active C/MRI connection, including simulators, you must have
|
|
different connection prefixes for each, such as "C2", "C3", etc. You can also define a
|
|
<a href="../../setup/profiles.shtml">JMRI Configuration Profile</a> for testing with
|
|
simulator connections replacing each of your physical C/MRI connections.</p>
|
|
|
|
<p>To create a Simulator connection, follow the same steps above and select Simulator for the
|
|
System connection. Be sure to <strong>Save</strong> after defining Simulator connections.</p>
|
|
<img alt="CMRI Prefs - Sim" src="images/cmripreferencessimulator-rel4-21-3.png" width="828"
|
|
height="504">
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
<!-- +++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
|
|
<h2 id="L258">Managing Nodes</h2>
|
|
|
|
<p>An SMINI, USIC/SUSIC, or cpNode is called a "node". A node is a point in the CMRInet
|
|
network where the physical connections for controlled layout equipment is done. Before using
|
|
C/MRI with JMRI, you must tell JMRI what nodes you have attached to each C/MRI system
|
|
connection and the configuration of each node.</p>
|
|
|
|
<p>Each node has a unique node address in the range of 0 to 127. Two nodes on the same C/MRI
|
|
system connection to JMRI may not have the same node number. However, nodes on different connections
|
|
may have the same node address since each connection describes a totally separate CMRInet
|
|
network.</p>
|
|
|
|
<p>Node addresses are set using switches on the SMINI and USIC/SUSIC boards, by entering the
|
|
node number into the cpNode software sketch, or as required in the emulation software of a
|
|
microcontroller. In the C/MRI manuals, node addresses are called the Unit Address (UA).</p>
|
|
|
|
<p>You can add new nodes or update an existing node's configuration via the main PanelPro
|
|
window, either by</p>
|
|
|
|
<ul>
|
|
<li><strong>Edit ⇒ Preferences ⇒ Connections</strong>, or</li>
|
|
|
|
<li><strong>C/MRI ⇒ Configure Nodes</strong> (using the appropriate C/MRI menu for each
|
|
connection)</li>
|
|
</ul>
|
|
|
|
<p>You will need to save your Preferences after making changes to your node configuration.
|
|
Use the "Save" button in the Preferences window to do this.</p>
|
|
|
|
<h3 id="L268">Configuring C/MRI Nodes</h3>
|
|
|
|
<p><img alt="" src="images/menu_Configure_Nodes.png" width="672" height="217">
|
|
</p>
|
|
|
|
<p>CMRInet nodes are created from the Node Configuration Manager window.</p>
|
|
|
|
<p>C/MRI nodes require certain information be established for proper operation within the
|
|
CMRInet network. Each node type has some common parameters, and may have specific parameters
|
|
for initialization and data port mapping.</p>
|
|
|
|
<p>To open the Node Configuration Manager window from the PanelPro Main menu, select the name
|
|
of the specific C/MRI connection to get the pulldown. If there is only a single C/MRI
|
|
connection, that will be <strong>C/MRI⇒Configure Nodes</strong>. You may also click on the
|
|
"Configure CMRInet nodes" button in the Preferences window for the specific C/MRI
|
|
connection.</p>
|
|
|
|
<p>Any existing C/MRI nodes will be displayed by node address. The serial connection name is
|
|
displayed with additional configuration information for the node. Clicking on any of the
|
|
column titles will sort the rows in alphanumeric order.</p>
|
|
|
|
<p>JMRI assigns numbers sequentially beginning at 1 to input lines and separately to output lines.
|
|
It does not matter how many input or output "cards" any node has, how many bits are on each card,
|
|
or whether you have attached sensors to every input line or turnouts or lights to every output line
|
|
- if the configuration says there are 24 input lines and 48 output lines, that's how many JMRI
|
|
will assume when it sends a transmission to or receives a transmission from your C/MRI node (in this
|
|
example, it will send C/MRI messages with 6 bytes of data and expect to receive 3 bytes of data).
|
|
See <a href="#L391">below</a> for how to assign and name JMRI sensors, lights, and turnouts to use
|
|
the desired C/MRI bit.
|
|
</p>
|
|
|
|
<p><img alt="" src="images/nodeconfigurationmanager.png" width="1030" height="630">
|
|
</p>
|
|
|
|
<h3 id="L281">Adding a Node Definition</h3>
|
|
|
|
<p>To add a node, click the <strong>Add Node</strong> button at the bottom of the Node
|
|
Configuration Manger window. The Add Node window will be displayed.</p>
|
|
|
|
<p>There are parameters, which need to be entered for every node type. These entries are
|
|
required and some are common to all C/MRI node types. The example below shows the data fields
|
|
for an SMINI. See the individual sections for creating the specific node definitions.</p>
|
|
|
|
<p><img alt="" src="images/addnodew-text.png" width="579" height="691">
|
|
</p>
|
|
|
|
<p>Clicking on the <strong>Done</strong> button will close the Node Configuration Window.</p>
|
|
|
|
<p>A printed list of configured nodes can be provided by clicking on the
|
|
<strong>Print</strong> button.</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
|
|
<h3 id="L296">Creating an SMINI Node Definition</h3>
|
|
|
|
<p>Open the Node Configuration Window from either the Preferences window or from the PanelPro
|
|
main menu, select <strong>CMRI⇒Configure Nodes</strong>.</p>
|
|
|
|
<p><img alt="" src="images/addnodesmini.png" width="654" height="780">
|
|
</p>
|
|
|
|
<p>Select <strong>SMINI</strong> from the Node Type popup menu.</p>
|
|
|
|
<ul>
|
|
<li>Enter the node address in the Node Address field.</li>
|
|
|
|
<li>If required, enter Receive Delay value, otherwise leave as Zero.</li>
|
|
|
|
<li>If using twin coil switch motors and a different ON pulse value is required, enter that
|
|
value, otherwise leave as 500.</li>
|
|
|
|
<li>If you are using the Yellow signal aspect feature (2-lead oscillating searchlight) of
|
|
the SMINI, set the check boxes as needed. See the Chubb documentation on the SMINI for
|
|
specific details setting up this option.</li>
|
|
|
|
<li>The Description field provides a text entry area for a description of the node. An
|
|
example could be the physical area of the SMINI controlled section on the layout.</li>
|
|
|
|
<li>Enable Polling at Startup is checked. This option, when enabled, means polling of the
|
|
node will start when PanelPro launches. Un-checking the option will prevent the node from
|
|
being polled at startup.</li>
|
|
</ul>
|
|
|
|
<p>Click the <strong>Add Node</strong> button. The entries are checked for valid data, and if
|
|
any data errors are present, an error message will be displayed in the Alert Message
|
|
area.</p>
|
|
|
|
<p>You must do a <strong>Save</strong> from the <strong>Preferences</strong> window for nodes
|
|
which are added.</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
|
|
<h3 id="L323">Creating a USIC/SUSIC Node Definition</h3>
|
|
|
|
<p>Open the Node Configuration Window from either the Preferences window or from the PanelPro
|
|
main menu, select <strong>C/MRI⇒Configure Nodes</strong>.</p>
|
|
|
|
<p><img alt="" src="images/addnodeusicsusic.png" width="654" height="780">
|
|
</p>
|
|
|
|
<p>Select <strong>USIC_SUSIC</strong> from the Node Type popup menu.</p>
|
|
|
|
<ul>
|
|
<li>Enter the node address in the Node Address field.</li>
|
|
|
|
<li>Set the Card Size from the popup menu. This parameter defines the type of Chubb input
|
|
(DIN/DIN32) or output (DOUT,DOUT32) cards which are plugged into an I/O motherboard. The
|
|
USIC/SUSIC card plugs into the motherboard and is the serial interface to the control
|
|
computer. A card size of 24-bit represent three byte cards (DIN/DOUT) and 32-bit represents
|
|
four byte cards (DIN32/DOUT32).</li>
|
|
|
|
<li>If required, enter Receive Delay value, otherwise leave as Zero.</li>
|
|
|
|
<li>Pulse Width is specified when using twin coil switch motors. If a different value is
|
|
required, enter that value, otherwise leave as 500.</li>
|
|
|
|
<li>You need to define the type of card, by card address (set by switches on the card), and
|
|
whether the card is an input or an output. For each card installed, click on "No Card" and
|
|
select "Input Card" or "Output Card" for that position on the motherboard. Note that the
|
|
input and output cards may be in any order, but there must be no empty slots before the one
|
|
following the last installed card. This is a C/MRI hardware requirement</li>
|
|
|
|
<li>The Description field provides a text entry area for a description of the node. An
|
|
example would be the physical location on the layout.</li>
|
|
|
|
<li>Enable Polling at Startup is checked. This option, when enabled, means polling of the
|
|
node will start when PanelPro launches. Un-checking the option will prevent the node from
|
|
being polled at startup.</li>
|
|
</ul>
|
|
|
|
<p>Click the Add Node button. The entries are checked for valid data, and if any data errors
|
|
are present, an error message will be displayed.</p>
|
|
|
|
<p>You must do a Save from the Preferences window for nodes which are added, updated, or
|
|
deleted.</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
|
|
<h3 id="L352">Creating a CPNODE Node Definition</h3>
|
|
|
|
<p>Open the Node Configuration Window from either the Preferences window or from the PanelPro
|
|
main menu, select <strong>C/MRI⇒Configure Nodes</strong>.</p>
|
|
|
|
<p><img alt="Add CPNODE" src="images/addnodecpnode.png" width="654" height="780">
|
|
</p>
|
|
|
|
<p>Select <strong>CPNODE</strong> from the Node Type popup menu.</p>
|
|
|
|
<ul>
|
|
<li>Enter the node address in the Node Address field.</li>
|
|
|
|
<li>The card size for a CPNODE is 8 bits.</li>
|
|
|
|
<li>If required, enter Receive Delay value, otherwise leave as Zero.</li>
|
|
|
|
<li>Pulse Width is specified when using twin coil switch motors. If a different value is
|
|
required, enter that value, otherwise leave as 500.</li>
|
|
|
|
<li>You need to define the type of card, by card address (set by switches on the card), and
|
|
whether the card is an input or an output. For each card installed, click on "No Card" and
|
|
select "Input Card" or "Output Card" for that position on the motherboard. Note that the
|
|
input and output cards may be in any order, but there must be no empty slots before the one
|
|
following the last installed card. This is a C/MRI hardware requirement</li>
|
|
|
|
<li>cpNodes can have input/output expanders (IOX16,IOX32) which provide additional I/O data
|
|
ports. If IOX support has been enabled in the cpNode, select for each defined IOX by board
|
|
address, the port direction for each card. No Card corresponds to an unused byte in the
|
|
IOX.</li>
|
|
|
|
<li>The Description field provides a text entry area for a description of the node. An
|
|
example would be the physical location on the layout.</li>
|
|
|
|
<li>Enable Polling at Startup is checked. This option, when enabled, means polling of the
|
|
node will start when PanelPro launches. Un-checking the option will prevent the node from
|
|
being polled at startup.</li>
|
|
|
|
<li>Send EOT On No Inputs Changed is Un-checked. This option, when enabled, means that an
|
|
Open Source Nodes (OSN) can send and EOT in response to a poll if there has not been a
|
|
change in input states since the last poll.</li>
|
|
</ul>
|
|
|
|
<p>Click the Add Node button. The entries are checked for valid data, and if any data errors
|
|
are present, an error message will be displayed.</p>
|
|
|
|
<p>You must do a Save from the Preferences window for nodes which are added, updated, or
|
|
deleted.</p>
|
|
|
|
<h3 id="L353">Creating a CPMEGA Node Definition</h3>
|
|
|
|
<p>CPMega is an updated Version of the CPNode supporting the arduino Mega. It allows 56 bits
|
|
of onboard I/O and is compatible with I2C expansion boards for a total of up to 184 bits bit
|
|
per Node.</p>
|
|
|
|
<p>A separate area within the setup window is used to specify the "onboard" bits. Other than
|
|
that, this is set up like a CPNODE.</p>
|
|
|
|
<p><img alt="Add CPMega" src="images/addnodecpmega.png" width="819" height="668">
|
|
</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
|
|
<h3 id="L363">Editing a Node Definition</h3>
|
|
|
|
<p>Node configuration parameters may be changed by selecting the <strong>Edit</strong>
|
|
function from the Node Configuration Manager window.</p>
|
|
|
|
<p><img alt="" src="images/nodeconfigurationmanager-edit.png" width="940">
|
|
</p>
|
|
|
|
<p>For the node you want to edit, click on the <strong>Select</strong> popup column for the
|
|
node, and select Edit.</p>
|
|
|
|
<p><img alt="" src="images/editnode.png" width="576" height="702">
|
|
</p>
|
|
|
|
<p>The Edit Node window will open and display the configuration for the selected node. The
|
|
node address cannot be modified. Make the necessary changes, then click on the <strong>Update
|
|
Node</strong> button. If there are any data entry errors, an error message will be shown in
|
|
the "Notes" section of the window. When you are done editing, click on the
|
|
<strong>Done</strong> button to close the window.</p>
|
|
|
|
<p>You must do a <strong>Save</strong> from the Preferences window for the update to take
|
|
effect.</p>
|
|
|
|
<p>Note: When exiting the Node Configuration Manager and changes were made, a warning dialog
|
|
will be presented reminding you to save your changes from the Preferences window.</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
<!-- +++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
<a id="L391"></a>
|
|
<h2 id="iobits">C/MRI Input and Output Bits - JMRI Tables</h2>
|
|
|
|
<p><img alt="" src="images/menu_Tools_Tables.png" width="680" height="400">
|
|
</p>
|
|
|
|
<p>JMRI refers to C/MRI Input bits as <strong>Sensors</strong> and Output bits as
|
|
<strong>Turnouts</strong> or <strong>Lights</strong>. The definition of Sensors, Turnouts,
|
|
and Lights is done by adding entries into the appropriate data table. Tables are accessed by
|
|
selecting from the PanelPro main screen <strong>Tools⇒Tables⇒{table name}</strong></p>
|
|
|
|
<p>A specific input or output bit may be assigned to only one object at a time. If the
|
|
requested C/MRI bit has already been assigned, JMRI will refuse to associate a new object
|
|
with that bit. Input bits are only associated with Sensors. Output bits are associated either
|
|
with Turnouts or Lights, but a particular bit can only be associated with one at a time. When
|
|
a new Turnout or Light is created, JMRI checks that the specified output bit is available for
|
|
assignment.</p>
|
|
|
|
<p>Assigned and unassigned bits can be viewed using the <a href="#L609">List I/O Bit
|
|
Assignments</a> tool.</p>
|
|
|
|
<h3 id="L395">Inputs - Sensor Table</h3>
|
|
|
|
<p>Sensors provide input to JMRI about conditions on the layout; a button is pushed, a block
|
|
is occupied, etc. <strong>When you see a "Sensor" reference, think "input bit" or "input
|
|
port".</strong></p>
|
|
|
|
<p>A Sensor may be created in a number of ways, including automatically. All JMRI Sensors
|
|
which have been created may be viewed in the JMRI Sensor Table, which is accessed by
|
|
selecting <strong>Sensor Table</strong> in the Tools menu in the main PanelPro window.</p>
|
|
|
|
<p>A sensor is created by clicking the Add button at the bottom of the Sensor Table. Creating
|
|
a Sensor to refer to a specific C/MRI input bit, is called "assigning" that input bit. Each
|
|
input bit may be assigned only once, i.e. two different Sensors may not refer to the same
|
|
C/MRI input bit. A Sensor is "active" when its assigned input bit is On and "inactive" when
|
|
its input bit is Off.</p>
|
|
|
|
<h3 id="L405">Outputs - Turnout Table</h3>
|
|
|
|
<p>Turnouts are basically on/off switches that JMRI can change to control things on the
|
|
layout. C/MRI output bits are associated with Turnouts so <strong>when you see a "Turnout"
|
|
reference, think "output bit" or "output port".</strong></p>
|
|
|
|
<p>For historical reasons, C/MRI output bits used to control signal aspects are referred to
|
|
as 'Turnouts', even if the output bits are used to control signal mast LEDs or lamps. NOTE:
|
|
Always use 'Turnouts' for C/MRI outputs used to control Turnouts (track switches) and for
|
|
C/MRI outputs used to operate signals.</p>
|
|
|
|
<p>Before you can refer to a Turnout within JMRI, the Turnout must be "created". A new
|
|
Turnout is created by clicking "Add" at the bottom of that table. A new Turnout is created in
|
|
the Turnout table as illustrated below. Creating a Turnout to refer to a specific C/MRI
|
|
output bit, is called "assigning" that output bit. Each Turnout is linked to a specific
|
|
output line via the address part of the System Name.</p>
|
|
|
|
<p>Turnouts that have been created may be viewed in the JMRI Turnout Table, accessed by
|
|
selecting <strong>Turnout Table</strong> in the Tools menu from the PanelPro main window.</p>
|
|
|
|
<h3 id="L419">Outputs - Light Table</h3>
|
|
|
|
<p>Similarly, Lights are controlled by C/MRI output bits. <strong>When you see a "Light"
|
|
reference, think "output bit" or "output port".</strong> Lights can be created via the Light
|
|
Table.</p>
|
|
|
|
<p>The JMRI Light Table is accessed by selecting Lights in the Tools > Tables menu. All
|
|
JMRI Lights that have been created are listed in the JMRI Light Table. Turnouts and Lights
|
|
are different methods of referring to C/MRI outputs from within JMRI. Each method has
|
|
different setup and control options. JMRI refers to C/MRI output bits as Turnouts or Lights.
|
|
Lights are on/off switches that JMRI can change to control things on the layout.</p>
|
|
|
|
<p>The JMRI Light Table is accessed by selecting Lights in the Tools > Tables menu. All
|
|
JMRI Lights that have been created are listed in the JMRI Light Table. Creating a Turnout or
|
|
a Light to refer to a specific C/MRI output bit, is called "assigning" that output bit. Each
|
|
Light or Turnout is linked to a specific output line via the address part of the System
|
|
Name.</p>
|
|
|
|
<h3 id="L429">Unique Output Bits</h3>
|
|
|
|
<p>A specific output bit may be referred to as a Turnout or a Light, but not both. Each
|
|
output bit may be assigned only once. When a new C/MRI Turnout or a new C/MRI Light is
|
|
created, JMRI checks that the specified output bit is available for assignment. If the
|
|
requested C/MRI output bit is in use by a Turnout or a Light, JMRI will refuse to create the
|
|
new Turnout or new Light. Note that some C/MRI Turnout control options use two output bits,
|
|
the addressed one and the next one (see next paragraph), and that both output bits must be
|
|
unassigned for successful creation of a new Turnout controlled by two output bits.</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
|
|
<h3 id="L001">Forming a JMRI System Name For a C/MRI Bit</h3>
|
|
|
|
<p>System Names, which represent physical C/MRI hardware inputs or outputs, have four
|
|
components:</p>
|
|
|
|
<p style="margin-left:2em;"><strong>c[c]pn[nn]bbb</strong>
|
|
</p>
|
|
|
|
<p>where:</p>
|
|
|
|
<ul>
|
|
<li><em>c[c]</em> is the one or two character <strong>Connection prefix</strong> of the
|
|
C/MRI Connection. If there is only a single C/MRI connection, this is typically the default
|
|
of "C". If more than one C/MRI connections is defined, each will have a different
|
|
connection prefix of one or two characters.</li>
|
|
|
|
<li><em>p</em> is the <strong>Port type</strong> which specifies what type of JMRI object
|
|
is to be associated with this C/MRI bit. Sensors are designated with a
|
|
"<strong>S"</strong>, Turnouts with a "<strong>T"</strong>, and Lights with an
|
|
"<strong>L</strong>".</li>
|
|
|
|
<li><em>n[nn]</em> is the one, two, or three digit <strong>node address</strong>, a decimal
|
|
value in the range of 0-127. While a node address of zero does not need to be inserted, it
|
|
is preferred to include it for readability. Also, assigning node addresses greater than 9
|
|
makes the System Name more readable.</li>
|
|
|
|
<li>
|
|
<em>bbb</em> is the <strong>bit number</strong>, the physical bit position in the C/MRI
|
|
data stream, numbered in the range of 1-999 [for larger bit numbers, see <a href=
|
|
"#L447">Alternate Form For System Names</a> below].
|
|
</li>
|
|
</ul>
|
|
|
|
<p>For example, C2S10024 is a JMRI Sensor, associated with the 24th input bit on Node 10 of
|
|
C/MRI connection C2. CT8001 is a JMRI Turnout for the 1st output port on Node 8 of C/MRI
|
|
connection C.</p>
|
|
|
|
<p>When adding a C/MRI object to a JMRI table, only node address and bit number are entered.
|
|
Connection prefix and port type are prefixed automatically.</p>
|
|
|
|
<p>More information on System Names within JMRI can be found <a href=
|
|
"../../doc/Technical/Names.shtml">here</a>.</p>
|
|
|
|
<h4 id="L447">Alternate Numbering Scheme for C/MRI System Names</h4>
|
|
|
|
<p>An alternate scheme for numbering in C/MRI System Names was developed to give user access
|
|
to the full number of lines allowed by C/MRI hardware design. The main numbering system
|
|
allows access to 999 input and output lines on each node. The C/MRI hardware design, however,
|
|
supports many more bits for USIC and SUSIC nodes. Most JMRI users will never need this
|
|
alternate scheme, and should use the main numbering scheme.</p>
|
|
|
|
<p>The alternate numbering scheme is similar to the main numbering scheme, except the node
|
|
address and bit number are separated by a "B", and both node address and bit number can range
|
|
to any value supported by C/MRI. The format is thus:</p>
|
|
|
|
<p style="margin-left:2em;"><strong>c[c]pn[nn]Bbbbb</strong>
|
|
</p>
|
|
|
|
<p>where "B" is the separator between the node number and the bit number, which can now go up
|
|
to 2048 (depending on how the C/MRI node is defined to JMRI).</p>
|
|
|
|
<p>For example, C2S10B24 is a C/MRI Sensor, for the 24th input bit on Node 10 on C/MRI
|
|
connection C2. CT2B1009 is the a C/MRI Turnout for the 1009th output port on Node 2 on C/MRI
|
|
connection C.</p>
|
|
|
|
<p>Users may use either numbering scheme interchangeably for line numbers up to 999, but must
|
|
use the alternate numbering scheme for line numbers greater than 999. For ease in
|
|
communicating with other users, the main numbering scheme is recommended unless bits greater
|
|
than 999 need to be addressed.</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
<!-- +++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
|
|
<h2 id="L450">Creating JMRI Objects to Use With C/MRI</h2>
|
|
|
|
<h3 id="L459">Creating a Sensor Input</h3>
|
|
|
|
<p>To create a sensor input, open the Sensor table by selecting
|
|
<strong>Tools⇒Tables⇒Sensors</strong> in the main PanelPro menu. Select "Add" and Select the
|
|
name of the C/MRI connection from the pulldown list. [See also <a href=
|
|
"../../tools/Sensors.shtml">the Sensors Documentation</a>.]</p>
|
|
|
|
<p><img alt="Sensor Table" src="images/sensortable.png" width="1130" height="707">
|
|
</p>
|
|
|
|
<p>Creating a Sensor to refer to a specific C/MRI input bit on a specific node is called
|
|
"assigning" that input bit. Each input bit may be assigned only once, i.e., two different
|
|
Sensors may not refer to the same C/MRI input bit on the same node. Enter the node address
|
|
and the bit number in the <strong>Hardware Address</strong> field using the numbering scheme
|
|
discussed <a href="#L001">above.</a> Do not enter the C/MRI Connection Prefix or the Port
|
|
type ("S") as those will be prefixed automatically.</p>
|
|
|
|
<p>Sensors have two hardware states: a Sensor is "active" when the input bit is 1 and
|
|
"inactive" when its input bit is zero.</p>
|
|
|
|
<p>Some types of C/MRI hardware may require sensors to be defined for every bit on every
|
|
active node. This is not, however, a JMRI requirement.</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
|
|
<h3 id="L484">Creating a Turnout Output</h3>
|
|
|
|
<p>Turnouts and Lights are different methods of referring to C/MRI outputs from within JMRI.
|
|
Each method has different control options. Always use 'Turnouts' for C/MRI outputs used to
|
|
control Turnouts (track switches) and for C/MRI outputs used to operate signals.</p>
|
|
|
|
<p>To create a turnout output, open the Turnout table by selecting
|
|
<strong>Tools⇒Tables⇒Turnouts</strong> in the main PanelPro menu. Select "Add" and Select the
|
|
name of the C/MRI connection from the pulldown list. [See also <a href=
|
|
"../../tools/Turnouts.shtml">the Turnout Documentation</a>.]</p>
|
|
|
|
<p><img alt="Turnout Table" src="images/turnouttable.png" width="1123" height="910">
|
|
</p>
|
|
|
|
<p>Creating a Turnout to refer to a specific C/MRI output bit on a specific node is called
|
|
"assigning" that output bit. Each output bit may be assigned only once, i.e., two different
|
|
Turnouts or Lights may not refer to the same C/MRI output bit on the same node. Enter the
|
|
node address and the bit number in the <strong>Hardware Address</strong> field using the
|
|
numbering scheme discussed <a href="#L001">above.</a> Do not enter the C/MRI Connection
|
|
Prefix or the Port type ("T") as those will be prefixed automatically.</p>
|
|
|
|
<p>Note that some C/MRI Turnout control options use two output bits, the addressed one and
|
|
the next one (<a href="#L519">see next section</a>), and that both output bits must be
|
|
unassigned for successful creation of a new Turnout controlled by two output bits.</p>
|
|
|
|
<p>Turnout bits have two hardware states; THROWN for On and CLOSED for Off. These names are
|
|
in place for historical reasons. When connected to actual switches, Closed can be "Normal" or
|
|
the straight route and thrown can be interpreted as "Reverse" or the diverging route.</p>
|
|
|
|
<p>When turnout bits are used on the C/MRI hardware to control signal LEDs or lamps, one
|
|
turnout (output) bit would be assigned to the connection wire to the LED or lamp. Multi-color
|
|
(aspect) signal heads would have one output port assigned to each active color LED. When
|
|
defining signal heads, the defined turnout name for the color is used to associate the LED
|
|
control wires. See the example on defining signal heads.</p>
|
|
|
|
<p>Some types of C/MRI hardware may require turnouts to be defined for every bit on every
|
|
active node. This is not, however, a JMRI requirement.</p>
|
|
|
|
<h4 id="L519">Turnout Control Options</h4>
|
|
|
|
<p>Turnouts (switches) may be controlled using one or two output bits. When a Turnout is
|
|
created using the Add option in the Turnout Table, the user is asked whether the Turnout is
|
|
to be controlled using one or two output bits and whether these should be "steady-state" or
|
|
"pulsed." The way JMRI responds in each case for C/MRI turnouts is described in the following
|
|
paragraphs.</p>
|
|
|
|
<p class="noted">The way JMRI responds for turnouts defined with other hardware control
|
|
systems may be different than for C/MRI. If you are not using C/MRI hardware or protocols,
|
|
please refer to <a href="../index.shtml">the Hardware</a> help pages for your particular
|
|
hardware or protocol.</p>
|
|
|
|
<p><img alt="Turnout Control Bits" src="images/turnoutnumbits.png" width="665" height="247">
|
|
</p>
|
|
|
|
<p>With one bit control, THROWN and CLOSED states are controlled by the same bit (see below
|
|
for how). With two bits, one bit is "On" for THROWN and the other bit is "On" for CLOSED. If
|
|
both bits are "On" or "Off," nothing is sent to C/MRI. "Steady state" output means the C/MRI
|
|
bit or bits will be sent once by JMRI. "Pulsed" means that an "On" will be sent when a change
|
|
in state is requested and then an "Off" one second later, i.e. a pulse is sent. This behavior
|
|
is particularly important to understand if you are programming a microcontroller to accept
|
|
and respond to C/MRI transmissions.</p>
|
|
|
|
<p><img alt="Turnout Output Type" src="images/turnoutoutputtype.png" width="603" height=
|
|
"247">
|
|
</p>
|
|
|
|
<p>There are four possible combinations of number of bits and output selection:</p>
|
|
|
|
<dl>
|
|
<dt>[1 bit, steady-state]</dt>
|
|
|
|
<dd>
|
|
<p class="dl">The one output bit is set "Off" for CLOSED (C/MRI manuals call this
|
|
'normal') or "On" for THROWN ('reverse'). When setting the output bit, JMRI compares the
|
|
<em>requested state</em> to the state indicated by the current value of the output bit.
|
|
If these states are different, then the output bit is set and transmitted as indicated
|
|
above. If these states are the same, that state is compared to the state indicated by
|
|
<em>Turnout Feedback</em>. If the states are the same, no transmission take place since
|
|
the Turnout is already in the requested state. If the states are different, the Turnout
|
|
was probably changed by some means separate from JMRI.</p>
|
|
|
|
<p class="dl">To ensure the Turnout is actually set to the requested state, the output
|
|
bit is sent twice as follows:</p>
|
|
|
|
<ul>
|
|
<li>first, it is changed to match the state indicated by the Turnout Feedback,</li>
|
|
|
|
<li>then one second later, it is changed again to match the requested state.</li>
|
|
</ul>
|
|
|
|
<p class="dl">This approach guarantees that a requested change of state causes an actual
|
|
move in the Turnout for those Turnout control devices that require a change in state to
|
|
force the move.</p>
|
|
</dd>
|
|
|
|
<dt>[1 bit, pulsed]</dt>
|
|
|
|
<dd>
|
|
<p class="dl">If "Use 1 bit" option is used with "Pulsed Output" control, the output bit
|
|
is "Off" when nothing is happening. When CLOSED or THROWN is requested, this request is
|
|
compared to the <em>known state</em> of the Turnout (which follows Turnout Feedback). If
|
|
the known state indicates the Turnout is already in the requested state, nothing is done.
|
|
If the known state is different from the requested state, then the bit is 'pulsed'. A
|
|
'pulse' consists of the bit being turned "On" and transmitted. One second later, the bit
|
|
is set "Off" and another transmission occurs.</p>
|
|
</dd>
|
|
|
|
<dt>[2 bit, steady-state]</dt>
|
|
|
|
<dd>
|
|
<p class="dl">If "Use 2 bits" control is selected, the bit referenced in the Turnout
|
|
system name and the next bit in sequence are used to control the Turnout. For example, if
|
|
CT33 has two-output-bit control, the 33rd and 34th bits are used to control the Turnout.
|
|
If two-output-bit control is selected, the user must select either 'steady state' or
|
|
'pulsed' control. Steady state control should be selected for stall motor Turnouts, such
|
|
as a Tortoise, if it is being controlled according to the recommendation in Chubb's C/MRI
|
|
User's Manual, Version 3.0, page 3-12. With steady state control, for CLOSED, the first
|
|
bit is set "Off" and the second bit is set "On"; for THROWN, the bits states are
|
|
reversed, i.e., the first bit is set "On" and the second bit is set "Off".</p>
|
|
</dd>
|
|
|
|
<dt>[2 bit, pulsed]</dt>
|
|
|
|
<dd>
|
|
<p class="dl">If "Use 2 bits" control with "Pulse Output" control is requested, both bits
|
|
are "Off" when nothing is happening. When CLOSED or THROWN is requested, this request is
|
|
compared to the known state of the Turnout (which follows Turnout Feedback). If the known
|
|
state indicates the Turnout is already in the requested state, nothing is done. If the
|
|
known state is different from the requested state, then the first bit is pulsed if CLOSED
|
|
is requested, or the second bit is pulsed if THROWN is requested. In either case, a
|
|
'pulse' consists of the bit being turned "On" for one second, then returned to the "Off"
|
|
position.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Note that Turnouts using two-output-bit control can only be created using the "Add" button
|
|
in the Turnout Table.</p>
|
|
|
|
<p>Finally, the "inverted" option can be selected. This controls how the C/MRI hardware
|
|
implements the "On" and "Off" used in the description above. Normally (invert option not
|
|
selected), "On" refers to a "1" to the hardware; with standard C/MRI hardware, this pulls the
|
|
output pin down and allows it to sink current. "Off" the corresponds to a "0" to the
|
|
hardware, turning the output pin off, and causing it to stop sinking current. When "invert"
|
|
is selected, "On" results in a "0" sent to the hardware, and "Off" results in a "1" being
|
|
sent. This causes the hardware to act with the opposite polarity.</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
|
|
<h3 id="L547">Creating a Light Output</h3>
|
|
|
|
<p>To create a Lights output, open the Light table by selecting <strong>Tools⇒
|
|
Tables⇒Lights</strong> in the main PanelPro menu. Select "Add" and Select the name of the
|
|
C/MRI connection from the pulldown list. [See also <a href="../../tools/Lights.shtml">the
|
|
Lights Documentation</a>.]</p>
|
|
|
|
<p><img alt="Light Table" src="images/lightstable.png" width="1123" height="505">
|
|
</p>
|
|
|
|
<p>Creating a Light to refer to a specific C/MRI output bit on a specific node is called
|
|
"assigning" that output bit. Each output bit may be assigned only once, i.e., two different
|
|
Turnouts or Lights may not refer to the same C/MRI output bit on the same node. Enter the
|
|
node address and the bit number in the <strong>Hardware Address</strong> field using the
|
|
numbering scheme discussed <a href="#L001">above.</a> Do not enter the C/MRI Connection
|
|
Prefix or the Port type ("L") as those will be prefixed automatically.</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
<!-- +++++++++++++++ TABLE BELOW VISIBLE IN VERSIONS OF THIS PAGE BEFORE 2020-12-08. ORIGINAL STILL AVAILABLE AS REFERENCED BELOW +++++++++++++++++
|
|
<h2>C/MRI Entry Format Summary</h2>
|
|
<p>Here's a summary, split up for outputs (eg. Turnouts) and
|
|
inputs (eg. Sensors):</p>
|
|
|
|
<table>
|
|
<tbody><tr>
|
|
<th>In/Out</th>
|
|
<th>Entry</th>
|
|
<th>Meaning</th>
|
|
<th>makes System Name</th>
|
|
<th>Mask</th>
|
|
<th>Equivalent</th>
|
|
<th>Minimum</th>
|
|
<th>Maximum</th>
|
|
</tr>
|
|
<tr>
|
|
<td>i/o</td>
|
|
<td>1003</td>
|
|
<td>Node 1, Input 3</td>
|
|
<td>CS1003</td>
|
|
<td>n digits (node) + 3 digit (pin)</td>
|
|
<td>1:3</td>
|
|
<td>node: 1; pin: 1</td>
|
|
<td>node: 127; pin: 999</td>
|
|
</tr>
|
|
<tr>
|
|
<td>o</td>
|
|
<td>3</td>
|
|
<td>Node 0, Output 3</td>
|
|
<td>CT3</td>
|
|
<td> </td>
|
|
<td> </td>
|
|
<td>1</td>
|
|
<td>999</td>
|
|
</tr>
|
|
<tr>
|
|
<td>i/o</td>
|
|
<td>4003</td>
|
|
<td>Node 4, Output 3</td>
|
|
<td>CT4003</td>
|
|
<td>n digits (node) + 3 digit (pin)</td>
|
|
<td>4:3</td>
|
|
<td>node: 1; pin: 1</td>
|
|
<td>node: 127; pin: 999</td>
|
|
</tr>
|
|
<tr>
|
|
<td>o</td>
|
|
<td>4:3</td>
|
|
<td>Node 4, Output 3</td>
|
|
<td>CT4:3</td>
|
|
<td> </td>
|
|
<td>4003</td>
|
|
<td>0:1</td>
|
|
<td>N/A</td>
|
|
</tr>
|
|
<tr>
|
|
<td>i/o</td>
|
|
<td>4B3</td>
|
|
<td>Node 4, Output 3</td>
|
|
<td>CT4B3</td>
|
|
<td> </td>
|
|
<td>4003</td>
|
|
<td>0B1</td>
|
|
<td>127B999</td>
|
|
</tr>
|
|
</tbody></table>
|
|
|
|
+++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
<!-- this table is an excerpt from the table in the help/en/html/doc/Technical/Names.shtml
|
|
based on information from the Hardware help pages
|
|
by Egbert Broerse @silverailscolo July 2017 -->
|
|
<!-- +++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
|
|
<h2 id="L562">CMRInet Network Management Tools</h2>
|
|
|
|
<p>The C/MRI menu contains three tools which are used to manage nodes in a CMRInet network.
|
|
Controlling the polling of nodes, displaying the operational states of configured nodes, and
|
|
monitoring the data message traffic on the network are all functions available in the tool
|
|
suite.</p>
|
|
|
|
<p>Tools are found under a pulldown menu on the PanelPro and DecoderPro menu bar with the
|
|
name of the C/MRI connection. In the example below, two C/MRI connections have been defined
|
|
so two separate pulldown menus are listed.</p>
|
|
|
|
<p><img alt="CMRI Tools on the Menu Bar" src="images/panelpromenubar-rel4-21-3.png" width=
|
|
"488" height="235">
|
|
</p>
|
|
|
|
<h3 id="L568">CMRInet Network Manager</h3>
|
|
|
|
<p>The CMRInet Manager is selected by selecting the <strong>C/MRI Network Manager</strong>
|
|
menu item from the <strong>C/MRI</strong> menu.</p>
|
|
|
|
<p>The CMRInet Manager displays the status of each configured node. Polling of individual
|
|
nodes can be enabled or disabled by checking the <strong>Enabled</strong> check box for the
|
|
node. The <strong>Status</strong> column shows the real time state of the node.</p>
|
|
|
|
<p><img alt="Network Manager Menu" src="images/menu_Network_Manager.png" width="699" height=
|
|
"219">
|
|
</p>
|
|
|
|
<p><img alt="Network Manager" src="images/cmrinetnetworkmanager.png" width="830" height=
|
|
"580">
|
|
</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
|
|
<h3 id="L580">CMRInet Monitor</h3>
|
|
|
|
<p>CMRInet protocol messages can be viewed by selecting <strong>C/MRI Monitor</strong> from
|
|
the <strong>C/MRI</strong> menu in main PanelPro window. The monitor window decodes and
|
|
formats the CMRInet data message to a readable form. The message traffic is displayed in real
|
|
time with options selected by the user. The window has a scroll bar which will move the
|
|
display up or down so messages which are off view can be seen.</p>
|
|
|
|
<p>The data display may scroll by very quickly, depending upon the network line speed.
|
|
Clicking on the <strong>Freeze Display</strong> button will stop the display from scrolling.
|
|
Data messages will still be collected but not displayed until the <strong>Resume
|
|
Display</strong> button is clicked. A text message tag can be inserted into the data display
|
|
(and log file) by typing the text into the field next to the Add Message button. Click on the
|
|
<strong>Add Message</strong> button to insert the text into the display.</p>
|
|
|
|
<p>Data messages can be captured into a text file and saved for later viewing and analysis.
|
|
Click on <strong>Choose Log File</strong>. A file create dialog window will open. Select a
|
|
file name to save the data, then close the window. This action only creates the file for data
|
|
capture. Click the <strong>Start Logging</strong> button to start the collection of data.
|
|
Clicking <strong>Stop Logging</strong> will stop the data capture and close the log file.</p>
|
|
|
|
<p><img alt="Monitor Menu" src="images/menu_Monitor.png" width="672" height="217">
|
|
</p>
|
|
|
|
<p>The following screen shows polling with responses for nodes 20 and 21. [See the section
|
|
<a href="#L590">below</a> for help in interpreting hexadecimal output.]</p>
|
|
|
|
<p><img alt="Monitor" src="images/cmrinetmonitor-pollresponse.png" width="997" height="480">
|
|
</p>
|
|
|
|
<p>There are display option checkboxes which provide additional information and formatting
|
|
for the messages.</p>
|
|
|
|
<p>If the <strong>Show Timestamps</strong> check box option is checked, each message is
|
|
prefixed with the system time in the form of hh:mm:ss:mss.</p>
|
|
|
|
<p>The message type (e.g. Receive) and node address (ua) are displayed next. The "IB" are the
|
|
input data bytes. Each byte is displayed as a separate hexadecimal number.</p>
|
|
|
|
<p><img alt="Monitor Poll Timestamp" src="images/cmrinetmonitor-pollresponsetimestamp.png"
|
|
width="1040" height="559">
|
|
</p>
|
|
|
|
<p>Here are examples of the Initialization messages for each of the node types.</p>
|
|
|
|
<p><img alt="Init USIC" src="images/cmrinetinit-USICSUSIC.png" width="426" height="255">
|
|
</p>
|
|
|
|
<p><img alt="Init SMINI" src="images/cmrinetinit-SMINI.png" width="427" height="169">
|
|
</p>
|
|
|
|
<p>The following screen shows the node initialization message sequence for node 20, followed
|
|
by the node coming on line and responding to polls. The <strong>Init</strong> message shows
|
|
the node address (ua) of 20, followed by the node type (NDP) of C which is a cpNode. DL is
|
|
the delay value, and Opts are node options entered in the node configuration window. A
|
|
<strong>Transmit</strong> message follows with the node address (ua) of 20. OB are the output
|
|
data bytes as hexadecimal values. Polls are seen followed by the poll/response sequence.</p>
|
|
|
|
<p><img alt="Monitor Poll Init" src="images/cmrinetmonitor-pollinitialization.png" width=
|
|
"904" height="559">
|
|
</p>
|
|
|
|
<p>If a node goes off line and stops responding to polls, JMRI will initiate an
|
|
initialization sequence consisting of five polls. If five polls result in no responses
|
|
(timeouts) the Init/Transmit message sequence will be done. This poll/init/transmit message
|
|
sequence is repeated until the node comes back on line.</p>
|
|
|
|
<p><img alt="Monitor Poll Timeout" src="images/cmrinetmonitor-polltimeoutinit.png" width=
|
|
"1018" height="561">
|
|
</p>
|
|
|
|
<p>The following screen shows a poll to node 20, followed by a response, then output bytes
|
|
sent to the node.</p>
|
|
|
|
<p><img alt="Monitor Transmit" src="images/cmrinetmonitor-transmitmessage.png" width="1040"
|
|
height="586">
|
|
</p>
|
|
|
|
<p>The following screen shows all of the display options enabled. The order of options
|
|
is:</p>
|
|
|
|
<p style="margin-left:2em;"><strong>timestamp</strong>s as hh:mm:ss:mss, <strong>raw
|
|
data</strong> in hexadecimal, <strong>data message</strong></p>
|
|
|
|
<p><img alt="Monitor Timestamp" src="images/cmrinetmonitor-timestampraw.png" width="997"
|
|
height="480">
|
|
</p>
|
|
|
|
<p>CMRInet messages can be filtered from display by clicking the <strong>Filter
|
|
Packets</strong> button. The packet filter window lets you select the nodes and message type
|
|
to display in the monitor window. The <strong>Select Nodes</strong>, <strong>Select
|
|
Packets</strong> buttons allow for quick select or de-select of the filters. Clicking the
|
|
<strong>Halt Poll</strong> button will stop network polling. Clicking <strong>Resume
|
|
Polling</strong> will restart polling.</p>
|
|
|
|
<p><img alt="Network Packet Filer" src="images/cmrinetworkpacketfilter.png" width="700"
|
|
height="455">
|
|
</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
|
|
<h4 id="L590">Interpreting Hexadecimal in C/MRI Monitor Output</h4>
|
|
|
|
<p>The CMRI Monitor is a useful debugging tool for advanced JMRI users as it shows all data
|
|
sent to and received from each connected CMRI node. Data is displayed in hexadecimal format
|
|
(each digit representing 4 bits with hexadecimal values from 0 to F) so two digits represent
|
|
a single byte (if the high order bits are all zero, then only a single digit is
|
|
displayed).</p>
|
|
|
|
<p><a href="https://en.wikipedia.org/wiki/Hexadecimal" target="_blank">Hexadecimal
|
|
numbers</a> are used in displaying computer values based on assigning values in terms of
|
|
powers of 2. Bits are numbered from 0 to 7 within a single byte where bit 7 is the leftmost
|
|
and bit 0 is the rightmost bit displayed (if bits 4-7 are 0, only one hexadecimal digit will
|
|
be shown).</p>
|
|
|
|
<p>Note that the byte values "2", "3" and "10" have special meaning to CMRI (start of text, end of text, and escape).
|
|
To avoid confusion, an additional byte of "10" is put in the string in front of any other byte whose value is "2",
|
|
"3" or "10" (see below for examples).</p>
|
|
|
|
<p><strong>Be aware:</strong> JMRI numbers C/MRI bits starting at 1 rather than 0 which may
|
|
cause some confusion in interpreting the C/MRI Monitor output versus the C/MRI bit
|
|
assignments. Some devices receiving C/MRI transmission from JMRI, such as the arduino, are
|
|
programmed to assume bit numbering that starts at zero which is a further source of possible
|
|
confusion.</p>
|
|
|
|
<p>To help in interpreting C/MRI Monitor output, here are several examples showing what would
|
|
be displayed with the corresponding bits set to 1. The examples represents a C/MRI node with
|
|
24 bits (three bytes) of either input or output:</p>
|
|
|
|
<p style="margin-left:2em;">C/MRI bits 8, 16, 24 set to 1 display as 80 80 80 (computer bits
|
|
7, 15, 23)<br>
|
|
C/MRI bits 7, 15, 23 set to 1 display as 40 40 40 (computer bits 6, 14, 22)<br>
|
|
C/MRI bits 6, 14, 22 set to 1 display as 20 20 20 (computer bits 5, 13, 21)<br>
|
|
C/MRI bits 5, 13, 21 set to 1 display as 10 10 10 10 10 10 (computer bits 4, 12, 20, each preceded
|
|
preceded by the escape byte value of "10")</p>
|
|
|
|
<p style="margin-left:2em;">C/MRI bits 4, 12, 20 set to 1 display as 8 8 8 (computer bits 3,
|
|
11, 19)<br>
|
|
C/MRI bits 3, 11, 19 set to 1 display as 4 4 4 (computer bits 2, 10, 18)<br>
|
|
C/MRI bits 2, 10, 18 set to 1 display as 10 2 10 2 10 2 (computer bits 1, 9, 17, each preceded by
|
|
the escape byte value of "10")<br>
|
|
C/MRI bits 1, 9, 17 set to 1 display as 1 1 1 (computer bits 0, 8, 16)</p>
|
|
|
|
<p>If multiple bits are set to 1 within the same byte, then output appears as in these
|
|
examples:</p>
|
|
|
|
<p style="margin-left:2em;">C/MRI bits 1, 2, 3, 4 set to 1 display as F (computer bits 0, 1,
|
|
2, 3)<br>
|
|
C/MRI bits 2, 4, 8 set to 1 display as 8A (computer bits 1, 3, 7)<br>
|
|
C/MRI bits 1, 2 set to 1 display as 10 3 (computer bits 0, 1, preceded by the escape byte value of "10")<br>
|
|
C/MRI bits 3, 4 set to 1 display as C (computer bits 2, 3)<br>
|
|
C/MRI bits 3, 4, 6, 7 set to 1 display as 6C (computer bits 2, 3, 5, 6)<br>
|
|
C/MRI bits 6, 8 set to 1 display as A0 (computer bits 5, 7)</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
|
|
<h3 id="L597">CMRInet Network Metrics</h3>
|
|
|
|
<p>Anytime the CMRInet is active, a network metrics collector is running in the background.
|
|
The metrics collected are errors and performance or instrumentation data. CMRInet metrics can
|
|
be viewed by selecting <strong>C/MRI Network Metrics</strong> from the <strong>C/MRI</strong>
|
|
menu in main PanelPro window</p>
|
|
|
|
<p><img alt="Network Metrics Menu" src="images/menu_Network_Metrics.png" width="702" height=
|
|
"219">
|
|
</p>
|
|
|
|
<p>Each of the Error and Data Metric values can be reset to zero by clicking the appropriate
|
|
<strong>Reset</strong> button. All of the metrics can be reset to zero by clicking the
|
|
<strong>Reset All</strong> button. Metric data can be saved to a text file by clicking on the
|
|
<strong>Save Metrics</strong> button. A file create dialog window will open, enter a file
|
|
name for the metric data.</p>
|
|
|
|
<p><img alt="Network Metrics" src="images/cmrinetworkmetrics.png" width="925" height="480">
|
|
</p>
|
|
|
|
<h3 id="L609">Listing C/MRI Bit Assignments</h3>
|
|
|
|
<p>For each node, you can view a summary list of C/MRI bits that are in use and those that
|
|
are available.</p>
|
|
|
|
<p>From the PanelPro main menu, select <strong>C/MRI⇒List Assignments</strong>, or
|
|
<strong>C/MRI⇒Configure Nodes</strong> and then <strong>Select⇒Bit Assignments</strong> for
|
|
each node, to bring up the Bit Assignments window. Click "Show Input Bits" or "Show Output
|
|
Bits" depending on which you are interested in.</p>
|
|
|
|
<p><img alt="List Assignments" src="images/menu_List_Assignments.png" width="672" height=
|
|
"217">
|
|
</p>
|
|
|
|
<p>List Assignments is useful for checking that you have assigned the correct input and
|
|
output bits to each Sensor (input) and Turnout or Light (outputs). Each line in the
|
|
Assignment Table also contains an "address" column showing the node address and bit number as
|
|
used in the JMRI system name for each C/MRI object. Printing blank assignment lists for each
|
|
node provides a convenient paper form for use in setting up your input/output bit
|
|
assignments. The Comment field information for the sensor, turnout, or light is also
|
|
displayed.</p>
|
|
|
|
<p><img alt="List Bit Assign" src="images/listbitassignment.png" width="773" height="726">
|
|
</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
<!-- +++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
|
|
<h2 id="L624">Diagnostics</h2>
|
|
|
|
<p>Diagnostics are useful for checking the functioning of your C/MRI hardware. These
|
|
automated procedures are controlled via a dialog available by selecting Run Diagnostics in
|
|
the C/MRI menu. Some of the diagnostic tests require external hardware to operate. Chapter 6
|
|
of Bruce Chubb's C/MRI User's Manual, Version 3.0, describes a test output card and loopback
|
|
cable. These items connect to input and output ports on Classic nodes and provide hardware
|
|
devices which are driven by the diagnostic test code. An integrated test card (IOTEST) from
|
|
MRCS provides compatible test hardware support.</p>
|
|
|
|
<p>Test message traffic can be viewed by opening the <strong>C/MRI Monitor</strong>.</p>
|
|
|
|
<p><img alt="Diagnostics Menu" src="images/menu_diagnostics.png" width="672" height="217">
|
|
</p>
|
|
|
|
<p><img alt="Diagnostics Main" src="images/diagmain.png" width="698" height="612">
|
|
</p>
|
|
|
|
<p>The C/MRI Diagnostics window has five sections.</p>
|
|
|
|
<p><strong>Test Node</strong> provides a popup menu for the selection of the node to be
|
|
tested. The menu only displays the addresses of configured nodes for the connection. Node
|
|
type and card assignment information for the selected node are displayed.</p>
|
|
|
|
<p><strong>Test Suite</strong> has the test selection popup menu which lists available tests.
|
|
The suggested equipment needed to run the test is also listed. The Halt polling button stops
|
|
polling of nodes on the connection. Polling should be halted when running diagnostics so as
|
|
not to interfere with the test sequences.</p>
|
|
|
|
<p><strong>Test Set Up</strong> provides user input fields for data card selection and
|
|
options for each test suite.</p>
|
|
|
|
<p><strong>Status</strong> displays the progress of the running tests and any error messages
|
|
related to the test sequences.</p>
|
|
|
|
<p><strong>Test Control</strong> buttons displayed at the bottom of the window control the
|
|
various test sequences and are specific to each test suite.</p>
|
|
|
|
<h3 id="L625">Output Test</h3>
|
|
|
|
<p>The Output Test writes a walking bit pattern to the output test card, lighting the LEDs
|
|
corresponding to the bit pattern. The number of bits written is based upon card size (8, 24,
|
|
32). The Output Card number is checked to be a valid defined output card. Observation delay
|
|
is the number of milliseconds delay between each write. Checking the Invert box flips the
|
|
state of the bits. This is useful for output cards which drive Common Anode (sinking)
|
|
devices.</p>
|
|
|
|
<p><img alt="Output test" src="images/diagoutputtest.png" width="698" height="612">
|
|
</p>
|
|
|
|
<h3 id="L626">Loopback Test</h3>
|
|
|
|
<p>The Loopback Test uses a loopback cable connected to a card of outputs and a card of
|
|
inputs. The test writes a data value pattern to each output port and reads the value from the
|
|
corresponding input port. The input value is compared to the output value and displays any
|
|
comparison errors. If a compare error occurs, the test is paused. Clicking the Continue
|
|
button will write the next value to the output. Observation Delay and Filtering Delay adds
|
|
time delay intervals to the write and read operations. Invert works the same as in the Output
|
|
Test.</p>
|
|
|
|
<p><img alt="Loopback" src="images/diagloopback.png" width="698" height="612">
|
|
</p>
|
|
|
|
<h3 id="L627">Send Commands</h3>
|
|
|
|
<p>Send Commands provides raw CMRInet packet transmissions to the test node.</p>
|
|
|
|
<p><strong>Initialize Node</strong> transmits an Initialize (I) message to the node. The node
|
|
would then execute the onboard initialize code.</p>
|
|
|
|
<p><strong>Poll Node</strong> transmits a poll message (P) to the node. The count of input
|
|
bytes in the response is returned. If the node does not respond to the poll, a timeout error
|
|
is reported.</p>
|
|
|
|
<p><strong>Write Bytes</strong> transmits (T) the user entered byte string to the output card
|
|
number. The bytes need to be entered as hexadecimal values separated by a space. The maximum
|
|
number of bytes written is the defined by size of the card (1, 3, 4). Invert works the same
|
|
as in the Output Test.</p>
|
|
|
|
<p><img alt="Send commands" src="images/diagsendcommands.png" width="698" height="612">
|
|
</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
<!-- +++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
|
|
<h2 id="L632">CMRInet Network Connections</h2>
|
|
|
|
<p>Using USB-serial adapters</p>
|
|
|
|
<p>Most C/MRI systems use RS-422/485 electrical signals to communicate between the nodes and
|
|
the computer. There are several ways to generate them:</p>
|
|
|
|
<p style="margin-left:2em;">1. If your computer has a built-in serial port (RS-232
|
|
connection), you can use an RS-232 to RS-422/485 convertor. There's one you can build as part
|
|
of the C/MRI system, or you can buy a commercial one.</p>
|
|
|
|
<p style="margin-left:2em;">2. If your computer has a USB port, you can buy a commercial USB
|
|
to RS-422/485 adapter and use that.</p>
|
|
|
|
<p style="margin-left:2em;">3. If your computer has a USB port and you have a RS232 to
|
|
RS-422/485 convertor, you can install a USB-to-RS232 adapter (sometimes called a
|
|
"USB-to-serial converter"), then connect the RS232 output of that to the RS232 input of the
|
|
RS232 to RS-422/485 convertor.</p>
|
|
|
|
<p style="margin-left:2em;">Note that if you're using the Chubb RS232-to-RS-422/485
|
|
converter, some USB-to-RS232 adapters will require that you connect certain RS232 control
|
|
leads that are not handled by the Chubb interface board:</p>
|
|
|
|
<p style="margin-left:2em;">o DSR - DTR (pins 4 & 6 on the DB9 connector)o RTS - CTS (pins 7
|
|
& 8 on the DB9 connector)</p>
|
|
|
|
<p style="margin-left:0em">In all cases, the communications line will end up appearing as a
|
|
serial port on your computer. In Windows, this is a COM port, in other computers it's a named
|
|
serial device. You will need to select the proper one when configuring JMRI. If no serial
|
|
devices appear in the selection popup menu, you may not have any operating system serial
|
|
device drivers installed.</p>
|
|
|
|
<h3 id="L652">Using An Ethernet Network Connection</h3>
|
|
|
|
<p>JMRI allows you to connect to C/MRI nodes through a network connection. JMRI communicates
|
|
via the TCP/IP protocol across a network to a network-to-serial adapter, which converts the
|
|
network connection to a serial stream that then goes through a RS-422/485 convertor to the
|
|
C/MRI node(s).</p>
|
|
|
|
<p>The network-to-serial adapter is sometimes called a "terminal server". It's also sometimes
|
|
called a "Lantronix box" after an early manufacturer of these, though they're now available
|
|
from multiple sources. The adapter has to be configured with the correct serial parameters
|
|
for your C/MRI system, including the proper baud rate and 8-data-bits, no parity. You will
|
|
probably need a RS232-to-RS-422/485 adapter on the output of the network adapter.</p>
|
|
|
|
<p>Some hobbyists have also built C/MRI nodes that have native Ethernet connections. JMRI
|
|
communicates with them via a direct TCP/IP connection using the C/MRI protocol, but in this
|
|
case there's no need for a RS-422/485 convertor.</p>
|
|
|
|
<p>To configure JMRI to use a network connection, go to the Preferences screen, Connections
|
|
tab. After selecting C/MRI for the System Manufacturer, select "Network Interface" for the
|
|
System Connection. Then enter the IP address (or node name, if it has one) of your
|
|
network-to-serial adapter in the IP Address / Host Name field. If it uses a non-standard port
|
|
number, check the Additional Configuration Settings box and enter the port number. Click Save
|
|
and restart the program.</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
|
|
<h3 id="L662">Running JMRI when disconnected from your C/MRI system</h3>
|
|
|
|
<p>JMRI continually polls the C/MRI hardware for status changes. If one or more C/MRI nodes
|
|
are not responding, eventually their inputs (Sensors) are set to the UNKNOWN state to
|
|
indicate that JMRI has lost contact with those devices on the layout.</p>
|
|
|
|
<p>Although this is the right thing to do when you're really connected to the hardware and
|
|
trying to operate the layout, it can get in the way if you're running JMRI without your
|
|
layout connection. You might want to do this, for example, to work on your panels while away
|
|
from the layout, or while the layout needs to be powered off for some reason.</p>
|
|
|
|
<p>To accommodate using JMRI without an active layout connection, in the JMRI 2.3.2 release a
|
|
"C/MRI Simulator" connection was made available in the Preferences.</p>
|
|
|
|
<p>Please note that this is only meant for users who already have a working C/MRI connection
|
|
already configured. Please do not try to use the C/MRI simulator before configuring a valid
|
|
connection to C/MRI hardware, as it will not work.</p>
|
|
|
|
<p>Once you have your C/MRI connection configured, when your hardware is not available you
|
|
can just go to the JMRI Preferences, select "C/MRI Simulator", save Preferences, quit and
|
|
restart. Don't change any other settings!</p>
|
|
|
|
<p>When the C/MRI hardware is again available, go the JMRI Preferences, select "C/MRI
|
|
Serial", save Preferences, quit and restart.</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
<!-- +++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
|
|
<h2 id="L676">PanelPro Signaling Example Using C/MRI</h2>
|
|
|
|
<p>The following is an example of what is needed to create a simple ABS signaling system
|
|
using an SMINI node and Control Panel Editor (CPE) in PanelPro. The SMINI will be set to node
|
|
address 15.</p>
|
|
|
|
<p>The focus of the example is to show the relationship between the input and output ports
|
|
(bits) on the SMINI and the logical connection to the various JMRI device tables. Only the
|
|
device table information will be defined. The required Logix and Conditionals will not be
|
|
described.</p>
|
|
|
|
<p>The section to be signaled is a classic mainline/passing siding triad. The operating
|
|
scheme is assumed to be Automatic Block System (ABS), with the trains given written authority
|
|
to occupy the track segments and operate the switches if needed. Block occupancy and turnout
|
|
position determine signal aspects. All Stop aspects are Absolute.</p>
|
|
|
|
<p>Signals, which control the entrance and exit to the siding, will display only Yellow
|
|
(Approach) and Red (Stop) as it is assumed these are low speed routes.</p>
|
|
|
|
<p><img alt="Rucker section" src="images/example-ruckersection.png" width="627" height="399">
|
|
</p>
|
|
|
|
<p>Sensors are the block occupancy detectors and two fascia toggle switches controlling the
|
|
turnouts. The detectors will present an Active state when a block is occupied, and Inactive
|
|
when a block is vacant. The switch controls, will present Inactive for the turnout in Normal,
|
|
and Active if the turnout is Reverse.</p>
|
|
|
|
<p>Inputs are assigned to Card 2, ports A0 through B0. The output of block detector BLK78 is
|
|
connected to SMINI Node 15, Sensor input, Card 2, port A0. The comment field is used to
|
|
document the physical SMINI port and a description of the track section.</p>
|
|
|
|
<p>By referring to the port names printed on the SMINI circuit board, the connection is path
|
|
is fully defined. User Names are used when writing Logix statements. A consistent naming
|
|
scheme should be adopted for creating easy references in the Logix Conditionals. One should
|
|
be able to look at a User Name and immediately identify what type of device is connected to
|
|
the port.</p>
|
|
|
|
<p>The Sensor table is a live view of the state of the port. For Sensors, applying a signal
|
|
ground to the port will cause the State to change from Inactive to Active. This technique is
|
|
a great way to verify if the node is communicating with the Master and that the port
|
|
assignments match the actual connected device.</p>
|
|
|
|
<p><img alt="Sensor Table" src="images/example-sensortable.png" width="1153" height="449">
|
|
</p>
|
|
|
|
<p>Outputs are defined in the Turnout table. As described earlier, the name "turnout" is
|
|
historical. Again, just think of turnouts as the output ports. Output states are Closed for
|
|
Off, and Thrown for On. If the port is connected to an actual turnout, Closed would normally
|
|
be "Normal" and Thrown would be "Reverse". The "Cmd" column displays the live state of the
|
|
port. Clicking on the Cmd button will toggle the turnout from Closed to Thrown. This
|
|
capability can be used to test connections and proper operation of output devices.</p>
|
|
|
|
<p><img alt="Turnout Table" src="images/example-turnouttable.png" width="1158" height="970">
|
|
</p>
|
|
|
|
<p>There are two output ports assigned to turnout controller bits. The turnout control bits
|
|
are assigned to Card 0, ports A0 through C7, and Card 1 port A0. The turnout motor control
|
|
bit for SW35 is connected to SMINI Node 15, Turnout output, Card 0, port A0.</p>
|
|
|
|
<p>Six signal masts are required for signaling. Two are dual head with an upper and lower
|
|
head. LED's are assumed to be the lamps used for aspect illumination. One output bit is
|
|
required for each color. All LED commons are tied together. Signal mast 80LA is a single head
|
|
signal.</p>
|
|
|
|
<p>There are three LEDs in the head; Green, Yellow, and Red. Each wire attached to a color
|
|
LED must be connected to an output port. The green LED for signal 80LA (SG80LA-G) is
|
|
connected to SMINI node 15, turnout, bit 10, Card 0, port B1.</p>
|
|
|
|
<p><img alt="Add signal head" src="images/example-addsignalhead.png" width="345" height=
|
|
"501">
|
|
</p>
|
|
|
|
<p><img alt="Signal mast table" src="images/example-signalmasttable.png" width="1234">
|
|
</p>
|
|
|
|
<p><img alt="Add signal mast" src="images/example-addsignalmast.png" width="495" height=
|
|
"492">
|
|
</p>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
<!-- +++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
|
|
<h2 id="L739">JMRI and Third Party Help</h2>
|
|
|
|
<ul>
|
|
<li>
|
|
<a href="Signals.shtml">C/MRI signals</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>For more information on C/MRI (including the C/MRI User Manual), please see:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<a href="https://groups.io/g/CMRI-Users">C/MRI Users on groups.io</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://www.jlcenterprises.net/">JLC Enterprises website</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://www.modelrailroadcontrolsystems.com/">Model Railroad Control Systems
|
|
(MRCS)</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<p><a href="#top"><em><small>[Go to top of page]</small></em></a>
|
|
</p>
|
|
<!-- +++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++++++ +++++++++++++ -->
|
|
<!--#include virtual="/help/en/parts/Footer.shtml" -->
|
|
</div>
|
|
<!-- closes #mainContent-->
|
|
</div>
|
|
<!-- closes #mBody-->
|
|
<script src="/js/help.js"></script>
|
|
</body>
|
|
</html>
|