Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx digital waveform to double array

Hello,

 

I am working with a cDAQ-9174 to make a data aquisition and control system.  For the data acquisition, I am using the NI PLL vi's which take in a 2D array of doubles for the signal and reference.  My signal array is taken from a NI-9219 analolog inputwhich gives me the correct format.  My reference signal is a chopper that operates between 25-75 Hz (currently set to ~30) and generates a 5V TTL signal that is 1:1 for the chopper spacing.  If i try to wire this signal to an analog in on the 9219 the signal that is read is not clean (picture of signal taken is attached).  I assume this is due to innacuracies generated by using the high speed setting for the voltage acquisition.  Instead I am using the NI 9402 module to take in the signal, which gives me a clean digital waveform.  

 

My question is regarding how to convert the digital waveform to an array of doubles that the PLL algorithm will accept.  The sample clocks of the analog and digital input are set to be synchronous so the indicies of the two arrays should match and I need to keep this intact for the lockin to work.  What is the simplest way for me to get this clean square wave in the correct format to be read as a reference signal (meaning an array with double values of 0 or 5 only)?  A solution to either correct the input on the analog input channel (9219) or convert the data from the digital channel (9402) would be fine.

 

Thanks in advance for any assistance you can give me with this!  

0 Kudos
Message 1 of 5
(4,388 Views)

Which toolkit is this PLL.VI part of? I don't seem to have a PLL.vi in my typical LabVIEW products, so I can't speak directly to fitting data for that VI. If you can give more information about where it comes or what versions of the standard packages you have, it may help us find more information about that VI.

 

I have an idea for converting an ordinary waveform to digital or to an array. Is this what you are looking for?

 

Digitize Waveform to Numeric Array.png

 

- Regards,

Beutlich
0 Kudos
Message 2 of 5
(4,347 Views)

Thanks Big Cheese,

 

I will try out the digital data components and see if I can get it to work with the PLL VI.

 

If you are still curious I have a link to it here http://digital.ni.com/express.nsf/bycode/lockin?opendocument

 

By default it is sampling 2 analog channels, but I need one of those channels to come from my digital input.  In other words I need the square wave coming in on the digital channel to "look" like an analog square wave to the vi.  Additionally I need to keep the indecies of the two data sets matched for the lockin to work properly.

 

Thanks again for your assistance!  I will get back with any progress.

0 Kudos
Message 3 of 5
(4,335 Views)

I'm trying to do a similar operation in C# (Measurement Studio) given a digital waveform.  Any idea how this would be done?

 

Thanks

0 Kudos
Message 4 of 5
(3,862 Views)

Hi Qbits

 

I would try creating a new thread in the Measurement Studios community. The user's of that community will be more familiar with using Measurement Studio.

 

It will also be helpful to include additional information such as a detailed explanation of what you are trying to accomplish, why you are doing it, and what you have attempted so far.

 

Regards

Steven Gloor
Staff Customer Engineer - CTA, CLD
0 Kudos
Message 5 of 5
(3,834 Views)