Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample Clock Timed Bipolar Analog Output Glitch Across Zero

Solved!
Go to solution

Using a PCI-6221, calling into the DAQmx 8.6 DLL with a standalone C application.  

 

I create and populate a buffer like so:

 

   float64 volts1[2048];

   for(int x = 0; x < 2048; x++) {

      volts1[x] = (-0.320) + (x * (0.640 / 2048));

   }

 

My task is created and started as follows:

 

   TaskHandle t; 

   DAQmxCreateTask("WaveTask", &t);

   DAQmxCreateAOVoltageChan(t, "PCI-6221/ao0", NULL, -5, 5, DAQmx_Val_Volts, NULL);

   DAQmxCfgSampClkTiming(t, NULL, 30000, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, 2048);

   DAQmxWriteAnalogF64(t, 2048, false, -1, DAQmx_Val_GroupByScanNumber, volts1, NULL, NULL);

   DAQmxStartTask(t);

   DAQmxWaitUntilTaskDone(t, -1);

   DAQmxStopTask(t);

   DAQmxClearTask(t);

 

The above, minus creating and clearing the task, is executed in an endless loop.  It generates a very lovely approximation of a rising sawtooth wave (see attached complete.png).

 

Unfortunately, when you zoom in on the time axis, a glitch becomes apparent at the point where the waveform crosses zero (see glitch.png).  The glitch, as shown, is about 80 mV in amplitude and  2.5 us (microseconds) in duration.

 

It's extremely short, but could be the source of trouble.  Is there anything that can be done programmatically to correct this, or does it look like a hardware issue?

 

Many thanks!

~Brian 

 

 

 

 

Download All
0 Kudos
Message 1 of 4
(3,300 Views)
Solution
Accepted by topic author pine_bh

If you check out the specifications for the PCI-6221, you'll see that there is a specification on page 3 for glitch energy on the analog output of this board.  This is a result of the DAC on the board and isn't something that can be corrected in software.  The specification is:

622x glitch energy.png

So what you are seeing is under the specification, so your board is actually performing better than spec.

 

Hope this clarifies,

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 2 of 4
(3,295 Views)
Thank you, Seth!  As an application developer, I'm rather new to data acquisition, and did not know the meaning of that spec.  You've cleared it up perfectly.
0 Kudos
Message 3 of 4
(3,276 Views)

Yeah, that one takes a bit to understand.  It's even more fun given that glitch energy is sometimes specced in terms of V/nS or something similar, so that you then have to know that you have to multiply the peak of the spike by the duration of the spike.

 

DAQ hardware specifications can be complex some times, so feel free to post here any time anything is unclear, we are here to clear them up.

 

Best of luck with your application,

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 4 of 4
(3,264 Views)