02-28-2011 10:26 AM
Hello
I am trying to stream a FM channel of about KHz bandwidth from my PXI controller 8106 to a client PC using the Ethernet port of controller interface and the data is then demodulate (FM) By My client PC real time. I am Using SMTP library of NI for client server application's and 5142 as My RFSA
1-Server works fine. On my Client side I have a data receiving loop(which I have made Producer loop, SMTP data receiving loop) and I have Demodulator loop (which I have made consumer loop) which demodulates the FM signal.
2-Both works fine initially But after some time my Vi just got stuck(not stopped) I can see the CPU usage from task manager that I goes to "0" for labview process then it comes back to some 20% after few seconds.this situation is random till I have memory full error.
3-Also I got a memory full error after 5-10 mints have read few suggestion regarding memory full error like increasing Virtual memory/RAM and have done so but only difference it makes is that vi now gives error after Mints.Point to be noted is if I see in my producer/consumer ,enqueue/dequeue there are no elements in both the queues which I think so means that there is no burden on my memory But even then Memory full error comes Up (when the error is there even then the elements in enqueue/dequeue are "0") after I click the memory error pop up as OK the the VI is running fine in the back ground (acquisition and demodulation is still going on). What does it means?
As I can see the network utilization of My cable it is 0.5%(Mbps) for 1Gbps Ethernet cable which I think should be no problem.
03-01-2011 11:46 AM
Good day!
Could you provide a screenshot of the error that you are receiving? Thanks!
Regards,
Joe S.
03-02-2011 03:59 AM
Hello
Tnax for the reply I have attached the snaps of my front panel with error u can see that when it gives error there is only
one data elements in Data_Queue and "0" elements in Demod_queue . 2nd snap with front panel is when I pressed OK (the vi is not stopped but hanged and starts iteration from the same place where it is halted) Also I can see that my Digitizer memory backlog is not increasing then where is data going is it lost or what?.I have also attached my Block diagram for your kind suggestion if it has any discrepancy kindly inform.
03-02-2011
10:01 AM
- last edited on
04-26-2025
09:10 PM
by
Content Cleaner
Good morning,
You said that you received the memory error even when there were no elements in the queue. As a sidenote, what I noticed from the screenshot of your code is that you poll the queue status after the data loop enqueues the element, then again in your demodulation loop after you dequeue the element. Technically they are polling the same queue. When you get the queue status from the demodulation loop, it is after you have already removed an element from the queue.
One possibility is that you could have a memory leak in your program. You can try using the Desktop Execution Trace Toolkit to monitor your memory usage while running your program. If you have already purchased it, you can find it by going to Tools > Profile > Trace Execution and go from there. If you haven't already purchased it, you can find it at the link below and download a 30 day evaluation version of the software. Also attached is a tutorial for the toolkit to help get you started. Hope this helps!
Regards,
Joe S.
03-08-2011 03:12 AM
Hello
1-Tnx for reply you are absolutely right about the Queue status but I have actually a third loop for play back of FM signal this(FM demod Queue) was for it .
2- What my point was that if there are no elements in enqueue why does this error comes? Who is so memory hungry in my Vi and why it does not show in Task manager's page file usage(PF) that they are about to Blow Off.?
3-Never the less I have worked on your suggestion of Labview Desktop Execution Trace Tool kit But what happens this time is my Vi for data acquisition is running fine and THIS (LDETTK) gives the error "not enough memory to complete this operation" This (LDETTK) runs not more than 20sec and gives following error snaps attached.
4-On the other hand the FM demod Vi runs fine but after 5-6 hours it also gives the same error we are discussing previously. I have also run memory.llb from example finder while execution my Vi consumes about 10MB of memory
anyone have any other tools to monitor the memory manager Kindly answer point by point
Regards
03-08-2011 10:58 AM
Good morning,
The memory error you are receiving is not necessarily related to the number of elements in the queue. There are a lot of things that LabView is doing before and after the queue comes into play.
I have a few more questions. Have you seen this error occur while running any other program or VI on your computer? Have you tried running this VI on a different computer? You mentioned the "FM Demod VI", which VI are you referring to?
One option to see how LabView is using memory is to use the Show Buffer Allocations tool. This can be found under Tools >> Profile >> Show Buffer Allocations. This tool shows where LabView makes copies of elements in the buffer, and further details can be found in LabView help. Use this to check what LabView is doing with the memory. Also you can try using other performance monitoring tools besides the task manager such as Performance Monitor (found in Control Panel >> Administrative Tools) or Perfmon (found online).
I noticed there were some disabled structures in your code. If those aren't important to your program, have you tried running the code with them removed? Also, you can try running the program with the consumer loop not demodulating, perhaps just displaying the data on an indicator and see if the memory error still happens.
If none of these options provide any help, you can provide the section of your code that reproduces this memory error and I will take a look at it on my own. Hope this helps!
Regards,
Joe S.
03-16-2011 04:11 AM
Hello
i have been working with the performance tool Of windows i am here making an attachments of my %age page usage for labview , virtual memory for labview process and task bar memory over flow status.I have also attached the VI of mine, which actually works for longer time if i increase the RAM and Virtual memory But i want this application to run 24 hours (and might be 7 days a week) but it gives error after 12 hours .Error is mostly random u dont Know when it will come up again after u have clicked Ok to memory error 1st. I am runing my client code on DELL PC optiplex 755 Windows XP Quad core processor with 4GB of RAM and 5GB of Pagefile size.
2- server Vi is just to give an idea how i am approching my task. u might not be able to hear the FM channel clearly.
3- Another Issue which i have posted in my first post is still not addressd(snaps Vi hangs attached) that Client VI hangs for about 5-10 seconds .As i can see CPU usage in task manager goes to Zero but memory is occupied. Also my server backlok memory increases.After 5-10 seconds it runs again but for that 5-10 sec i have lost my data.As i am listening the FM channel i can feel the difference
Regards.
03-16-2011 07:50 AM
Hi Madd,
I would love to play along but laking images of the code, I am in the dark. If you posted some screen shots of the code to go with your discusion, I and others may be able to add to the discusion*.
Otherwise I will watch for a post mortem summary,
Ben
* donw loading zips unzipping transfering to a machine with the same version of LV inspecting the code... way too much for me to squeeze during breaks.
03-17-2011 12:29 AM
Hi
here u go no zip , no downlaod, no conversion, . . . . . .
03-17-2011 07:05 AM
Without spending a lot of time looking at it, I'll throw out some ideas and questions.
1) If this all ran fine, what is the throughput in BITS/second you need to keep this connectiona alive and well?
2) WHat is your network topology its speed or tried a direct connect via a cross-over cable?
3) Try commenting out the memory hungry stuff or replacing wiht constants (specificall yhe flaten to string looks like a good candidate to attack).
4) Windows is a strange animal to tame. Review the notes I posted in post # 7 of this thread to shut-dwon or minimize interuptions of your code.
5) Can you throttle that bottom loop? It looks like it spins as fast as the CPU will allow.
6) When the app is hanging, what is the top CPU user (under Windows Task manager?)
7) The "Out of Memory" of memory error does not mean that all memory is filled although full memory can result in that error message. What that message really means is "LabVIEW attempted to allocate a contiguous block of memory but failed." LV only works with contiguous memory blocks so fragmented memory could result in that error. Memory fragmentation results from many reapeated allocations. The first sign that I look for while developing is my app using more an more memory (as shown by the Windos Task manager). Ideally your app should wake up allocate and reuse all and sit on a fixed memory size. THere are many threads that will talk about re-using memory.
😎 For us to make progress on your app I ureg you to break it down into to smaller parts that each do a portion of the big goal and analyze the hell out of each section to see which parts (plural) are acting up.
9) In the end I would not be suprised if the culprit ends up being getting the data on to and of of the wire since that is a natuarl bottleneck that can't be avoided (you would not entertain switch to SCRAMNet refelctive emory would you? ... that was a joke...).
10) Again that flatten to string is screaming at me. It was the Flatten to String that prevented me from using teh early non-polymorphic queues since the flatten to string was a pig.
SO that is all that I can say without actually working. Thanks for sharing the pictures. Please keep us updated. It is only a matter of time until I will be looking at the same issue myself.
Take care,
Ben