On Jul 13, 12:40 pm, Ha-Jo <x...@no.email> wrote:
> Hello,
> I've got a problem using named queues. I've wrote a program for a Measurement set-up, which is installed on a ferry to collect environmental data along the route between the home- and the destination port over a long period. In automatic mode the set-up is controlled by the ships GPS-position. If it leaves an defined area around the port, a calibration of some instruments is performed. After a succesfully ended calibration a "water-measurement"-mode starts in a timed loop (period 1 minute) till the ship reaches a specified latitude to perform some "air-measurments" and then go back to "water-measurement"-mode again till it reaches a defined area around the destination port and so on.
> In "water-measurement"-mode two readings have to be delayed for 2 minutes, to compensate the time, the water needs to flow from an outer sensor to the set-up. I thougt it was a good idea to use a named queue for each reading to delay it for two periods of the timed loop. A third named queue collects error informations around the programm. This error information is queued out, displayed and stored in a file in a separate loop.
> The program works fine at the first journey. At the run back only calibration and air-measurements are stored. I've got neither water nor error information.
> My next step was adding an additional named queue to collect status information about the programm parts which have passed through and additional every five minutes the actual GPS-position. Now all informations from sources, which are including a queue, is ending already about 20 hours past program start. About 45 minutes after truncation of water measurements, errorlog and infolog, the air measurements again are performed correctly.
> Before installation on board, we tested the set-up whith a simulated GPS-signal. In these tests we had accelerate time for a journey. Whith 60 minutes for one run between the ports we performed multiple runs without any problem. So I guess, there is a problem caused by my usage of queues.
> I tested my DataDelay.vi in a loop and got some strange results after I forgot to stop my test. It seems that labview is consuming an increasing amount of CPU-time after a high number of loop cycles. In the attachment I tried to speed up the effect by using 3 of these VIs in a loop. On my PC after about one hour the labview part of the CPU-time reaches nearly 100%. This may not be related to the problem at the ship, because the conditions are too different, but I don't understand it.
>
> My next trial will be to replace the queues for data delay by shift registers, "build array" and "delete from array".
> Since the set-up is installed at the ferry, it it costly and time-consuming to get access. I have to ride about 150 km to the port at tuesday evening to get some hours around midnight to make changes.
>
> Please excuse my english. I hope, someone can give me some hints to understand and solve the problem.
> Ha-Jo
It seems like there is a memory leak due to queue not being emptied or
initialized. make sure that you initialize the queue first, use it in
the loop and delete the queue before quitting the program. If
synchronization is not important, try using shift registers or global
variables. hope it helps.