High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to Trigger AWG off Digitizer (CVI)

Solved!
Go to solution

I'm working with an NI Arbitrary Waveform Generator PXI-5421 and Digitizer PXI-5211.

Using CVI, I'd like to output a waveform with the AWG 500ms after the digitizer is triggered.

Is this possible?

 

To attempt to setup the triggers, I've used the following two functions:

  • niFgen_ConfigureDigitalEdgeStartTrigger (AWGHandle, "PXI_Trig1", NIFGEN_VAL_RISING_EDGE);
  • niScope_ConfigureTriggerOutput (ScopeHandle, NISCOPE_VAL_START_TRIGGER_EVENT, NISCOPE_VAL_RTSI_1);


However, I've been unsuccessful in getting the ARB to output anything once the scope is triggered.

Am I missing any crucial steps or is this something that can't be done in the manner in which I am attempting?

 

Thanks for your help. 🙂

0 Kudos
Message 1 of 6
(7,114 Views)

Hello,

 

I believe that the niScope_ConfigureTriggerOutput() function is obsolete and likely does not work on your digitizer. Also, what digitizer is it that you have? Did you mean a PXI-5112? Instead of using that function to output your start trigger event, I would use the niScope_ExportSignal() function. This function essentially works the same way but you can generate signals based from more types of triggers.

 

Chris W

0 Kudos
Message 2 of 6
(7,080 Views)

Hi Chris,

 

Thanks for the reply.

 

I had a dyslexic moment -- my digitizer is actually the PXI-5122 🙂

I will give the niScope_ExportSignal() function a try.

 

Thanks again!

0 Kudos
Message 3 of 6
(7,078 Views)

Hmmm, still no luck.  Maybe I'm screwing up something with the setup?

I've tried to link them on several different lines (RTSI's, PFI's, PXI Star) with no results.

 

I've attached a small program I created to try and get this working.

 

0 Kudos
Message 4 of 6
(7,073 Views)
Solution
Accepted by topic author HotDogWater

Hello,

 

I think I see the problem. What it appears is that you're configuring your digitizer and fgen properly if they were going to be run separately, except for one thing. In this section:

 

////    Config Digitizer    ////

 ....

//    Configure output trig for Digitizer to trigger AWG
    error |= niScope_ExportSignal (ScopeHandle, NISCOPE_VAL_START_TRIGGER, "", NISCOPE_VAL_RTSI_0);

 

you export the start trigger, which is actually sent immediately once you call the niScope_InitiateAcquisition() function. All of this is done before you configure your AWG, so the start trigger is already being sent before you call the niScope_InitiateGeneration() for the AWG. Also, I'm assuming that you actually want to trigger off of the reference trigger that you are configuring with your call of the niScope_ConfigureTriggerEdge() function. I have attached an image of the help file for that function.

 

There are two things you need to do to fix this.

 

1. You need to change this line: //    Configure output trig for Digitizer to trigger AWG
    error |= niScope_ExportSignal (ScopeHandle, NISCOPE_VAL_START_TRIGGER, "", NISCOPE_VAL_RTSI_0);

 

to export the reference trigger instead: //    Configure output trig for Digitizer to trigger AWG
    error |= niScope_ExportSignal (ScopeHandle, NISCOPE_VAL_REF_TRIGGER, "", NISCOPE_VAL_RTSI_0);

 

2. Also, you should move the niScope_InitiateAcquisition() function to be called after the niFgen_InitiateGeneration() function:

 

"....

 

//    Enable AWG output
    error |= niFgen_ConfigureOutputEnabled (AWGHandle, "0", VI_TRUE);

    //    Arm output
    error |= niFgen_InitiateGeneration (AWGHandle);

 

//    Begin digitizer acquisition
    error |= niScope_InitiateAcquisition (ScopeHandle); "

 

I think that should take care of it.

 

Chris W

Message Edited by Chris W. on 04-15-2009 03:25 PM
Message 5 of 6
(7,055 Views)

Chris,

 

That worked like a charm.

Thanks!

0 Kudos
Message 6 of 6
(7,051 Views)