The Circuit Builder is a view of a Control Panel Editor panel. It is an alternative to using the Occupancy Block Tables to create OBlocks, Portals and OPaths. Circuit Builder is a graphical tool to create and configure these objects by "point and click" mouse operations. Here "track circuit" is just another name for "OBlock". The prototype name for track having a device that can detect occupancy is Track Circuit. In JMRI we have used the term "Block" and "OBlock" to refer to what in the prototype world is a track circuit. The term Block in the prototype world is a length of track defined by limits, whose use is governed by block signals, cab signals or block limit markers and train orders. That is, a prototype block incorporates a signaling system providing a way to manage safe usage of its trackage. So to model a prototype block, several track circuits may be needed. The term track circuit here in JMRI is just an attempt to get a little closer to prototype usage, but it is just another name for OBlock and the stuff (Portals and OPaths) that gets it to act a little more like a prototype "Block". Creating track circuits, that is, making and configuring OBlocks, Portals and OPaths enables the creation and running of Warrants.
Circuit Builder also configures Signal Masts or Signal Head at Portals to display aspects and appearances that indicate track conditions on your layout. These signals then can modify warrants during their runtime to respond to track conditions.
Getting StartedThe Circuit Builder tool can be opened from either the Circuit Builder menu item under the Add Items menu or by the Open Circuit Builder menu item under the Warrant menu.
Make a track diagram of your layout using track icons - of any kind, but
eventually they will need to be some kind of Indicator Track. The
Item Palette menu item under the Add Items menu
can help you select the kind you want. Then open
CircuitBuilder as suggested above. The CircuitBuilder menu
will appear. Now use either the Circuit Builder window or the
Circuit Builder menu to make two track circuits (OBlocks).
After making two OBlocks you can make and configure the following items:
Edit Portal direction Arrows
When you are done editing, select the items under the Error Checks submenu for errors and omissions.
Basic Operational Model of Circuit BuilderCircuit Builder works by using icons on a block by block basis. OBlocks, Portals and OPaths are created and linked by "point and click" on the icons of your layout diagram. The element types (OBlock, Portal, OPath, Signal) are created and edited using various editing modes of the tool. In short, it works as follows:
First create an OBlock by selecting track icons. Then create Portals by dragging an icon that overlaps two OBlocks. Then create OPaths by selecting the portal icons and track icons that indicate the path. Finally perhaps add a signal to protect an OBlock by selecting the portal of the approach. The result of this editing transforms the track in your layout panels to indicator trackage displaying the states of the blocks and their paths by color without altering the original look of the panel. These operations are done from the CircuitBuilder menu items and are detailed below.
Panel files previously made with Panel Editor can be used with Circuit Builder as long as they can be loaded into this version of JMRI. Circuit Builder upgrades plain track icons to Indicator Track icons. See The Item Palette for more information about Indicator track icons.
CircuitBuilder is aware of all the objects defined in the Occupancy Block tables. When your layout track diagram is split up among several panels, each panel has a its own CircuitBuilder to edit its icons. It may post messages about missing icons but if the objects are not meant to be represented on that panel, ignore them. This "discrepancy" is due to the fact that OBlocks, Portals and Paths are global for all panels of your JMRI session, but each Circuit Builder is concerned only by the icons on its panel.
Mouse Operations When Using CircuitBuilderWhen in an editing mode of Circuit Builder, the mouse click conventions differ somewhat from those of the panel editors. When a Circuit Builder menu item is selected an editing window is opened and the panel is in a Circuit Builder editing mode. Note the following when in a Circuit Builder editing mode:
- Dragging is not supported except for portal icons when creating or editing Portals or configuring a Signal Mast.
- Most Control Panel Menus are disabled.
- Only track or portal or signal icons can be selected.
Portal IconsWhen not in one of the CircuitBuilder editing modes, portal icons are usually invisible. The only situation in normal panel operation where they may be visible is when a warrant is allocated. In this case direction arrows can be shown indicating the direction of travel of the warranted train. Portal icons are necessary for CircuitBuilder to be able to define Portals and OPaths. In such editing modes the icon is usually a red circle that may be dragged or selected. Note: It is important for defining paths that every track circuit depicted on the panel have all its portals represented by a portal icon.
The Circuit Builder MenuThe menu has the following menu items: (except for the items "Add Detector Circuit" and "Error Checks" menu items). The menu item will first ask you to select an OBlock from a pick list.
- Add Detector Circuit - Create an OBlock track circuit and assign the icons that display it. You will be prompted for the system and user names to create a new OBlock. Then you will be in circuit editing mode.
- Edit Circuit OBlock - Edit an existing track circuit. After choosing an OBlock, you will be in circuit editing mode. In this window you select the track icons that represent the OBlock graphically and add sensors for occupancy.
- Edit Circuit Portals - Create or edit Portals connecting two track circuits. After choosing an OBlock, you will be in portal editing mode. In this window you define Portals by positioning them over track icons to connect OBlocks.
- Edit Circuit Paths - Create or edit the paths (OPath) through a track circuit. After choosing an OBlock you will be in path editing mode. In this window you define OPaths by selecting track and portal icons.
- Edit Portal Direction Icons - (since 3.8) Choose arrows to indicate the direction of a Warrant route through a block. After choosing an OBlock you will be in portal icon editing mode. In this window you configure portal icons so they show the direction of travel when a warrant is allocated.
- Add/Edit Signal Icons - (since 4.17.3) Attach a Signal Mast to a Portal whose OBlocks are the approach block and block protected by the the signal. signal icon editing mode. In this window you blahh configure portal icons so they show the direction of travel when a warrant is allocated.
Error Checks - Provides information about objects that may require editing. These
either highlight the icons representing the object or display a list of track circuits or
Portals that may require editing. Selecting an item from such a list will open a window for
the appropriate editing mode.
- Circuits without icons in this panel - Has a submenu for each track circuit OBlock that does not have an icon. A track circuit needs at least one Indicator Track icon to display its state.
- Circuits whose icons need conversion - Has a submenu for each track circuit OBlock
whose track icons are not Indicator Track icons.
Note: Only Indicator Track icons can display circuit state information.
- Highlight track icons needing conversion - Highlights all track icons that are not Indicator Track icons. If all track icons are Indicator Track icons, this menu item it labeled All track icons are Indicator icons
- Highlight Indicator Track icons without circuits - Highlights all track icons that are not associated with a track circuit. If every track icon is associated with a circuit this menu item is labeled All track icons belong to Circuits
- Circuits without a Portal or Path - (since 4.17.3) Has a submenu for each track circuit OBlock that does not have a Portal or Path. Select an item to add the required portal or Path.
- Circuits with misplaced Portal Icons - (since 4.16) Has a submenu for each track circuit OBlock that has a Portal icon positioned incorrectly.
- Highlight misplaced Portal Icons - Highlights all portal icons that are not positioned correctly. If every portal icon is positioned correctly this menu item is labeled All Portal icons positioned OK
- Portals without icons in this panel - (since 4.16) Has a submenu for each Portal lacking an icon. Selecting an item opens a Portal Editing window and an icon can be dragged onto the panel.
- Highlight Signals not configured to protect an OBlock - (since 4.17.3) Highlights all signal icons not protecting an OBlock at a Portal. If every signal icon provides protection correctly this menu item is labeled All Signal icons positioned OK
- Check Portal and Path errors - Examines the Portal and OPath definitions looking for errors or incomplete information. A dialog box is displayed listing any errors found.
How to Make OBlocks, Portals and OPathsCreation and editing of these objects is done is with the editing modes of Circuit Builder.
Creating OBlocksFrom the Circuit Builder menu select the Add OBlock Circuit menu item. This opens a dialog for you to create a circuit OBlock by supplying its system and user name. Creating the OBlock opens the Edit Circuit OBlock window.
Note: Each OBlock must have at least one Indicator Track icon to represent it. Otherwise CircuitBuilder cannot define Portals and Paths
Editing OBlocksFrom the Circuit Builder menu select the Edit Circuit OBlock menu item. This opens a picklist for you to select a circuit OBlock to edit. Selecting a row and pressing the Show OBlock button opens the Edit Circuit window. If any track icons have been defined to indicate the OBlock, they will be highlighted in blue.
Circuit Editing ModeThe Edit Circuit window used is to identify all the track icons will display the track circuit. It also configures the OBlock sensors for occupancy detection and error indication. OBlock user names can be changed or have a track circuit OBlock. The length of block can be entered as either inches or centimeters. deleted. Finally, the circuit track icons can be upgraded to be Indicator Track icons.
In this mode, mouse clicks on a track icon in the basic window frame toggles selection of the track. Select the icons you want to use to display the track circuit. The icons for a track circuit typically are, but need not be contiguous. The icons that display the circuit are highlighted in blue. Icon types other than track icons cannot be selected. No icons can be dragged.
- At the top of the window is a non-editable field to show the current state of the circuit.
- The window has a text field showing the OBlock User Name. The field can be edited to change the user name of the OBlock circuit and a Change Name button to accomplish the name change.
- The Delete Circuit button deletes all components of the track circuit. Note this means, the OBlock, all the OPaths in it and all portals into and out of the block.
- The window also has convenience fields that count the track icons that are selected for the circuit.
- When adding or editing a circuit, the window has text fields to name the sensor that will detect occupancy and a sensor that can indicate errors. Each of these sensors are optional and can be entered later. There is an Open Picklist button to display sensor names that can be dragged and dropped onto the sensor name text fields. If no occupancy detection sensor is named, the circuit will be a Dark Block. Warrants are able to start, end or pass through dark blocks.
- The window has a text field to enter the length of the OBlock and button for either
inches or centimeter units.
Note: In order to create and run NXWarrants over a block, the block must have a length. Running recorded warrants also needs block lengths to compute ramp parameters when responding to signals and other track conditions
- The Convert Icons button will convert the icons in the circuit to Track Indicator icons if they are not already icons of this type. This can be done later. Converted icons may need to be rotated and repositioned.
- The Done button completes the creation and editing of the track circuit.
Portals - Add/Edit Circuit PortalsFrom the Circuit Builder menu select the Add/Edit Circuit Portals menu item. This opens a picklist for you to select a circuit OBlock to edit. Selecting a row and pressing the Show OBlock button opens the Add/Edit Portal window. The track circuit will be highlighted in blue. if any Portals have been defined, they will be shown as a red circle and also highlighted in blue.
Portal Editing modeUse this window create and edit portals. A portal is represented by a red circle icon. The blocks it connects are determined by positioning a portal icon so it spans the two blocks it connects. That is, the icon should overlap a track icon representing each of the two blocks. In this mode, only portal icons can be repositioned. No other panel items can be moved or selected.
To create a new portal type in a name for it in the Portal Name text field. Then drag the red circle portal icon to the panel. Place it so that it intersects with a track icon representing the OBlock you selected to open the window. The OBlock circuit you selected is the "home" block. Position the portal icon so it also intersects with a track icon representing an adjacent block. Overlapping both blocks defines the portal.
To create an icon for a portal previously defined, perhaps from the Occupancy Block tables, select the portal from the "Portals into and out of circuit ..." list. Then, as above drag and position the red circle icon.
Notice that when you select a portal from the portal list, its icon highlight changes from blue to pink. Conversely, selecting an portal icon on the panel with a mouse click will select the portal it represents in the portal list. When repositioning a portal icon it may be necessary to "unlock" its position.
There may be diagrams where a portal icon cannot span icons from each block
that the portal connects. An example of this might be when the panel diagram depicts a loop
as a line of blocks across the panel from left to right. Here a leftmost block icon
cannot be spanned by one from the rightmost block. This can be handled in one of two ways.
A non-contiguous track icon could be placed from one edge onto the opposite edge of the diagram
and a have the portal icon overlap both blocks there.
(since 4.17.3) Or two portal icons can be used for the same portal. Each icon placed on the respective blocks at the opposite sides of the diagram.
- The Edit Portal window has a list of the portals already defined for the track circuit (OBlock) and a text field to name new portals to be created. The window also has a icon to represent portals as a red circle in the main window.
- The text field can be used to change the name of a portal with the Change Name button to accomplish the name change.
- Portals are created by naming them in the text field and dragging the red circle icon to its position between the two track circuits it connects. After dragging the icon into position the portal is listed in the Portal List.
- Portals that were created in the Occupancy Tables do not have red circle icons.
For any portal in the Portal List that does not have an icon, select it from the list and
drag a red circle icon to its position between the blocks it connects.
Portal icons are needed to create and display paths.
Note Please be sure all of the OBlock's portals are represented by icons before making paths.
- To change the name of a portal, first select it from the list, then change the name in the Portal Name text field and lastly, press the Change Name button.
- To delete a portal, select it from the list and press the Delete Portal button.
- The Done button completes the creation and/or editing of Portals.
Paths - Add/Edit Circuit PathsFrom the Circuit Builder menu select the Add/Edit Circuit Paths menu item. This opens a picklist for you to select a circuit OBlock to edit. Selecting a row and pressing the Show OBlock button opens the Add/Edit Path window. The track circuit will be highlighted in blue and the portal icons shown with a red circle and highlighted in blue.
Path Editing modeUse this window is to create and edit the paths in the track circuit. In this mode, no panel items can be moved and only track and portal icons can be selected.
To create a new OPath, first press the Clear Selection button. Then type a name for the path into the Path Name text field. Now select all the track icons that mark the route. Selected route icons change their color to green. When selecting a turnout track icon, the position of the points may not be correct. To change the position of the points, hold the Shift key down while clicking on the turnout icon. At least one portal must be selected to complete the definition of an OPath. A selected a portal icon changes from a red circle to a green square.
Be sure you select all the turnout icons for turnouts that need to be set to define the path. Also be sure that the portal icons needed for entrance and exit are selected. A path must have at least one portal and at most two.
If the value of the Length text field is "0.0" the length of the path will be inherited from the value of what was entered for the length of the OBlock circuit. If the length of the path is significantly different from the OBlock length (i.e. by more than 10%), enter a length for the path. Note: Path lengths are needed for a warrant to calculate where to begin a speed change required by a signal aspect or block occupation ahead of the train.
- The Edit Paths window has a list of the paths already defined for the track circuit and a text field to name paths to be created.
- The text field can be used to change the name of a path with the Change Name button to accomplish the name change.
- Paths are created by selecting the icons that display the path. The selected icons are displayed green. A second mouse click deselects the icon.
- When selecting a turnout icon for the path, it needs to have its points set correctly. To keep the icon selected green when you throw the switch, hold the Shift Key down when clicking with the mouse. This keeps the selection green while throwing the switch.
- It is important that portals for the entrance and/or exit of the path be selected also. When a portal icon (red circle) is selected it turns into a green square. A path may have one portal selected, if it is a stub siding but must have two portals selected (entrance to and exit from the block) if it is a through path.
- To change the name of a path, first select it from the list, then change the name in the Path Name text field and lastly, press the Change Name button.
- The window has a text field to enter the length of the OPath and button for either inches or centimeter units.
- To delete a path, select it from the list and press the Delete Path button.
Portals - Edit Portal Direction IconsSince 3.8
From the Circuit Builder menu select the Edit Portal Direction Icons menu item. This opens a picklist for you to select a circuit OBlock to edit. Selecting a row and pressing the Show OBlock button opens the Edit Portal Direction Arrows window. The track circuit will be highlighted in blue and the portal icons shown with a red circle and highlighted in blue.
Portal Direction Arrows EditingUse this window to modify the portal icon to show the direction of travel for a warrant. Portal icons must exist in order to have direction arrows when a warrant is allocated.
To set the direction, either select a portal icon or select a portal from the "Portals into and out of circuit ..." list. A green arrow will replace the red circle on the highlighted portal icon. To have the arrow display the correct direction the arrow must point into the OBlock circuit. If it does not, select one or the other of the green arrows on the Entry Icon box. The arrows can be moved and rotated to display a more desirable direction. If a n icon is moved, be sure it retains its position overlapping the blocks it joins.
If you do not want an arrow to display at the portal when a warrant is allocated, select the "No Icon" icon.
After all the portal icon arrows are pointing into the block, verify that each adjacent OBock also has its portal direction arrow set into that block.
Signals - Edit Signal MastsSince 4.17.3
From the Circuit Builder menu select the Add/Edit Signal Masts menu item. This opens a picklist for you to select a circuit OBlock where you want to have protection by signals. Selecting a row and pressing the Show OBlock button opens the Add/Edit Signals window. The track circuit icons will be highlighted in blue and the portal icons shown with a red circle highlighted in blue.
Signal Position EditingUse this window to configure a Signal Head or Signal Mast to protect the OBlock. There is a "speed name" associated with every signal aspect that limits the speed a train may have through the protected block. The speed names are mapped to speed numbers by a table in Warrant Preferences. Warrants use the speed number to modify the scripted speed before entering the block. The meaning of the speed number is interpreted to be
- scale miles per hour
- scale kilometers per hour
- percentage of full throttle
- percentage of the warrant script speed
To set a signal to protect the OBlock, choose the portal where the signal will guard entrance into the block. The opposing block of the portal will be the approach OBlock. Choosing the portal can be done by either selecting a highlighted portal icon or selecting a portal from the "Portals into and out of circuit ..." list.
Enter the name of the signal into the Signal Name text field. Alternatively there are Open Picklist buttons to display signal names. Drag a name into the Signal Name text field. Pressing the Configure Signal button will attach the signal at the portal.
It is recommended to use Signal Masts rather than Signal Heads. If you do use a Signal Head be sure it is not part of the definition of a Signal Mast. Signal Head appearances are translated to speed names according to to a table in Warrant Preferences. Then, as above, the speed name is used to regulate train speed.
The signal add/edit window has the following items.
- A list of the portals into the OBlock. Select a portal to add or remove the block protection by a signal. If a signal already protects at the selected portal, its name is displayed in the Signal Name text field.
- A Signal Name text field for the name of a protecting signal.
- Buttons to set block protection or remove it.
- Buttons to display pick lists for dragging signal names into the Signal Name text field
- A text field to adjust the target point a warrant calculates for the place where a speed change should start, if a signal aspect requires it. (Speed changes required in a protected block must be completed before entering the block.) The number is an offset from the portal entrance point to the block. It may be positive or negative.
- For a step-by-step instruction on Warrants and Circuit Builder, check out the clinic presentation by Dick Bronson on JMRI 2014 Control Panel Editor plus Warrants.