JMRI: Transit Add/Edit Actions
Author: Bob Jacobsen
Keywords: JMRI help Dispatcher Transit Special Actions

# Transit: Add/Edit Action

## The Add/Edit Action Window

Special Actions are tasks that can be initiated automatically as a Dispatcher Train running in automatic mode traverses the layout.
The Add Action pane provides for creating new Actions:

The "Edit" version of this window is the same as the one shown above, except the Create New Action button is replaced by an Update Action button and the selections and data are filled in to current values of the Action being edited.

An Action is defined in two steps:

1. specifying When an action should be initiated
2. specifying What action is to be executed

### When to act

To specify the When part, select an option in the When popup menu, and fill in any data that might be required. Data item fields or menus will appear when the item needing them is selected. Each data item is supplied with a text description (tooltip) that may be summoned by hovering the cursor over the item. Each When option is described in more detail in the Actions Help.

Optionally a Delay, specified in milliseconds, can be set with each When option. The default Delay of 0 causes the Action to be be initiated immediately after the when event occurs. If a Delay time greater that 0 is specified, Dispatcher will wait for the specified time after the when event occurs before initiating the Action.

To specify What action is requested, select an option in the What: popup menu, and fill in any data that might be required. Entry fields will appear when the item needing them is selected. Each data item is supplied with a text description (tooltip) that may be summoned by hovering the cursor over the item.
From the drop down box choose one of:

- On Section Entry - When the automatic train enters the current Section (see above image).
- On Section Exit - When the automatic train exits the current Section. This means when the last detectable car leaves the Section, and the Section is unoccupied.
- On Block Entry - When the automatic train enters a specified Block in the Section. For Sections with only one Block, this is equivalent to On Section Entry.
- On Block Exit - When the automatic train exits a specified Block in the Section. This means when the last detectable car leaves the specified Block, and the Block is unoccupied. For Sections with only one Block, this is equivalent to On Section Exit.
- On Train Stop - When the automatic train stops. This may be used, for example, for stopping the bell in a sound decoder or initiating other actions when the train stops at a station.
- On Train Start - When the automatic trains starts up after having been stopped. This may be used, for example, to initiate actions when a train starts up after a station stop.
- On Sensor ACTIVE - When the specified Sensor moves to the Active state. The specified Sensor may be either internal or hardware, and must be in the Sensor Table. This might be used, for example, with a hardware Sensor connected to a fascia push button to trigger an action. It could also be used to trigger actions using hardware position sensors on the layout. With internal sensors it can provide a link to Logix.
- On Sensor INACTIVE - When the specified Sensor moves to the Inactive state. This is the same as above, but with the opposite Sensor state. Use the one that best fits your hardware or Logix.

### What to do

After making a When choice, continue by choosing one of the following What actions and fill in the settings:

- Pause Train
- Set Maximum Speed
- Set Train Speed
- Ramp Train Speed
- Go to Manual Mode
- Set Locomotive Light
- Start Bell
- Stop Bell
- Sound Horn
- Pattern Sound Horn
- Set Decoder Function
- Set Sensor ACTIVE
- Set Sensor INACTIVE
- Hold Signal
- Release Signal

When the Action is completely defined, click the Create New Action button (or the Update Action button if editing). Any required data will be validated. If a problem is found, a message will appear, and the Add/Edit Action window will remain to allow correction of the problem. If everything checks out, the Add/Edit Action window will disappear and the new (or edited) Action will appear in the View Actions window.

Click the Cancel button to dismiss the Add/Edit Action window without creating a new Action or completing the edit of an existing Action. Closing the Add/Edit Action window is equivalent to clicking the Cancel button.

Back to the Special Actions help.