Prev: Handling windows messages within an event structure
Next: i2c help need with pull up resistor problem
From: AZH on 6 Aug 2008 12:40 Hi all, I am currently working on a project and required the use of queue. I have attached part of the project as attachment. In this program, I wish to to generate 20 IQ data and store them into the queue and then try to de-queue to see if I am able to get all 20 IQ data to display in the array. I need the IQ data to be in the arraY. I tried to run this program and it seen like it is not working. Can someone please take a look and tell me what has gone wrong. Your help will be appreciated!! Thanks. Zhi Hong Queue test program.vi: http://forums.ni.com/attachments/ni/170/347170/1/Queue test program.vi
From: yenknip on 6 Aug 2008 12:40 You have set the maximum queue size as 2, then you are attempting to enter 20 elements into the queue. Queues are indented for use to be used in parallel, rather than in series. What exactly are you trying to achieve? In your current set up, an array would be more appropriate.For more information on queues, you can look them up in the examples section under help.
From: VADave on 6 Aug 2008 13:10
Zhi The Queue was stuck because you set the Queue size to 2 but then tried to put 20 items on the Queue. Changing the Queue size to -1 (default) or 20 works. I am curious as to why you are placing twenty (20) items on the Queue but only removing two (2). You should flush the Queue on exiting to release the memory. |