06-18-2014 08:12 AM
Hello all,
I am new to LabVIEW so this could very easily just be a simple problem. I apologize that the VI is a bit cluttered... The purpose of the program is to measure the voltage accross batteries in a circuit when a 5v pulse is provided. It does this and gives me almost the results I need, but all of the timing is a bit off. For instance, the graph connected to the data shows that the pulse starts around 100 ms, when I specified for 150ms... And even that moves around a little bit with each run. Usually not more that +/-5ms, but I feel that the equipment is definitely more precise than that. I have also noticed that it won't produce the pulse for 16ms as I requested. The shortest it seems to get is about 23ms, and again this moves around a bit with each run. The big thing here is that it isn't precise like I know it should be. I have looked into using the daqmx instead of the daq assistant, but it didn't seem to really make a difference. What could I be doing wrong or overlooking? I am using the NI 9264 to produce the signal and the 9205 to read it. Thanks in advance for the help!
Many thanks,
Bradley
Solved! Go to Solution.
06-18-2014 08:25 AM
Your problem is that you are relying on Windows timing. This is NEVER accurate. How accurate do you need the timing to be? You should setup the Analog Output task to be multiple points and supply a waveform for it to output instead of just setting it randomly in software.
06-18-2014 08:38 AM
That's pretty disappointing to hear... I would really like to have all of it within 1-3 ms if that is possible. It just needs to be consistent.
Ok, I'll test the waveform output. Is this the reason the wait time and pulse time are messed up?
06-18-2014 09:05 AM - edited 06-18-2014 09:05 AM
riemer.j wrote: Is this the reason the wait time and pulse time are messed up?
The software timing (relying on the Wait (ms) and Windows for your timing)? Yep.
But by using the waveform output for the analog output, you are not using the hardware clock in the DAQ. So it will be a lot more accurate.
06-18-2014 01:08 PM
Alright, Thanks a lot. Now theoretically speaking, what equipment/OS would I need to use to get the precise values that I want?
06-18-2014 01:36 PM
I'm pretty sure you can do this now. Like I said before, you need to build up the waveform that needs to be outputted by the analog output and write that to the AO task.
06-18-2014 02:18 PM
@riemer.j wrote:
Alright, Thanks a lot. Now theoretically speaking, what equipment/OS would I need to use to get the precise values that I want?
You are not likely to get there with the DAQ assistant. Period- (There are way too many implicit state transitions required to get the performance you want (See here for the wrap-your head with duct-tape details)
HOWEVER, if you right-click that DAQ assistant and select "Generate code" you will have something to start from. Create and commit your task before your main acquisition sequence loop. start your task in the main loop and destroy it at the end of the vi. See the example finder (Help>>Find examples) for better DAQmx task use using the DAQmx API calls.
06-18-2014 03:16 PM
I've tried a lot of different ways to use a waveform as the source for AO task, but I can's seem to get it to function right. I feel like I have the waveform doing what I want, but the data im reading from the AI task isn't acknowleding it as so. Could you maybe point me in the right direction in where to get started for it? Again, I'm new at this and don't exactly have all of the basics down yet. Thanks for helping me out so far.
06-19-2014 03:20 PM
Alright, I finally got it to work. After using a waveform for the AO and using strictly the hardware timing, my results are well within my needed range. Thanks.
06-19-2014 05:30 PM
I'm glad you got it working. By the way, what you desacribed was a wonderful description of jitter in a signal. Very accurate and thorough reporting. 🙂