This lesson is part of the Transaction Groups in Ignition course. You can browse the rest of the lessons below.

Supplemental Videos

LESSON

Trigger – While Condition is True

Description

Learn how to execute a Transaction Group only while a trigger condition is true. This is most commonly accomplished on boolean or integer triggers, or on Execution Scheduling.

Video recorded using: Ignition 8.1

Transcript

(open in window)

[00:00] A transaction group can be configured to execute continuously while a trigger condition is met. Here I have a historical transaction group logging four tag values to my database at a one-second rate. I can configure this group to execute on a trigger. Notice our Boolean A tag here. I can head over to the Trigger tab on my historical transaction group and use our Boolean A tag's value to control the execution of my group. By default, enabling this group to execute on a trigger and selecting the Boolean A tag as the trigger item, like so will cause a transaction group to execute if, and only if, my Boolean A tag has a value of false. Enabling the transaction group and saving my changes with my Boolean A value set to true, I see the total executions of my transaction group do not change because my trigger condition is not met.

[01:07] Toggling my Boolean A tag to false, I immediately see the transaction group begin to execute every second and log a value to my database every second due to my trigger condition being met. Toggling the Boolean A tag back to true will cause the transaction group to stop executing. I can change that transaction group to only execute if my Boolean A value is equal to true by simply using the not equal to zero trigger condition. Another example of this type of trigger would be to run the group while my trigger's value fell within a certain range. With a Boolean trigger, this might not make much sense, but if I set my trigger item to be, say, this integer B tag, I can tell the group to only be active or execute if this integer value is greater than, say, 50, for example. I can also tell the group to be inactive if the integer value goes below, let's say, 10.

[02:10] If we enable the group with these settings, we will not see any rows inserted into our database unless the integer B value meets our trigger conditions. If the integer value goes to 65, the group will begin logging and will continue to log until our trigger item goes below 10. Using triggers, it is easy to capture data while some user-defined conditions are true. For example, you may choose to only record values to your database while a machine is running. In that case, you could have the group trigger from a bit's value like we had earlier. Or, as we did just now, we could have the group execute based on a numeric range, which could be used to capture abnormal events. For example, you can log your data to your database whenever a temperature value was outside of a certain tolerance.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.