From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

data-acquisition with NI 6036E DAQ card & GPIB using an external trigger

Hi all,

I hope somebody could give me some help with the following and answer some questions:

Simple system description:

Labview 6.1
PCI-GPIB card
6036E DAQ card

In my system, I am using an external analog trigger signal (A) for continuous data-acquisition. Characteristics of the analog trigger signal (A) are: ~40 Hz, signal height +1.48V, triggered by rising edge (the analog trigger signal (A) could be changed to a TTL signal). Each data-acquisition is done within ~1.0 ms after the rising edge of the trigger pulse. The timing of the data-acquisition and analyzing procedure is controlled by execution in a sequence structure placed in a loop.

Now, I connected a power meter to the system, to measure the laser power during the data-acquisition. The power meter has two options to provide the laser power data:

a) via analog signal output (voltage corresponds to laser power in watts)
b) via GPIB (direct output reading of laser power in watts).

Problem:
During a certain point in my data-acquisition sequence structure (defined by a frame), I want to use the next occuring analog trigger signal (A) to acquire 1 value from the power meter.

How do I do this in Labview programming for the following two situations?

a) If I connect the analog output from the power meter to an analog input channel of the 6036E DAQ card. The analog trigger (A) would be connected to a second analog input channel (In case the analog trigger signal (A) is changed to a TTL signal it would be connected to the PFI0/Trig input pin on the DAQ card).

b) If I use the GPIB connection of the power meter. The analog trigger (A) would be connected to a second analog input channel (In case the analog trigger signal (A) is changed to a TTL signal it would be connected to the PFI0/Trig input pin on the DAQ card).


An other possibility would be to trigger the power meter directly, so it outputs constantly power meter values at ~40 Hz. How could I than acquire 1 power meter value (at a certain time im my sequence structure) via analog input at DAQ card or GPIB?

Additional questions:
How do I configure the PFI0/Trig pin on the 6036E DAQ board individually as an INPUT?

How do I use an analog trigger signal (A) as counting signal for a loop, or as an activation signal for a sequence structure which includes GPIB commands?



It would be very nice if somebody could give me some help.

Kind regards,

beam
0 Kudos
Message 1 of 9
(3,884 Views)
Hi beam,

I just want to verify that I understand your situation correctly:
An external trigger signal (A) is wired to one of your input channels (e.g. CH0) to trigger data acquisition of a second channel (e.g. CH1). Your power meter is connected to an analog input channel, which you would like to trigger with a certain rising edge at some of your sequence structure.

Problem:
During a certain point in my data-acquisition sequence structure (defined by a frame), I want to use the next occuring analog trigger signal (A) to acquire 1 value from the power meter.

How do I do this in Labview programming for the following two situations?

a) If I connect the analog output from the power meter to an analog input channel of the 6036E DAQ card. The analog trigger (A) would be connected to a second analog input channel (In case the analog trigger signal (A) is changed to a TTL signal it would be connected to the PFI0/Trig input pin on the DAQ card).

If a task has been configured to acquire signal from one analog channel, it's not possible to run a second analog input task or to add a second channel on the fly. You had mentioned that it's possible to read from the instrument through GPIB. Is it possible to perform a software trigger such that at a certain frame of your structure, when the trigger signal A reaches voltage "x", a GPIB command is written to your power meter to query a measurement reading?

Additional questions:
How do I configure the PFI0/Trig pin on the 6036E DAQ board individually as an INPUT?
You do not need to explicitly configure the PFI0 line as an input. If you want to use it as an input such that it acts as an analog trigger, simply wire the trigger signal to this pin. When configuring the trigger in your software, specify PFI0 as the trigger source.

How do I use an analog trigger signal (A) as counting signal for a loop, or as an activation signal for a sequence structure which includes GPIB commands?
You can try using the Limit VI to find out when the trigger signal reaches a certain level, and count how many times this level is reached. Similarly, you can use this as the condition to execute GPIB commands.

Hope this helps,
Lesley
Message 2 of 9
(3,865 Views)
Dear Lesley,

thank you very much for your help! Yes, I think you understood my situation quite well. You wrote:

"If a task has been configured to acquire signal from one analog channel, it's not possible to run a second analog input task or to add a second channel on the fly. You had mentioned that it's possible to read from the instrument through GPIB. Is it possible to perform a software trigger such that at a certain frame of your structure, when the trigger signal A reaches voltage "x", a GPIB command is written to your power meter to query a measurement reading?"

Yes, that should be possible, because the power meter has also a TTL trigger input (the delay from the trigger input going active to start the A/D conversion is <80 micro-seconds. Remember, after the 6036DAQ card receives the analog trigger signal A, I have only ~1 ms to aquire 1 data point from the power meter. If I have than a software trigger from my 6036DAQ card back to my power meter to start the GPIB sequence - can LabVIEW handle these short times? Are there some programming examples for this kind of stuff available?

Additionally, what do you mean with: "....it's not possible to run a second analog input task or to add a second channel on the fly."?
I have only 1 analog signal from the power meter and 1 analog trigger signal A (can be changed to TTL) in my whole system. Additionlly, I have a anolog output channel which controls a laser. All other data-acquisition and instrument controlling is done via GPIB.

Furthermore, what should I do if at the certain point in my data-acquisition sequence structure (defined by a frame), I want to use ONLY the next 65 analog trigger signals (A) from this point on, to acquire 65 values from the power meter.

Should I do this in a loop with the Limit VI? Could somebody explain this to me?


Thank you very much for all your help!!

beam
0 Kudos
Message 3 of 9
(3,861 Views)
Hi beam,

Thanks for the clarification. I was under the impression that you're acquiring one analog signal, one trigger signal (A), and in ADDITION to these two, a power reading from the GPIB meter. However, after reading your second response, I understand that the signal A is used to trigger reading from the power meter only. Please ignore my earlier statement about adding an analog channel to the task.

In this case, you should be able to use hardware trigger to get better timing. You can configure an analog input task with analog trigger. I'm assuming you will need multiple triggered analog input readings, hence you would need to configure an analog task with multiple triggers. Analog operations are not retriggerable, but you can try the following work arounds:

1. Call AI Start multiple times. This method requires some addition time in between acquisitions to reconfigure the task (see "Retriggerable AI using Loop example).
2. Use a retriggerable pulse train as the sample clock source of your analog input task. However, since analog triggering is not supported with the NI-STC counter chip (used in E Series), you would need to use a TLL signal. Regardless of this situation, I would recommend using a digital edge trigger over analog trigger (see "Retriggerable AI using Ctr example).

If you want to use 65 triggers, simply replace the while loop with a for loop, configured to iterate the read 65 times.

Apologies about the earlier confusion. I hope this helps.

Thanks,
Lesley
Message 4 of 9
(3,848 Views)
Retriggerable AI Using Ctr exmaple:
Message 5 of 9
(3,845 Views)
Dear Lesley,

thank you very much for your reply!

Could you tell me where I can find the two examples you attached to your previous message for LabVIEW 6.1?


Kind regards,

beam
0 Kudos
Message 6 of 9
(3,835 Views)
Hi beam,

Unfortunately, I was not able to get the code for LV6.1. If you're using the DAQmx driver, I've taken a snapshot of the code which you can use as a starting point.

If you're using the Traditional DAQ driver, you can try this example program:

Generating a Retriggerable Pulse from an Analog Input Signal


Thanks,
Lesley
Message 7 of 9
(3,803 Views)
Message 8 of 9
(3,802 Views)
You may find this utility helpful in setting up your timing and triggering application:
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=F4023DE6E9FD4F39E0340003BA7CCD71
0 Kudos
Message 9 of 9
(3,665 Views)