Skip to content

Control Objects

The LCOS Control Object is used to bind physical and logical controls to layout actions, allowing you to command layout objects and processes. Control objects are linked to triggering devices such as digital input devices,—buttons, switches and digital sensors — or are bound to a virtual port that other layout objects can use to trigger the Control Object.

Digital Inputs #

Digital inputs are used for control panel buttons, switches, and digital sensors on the layout. “Digital” means that the output of the sensor device can be interpreted as “on” or “off” with no intervening values.

LCOS uses DNIN8 Digital Input duinoNodes for digital inputs. DNIN8 boards can be chained or stacked to concentrate input ports in a particular place. If you do not have any DNIN8 boards in your configuration, you will not be able to create Control Objects triggered by buttons and switches. For more information about DNIN8 boards, see DNIN8 Instructions.

The Virtual Input Port #

LCOS hosts virtual input port 128 to enable layout objects to command other layout objects.

Virtual port 128 is just like real input ports 0 to 127, except that it is a shared port that objects can switch in code without a physical trigger connection. When a control is bound to the virtual port, it is exclusively available to layout objects and cannot by triggered electrically. This supports cascading automation: where triggering a single object can cause effects to cascade through multiple objects, leading to complex actions that are hard to script in a linear fashion.

Control Objects linked to the virtual input are accessed and triggered by other layout objects. For example, blocks can be configured to trigger a Control Object whenever the occupancy state changes.

Let’s say you have a warehouse dock scene and, whenever cars are moved onto the dock track, you want some lights on or maybe an animated object to run. To do that, you create one or more Scene Objects that contain all the things you want to turn on, then you create a Control Object bound to the virtual port, setting it to turn the scene object(s) on and off.

Then, because the Control Object is bound to port 128, it is available to block objects: link the Control Object to the dock Block Object, and the Control will be activated whenever the dock block is occupied, and deactivated if not occupied.

The Control Objects Tool #

On the main screen of the Configurator, click to invoke the Control objects tool.

The Control Objects tool is divided into three zones: Add, Edit and List.

To create a new input object, first select the input port you will use for this object.

To bind the control to a physical input port, select Input Port. Otherwise select Virtual Port.

If you selected Input Port, select the port you are using in the next box.

Finally, select the input type by selecting button or switch contact (see below), then click on add button. The new object will be added to the list and loaded into the edit zone with default settings.

After adding a new input object, the object is loaded into the edit zone with default selections.

Button vs. Switch Contact #

The difference between a “button” and a “switch contact” is the events the objects fire. It is not description of the device. Any port can be configured as a button or switch contact depending on the functionality desired.

Buttons are treated as trigger devices: they always fire an “ON” event, but do not generally fire an “OFF” event. The one exception occurs when the target of the button press is general output port or relay: in that case, a possible ON event is “On While Pressed” which will cause the button to fire an “OFF” event automatically when the button is released.

Switch Contacts support both ON and OFF events. You can chose either or both to fire for any given contact.

The Action Object #

When you create a new input object, the default Action is set to “Native Event”. Click the Action drop down list to see all available action objects.

In LCOS, you can choose from multiple actions that can be triggered or controlled by a Control Object. The options shown are for a CLIENT node. MASTER nodes have an additional action option: Fast Clock.
  • Native Event: both buttons and switches will fire an “ON” event; a switch contact will also fire an “OFF” event.
  • Port: The input will control a digital output port.
  • Relay: The input will control a relay,
  • Signal: The input will set a signal aspect.
  • Turnout: The input will set a turnout.
  • Scene Object: The input will control a Scene Object.
  • Fast Clock: [MASTER ONLY] The input will control the Fast Clock.

The Target Object Field #

For Action Objects other than Native Event, you have to select a target object for the input to act on. When you select an action object, the Target Object field will auto-populate with available objects of the required type. If you haven’t configured objects of that type — for example, you haven’t defined any relays and you select Relay as your Action Object — the Target Object field will remain “disabled”.

When the Action Object is turnout, the the Target Object field will auto-populate as follows:

  • On the MASTER: the list will contain all turnouts in the master turnout list; at the end of the turnout list you will find “Set Route” and “Set Global Route.”
  • On a CLIENT: the list will contain all local turnouts; at the end of the list you will find “Set Route.”

The Event Fields #

The Event Fields will auto-populate with available events; with one exception, OFF events are only available with the switch contact input type.

Ports offer the following ON or OFF events:

  • On While Pressed [Buttons only;implies automatic OFF event upon release]
  • Port On
  • Port Off
  • Toggle [flip between on and off]
Port ON events list.

Relays offer the following ON events:

  • Set Alternate
  • Set Default
  • Energize/Trigger — for break/make or select/energize relays; no effect for other relay types
  • Toggle [Buttons only] — flip between default and alternate states.

… and the following OFF events:

  • Set Alternate
  • Set Default
  • De-energize

Signals offer the following ON events –
NOTE: invoking these events suspends automated functions for the affected signal until explicitly Released:

  • Set Stop
  • Set Approach
  • Set Clear
  • Release [re-enables automated signal functions]

… and the following OFF events:

  • Set Stop
  • Set Approach
  • Set Clear
  • Set Off
  • Release [re-enables automated signal functions]

Further Note about Signals and Switches: When you set an aspect using an ON event with a switch contact, you can either change the aspect again with the OFF event or use the ON event of a different switch contact, but not both where the contacts are on the same switch. You should not use both ON and OFF events with groups of contacts (contacts on the same multi-contact device like a bi-state or rotary switch) because the events could conflict. When using multi-contact switch to control the same signal, use only ON events.

Turnouts offer the following ON and OFF events:

  • Set Main
  • Set Divergent
  • Toggle Position [ON event Buttons only]

In the event you selected as your Target Object either Set Route, or Set Global Route on the MASTER, then the ON Event list will be populated with either the Global Route List, or the Local Route List; the OFF Event list will be disabled. See Routes for more information.

Scene Objects offer the following ON events:

  • Activate
  • Toggle State

… and the following OFF events:

  • Deactivate

Fast Clock control (available on the MASTER only) offers the following ON events.

  • Run
  • Stop
  • Reset

… and the following OFF events:

  • Stop

Using Sensors #

Sensors that accept a 5v input and a single HIGH/LOW (on or off) output can be directly attached to a DNIN8 port. Examples of compatible sensors are reed switches, mechanical level and tilt sensors, and photo interrupters.

Other kinds of sensors require analog processing and special program logic to determine and act on sensor state. For example, a proximity sensor is generally used to determine when to turn something on or off, but a processor has to read the signal and determine if trigger criteria are met. In this case, an auxiliary processor running the sensor could be attached to an input port, pulling the connection HIGH whenever trigger criteria are met. To trigger a momentary BUTTON press event, your sensor processor should hold the connection HIGH for at least 200 milliseconds to ensure recognition.

In general, any analog or non-binary sensor can be attached to an input port if the connection is through another processor that can translate sensor readings into a HIGH/LOW output.

Configure the sensor input as a BUTTON or SWITCH CONTACT depending on the behaviors you desire.

Save And Reboot #

Remember to save the configuration to the Node by clicking save input objects button.

To complete the change, the node must rebooted. On the Main Window, click reboot button to reboot and load the new configuration.

Powered by BetterDocs