Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Legacy DAQ and s-series 6111

Hi,

I need two simultaneous inputs of s-series 6111 card by using traditional legacy daq drivers. Actually, I make code with borland delfi. 
I know that better is to work with daqmx, but anyway, now I'm very curious about legacy case. After daq_rate -> scan_start over two input channels,
at highest frequencies (from nearly 1MHz towards maximal 5MHz) I see clear phase differences between two inputs signals,  though  for sake of clearance,
the same signal was connected to both inputs. It is the same, what I had with older - non- simultaneous acquisition card.
So, exact question would be: is it my mistake in legacy daq programming or it is impossible to do well with 6111S with legacy drivers at all.
Anyway I will learn daqmx, but until, I'm very curious where is my mistake.

thanks in advance,
Emilis

0 Kudos
Message 1 of 13
(4,407 Views)

Hello Emilis,

The channel to channel skew in a 6111 should be very small.  From your post I assume that you are sampling up to 5MHz, not sampling a signal (i.e. a sine wave) that is centered at 5MHz.  What type of skew are you seeing between the two channels?  How are you determining this?  Can you attach a screenshot of a graph showing the two channels skew?

Since there is only one timing engine, both ADCs should be converting off the same clock.  I do not see how your Traditional DAQ calls could be causing this skew.  I do not think there should be a difference between DAQmx and Traditional DAQ for channel to channel skew.  However to make sure you are handling arrays correctly you might want to take a look at a shipping example.  DAQmx shipping examples are typically installed C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C.

Finally, you mentioned that you are going to learn DAQmx.  If you are just starting an application I would highly recommend using DAQmx.  All of NIs new DAQ devices (i.e. Compact DAQ, M Series) only support DAQmx.  By programming in DAQmx for your S-Series device, for the most part you should be able to use the same software on an M-Series or any other DAQmx MIO device.

Regards,

Jesse O.
Application Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 2 of 13
(4,332 Views)
Thank You, Jesse

I keep maximal sampling rate, and only change frequency of sine wave. At low frequencies all seems okay.
We use NI products for noise measurements, simultaneous sampling is needed for correlation or
coherence spectrum measurements. I take both acquired signals and after some mathematical operations
have complex coherence spectrum, actually, complex spectrum can be plotted as complex spectra modulus, its real part, or its phase.
So I see peak in the modulus and real part spectra at frequency which is the same as sine wave frequency. If this frequency is low,
there is no peak in phase spectra, but, peak occurs and increases as sine wave frequency reaches near MHz range and above.
Mathematical part is proven many times, now only signal capture module is written for DAQ card.

Also now I think, that only frequency domain was looked for, so next time I should specially examine if skew is seen in time domain,
as frequency is high...  also its possible, (if non-simultaneous regime for 6111S is impossible, what sounds promising) that arrays handling can be made incorrectly.

I believe that tomorrow or so, after next my time in the laboratory, I will be able to post screens and I hopefully answer to problem.

Sincerely,

Emilis
0 Kudos
Message 3 of 13
(4,321 Views)
Emilis,

Great.  Once you have those screenshot and skew numbers we can look into this further.

Regards,

Jesse O.
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D
0 Kudos
Message 4 of 13
(4,304 Views)
Hi Jesse,

if You still have time:

I made quick Labview tool which confirmed that skew between channels is negligible i.e. it is a true simultaneous operation
please see pic1. jpg  There both time signals so similar, that one overlap another, and any red point can be seen rarely.

I did the the same with borland written program (using traditional daq) also. Please see pic2.  Things are different...

It means that I made mistake somewhere in code or just these old drivers work bad with S-series cards.
It is also interesting, that each channel frequency is two times smaller than sampling frequency I set.
For example, I write in code 5MHz, but each channel data is WRITTEN in buffer as it be only 2.5MHz.
Is it possible, that even that single clock forces both ADCs to convert voltage, but old driver writes only first channel's value, and
after the next clock pulse - second channel's value, as driver was 'used' to do with old multiplex cards?
Okay, maybe this is only my ravings...
Actual parameters I took: 
iStatus := SCAN_Start(1,@Buff, ulCount, iSampTB,uSampInt, iScanTB,uScanInt);
iSampTb and uSampInt -> 'Simultaneous sampling devices ignore parameters for sampTimebase and sampInterval. These devices sample all channels simultaneously. The acquisition rate is controlled by scanTimebase and scanInterval; therefore, a scanInterval value of 0 is not allowed.' so they are ignored

and

last two parameters I took as -1 (5Ghz clock) and interval 1. Another possibility was iScanTB= -3 (20MHz) and uScanInt=4. But in both cases (I'm not sure now that second worked) I got the same problem and two times smaller frequency.

Sincerely,

Emilis

  
Download All
0 Kudos
Message 5 of 13
(4,297 Views)
Hi again,

I use daq 7.0 version which comes with labview 7.0
Maybe I need upgrade of daq to 7.4.1 daq version, for I found table
http://www.ni.com/support/daq/versions_pci_pxi.htm
where is shown 7.4.1 version for 6111. Any way, I found in daq readme file another table,
where devices supported by legacy daq are listed and 6111 is among many. But there no
information about daq versions.

Regards,

Emilis


0 Kudos
Message 6 of 13
(4,251 Views)
Hello Emilis,

You can upgrade to Traditional DAQ 7.4.1.  You can always check which version of DAQ (DAQmx or Traditional DAQ) is supported by your device here.  You can also check which version DAQ are supported by your version of LabVIEW here.

There have been many fixes and additions to Traditional DAQ from 7.0 to 7.4.1.  I have a test system with 7.4.1 installed that does not show this problem in DAQmx (8.3.1) or Traditional DAQ in LabVIEW.  I will try some c code shortly. 

In the LabVIEW screenshot you posted that shows no skew, was it written with Traditional DAQ or DAQmx?

Regards,

Jesse O.
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D
0 Kudos
Message 7 of 13
(4,245 Views)
Hi Jesse,

In labview I just used  standart (high level )VIs such as 'AI Waveform Scan' which are shipped todether with labview
and resides in its function palette. I always thought that these VIs use daxmx drivers.
I'm very afraid if it is just stupit error in my code, but thar error should be very subtle for why I see signal, its normal power spectra and etc.
As I know, buffer is filled so that first number is  first value of ai0 channel, then next number is first value of second channel, then goes  second value of first channel and so on (arranged in columns array).  Type is well known for 12 bit ADC it is a  signet 16 bit integer.
So after I  upgrade to daq legacy 7.4.1 the only possibility I see in case of malfunction is a rewrite capture module in daqmx.

Main reason for me not to use labview (I usually use labview for quick and easy software development) in that concrete case, is that borland program is quite large  (2500 lines have only main unit) and I need write my own mathematical function (I want to know exactly what program do
and how, also VIs or any other IDE components not always have subtle things reseacher needs. In my opinion Labview includes very good library
of signal analysis and mathematical functions).

Sincerely,

Emilis

0 Kudos
Message 8 of 13
(4,233 Views)
Hello Emilis,

I put together some code and attached it below.  I have tested this on a 6110 which should be similar enough to your 6111.  I tested this example in Visual C++.  I built the exe and ran the command and directed the output to a file (i.e. SeriesDAQ >> out.txt).  I then took the output and graphed it in xls because it was easier.  I have attached my xls file below.

The data is still aligned in my Traditional DAQ C code.  Does this code work for you?

Regards,

Jesse O.
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D
Download All
0 Kudos
Message 9 of 13
(4,218 Views)
Hello Jesse,

yes, You got aligned data. You use synchronous input function. I asynchronous.
Next time in lab (it can last even week...but as I understand You will there and after) I will install any C++ IDE, adopt Your code, I look for results.
Before I should install legacy 7.4 (I still has hope:) ).

Sincerely,

Emilis


0 Kudos
Message 10 of 13
(4,215 Views)