How To | Making an Adjustable Time-Based Trigger without Scripting

Learn how to create an adjustable time-based trigger without the need for scripting, allowing you to automate actions and events in your project with ease.

Updated at April 24th, 2024

Procedure


Having a state that can be set to fire at a specific time can be useful when trying to control an audio player or a control in your system. This guide will show you how to put together the foundation for a trigger fired on a variable schedule using only components.

Note

This example is limited to a one second on/off cycle. 

 
  1. Drag the necessary components into the design space and configure them as follows:
    1. One Date/Time component
      1. Select the ‘output’ control pin
    2. One Control Function component
      1. Set the Function property to ‘String Equal’
    3. One Custom Control component configured to have two control groups
      1. Group 1:
        1. Set Type to ‘Time Knob (seconds)’
        2. Set Count to ‘1’
        3. Set Custom Range to ‘Yes’
        4. Set Minimum to ‘0’
        5. Set Maximum to ‘86400’
      2. Group 2:
        1. Set Type to ‘LED’
        2. Set Count to ‘1’
  2. Connect the control pins as follows:
    1. Connect the Custom Control's ‘Time (sec) 1’ control pin output to the String Equal's ‘Input 1’ (top) control pin input
    2. Connect the Date/Time's ‘output’ control pin output to the String Equal's ‘Input 2’ (bottom) control pin input
    3. Connect the String Equal's ‘Output’ control pin output to the Custom Control's ‘LED 1’ control pin input
  3. Press the F6 key to enter Emulation Mode
  4. Open up the Date/Time component and set the Format String control to “%H:%M:%S”

That's it! Now set the desired time for the state change to happen. The LED will go true for 1 seconds and then go off. 

Example

The screenshot below shows UI that may be useful. The H:M:S buttons are copies of the time knob.  The properties have been changed to be a button with a string of -00:00:01 for -1 second and 00:00:01 for +1 seconds and so on. The text is just typed on