LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My Labview EXE (not computer) goes to sleep-mouse jiggle wakes up

Hi:

 

I just lodged a support ticket about this problem last week. This is a very real LabVIEW anomaly and I am able to duplicate this behaviour by just letting the PC run the LabVIEW application while unattended for hours. The occurrence has no specific time pattern. It occurred after 15 min in one instance,  3 hrs in another, three days in another, and nine hrs in yet another instance. The apparent 'sleep' status can be woken up by just jiggling the mouse while inside the area of the front panel.

 

I resolved this by creating a dedicated parallel labview exe that checks the data time stamps to see if there is any prolonged gap in the save interval. The exe uses User32.dll calls to bring the application to the front and jiggles the mouse back and forth. This trick works but it should not really be needed.

 

... Question is: Why does LabVIEW runtime ever go to sleep?

 

Here are bulleted points:

 

-- My application is written in LabVIEW 8.6.1

-- My application has about nine (9) parallel loops

-- My application was tested without talking to any instruments and while talking to instruments. The sleeping occurred regardless of those test situations

-- Application is highly mission critical and must run 24/7 for months (unattended)

-- The LabVIEW exe goes to sleep on WinXP, Win 7 64, or Win 7 32. The OS does not matter

-- When application goes to sleep, the front panel stops updating, and 'ALL' parallel processes come to a STOP

-- There seems to be no minimum time interval when this seems to start to occur, 15 min, 3 hrs, 9 hrs, 3 days was required in different instances to make this happen.

-- Alarm routines that I coded in the LabVIEW application all come to a stop and are therefore meaningless/useless

-- Application recovers only if mouse is jiggled while on top of the LabVIEW ex front panel.

-- Moving the mouse while away from the front panel bounds fails to recover the sleeping application.

-- Programmatically bringing the front panel to the front (assign focus) does not wake the application either.

-- Again the only fix is jiggling the mouse while in the area of the front panel. Clicking on Front panel is not required.

 

Anthony Lukindo CLA

Mezintel Inc.

 

 

0 Kudos
Message 11 of 12
(1,321 Views)

In regard to the post by: Anthony Lukindo CLA   Mezintel Inc.

I had this problem last year in LV7.1 (posted earlier in this thread), and the same problem occurred after porting to LabVIEW 2010.  I did resolve this issue for my specific application, discussed briefly in this thread were I point to the 6K motor controller as the possible culprit.

 

http://forums.ni.com/t5/LabVIEW/Compumotor-6K-4-used-to-drive-goniometer-table/m-p/1561514#M574778

 

In my case, I resolved the problem by resorting to uniprocessor mode in the Bios.  Attempts to just run the EXE with an affinity assiged to a single core did not work.  I theorize that the problem is a timer/counter synchronization issue between multiple cores that was discussed in a 2004 MSDN arcticle, but I have no way of verifying this in the LabVIEW code.

 

http://msdn.microsoft.com/en-us/magazine/cc163996.aspx

 

We did have one other "simple" patch for this problem, (see the attached PNG).  We added a while loop to the main VI that would periodically minimize, and then restore the Front Panel (FP).  This resolved the problem and was only annoying when you were working on the PC, but it could easily be modified to be able to enable it only when unattended.  Commercially available "Mouse Jigglers" did not work; we tried several.

 

After spending 6 months and nearly 200 hours trying to solve the problem with a whole slew of approaches and scenarios, we've given up and are using the uniprocessor mode solution until such time as we can port the entire application to C# to get away from Labview since we cannot debug the Labview code.

 

If anyone has a "simple" example that demonstrates the problem that would certainly help NI to address the issue.  The application that I've been working on is not "simple" and thus not useful to help NI investigate the issue.  I've not attempted to find a simple demonstrate of the problem becuase I don't know what's causing the problem.

 

0 Kudos
Message 12 of 12
(1,309 Views)