06-12-2017 04:38 AM
Hello,
I would like to measure the sound pressure level from a variable speed compressor. Using DAQ NI9234, I measure the analog inputs Sound Pressure and Voltage (0 to 5 V) for compressor running speed. My labview program gives trouble, recording both the signals simultaneously. Can anyone help me with this?
Thanks,
Deepika
06-12-2017 07:14 AM - edited 06-12-2017 07:18 AM
Well, it can't help to have a Clear Task function for your Analog Read inside the While Loop. It is also a bit difficult to follow the logic of what you are trying to do within this loop. You might consider whether you can "encapsulate" functionality by using sub-VIs to do (some of) the Processing for you, but be sure to create an Icon, even if only a White Box with 3 short words ("Find Peak Freq" or "Get Total Power") to tell you what happens inside.
Bob Schor
P.S. -- oops, my first comment is wrong! The Clear Task is, in fact, outside the While loop, it only looked as though it was inside (because the Icon, and its attached wire, had been dragged back over the Loop boundary, or the boundary had been "stretched" too far to the right). Still, cleaning up the code (even a simple use of the "Broom" icon would help" would help.
06-12-2017 12:50 PM
Hallo Bob,
Thanks for your reply. I have just altered the original labview example VI - Sound Pressure Level Measurement (DAQmax). I have made the following additions into the example VI:
1. Analog output from the frequency converter 0 to 5 V is added as analog input (AI-Voltage) to NI
2. Opening a TDMS File
3. Writing the processed data (Leq, Peak, Exponential averaging) and measured voltage for each timestamp to a TDMS file again.
Thanks!