High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I detect the external trigger in my Labview program?

I am a new user of NI product.  I use NI high-speed digitizer PXI-5114 and Labview 8.0 for acquiring the data.   I am using a pulse laser signal as external TRIG to trigger my data acquisition.  So every laser pulse can trigger a data acquisition, and now I can use the NI SCOPE Express in my Labview program to obtain these data.  But I also wish to get these external trigger signals in my Labview program, so I can know when these external trigger pulses happen, and then the program can start next operation after every trigger pulse.   I wish to know how I can detect these external triggers in my labview program.   Thanks a lot for your help.
0 Kudos
Message 1 of 8
(8,824 Views)

JHu,

Can you clarify a few things about your application/setup?

What do you mean by "next operation"?  Are you fetching another record or performing some software logic?

What other devices do you have in your PXI chassis?

Ryan N
National Instruments
Application Engineer
ni.com/support
0 Kudos
Message 2 of 8
(8,813 Views)

Hi, Ryan.

Thanks for your reply.  My experiment system is for measuring the spectroscopic data, and a wavelength-tunable laser is used here.  This tunable laser wavelength is controlled by a stepper motor, so that the lasing wavelength can be changed step by step under the control of the program.  I need to measure the total optical signal at each lasing wavelength.  In my experiment, after receiving a laser pulse which is used as the external trigger for digitizer, the program will perform some software logic, and then drive the stepper motor to change the wavelength of the tunable laser.  The stepper motor is connected to the computer with a NI USB-6008 DAQ pad, not through the PXI chassis.  So I wish to know when these external triggers happen in my program, and then the program can drive the stepper motor to next step.  

 

0 Kudos
Message 3 of 8
(8,805 Views)

JHu,

It sounds like you are using the trigger to activate the stepper motor and then acquire the data for that specific wavelength, and then this process continues.  Is that correct?

If so then you could use the State-Machine architecture to accomplish this.  Your first state would be to fetch the data using your 5114.  After the fetching is complete you would move to your second state, which would activate the stepper motor (using the 6008) and prepare the turntable laser for the next fetch.  This process would then continue for each wavelength you want to measure. 

Ryan N
National Instruments
Application Engineer
ni.com/support
0 Kudos
Message 4 of 8
(8,783 Views)
Hi, Ryan.
 
Yes, I am using the trigger to activate the stepper motor, and then acquire the data from the PMT for each specific wavelength.  According your suggestion, I tried the State-Machine architecture, it works.   But I wish to acquire the data exactly between the two triggers, and then calculate the definite integral of the signal on this time interval between two triggers.   Here I am using the NI SCOPE Express. vi in my program to acquire the data.  It seems the every fetching (the signal on each time interval) is only dependent on the record length which is not the same as the time interval between two triggers.  Am I wrong?  I am very new at Labview and NI Scope.  I want to know if there is any way to set the "stop trigger" in the NI SCOPE Express. vi, so I could get the complete signal between every two triggers.   I could not find this information in the NI SCOPE help, neither the guide of PXI 5114.  Do you have any suggestions on this problem?  Thank you for your help.
0 Kudos
Message 5 of 8
(8,766 Views)

Hi

Every record is related to a trigger, so something you can try is changing the reference position to 0%, this means that if your record length is 1000 samples you will get the 1000 samples after the trigger was received. As a consequence of this setup every record is going to be held between two triggers.


I hope it helps



Message Edited by Jaime F on 03-05-2008 10:52 AM
Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 6 of 8
(8,754 Views)

Hi, Jaime.

Thank you for your reply.  I tried changing the reference position to 0%, but I still don’t get it.  As you said, if my record length is 1000 samples I will get the 1000 samples after the trigger was received.  And for example, if my sample rate is 5M S/s, then every record would be the signals on the time interval from 0s to 0.0002s (1000 divided by 5M).  But the time between two triggers I sent to the digitizer is about 100 micro sec.  So this record is not the signals between two triggers.   I am not sure if my understanding is correct.  I just wish that when every time the VI is called, it can return a record which contains the signals on the time interval exactly between two triggers, and then I could directly calculate the definite integral of the signal on this time interval.  Can I perform this with NI SCOPE Express?   Thank you for your help.

0 Kudos
Message 7 of 8
(8,744 Views)

Hi,

Reading the value of the trigger is not an option for scopes; triggers are intended for synchronization so they can only tell the card when to read or to latch data but you cannot read in LabVIEW when they happen.

So you have to option: either you make the number of sample big enough to read 100 us of data or you read continuously in both channels, CH0 is your signal and your trigger instead of going to the TRIG input it will go to CH1. Then you can use post processing on both of the signals to do the integral between two risings edges of your signal in CH2.

I hope it helps

Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 8 of 8
(8,720 Views)