07-07-2009 05:36 PM - edited 07-07-2009 05:44 PM
I have a trouble in calculating the delay just after trigger.
I used only two waveforms (sine and pulse) in script mode.
In way of solving other problem with phase matching, I intended to know the delay just after triggering.
According to 5421's manual, there is a inevitable delay just after receiving trigger signal in changing waveforms.
Scheme: Start trigger(trig0) -> #Sine1 generation--> Trigger (trig1) -> #Pulse1 --> Trigger (trig2) -> #Sine2.
Condition 1)Wave generation under Common 5421 Sample Rate: 7.945E+7 Hz in High resolution mode
Condition 2)Sine, 1.589 MHz, number of samples: 100 (Unit Number of cycles: 2)
Condition 3)Pusle, 125 kHz, number of samples: 6356 (Unit Number of cycles: 10)
Condition 4)If the digital filter factor=4 (63 waveforms of sample clock)
5)Estimate (let's call "start delay") due to start trigger(sec)?
=start delay= 63/7.945E7 + 1.1E-7 = 9.02952E-7 : 110 nsec indicated in the manual.
*) I observed this delay in oscilloscope.
Condition 6)The frequency of trigger from counter: 1 Hz (period: 1 sec)
7)Total number of sine waveforms (#sine) between trig0 and trig1?
=#sine1= (trigger period - start delay) / sine frequnecy = 1.588998565E+6
8)How many cycles(#Remained_Sine) are remained just after "trig1"
#Remained_Sine= Remainder(total number of sine waves, unit number of sines)
= Remainder(1.588998565E+6, 2) = 0.56521 #waves (trig1 delay corresponding to 3.55702E-7 sec)
9)When I compare the start delay and the waveform delay just after trig1,
start delay > waveform delay, therefore, the real delay (trig1 delay) after trig1 should be start delay.
*) I observed trig1 delay, Let's calculate pulse delay (just after trig2)
From modification of #7) and #8).
10)#pulse1=(trigger period-start delay)/ pulse frequency =1.249998871E+5
11)#Remained_pulse=Remainder(1.249998871E+5, 10)=9.88713 #waves(trig2 delay corresponding to 7.9097E-5. around 80 usec!!!!)
Conclusion: trig2 delay > start delay.
*****Question )My real observation in delay of trig2 is still the start delay (9.02952E-7). why?
labmaster.
07-10-2009 09:30 AM
Hey Labmaster,
I tried doing what you did, but what I got was totally different. In my case the card waits to complete the generation of the waveform and then starts generating new wfm after the trigger is received. I don't know how are you getting that, what driver version do you have. The driver I have is NI-Fgen 2.6 card I used was PXI-5421.
Lab
07-11-2009 12:07 AM
The same condition with me.
You have to know the delay is so varied depending on the waveforms you used.
Can you estimate the delay just after receiving the triggering signal Theoretically?
labmaster
07-11-2009 12:33 AM
lab_boy, can you estimate the delay after triggering in oscilloscope?
Tell me your experimental result.
07-13-2009 05:05 PM
Hey Labmaster,
Here is what I tried.
Sampling Freq; Fs = 79.45 MHz
Wfm1:
Number of points, N1 = 100
Number of cycles, n1 = 2
Freq, f1 = 1.589 MHz
Wfm2:
Number of points, N2 = 200
Number of cycles, n2 = 2
Freq, f2 = 794.5 MHz
Trigger = 1MHz,
Trig Delay td = 9.0295e-7 sec
Time b/w trig1 and trig2 = 1e-6
Time remaining after the trig2 come i.e tx = 1.1616e-6 sec
Total delay is tx + td = 2.0645e-6 (Theoritically)
I am receiving abt 2.2 usec abt 10% off.
Attached is the pic how I calculated mine.
Cheers
-lab
07-13-2009 05:07 PM
One more thing can you post your code. I am wondering how did you get your trigger delay to be so small. Just curious ! ! !
Thanks
-Lab
07-13-2009 06:29 PM
Thank you, lab_boy.
I will think about your experiment and post my code as soon as possible.
labmaster of lab_boy^^
07-14-2009 09:52 AM - edited 07-14-2009 09:56 AM
Lab_boy,
I am sending my code with these parameters.
I still watch the unreasonable delay in my AWG.
Please let me know your result with your specification of AWG with
software version?
labmaster.
07-17-2009 12:54 PM
Hey Labmaster,
I apologize for the delay in getting back. I didn't have the DAQ card hence could not reproduce your exact senario. But still I tried playing with FGEN Trigger, to me it seems like it works as stated in the user manual, rarely I get skewed results that may be because of jitter in trigger or the cables as they are not matched and are also of different lenght, but still haven't seen any huge problem with it.
Thanks
-Lab
07-17-2009 01:03 PM
Hey Lab_Boy,
Thanks for all your participation in working this issue out. I tested this out and this is what I got.
So here's what I found. The actual delay that happens between trigger and the start of the next waveform generation is purely driven by the trigger delay. The trigger delay that you see at the first trigger (your start trigger) occurs for every consecutive waveform generation, however, this delay is not seen at the transition from one waveform to the next.
The point is that if you receive a trigger and the time between that and the end of the current waveform is less than the trigger delay then that waveform will repeat one more time before switching to the next waveform. That means that the trigger must be received atleast *td* (trigger delay) before the end of that period of the waveform, or else the waveform will repeat one more time.
I have attached some images that I took when measuring this with the following parameters.
Sample rate of 5421= 79.45MS/s
Waveform 1 = sine wave where each period is 50 points, but the waveform is made up of 2 periods, therefore 100 points
Waveform 2 = square wave where each period is 100 points, but with 2 cycles, therefore 200 points total
I scoped the output so you can see the first two triggers and the waveforms that are corresponding.
We used a trigger frequency that was varying between 500kHz and 750kHz. At 726kHz trigger frequency with these parameters, we were right on the threshold of only outputting one cycle of the first waveform and then switching to the second. The images show this.
We measured the trigger delay to be 600ns with some slight clock jitter (could vary on the order of ns). The graph cursors show X = ticks of the acquisition signal where each tick = 20ns
We did not use digital filtering so the calculated td = 650ns (43*sample rate + 110ns).