Conditions
A Condition is used to specify when a Trigger should run. In an IF Then statement, this is an AND within the IF (IF AND THEN).
For the trigger to fire, the Condition must also be met.
Example:
IF (Real Time is 10:00:00) AND (Real Time is Before 21/05/2015) THEN (Start Timeline 1)
The Real Time Trigger will fire whenever the built in Real Time clock tells the controller that it is 10:00:00 AND that the date is before 21/05/2015, and the controller will then Start Timeline 1.
Any of the Conditions can be added to any of the Triggers to narrow down when they will be fired.
You can have several triggers of the same type with the same parameters, but different conditions and actions, so that the same input can have a different Action depending on another factor (e.g. time of day)
There are various different types of Condition:
Clock and Calendar conditions are used to specify a time/date that the trigger event must occur before or after.
Real Time
Real time conditions can be used to limit the operation of a trigger to certain times. A single condition can be set to match if the current time is before, after or equal to the time specified. Remember that the advanced dialog can be used to set a mask - this can be particularly useful with the "equal" setting for defining ranges, for example daily opening times. Where you want to specify a very specific range of times you can use two real time conditions on the same trigger, one specifying the time it must be after and the other the time it must be before, and both must match.
The conditions work by creating a mask of times, where each value of a component (year, month, day, day of week, hour, minute or second) can either be in the mask or not. When a trigger that has this condition on it is triggered, the current time will have a single value for each component. If the operator is Equals, the mask must contain those values for the condition to be satisfied:
Choosing "Every day" means all years, months and days are in the mask, so they will all satisfy the condition. Similarly, "Any Time" means all hours, minutes and seconds are in the mask, so any time will satisfy the condition. "Once a week" means only one day of the week is in the mask, so the condition is only satisfied when tested on that day of the week. Choosing a particular date or time means that only that date or time is set in the mask, so no other will satisfy the condition.
Using the Advanced mode, you can create more versatile masks:
For example, for the condition to be satisfied between 10pm and 4am, you would highlight all years, months, days, days of the week, minutes and seconds in the mask, but only set 22, 23, 0, 1, 2 and 3 in the hour mask.
Thus, the condition will only be satisfied when the current hour is between 10pm and 4am.
Another example might be if you wanted the condition to be satisfied in every tenth minute on Sundays.
Here, you would highlight all years, months, days, hours, and seconds in the mask, highlight only Sunday in the Day Name and highlight 0, 10, 20, 30, 40 and 50 in the minutes.
If the operator is set to Before (or After), the condition is satisfied if the current time is before (or after) the time set in the mask. If the mask contains a unique time (a single value for year, month, day, hour, minute and second), this should be easy to understand.
If the whole mask is set for a component of the date, that component is always satisfied as being Before (or After) the current time.
If the mask contains multiple (but not all) values in a component of the mask, only the first set value is taken. For example, if the day of the week component has Monday and Tuesday set, this is interpreted as being Before or After Monday.
When the operator is Before or After, the day of week is only considered if every value of the day component is set (so it will be satisfied on any day of the month).
NOTE: Conditions are always tested on the Controller that handles the trigger. Real time triggers are always handled on the Controller designated as Network Primary. But if you use real time conditions in situations where they will be tested on Controllers that are not the Network Primary then it is up to the user to make sure the time and date are set correctly on all the Controllers and not just on the Network Primary although they should synchronize automatically.
Astronomical
The Controllers are also equipped with astronomical clock algorithms which automatically generate the correct sunrise, sunset, dawn and dusk times for the location of the installation (see project properties).
Astronomical conditions can be used to limit the operation of a trigger to daytime or night time by selecting between dawn & dusk, sunrise & sunset, sunset & sunrise, etc. You can also specify offsets, negative or positive, in minutes as required.
There is also the option to select real time instead of sunset, sunrise or twilight and enter a time to create a hybrid condition such as "Between dusk and 01:00" or to create real time "between" conditioning which spans midnight.
Two versions of dawn and dusk are offered, using the two definitions of twilight: civil and nautical. Please see Wikipedia for an explanation of these terms.
Lunar
As well as astronomical triggers the Controller uses lunar clock algorithms to calculate the lunar phases based on the location of the Controller (see project properties).
Lunar conditions can be used to limit the operation of a trigger to specified lunar phases by selecting between new moon & full moon, first quarter & third quarter, etc.
Playback conditions are used to check whether a playback object (timeline or scene) is currently in use, or more complicated conditioning based within the Lua scripting environment
Timeline running
Use this condition to determine if a timeline is currently running. Running is defined as being between the start and the end of the timeline - so a timeline holding at end is not running. This condition can be useful if you want to only start a timeline if it is not already running. Sometimes timelines are used as timers and this condition is used to determine if the timer has expired. Use the configuration pane to select which timeline, or select 'Any' and choose a playback group to trigger when any timeline in that group is running.
Timeline onstage
Use this condition to determine if a timeline is currently affecting the output of the Controller. It will be true as long as one fixture patched to this Controller is being controlled by the timeline. It does not matter whether the timeline is running or holding at end. Use the configuration pane to select which timeline, or select 'Any' and choose a playback group to trigger when any timeline in that group is onstage.
Note that, unlike the timeline running condition, its result may vary between different Controllers in a network system because it depends on whether fixtures in the timeline are locally patched.
Scene onstage
Use this condition to determine if a scene is currently affecting the output of the controller. It will be true as long as one fixture patched to this controller is being controlled by the scene. Use the configuration pane to select which scene, or select 'Any' and choose a playback group to trigger when any scene in that group is onstage.
Script
Use this to run a Lua script where the returned value determines whether the condition is true or not. The script selection drop-down defaults to Quick Script. Using Quick Script, you can provide a single Lua statement which can be negated by checking the box labelled 'Negate'. To use a longer script, use the script selection drop-down to select an existing script from the project, or click 'New Script' to open the script editing dialog.
The Pharos Controllers support a scripting language that can be used for handling complicated conditional triggering or other advanced control requirements. The user can write scripts and set them to run in response to any trigger event. From within a script you can do all the things that you can do with a trigger in the triggers screen – access passed-in variables, test conditions and perform actions - but you can also define more complicated conditional statements and perform mathematical operations.
Example Scripts are available in this help file.
WARNING: Scripts are an advanced feature intended to solve problems that cannot be addressed in any other way. They are not as user-friendly as the normal triggers interface and incorrectly written scripts will not work as intended and could cause other problems with the operation of your Controller. For help with writing scripts, please see the Trigger Script Programming Guide, or please contact support to discuss requirements for a particular project.
Interactive conditions are used to require that a certain interactive element is in a certain state for the trigger to fire e.g. a digitial input being high, or a BPS button being pressed.
Digital input
You can specify a condition based on the current state of an LPC's, TPC with EXT's or Remote Device's digital input. Leave the Device as Local to check an LPC's or TPC with EXT's input, or choose a RIO. Select the input number and whether it is active high or low (select low for contact closure).
Note that if you have more than one RIO of the same type with the same address then the condition will check against the most recent event received.
Digital inputs on Controllers or Remote Devices can also be used to detect contact closures.
Digital word
This condition allows you to test multiple of the digital inputs as a single condition. By clicking repeatedly on the numbers representing each input you can specify whether it has to be low, high or either (the default) to match.
As a side-effect the condition will also capture as a variable the state of all inputs set to match as a binary number. This can be useful if you want to pass a lot of information (such as a timeline number) using a set of digital inputs. When building the binary number low (or contact closed) is treated as a one and high (or contact open) is treated as a zero and input 1 is the least significant bit (LSB) and input 8 is the most significant bit (MSB).
BPS Button
You can specify a condition based on the current state of a button. Select the BPS and button number and whether it is pressed (Down) or not (Up).
Touch device conditions will respond to any touch device in the project. To respond only to a particular touch device, use the 'Touch Device' field to set the type and number of the touch device you're interested in. To specify a particular TPC, enable the 'Trigger Controller Edit' project feature, set the parent trigger's 'Test conditions on' field to your TPC and set 'Touch Device' to 'Local'. You can leave 'Test conditions on' set to 'Local' if your trigger's controller is a TPC.
Touch Button Pressed
You can specify a condition based on the current state of a maintained touch button. The Button field should be set to the Control Key of the button you're interested in. The condition checks whether the button is pressed and can optionally be negated to check the inverse.
Protocol conditions are generally based around lighting or Pharos protocols, but also include analog inputs. These could be use to specify that eDMX Pass-Through can only be enabled if there is an eDMX signal to pass-through, or to only attempt to send DALI commands if the correct power is applied to the DALI Bus.
Protocol Status conditions are specifically based on the current status of a protocol (Pharos or Lighting).
Controller Online
Use this condition to determine if a Controller is online (or offline with "Negate" checked). Select the Controller's identification number from the configuration pane.
Remote Device Online
Use this condition to determine if a Remote Device is online (or offline with "NOT" checked), select the type (RIO or BPS) and its number.
eDMX Pass-Through Detected
Use this to test if a valid eDMX source is detected on the specified port. See patch for more information.
Live Video Signal Detected
Use this to test whether a valid Live Video Signal is being received.
Output Enabled
Use this to test whether a specified output protocol is enabled.
Cloud Site is Disconnected
Use this to test if the controller is disconnected from a Cloud Site or not. The current status of a controllers connection to a Cloud Site is shown on the home page of the web interface.
DALI Status
DALI Bus Power
Use this condition to determine the electrical state of a specific DALI bus.
DALI Ballast Errors
Use this condition to determine if any or a single ballast(s) have reported a fixture error.
Dynamic Protocol conditions are specifically based on the current level of an input.
Analog Input
The revised LPC hardware and TPC with EXT have 8 inputs that can be configured as digital or analog inputs in the Interfaces tab of the Network view. The RIO 80 and RIO 44 also have configurable inputs, see Remote Devices.
You can specify a condition based on the current state of an analog input. Set Device to Local to use a Controller's input or choose a RIO. Then select the input number and the percentage range of input voltage. The voltage range of an Controller's or RIO's analog input can be configured in the Network view.
DMX Input
This condition will test whether the last received value for a particular DMX channel is within the specified range.
DMX Input Detected
This condition will test whether the controller is currently receiving DMX Input.