LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to acquire a series of position data in a while loop which generate a position once a time in labview?

Solved!
Go to solution

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?

0 Kudos
Message 1 of 7
(2,735 Views)
Solution
Accepted by topic author 100148X

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).

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 7
(2,714 Views)

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?

0 Kudos
Message 3 of 7
(2,686 Views)

And I have already tried 'flush queue' & 'get queue statues', and this 2 all give me empty array.

0 Kudos
Message 4 of 7
(2,681 Views)
You don't understand the concept here. In the producer loop you will transfer the current reading from the kinect to the consumer loop. All your data processing and analysis takes place in the consumer loop.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 7
(2,670 Views)

Can you post the code you have created so that we can see where you are heading?

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 6 of 7
(2,654 Views)

I have used the first way to solve the problem. Thanks!

0 Kudos
Message 7 of 7
(2,625 Views)