Firing event when variable changes

Discuss issues and ideas you have to configuring displays with PowerVision
marcio
Posts: 4
Joined: Mon Jan 17, 2011 1:53 pm

Firing event when variable changes

Post by marcio » Thu Oct 27, 2016 10:38 pm

I have a real beginner question, but I have a flag coming in on a message and saving to a variable. Is there a way I can fire an event when the flag is 1 and a separate event when the flag is 0?

Using PowerVision Configuration Studio 2.8.10491 and PV380

THanks.
stalley
Enovation Controls Development
Enovation Controls Development
Posts: 618
Joined: Tue Mar 18, 2014 12:57 pm

Re: Firing event when variable changes

Post by stalley » Fri Oct 28, 2016 8:09 am

Hi marcio,

You will need three events.

On your events to fire when the FLAG is 1 or 0, put a condition event.
On FLAG Event 1 add a condition "FLAG = 1"
Likewise on FLAG Event 0 add a condition "FLAG = 0"

You will put the condition events as Actions on the third event. Put the third event as the Fire on change event in the FLAG variable properties.

So what happens will be when the FLAG value changes (CAN stops/starts receiving the FLAG is NOT considered a change. A change is a change in value.), the Fire on change event will fire the two condition events. The event with whichever condition evaluates to true will be the event that gets fired.

Happy config creating!
Sara Talley
Software Engineer
Enovation Controls
marcio
Posts: 4
Joined: Mon Jan 17, 2011 1:53 pm

Re: Firing event when variable changes

Post by marcio » Mon Oct 31, 2016 1:05 pm

stalley:

Thanks for your feedback. It's working perfectly now.