12-25-2012 08:13 PM
My program is whole in a while loop. Once it runs, it will use kinect to keep acquire my head position data, so it will generate a position once a time. I want to attain 5 positions, and use it to calculate 3 velocity and 2 acceleration. How do I get 5 once while it generate 1 once time?
Solved! Go to Solution.
12-26-2012 12:55 PM
If your received data is brought to the edge of the while loop, and you right click where that wire exits the while loop, you can select "Enable Indexing" which will produce an array of the received data as big as the number of times through the loop. Alternatively, check the "Help:FInd Examples" for "Producer/Consumer", which will allow your receiving loop (producer) to get data and send it to a processing loop (consumer).
12-27-2012 07:40 PM
Thanks. I m using the producer consumer pattern. But what I get in consumer loop is still a real-time position value. So how to get 5 positions in consumer loop?
12-27-2012 08:37 PM
And I have already tried 'flush queue' & 'get queue statues', and this 2 all give me empty array.
12-27-2012 11:56 PM
12-28-2012 08:05 AM
Can you post the code you have created so that we can see where you are heading?
01-02-2013 03:53 AM
I have used the first way to solve the problem. Thanks!