I am using an NI USB 6212 BNC DAQ in an attempt to monitor rise time. One channel (AO0) is being used to set a voltage while another channel (AI1) is monitoring. The problem I am having is that I am not able to see the rise time on AI1, only a jump to the specified voltage.
I started out modifying one of the Hardware examples. Initially, I connected the two channels via a BNC to BNC cable but thought I would do better with a simple circuit. I set up a resistor on a breadboard and connected my channels accordingly with alligator clips. Unfortunately, the result has remained the same and all I see is a jump from the previous voltage setting (usually 0) to the new one I entered with a an infinite slope (vertical line).
I'm pretty new to DAQ and plan on working with it for quite some time. The simple circuit will be expanded significantly into filter testing and other applications but for now I have to get the basics. I would very much appreciate any help you can offer; right now my thoughts are whether this could be a sampling issue (I set it as high at 400000) and whether I need to add in a cap to slow things down. I would very much like to get this working, however, so I could expand into looking at slew rates, overshoot, and filters.
I am attaching my VIs in hopes that they will help you decipher the problem. Have tried different combinations on DAQ Read and Write with single/multi channel and 1DB/Waveform, although I am pretty green on how they work, without any success.
Hoping to hear from you,
Solved! Go to Solution.
What kind of signal are you generating on the AO line? The default value in the Output array is a single element of zero. That does not exactly have a rise time!
To measure rise time the sampling rate on the AI line needs to be fast enough to get several samples during the rising portion of the waveform being measured.
The signal on the AO line will always be in steps from one value to the next. That is the way D/A converters work. The 6212 specifications indicate a slew rate of 5 V/us. If two successive samples were 0 and 10 V it would only take the output 4 us to move from one value to the other. Even samplng the AI line at 400 kS/s you would get at most one intermediate value and would not be able to measure the rise time.
Try putting an R-C circuit with a time constant on the order of milliseconds between the AO and AI connections. You should be able to measure that.
Thank you so much for your response! I set up the RC circuit like you suggest and am indeed able to see a discernable rise time.
To probe your wisdom a little deeper; could you give me any suggestions on how I could capture the parameters of the rise in LabVIEW? I can see it on the chart but I'd like to be able to view figures for the slew rate, overshoot, rise time, etc. in indicators and don't see relevant functions in the DAQ category.
Thanks again, hope to hear from you,
Edit: Took out stupid question I resolved with a simple internet search.
Some of the functions you want are in the Signal Processing >> Waveform Measurements palette. Transition Measurements.vi will do several of those measurements.
The issue of the rise time has definitely been resolved, however, I am trying to implement your transition measurements suggestion but having some difficulties.
When I add it into my VI, I am getting no readings whether I ask for a numerical display or a graph. Is this only intended for waveforms? I am trying to monitor slew rate for a DC circuit with little success so far.
Hope to hear from you,
You are getting no results because you are only feeding one pont at a time to Timing and Transition Measurements VI. In the lower loop you have the DAQmx Read set for 1Chan 1Samp. That means that each time it is called it returns one data point - the voltage on the input at that instant of time. What is the rise time of 1 Point?
You need to have multiple points for the measurements VI to work. You can do this two ways. One is to continue reading one point at a time and place the data in a array. When you have accumulated enough data, then send it to the measurements VI. The other way is to set the AI task to read multiple samples on each call. The default rate in your VI is 1000 samples per second. Reading 1000 samples at a time would produce 1 reading per second with 1 ms resolution. Then analyze that waveform.
Thank you for all the patient, helpful advice thus far. I hope you will bear with me for one more followup as I am having a bit of a tough time getting your suggestion to work.
When I try setting multiple samples and sending that to the Transition Measurements VI, I get a constantly changing indicator that jumps even when there is no change in the voltage level. I have gotten an indication of up to 9.XXX when the voltage was still set to zero and whenever I stop the VI from running, it settles on whatever number it was at during that sampling period. I understand that the problem is that it's taking the analysis for the instance and getting a new one each time it samples but I don't know how to set it that so it only aquires for the jump. The point of this particular VI is to get the slew rate and other transitional parameters for a step function but to keep monitoring the channel after it settles on the desired voltage.
When I try going the route of the array, everything works fine while the VI is running but afterwards I get an error that says "The amplitude of the waveform is zero so the histogram method cannot be used." This is stranger to me than the problem with multiple samples because I can clearly see the rise time in the chart watching the channel.
Thank you again for your patience, I hope to hear from you.
There are triggering options available with DAQmx. Which ones can be used depend on the DAQ device. I have not looked up your device to see what might be available. Look at the manuals and the help files for the DAQmx VIs. You may want to trigger on the step output of the AO line.
Your chart may be fooling you. The chart has an internal buffer which stores data. Replace the chart with a graph. Then you will see only the data which was acquired on that iteration. If you need to keep more data use a shift register.
Without seeing your VI and some actual data, it is difficult to provide specific suggestions.