11-28-2011 04:47 PM
Hello everybody,
I was wandering If I can ask for a help with a VI(attached) that I inhereted but can't completely understand (and the original author can not be reached). Its a three level case-type structure, and the first two levels are trivial, three channels are defined(each connected to a microphone), feeded into spectrum analizer and the output is then transferred to the plotting VI. The last, third part, is the one that gives me a headache.
It starts from AI config and AI start, which have: channels, sample reate(I am using 64KHz with 32000 samples to read), # of buffer samples and # of buffers.
I can't seem to figure out the last two. If I am reading from three channels simultaneously do I need 3 buffers(one for each channel)? How the #of buffer samples is correctly choosen? In addition to that, whether I choose 3 channels or 1 channel and start to record data, I am always getting a three colomn in the output file, not sure why though.
The last piece of the puzzle is IA read, which is inside of the loop. My guess that it tries to read the stream of data that gets to the loop after each iteration. Would that be correct?
I hope my questions will not cause to much troubles. Thanks in advance!
Oleks
11-28-2011 06:20 PM
Sorry,
Forgot to add an attachment.
11-30-2011 09:59 AM
Good morning Oleks,
Your VI has custom SubVIs that are not attached, and I believe the general questions you are asking refer to functions in these subVIs.
Thanks,
Lisa
11-30-2011 12:39 PM
Hello Lisa,
Thank you for looking at my post! I guess this shows how much I know about Labview... I tried to separate whole file into two parts, hopefully it will show all details now. The first part, from what I understand, is just designed for data visualisation(it still not clear from the help which value is used to scale amplitude on the waveform graph, reference pressure of some sort?). The second part is the one I am trying to understand in details, and it contains components my original post was refferring to.
I am getting some more ideas about 2nd part now, it seems like it is dedicated to data recording, but I am still not sure how it is related to the original data, does it pass a scaled data to the file (for each microphone I scaled its output into PSI, by dividing on a scaling factor), does it keep the sampling rate I use for visualisation, and how channels related to that. This is probably some basic stuff but I can't seem to find a good explanation.
Do you have some ideas you can share with me?
Thanks in advance,
Olek
12-01-2011 01:09 PM
Hi Oleks,
Thanks for the update.
It looks like your Part 1 is viewing graphical data, but this data is not being recorded. You can autoscale or manually set your limits on the x and y-axes for viewing angles (right click on an axis and check/uncheck autoscale). In your part 2, you're doing data acquisition to save to a file, but this data is not being scaled. Your buffer samples is the number of scans retrieved from the buffer.
Since this program looks pretty simple overall, I would like to mention the differences between our NI-DAQ driver and NI-DAQmx driver to communicate to hardware. The newer DAQmx driver is a lot more user friendly, and the driver package ships with premade examples that function similarly to the program you have written. We also offer much better support for NI-DAQmx since most of the support engineers have more available resources for troubleshooting DAQmx compared to t-DAQ. In my personal experience, I think it's probably more easy to pick up DAQmx since a lot more configuration and timing/synchronization functions are done behind the scenes.
Please let me know if you have any additional questions!
Lisa