Adding/Editing Lights
Adding a new Light
To add a new Light, follow this procedure:Click Light Table in the Tools menu to bring up the Light Table, and click the Add... button at the bottom of the table to bring up the Add/Edit Light window.
Enter a system name, according to the JMRI convention. The first letter designates your hardware system ('L' for loconet, 'C" for C/MRI, etc.), and the second letter must be 'L' for Light. These are followed by a number that gives the hardware address of the digital output bit being referenced. Examples of valid system addresses are: CL1004, and LL401, assuming you have the hardware for the addressed digital output bits.
Enter a user name. Any string of characters that is different from the user name of other Lights will be accepted, but it's wise to use a string that describes the intended use of the Light.
Select the control type from the options in the popup menu. When you change the control type, different options appear on the two lines below. Control options are discussed in more detail below.
Enter the required information to complete the control definition in the fields that appear. If you need to enter a sensor name or a turnout name, you must enter the name (system name or user name) of an existing sensor or turnout. Caution: if you enter a user name, be careful about changing the user name of your sensor or turnout. A simple change of user name could break your Light control definition.
Next is the notes area of the Add/Edit Light window. This is where instructions and error messages will appear as you create or edit a Light. Always check this area to see if things went as expected.
Click the Create button at the bottom of the window. If everything is fine, a message stating "New Light added ... " will be displayed in the notes area. If there is trouble with anything, an error or warning message will be displayed in the notes area; you should then correct the error and click Create again.
Editing an existing Light
To edit an existing Light, follow this procedure:- Edit of an existing Light may be started in either of two ways:
- Click on a Light's Edit button in the Light Table.
- Enter the system name of the Light to be edited in the Add/Edit Light window and click the Edit button at the bottom of the Add/Edit Light window. This must be the same as the system name shown in the Light Table.
- Make whatever changes or additions you need to the information in the dialog. Note that the system name of the edited Light may not be changed, but the user name may be changed. Other items are as described above.
- After making changes to the Light information, click Update to change the selected Light. If everything is fine, a message stating "Light updated ... " will be displayed in the notes area. If there is any trouble, an error or warning message will be displayed in the notes area, and the update is stopped for you to correct the error and click Update again.
- Click Cancel to exit edit mode without changing the selected Light. If the Add/Edit Light window is dismissed (closed) while in edit mode, Cancel is automatically selected, and no changes are made to the selected Light.
Automated Control Options for Lights
The operation of a Light can be controlled in the following ways:By Sensor - The Light will be turned on when the sensor changes to active or inactive, depending upon the choice made in the 'Sense for ON' popup menu, and it will be turned off, when the sensor reverses state. Specify the sensor by entering its name (system name or user name) in the 'Sensor Name' field. This option has a number of uses, including setting a fascia panel light to follow block occupancy. That is useful, for example, for monitoring train position in a hidden staging area.
By Fast Clock - The Light will be turned on when the fast clock reaches the time entered in 'Time On' and will be turned off when the fast clock reaches the time entered in 'Time Off'. The times are entered in "hh:mm" format, where "hh" is hours and "mm" is minutes for a 24-hour clock. One use of this option is to turn on and off scenery lighting, street lights, house lights, etc. to simulate night time on the layout. (See figure at top for an example of this)
By Turnout Status - The Light will be turned on when the turnout changes to closed or thrown, depending upon the choice made in the 'Status for ON' popup menu, and it will be turned off, when the turnout reverses its status. Specify the turnout by entering its name (system name or user name) in the 'Turnout Name' field. This option may be used to set a fascia panel light to follow the status of a turnout. That is useful, for example, for monitoring the status of hidden turnouts.
By Timed ON - The Light will be turned on when the trigger sensor changes to active, and it will be turned off, when the specified time has elapsed. Specify the trigger sensor by entering its name (system name or user name) in the 'Trigger Sensor Name' field. Enter the time the Light is to remain on (in milliseconds) in the 'Duration ON' field. This option has a number of uses, it was originally designed to turn on an electromagnetic decoupler in response to a fascia pushbutton, but it can also be used for other types of layout animation, for example, to control the ringing of a crossing bell when a train enters a block.