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.
Firing event when variable changes
- marcio
- Posts: 4
- Joined: Mon Jan 17, 2011 1:53 pm
- stalley
- Enovation Controls Development
- Posts: 618
- Joined: Tue Mar 18, 2014 12:57 pm
Re: Firing event when variable changes
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!
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
Software Engineer
Enovation Controls
- marcio
- Posts: 4
- Joined: Mon Jan 17, 2011 1:53 pm
Re: Firing event when variable changes
stalley:
Thanks for your feedback. It's working perfectly now.
Thanks for your feedback. It's working perfectly now.