03-26-2014 04:20 AM
Hello, dear fellas! Im having a huge misunderstanding with labview on sampling, tried to figure it out different ways but it wouldnt work, and it starting to feel like it works with specified parameters only once a week - on tuesdays.
So here is the the background: im a aquiring analog voltage from three sensors with my NI9205 and generating sine wave for a servovalve with a NI9269, the signals i am aquiring are being filtered, you can have a look at the .vi i've attached. so the aim is to pump water to a test rig, constantly change voltage in the servovalve with AO with a sine wave and collect pressure data, and since the opening/closure of a servovalve is related to a sine with obvious parameters, i need to collect the same parameters for the pressure data, the pressure changes as a sine also, so its amplitude mainly, so there it is, as you can see, the peak-to-peak amplitude measurement.
Now here is a problem: i cant test the amplitude measurement for i constantly get the 200279 error, which says i should either increase the buffer size (which i have done by the front panel control) or read data more frequently (which i have also done by changing the sample rate to a higher value). if you see something im doing wrong, or something that could be done and ive missed it, do please give me a tip.
I would also appreciate any help with amplitude measurement, for i have explored all the examples there were, such as amplitude spectrum, all the vis for measuring single tone amplitude and so on and so forth 🙂 but the amplitude measurement vi in attached code is the one im probably using as final, tho i only managed to test it with the AO signal, which is not a test at all, as you all know haha 🙂
Thank you all in advance 😉
03-31-2014 11:26 AM
Hey Pomplamoose!
You might want to change the polymorphic instance of your DAQmx Read VI from Nchannels 1Sample to Nchannels Nsamples.
Currently your program is only pulling one sample off of the buffer in each iteration of the while loop. So if your DAQ device is sampling at 1kHz, in one second there will be 1000 samples on the buffer, however depending on the speed of the while loop we are only pulling off a few samples per second(one per iteration.)
Changing to Nchannels Nsamples will give us the option to return ALL samples from the buffer, minimizing the risk of overflow.
Best Regards,
04-08-2014 02:18 AM
try this: