LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure in exe idle for a long time

I have a small exe that will stay idle in an event structure while another bigger and separate exe will run concurrently.  These two exe are seperate and indepedent.  

 

The small exe is usally idle, sometime for hours, in an event structure.  One time, I tried to use it, and it responsed very slowly.  Is there a way to make the exe more responsive in this situation when the exe will idle in a event structure for a long time?  Thanks!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
Message 1 of 10
(2,549 Views)

I suspect it got swapped out by the OS. Do you have plenty of RAM?

0 Kudos
Message 2 of 10
(2,548 Views)

Yeah, RAM is plenty. 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 10
(2,529 Views)

Hi,

 

Your event is static/dynamic in nature ? How your VI is behaving when you run it without making exe ? I suspect some code inside your event structure is taking more time.. Plz review your code and post back ..

 

Thanks

- HS

0 Kudos
Message 4 of 10
(2,524 Views)

Do you have any timeout event which'll keep it active? I suspect as Altenbach it's been swapped out by OS.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 10
(2,508 Views)

There is no time out caese in the event structure.  Is there a need for it?  I expected the program to be waiting at the event structure of the event of a boolean.  If it is swapped out by the OS, is it a big problem?  If it is, how do I fix that?  

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 6 of 10
(2,499 Views)

For my event structure, there is only static event.  The only event is a value change event of a boolean control.  The code in the event structure takes very little time, I checked it.  When the code is running regularly, there is not problem.  When I don't use the program for a long time and it is idle in the even structure waiting of a value change event, the response is slow.  

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 7 of 10
(2,496 Views)

First, you did not really say if the program is fast once it has woken up by an event. Is it?

 

Try an empty timeout event with a long timeout (e.g. 1 minute). That won't really use any CPU. See if it keeps the code responsive.

0 Kudos
Message 8 of 10
(2,495 Views)

@jyang72211 wrote:

There is no time out caese in the event structure.  Is there a need for it?  I expected the program to be waiting at the event structure of the event of a boolean.  If it is swapped out by the OS, is it a big problem?  If it is, how do I fix that?  



I suspect the OS feels the program is inactive if it never does anything and thus swaps it out to disc. Having a timeout case as both me and Altenbach suggest should solve this. The problem is as you've noticed that it takes some time to read back when it wakes up, most probably the cause of what's happening to you.

 

I dont know if an empty timeout is enough, but it should be.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 10
(2,482 Views)

Once it wakes up, it is goes back to normal speed.  I guess I don't have to worry about it too much.

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 10 of 10
(2,464 Views)