LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquire data using message queues

Solved!
Go to solution

Hello!

I'm new to labview and I would like some help on a program I'm working on.

I need to acquire data from a queue. The queue has to push start or stop message/ audio and data should be acquired based on whether you receive start or stop. How do I go about this? Should I use a producer/consumer loop? 

After acquiring the data it will be analysed and logged. The idea is to get audio/vibration measurements. I'm using the queue to push start/stop temporarily. 

 

Thanks for your help!

Maddy

0 Kudos
Message 1 of 7
(3,914 Views)

Could you post your code so we can better understand your setup?  It sounds like you are already setup as a Producer/Consumer, which is why I am confused.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(3,900 Views)

Hi crossrulz

 

I don't have a code yet. Someone suggested using a producer/consumer loop. Do you have any example programs where you acquire data from a queue and log it. Sorry, I'm still figuring my way around LabVIEW.

 

Maddy

0 Kudos
Message 3 of 7
(3,892 Views)

Ok, let's take a step back.  What is the goal of your program?  Where is the data coming from?  How is the data being taken?  What format do you want the data saved?



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(3,882 Views)

The goal of the program is to collect audio samples and log them. I'd like to include a graph/waveform to show the samples as they are acquired.

The data is coming in through a Plc to a cdaq(9132) and it has to be logged in a spreadsheet. The parameters for the audio samples haven't been set yet. I need to set up the data acquisition part first and I'm having trouble with coming up with the code. 

 

Maddy

0 Kudos
Message 5 of 7
(3,876 Views)
Solution
Accepted by topic author Ben-Da-Nee

Are you using LabVIEW 2016?

 

If so, in this thread I shared what will be the new look of the producer/Consumer when making use of Channels.

 

 

 

I latter when on to share what a Channeled Message Handler

 

 

They may help you get started with the new channel wires and the design patterns that best meets your needs.

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 7
(3,871 Views)

Thank you Ben! I understood the part about using channels instead of queues, although the code itself was a little too complicated for me. I need to come up with a data acquisition vi whose input is in the form of a 2D floating point array. Could you help me with a simple frame? I have difficulty starting a code, I'm a hardware engineer and I'm really trying to get better at LV.

Thanks!

0 Kudos
Message 7 of 7
(3,786 Views)