Action Control


Action controls trigger actions when the states of Rocrail objects change. An action control is therefore not part of an action but can control one. An action control is part of the object that is used to trigger the action (eg sensor, switch, route)

The button for setting up an action control (trigger) is mostly found on the General tab of the Rocrail object to be used to control the action.

It is possible to have several actions controlled by the state change of one action control object It is possible to have one action triggered by the state change of several different action control objects

Before an action control can be set up , the action that is to be controlled must first be defined in Action Setup


The list contains the actions that are to be triggered.


Move the selected action control up or down in the list.


Copy the selected action control(s) to the clipboard as XML text.
This can also be pasted in a text editor for expert viewing. It can be manually modified and re-copied to the clipboard.

The listbox is multi selectable to enable copying of more then one action control.


Add the action control(s) from the clipboard to the list.


An action ID can be selected from a dropdown list of all previously defined actions in Action Setup.


The state value entered here is the state that the action control object (trigger) has to change to for the action to be triggered.

Depending on the action control object being used, only the states available for that object will be presented in the dropdown field as listed below:
The field can be edited with additional parameters (count, track number etc.) if necessary.

Object State Remark
Sensor on, off, true, false,<count>3,shorton,longon4
Output on, active, off,shorton,longon4, longclick Output objects do not contain loco information.
Switch turnout, straight, left, right, none, lock, unlock Use “none” if the action should not activated by left-clicking on the accessory (switch) object, but only from it's command menu.
Signal red, yellow, green, white, blank, aspect number
Loco home, forwards, reverse, diesel, steam, electric, battery, min, mid, cruise, max, fon, foff, +, -, #, x, light, lightgoods, local, goods, post, ice, mixed, regional, shunting, cleaning, none, class, schedule:, idle, wait, auto, run, manual, automatic, f1-f28, eventtimeout Substate for energy: high, middle and low.
Block ghost, enter, occupied, reserved, free, closed, open, depart¹, acceptident2, exit(unexpected), codemismatch occupied is triggered at in
Staging block ghost, enter, occupied, reserved, free, closed, depart1, exit, section “exit” is performed, if the exit event will follow on the in event. Requirement: Exit sensor
In case of “section” the sub state must be set to the wanted section ID or to *.
Route go, lock, unlock “lock” is performed when the route is set (the Route is reserved but the switches are not yet set).
“unlock” is performed when the Route is released.
Schedule leave blank
Turntable goto <tracknumber>, next, prev, turn180, lighton, lightoff, calibrate, atposition <tracknumber> When goto or atposition is used without tracknumber, the action is triggered for every goto command, when goto <tracknumber> is used, the action is triggered only with a command to go to that particular track
System go-cmd, go-event, stop-cmd, stop-event, stoplocs, save, shutdown, analyse, reset, ebreak, init, initready, short-circuit, on-auto, off-auto, exception-xxxx, eventtimeout System actions are located in the Rocview Table Menu
The init event is fired after all Command Station libraries has been loaded.
For processing exception-xxxx the Check trace actions must be activated on the Rocrail Automatic Tab.
Text leave blank the action is raised when dynamic text is updated
Booster load, short circuit
MVTrack in
Variable See Action status.
Weather sunrise, noon, sunset

1) Depart for a departing train (not for a train running through!) is triggered at the same moment the route to the next destination is set.
2) Accept a new ident in auto mode.
3) The sensor counts the 'on' states. The action will be triggered if the count set in the state field match the counter of the sensor.
4) The short-/longon states are used for two different actions with the same sensor/output. The action is executed at off. Advised is not to combine short-/longon with other states.
:!: All state values are case sensitive.

Sub state

The sub state is used in combination with:

  • Staging block and “section” state.
  • Loco function “off”.
  • Loco energy “high,middle,low”.


If set greater then zero this value will overwrite the duration in the action setup.


If set greater then zero this value will overwrite the timer in the action setup.


Can be use to set the loco ID for specific objects which do not have any loco information like outputs.
Usually left blank for most action control definitions.

  • Block objects overwrite this value with the loco ID which has reserved it.
  • Sensor objects overwrite this value with the identifier if detected. (RFID, Railcom…)

Note: This field may show the last value used for this action after a restart of Rocrail.


Optional description for use in the Accessory Switch type popup menu.


Reset the counter in case of a sensor object.
If this option is not set, the counter will continue and actions defined for a higher counter value can be triggered. For the action to be triggered with the highest counter value this option must be set otherwise actions requiring a lower counter value will not be triggered.

All conditions must be true

At default all defined conditions of this action control must be all true.
By disabling this option only one of the conditions must be true.

At Command/Event

For switch, outputs and signal objects to define if actions will be checked at a command and/or at an event.
Events are usually generated by the command station.
If both options are enabled, and the command station also generates events after commands, the actions will be checked twice.



The action will only be triggered in automatic mode


The action will only be triggered in manual mode


The action will be triggered in both automatic and manual modes



The selected type and ID will be added to the list


The object selected in the list will be deleted


Changes to an object must be confirmed with this button.


In Roview Table Menu→ System-Actions Actions can be set, which are triggered by Rocrail system events
The same actions and conditions can be used as in objects.
System events = system states: see table above System -> State
The typical use-case for system actions is to set actions to a defined state when starting a Rocrail session.

Some Examples:

  • set all buttons in the plan on “red” when “init” (initializing Rocrail)
  • start a XML-script with the event “on-auto” bzw. “off-auto” (auto-mode on, auto-mode off)
  • set a output if “short-circuit” to trigger a external alarm
  • ….

Common Buttons

Personal Tools