05-01-2017 07:26 AM
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
Solved! Go to Solution.
05-01-2017
07:42 AM
- last edited on
05-09-2025
03:22 PM
by
Content Cleaner
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.
05-01-2017 08:04 AM
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
05-01-2017 08:14 AM
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?
05-01-2017 08:21 AM
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
05-01-2017 08:30 AM
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
05-08-2017 05:44 AM
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!