09-23-2011 10:03 AM
I am using Labview 10 with crio9074. When I start the webserver, Labview completely quits after about an hour. Any suggestions?
09-23-2011 11:00 AM
Hi Skysurfer,
I'm Jamie an Applications Engineer at NI UK.
One reason why the webserver may be hanging/quitting is the overuse of sockets with constantly opening and closing TCP connections, this can use up all available sockets and result in the TCP connection locking up. If this is the case ensure that any Open and Close functions are located outside structures where possible, especially while loops.
Hope this helps with your cRIO application.
Thanks
Jamie
10-06-2011 03:51 PM
Thanks for the reply. I don't use any open or close functions.
10-07-2011 06:03 PM
You may want to watch your ram to see if you have a memory leak. This is just a shot in the dark, some more information about your setup would be useful.
Kyle K.
10-10-2011 04:05 PM
Thanks for the reply. I'm using LV 10. Attached is a sample program that I wrote that updates a graph for every iteration of the while loop. When I use the web server, Labview totally shuts down after about an hour of running. I've noticed in the Remote Panel Connection Manager that the Total Bytes/sec constantly increases to a value of 1.6M before the program shuts down. I believe this has something to do with the problem. Any suggestions?
10-10-2011 04:53 PM
You are building 6 arrays in the loop. Plus you get several extra copies for the graph. Those arrays will keep growing until you have memory allocation problems. The better way is to decide on the maximum size you need for the arrays and initialize the arrays outside the loop. Then inside the loop use Replace Array Subset to pu tthe data values into the arrays. No arrays growing, no change in memory usage.
Also, the graph is about 540 pixels wide. If you send more than 540 points (per plot) to the graph, LV will reduce it to the number of pixels anyway, so why waste the bandwidth. Do the data reduction before passing it to the graph.
Lynn
10-10-2011 05:51 PM
I speeded up your VI by a factor of 100 and found that the memory usage goes from about 8 KB at the beginning to over 2 MB after an hour.
Lynn
10-24-2011 02:21 PM
Lynn,
Thanks for your input.