LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application Freezing Then Resuming

The basic problem:
I have developed an application to control an under water vehicle. This application uses shared varaibles to communicate with a compact field point device. I also use the built in joystick functions and communicate on 4 serial ports.

When I run the application on my development computer, everything works as it should. When I install and run the application on an different computer, the application loads, the shared varaibles are deployed. I transmit data for a few seconds - then the application appears to freeze up. Moments later (5 to 30 seconds) the applcation connects to the fieldpoint again and the lights come alive. Again the system will freeze. I am only able to close the application when it is not frozen. I have the "close window" button running an event which cleanly closes the application down.

The systems:
I am using LV8.2 Professional with Real Time Module Installed. This is running on a Windows XP machine (sp2 - intel P4 - 2.39gHz - 1gb RAM) Lets call this PC-A
I am testing my application primarily on a different XP Computer ( sp2 - Intel Core2 Quad, Q6600 @2.4Ghz - 3.25 GB Ram). Lets call this one PC-B
I have also tested this on some other computers:
PC-C is an AMD 4000+ 64 Bit.
PC-D is an Intel Core 2 Duo with LV8.2 Professional Installed and The RT Module.

The application structure:
The application is the combination of 9 timed loops and an event loop. I have a disable diagram box around each VI that contains a timed loop for easy. I have attached a screen shot of the main VI structure.

Looking for an answer:
To find the problem, I have disabled pieces of the main program, compiled the code and then re-introduced pieces until I get the error on PC-B. I found the VI that, when introduced causes the application to freeze. I then installed that applicaion on PC-C, and it worked without freezing.

My hunch:
I can only conclude that this is a platform specific problem. I tried to include my platforms for the different computers. I dont know if having labview installed affects the problem. I think it might be a threading problem, but I have not been able to find the tools to verify that.

I wonder if this is a problem with a race condition. In the attched jpg, the input node to this VI is a cluster with EVERY front panel control/indicator referanced. Each loop is then passed this master reference. The different loops will update the front panel periodically, as well as read values from the front panel. I am therefor passing information between different timed loops using references to the front panel objects, instead of using queues. I have also been using queues to pass information beetween loops that did not have a control on the front panel.

What confuses me is that it works on some computers and not others.

A Final Plea:
If you read this long story, please reply with your thoughts. The obvious conclusion is "dont load your program on some computers." I just dont know which those might be. I am happy to try suggestions and report back.

Thanks,
Kevan

0 Kudos
Message 1 of 4
(2,779 Views)

Hi solarburn,

Hmmm...  This is a tricky one.

So, the only time you experience the freeze up is on PC-B?  What is the structure of your network (ie: are all the PCs and the FieldPoint connected to the same switch, or are some remote, etc.)

Does installing the LabVIEW development environment on PC-B make it work?  (ie: does the VI still work, is the problem only occurring when running a compiled EXE?)?  If so, you could try creating a debuggable executable so you can watch the block diagram of your EXE:


LabVIEW Help - Debugging Applications and Shared Libraries

 
Eric V
National Instruments
Applications Engineer
Certified LabVIEW Associate Developer


"I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"
0 Kudos
Message 2 of 4
(2,746 Views)
Actually I have found the "freezing" to be independant of having the fieldpoint connected, or even having the network adaptor setup. It seams that one difference is that it fails on multi-core machines without labview installed. Cant say that is the problem or not. I was hoping that someone had experienced a race condition similar to this and could say, "dont pass information between the timed loops with queue's." The truth is that i think that something i have done works on some machines and not on others. Any hints would be helpful. As for the online debugging, I tried that. Because this is a timing issue, i found looking and probing my VIs not too helpful when I could not pinpoint where it was locking up.

Any suggestions would be great.

Kevan-
0 Kudos
Message 3 of 4
(2,725 Views)
Hi Kevan,

Looking at the bit of code that you posted in your screenshot, I don't see anything obvious that would cause a race condition, unfortunately.  The reason I suggested using a debuggable executable was so that you could watch the block diagram with "highlight execution" turned on and hopefully see when/where, exactly, the freeze up was occurring.
Eric V
National Instruments
Applications Engineer
Certified LabVIEW Associate Developer


"I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"
0 Kudos
Message 4 of 4
(2,676 Views)