Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

5122 Digitizer and 5412 Waveform Generator synchronization problem

Hi,
I am using 5412 Arbitrary Waveform Generator (AWG) to produce a waveform. The output of the AWG is connected to the input of the 5122 Digitizer for control purposes. Both AWG and Digitizer start by the same trigger produced by a timing card in the same PXI module.

The problem is that AWG always starts ~40 waveform periods after the start of the Digitizer according to the waveform the Digitizer acquires. I tried different output rates and different number of waveform samples but still AWG lacks the same 40 waveform periods. What can the possible reasons for such a behavior be?

Thanks in advance.



0 Kudos
Message 1 of 10
(5,169 Views)
Update:
"waveform period" = 1/"sample rate of the waveform"
 
If for example AWG produces waveform points each 1 micro second than Digitizer starts ~40 micro seconds erarlier than AWG starts to generate the waveform.
If AWG produces waveform points each 100 micro seconds than Digitizer starts ~40*100 = 4000 micro seconds erarlier than AWG starts to generate the waveform.


Message Edited by ampm on 01-03-2007 09:02 AM

0 Kudos
Message 2 of 10
(5,145 Views)
Hi ampm,

There are a couple of things we could look into,

- We need to make sure that the pretrigger samples for the digitizer is set to zero.

- The reference position for the acquisition is set to zero.

You can set the reference position to zero by placing a property node (anywhere in the acquisition sequence before the initiate is fine) and selecting Horizontal -> Reference Position.

You might notice some jitter but definitely should not be seeing a 40 waveform period offset.

If setting the property node and the trigger VIs does not work for you, you could post the VI and I could take a look.

Cheers
Malay Duggar
NI
0 Kudos
Message 3 of 10
(5,117 Views)

Dear Malay Duggar,

Thanks for your reply!
 
I had the reference position for the acquisition set to 0 (in "niScope Configure Horizontal Timing ") before. I also added the "Reference Position" property node as you said. This does not help. The AWG is still delayed by the same 40 samples... I can not find how to set the number of pretrigger samples for the digitizer to zero...

I think the problem is not related to the pretrigger samples of the Digitizer because the delay of the AWG does not depend on the aquisition rate of the Digitizer. It depends on the sample rate of the AWG and is always ~ 40 AWG samples long.

I hope you can get a general idea about how I program AWG and Digitizer by taking a look at the couple of pictures attached.
Generally: I have a Stacked Sequence structure in which one of the frames contains tasks shown in the "frame 1" figure and the next frame ("frame 2" figure) contains a "for" cycle in which I start and stop tasks from the "frame 1" repeatedly. LabView code shown on the pictures is part of the larger application. I can extract the "trigger + digitizer + waveform generator" part of the application into a separate VI if you need. Hopefully the information from the screenshots will be useful as well and will help to resolve the problem in hand...

Thanks!


Message Edited by ampm on 01-03-2007 04:30 PM

Download All
0 Kudos
Message 4 of 10
(5,111 Views)
Hi,

I have put tasks for AWG, Digitizer and Trigger into a separate file (attached).
The situation is the same - AWG is delayed by ~40 samples.

Your suggestions and help would be much appreciated!

AWG uses waveform in the "wave 1.txt" file enclosed.
The important parameters (marked by red) are :
"Number of points to acquire" and "digitization time" for the Digitizer
and
"Sample Rate (Samp/s)" for the AWG

I am using PXI-6602 timing card, PXI-5412 waveform generator and PXI-5122 digitizer

Thanks!

Message Edited by ampm on 01-04-2007 12:34 PM

Message Edited by ampm on 01-04-2007 12:35 PM

Download All
0 Kudos
Message 5 of 10
(5,069 Views)
HI ampm,

I think we might have an explaination for our mystery delay. Page 14 of the specification sheet for the 5412 describes the Delay from Start Trigger to CH 0 Analog Output. The delay for the default state of the AWG is 43 sample clock periods + 110 nS, which looks like what you are seeing.

One way to get around this is to place a marker in your generation script. Then, export the marker onto a PXI backplane line and have the digitizer trigger of the marker. You might want to add some pretrigger samples to ensure that you don't loose any data.

You can look at the niFgen_Arb_Waveform_Marker_Example.vi example program at C:\Program Files\National Instruments\LabVIEW 8.2\examples\instr\niFgen

If you are using a fixed update rate then you can add a trigger delay for the digitizer.

Let me know if these work for you.

Cheers
Malay Duggar
NI
Message 6 of 10
(5,028 Views)
hi ampm,
 
I tried to open the VI, but it's not opening.
 
Can U pl repost it saved for LV 7.1 ?
 
I too am involved in a project having AWG, Scope & Counter.
 
Regards,
Partha.
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 7 of 10
(5,019 Views)

Hi 50ohm Terminator,

Thanks for the information! It definitely explains the situation I have.
RTFM is really helpful sometimes 🙂

What are the technical reasons and justifications for such (I would say unexpected) behavior of the 5412 (and I guess other)  signal generators?

Thanks for your help!

 

 

0 Kudos
Message 8 of 10
(5,011 Views)

Hi Partha,

Unfortunately I was not able to save the VI for LV 7.1 ...
I am using LV 8.2. It allows making "Save for Previos Version" conversion to LV 8.0 only and I get many error messages of the type
 "C:\Program Files\National Instruments\LabVIEW 8.2\instr.lib\niFgen\niFgen.llb\niFgen Abort Generation.vi
    Cannot save VI from a toolkit to a previous version of LabVIEW."
during the conversion.
Hopefully somebody else can help you to make the VI run with LV 7.1..

Best,
ampm

0 Kudos
Message 9 of 10
(5,005 Views)
Hi ampm,

I'm not sure as to the reason for the presence of a delay from start trigger to analog output for the signal generators.  My initial guess is that there is an expected propagation time inherent in the circuitry of the device.  If you notice from the specifications sheet, the delay actually increases with increasing interpolation factor values because additional processing must take place on the board.

Regards,
Andrew W
National Instruments
0 Kudos
Message 10 of 10
(4,974 Views)