Add Seconds Function

The Add Seconds function is used in the Logic Editor to modify the date or time. This feature is useful for assessing how much time has passed since an alarm was triggered. In escalation cases, a Workflow can be made to check if alarms are handled within an acceptable time frame.

Example

In this example, we will check if more than ten seconds have passed since the alarm was triggered.

  1. We will add a new Workflow and set its Trigger.
  2. Drag and drop a Logic block onto the work area, and connect it to the Start block. Choose what asset you want to check for measuring the alarm response time.
  3. Double-click the Logic block to open the Logic Editor.
  4. Check if the asset is In Alarm. Click on the asset under Objects and select In Alarm under Properties. Label the block, Asset in Alarm?.
  5. Drag and drop one more Logic block onto the work area. Connect the previous Logic block's True exit path to the new Logic block and the False exit path to the Stop block.
  6. To compare it to the current time, double-click the new Logic block.
  7. Navigate to the chosen asset and select Last Alarm Time In under Properties.
  8. Click and add a > located under Operations.
  9. Click the AddSeconds function button.
  10. Click Date and Time.
    1. Select the date required in the Date and Time field.
    2. Click on Advanced Options.
    3. Select Environment and then choose Current DateTime.
    4. Click OK.
  11. Click Number of Seconds, and enter the desired number of seconds. In this case, input 10 for ten seconds. Click OK.
  12. Drag and drop an Action block into the work area. Connect it to the True exit path for the Logic block, then to the Stop block. Label the Logic block Active for 10 sec
  13. Set your Action block to verify if the time set was passed. This can be done through the Write to Message Banner or Write Custom Logging Messages command.