LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble configuring triggers with synchronized AWG and Digitizer

Hi,

I have been working for a few weeks in my project now, and I have a problem concerning the use of triggering options :

I am using a 5412 AWG and a 5142 Digitizer, in a PXI chassis. I have synchronized them using the Ni-TClk blocks provided in Labview. Now, let me explain what I am trying to do.

I need to make sure that the data I will record with the digitizer will be exactly aligned with the start of the sequence I am generating with the AWG. This acquisition is triggered either by the user (let's say a clic on a button) or by an external analog trigger.

I am trying to do that using 2 different kind of triggers : Arm reference trigger and reference trigger.

I am exporting a signal (Marker Event) from the 5412, on the RTSI0 line. This event happens each time the AWG starts to generate a sequence I have defined. I would like the digitizer to trigger off of this event, but only when a event occured first (the user trigger or the external analog trigger). My idea was to generate an Arm Reference Trigger with the "niScope send software trigger Edge", and to "plug" the reference (stop) Trigger on the RTSI0 line.

According to the SMC based digitizers acquisition engine state diagram, the digitizer should start in the idle mode when I initiate the acquisition (with Ni-TCLK Initiate), then it should wait for a start trigger (defined as IMMEDIATE) then it should wait for an ARM reference trigger (the one I want to send by software, or later by an external source). Finally it waits for the reference (stop) trigger which would be the marker event on the RTSI0 line.

According to what I see in my VI, the digitizer seems not to wait for the ARM reference trigger, I guess it directly sees the reference trigger on the RTSI0 line (which happens quite often) without waiting for me to allow it to look for it.


Do you see a mistake in my thinking here? Is it possible to do what I propose? I was thinking that the fact that I use the TClk synchronization might be a source of my problem with the triggers...


If it is not possible to do what I propose, I was also thinking to do what I need another way : Is it possible to somehow combine the 2 events I want to trigger off of? I mean, is it possible to create my own signal which would be high when the external trigger and the marker event are both High, and Low otherwise? And then, route this signal in one of the RTSI lines, which would be the source of a digital triggering...


I hope you will understand what I'm trying to do, and that you will be able to help me.

Thank you very much in advance,
Best regards
Antoine Benard

0 Kudos
Message 1 of 4
(3,224 Views)

Hi Antoine,

I have been reading you post for a while and I have concluded that it will help me a lot if I can have the code; if you were so kind to attach it to the discussion forum, I will be more than glad to try on my test machine.

I need to make sure that the data I will record with the digitizer will be exactly aligned with the start of the sequence I am generating with the AWG.”  In this case, and I will like to make sure I’m getting this correctly the 5412 is going to trigger the 5142 and either a user control or an external trigger is going to trigger the 5412. In this case the user control or the external trigger is going to start or stop de generation on the fgen and the fgen will control the scope.  So what we really need to do is figure a way of  using multiple triggers  with the  5412.

I was also thinking to do what I need another way: Is it possible to somehow combine the 2 events I want to trigger off of? You can handle this with another card. Using card with change detection, you can the FGEN trigger from multiple sources.

I will wait for you answer to make sure I got everything correctly

Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 2 of 4
(3,211 Views)
Hi Jaime,

Thank you for your interest in my problem. Actually I have managed to solve it a few hours after posting it in here.

The way my system works is the following : The 5412 generate a signal continuously, and the 5142 is being triggered by both the 5412 and an external trigger (or user control). Indeed, the thing I need to trigger is the acquisition, not the generation. My idea of using both arm ref trigger and ref trigger seems to work now. Somehow, I have had to configure the source of the arm ref trigger with a property node rather than with the niScope configure Trigger block.


Regards,
Antoine Benard
0 Kudos
Message 3 of 4
(3,207 Views)

Hi Antoine,

I’m glad you were able to find the problem and also great for you to help with the NI community by posting the results and the solution.  Even though we do have a couple of example in our developer zone where fgen and scopes are synchronizing; having one more would only make us a better example library. If you don’t mind posting your code even if it is not complete I will really appreciate it.

Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 4 of 4
(3,184 Views)