From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daq assistant precision issue

Solved!
Go to solution

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

0 Kudos
Message 1 of 10
(2,864 Views)
Solution
Accepted by topic author riemer.j

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 10
(2,861 Views)

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?

 

 

0 Kudos
Message 3 of 10
(2,855 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 10
(2,844 Views)

Alright, Thanks a lot. Now theoretically speaking, what equipment/OS would I need to use to get the precise values that I want?

0 Kudos
Message 5 of 10
(2,824 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 10
(2,821 Views)

@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.


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 10
(2,813 Views)

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.

0 Kudos
Message 8 of 10
(2,807 Views)

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.

0 Kudos
Message 9 of 10
(2,759 Views)

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.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 10
(2,748 Views)