Fire On Change with IO Variable

Discuss issues and ideas you have to configuring displays with PowerVision
robsinglehurst
Posts: 54
Joined: Fri Dec 12, 2014 6:57 am

Fire On Change with IO Variable

Post by robsinglehurst » Fri Feb 24, 2017 8:36 am

I'm planning to use Fire on Change on an IO variable (that will be changing due to external influences) to then fire an event which will call an activity program. However there will already be an activity program running on a 250m sec timer.
Does this behave a bit like an interrupt would in the embedded world i.e. the Fire on Change will be satisfied and then processing will resume at the very next point in the main activity program?
Just want to know how this works before spending a lot of time "head scratching"!!!
Rob Singlehurst
Design Engineer

Briggs Irrigation
Boyle Road
Corby
Northants.
England
UK
boyce
Enovation Controls Development
Enovation Controls Development
Posts: 322
Joined: Wed Sep 08, 2010 5:09 pm

Re: Fire On Change with IO Variable

Post by boyce » Fri Feb 24, 2017 9:14 am

The activity program that is running on the timer will run to completion before the IO fire on changes are processed. When the IO variable has a fire on change it will call it's activity program and it will run to completion before it will do anything else like the timer activity program. Therefore I would say it's not really like interrupt handling. The timer events and the fire on change events get queued and they sequentially each run to completion.
Boyce Schrack
Enovation Controls
robsinglehurst
Posts: 54
Joined: Fri Dec 12, 2014 6:57 am

Re: Fire On Change with IO Variable

Post by robsinglehurst » Fri Feb 24, 2017 11:50 am

Thanks Boyce,

That makes sense as I couldn't see how an activity program would resume. Is it the same behaviour for scripts?
It makes what I want to achieve a bit tricky then, as I was wanting to accurately time a pulsing input (fairly slow input i.e. 0.1Hz but I need an accurate time none the less)
Rob Singlehurst
Design Engineer

Briggs Irrigation
Boyle Road
Corby
Northants.
England
UK
boyce
Enovation Controls Development
Enovation Controls Development
Posts: 322
Joined: Wed Sep 08, 2010 5:09 pm

Re: Fire On Change with IO Variable

Post by boyce » Fri Feb 24, 2017 12:52 pm

Yes, it is the same for scripts.
Boyce Schrack
Enovation Controls
robsinglehurst
Posts: 54
Joined: Fri Dec 12, 2014 6:57 am

Re: Fire On Change with IO Variable

Post by robsinglehurst » Fri Feb 24, 2017 1:03 pm

Thanks Boyce,
Rob Singlehurst
Design Engineer

Briggs Irrigation
Boyle Road
Corby
Northants.
England
UK