Fire Event on Page View?

Discuss issues and ideas you have to configuring displays with PowerVision
CHAWE
Posts: 3
Joined: Fri Jan 29, 2016 1:19 pm

Fire Event on Page View?

Post by CHAWE » Fri Apr 21, 2017 1:37 pm

Hello,
Is there a way to fire an event when a page is viewed? I understand that I can fire an event at the same time the action that goes to a page view occurs, but that would require me to fire both items (page view and my event) which is a little extra work. Also, if the default startup page needs an event to occur when it is shown, there doesn't seem to be a possibility for this, correct?

Thanks!
boyce
Enovation Controls Development
Enovation Controls Development
Posts: 322
Joined: Wed Sep 08, 2010 5:09 pm

Re: Fire Event on Page View?

Post by boyce » Fri Apr 21, 2017 1:47 pm

You can fire an event when a page is shown by right clicking on the page view tab (Main Page View in the example) the Advanced item. Click the + and select the event.
PageView.JPG
PageView.JPG (152.01 KiB) Viewed 93 times
Boyce Schrack
Enovation Controls
CHAWE
Posts: 3
Joined: Fri Jan 29, 2016 1:19 pm

Re: Fire Event on Page View?

Post by CHAWE » Mon Apr 24, 2017 10:44 am

Boyce,
Thanks, I didn't see that in any of the documentation. So the event is fired when a transition occurs from a either a specified page view, or any page view, into the page I am configuring. I am still struggling to get the event to happen on the main page view on startup. I don't really transition to this page on startup, so in order to fire my event, I have to first navigate away and then back into it. I really need it to happen once when the device starts up as well, without the user having to do anything. Is there another way to do this?
boyce
Enovation Controls Development
Enovation Controls Development
Posts: 322
Joined: Wed Sep 08, 2010 5:09 pm

Re: Fire Event on Page View?

Post by boyce » Mon Apr 24, 2017 1:24 pm

I don't know exactly what you are trying to do, but you could add a state machine that only has an Initial State with the actions that you want to do in the On entering state execute these actions. The Initial State will only run one time when the system starts up.
Boyce Schrack
Enovation Controls
CHAWE
Posts: 3
Joined: Fri Jan 29, 2016 1:19 pm

Re: Fire Event on Page View?

Post by CHAWE » Mon Apr 24, 2017 3:35 pm

Thanks Boyce, I'll give that a try.

What I'm trying to do is transmit some CAN messages and also turn on the Digital Output on the PV780 when the device boots up. After thinking about it for a while it donned on me that by creating a Recurring Timer that executes the events that I want as well as shuts itself off once expired, essentially I would be making a one shot timer that initializes ON. I tried it and this seems to work well, but maybe not the most elegant solution?

I appreciate all the help!