Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

trigger

Hello,

I'm new to LabView, NI. So far, I've been going through the "getting started" book and parts of the measurment and user manual. Still, I struggle to do in my view something very simple...
Any advice is appreciated!

What I want to do:
I want to read four channels (0-10V). Besides recording the data of all four channels, I want to use one of the channeles to trigger the data aquisition (, analog trigger,rising slope). Moreover, data aquisition should start some samples before the actual trigger event.

I tried:
Firstly, I put all channels into one task. Next, I defined a trigger based on one channel to define the start of the data aquisition. So far so good--all worked as expected. Next I modified this initial setup, I tried to use the "reference trigger" as I want to record already some samples before the actual trigger value is reached (at least I read in the manual that I have to use this trigger type in such cases). Unfortunately, trying to run the code gives me an error message, which states that only one channel per task is allowed if I use the "reference trigger".

My question:
Why??? I checked over and over again the manuals but couldn't find any solution. Is triggering really so fancy that I cannot find a descent explenation?

My measurement equipment:
- multifunction DAQ (M-series)
- BNC-2110 board
- LabView 7.1

At the moment I'm just completely confused. I cannot believe that such very basic things seem to be so difficult.

Thank's very much for all of your suggestions!!
0 Kudos
Message 1 of 10
(4,703 Views)
I don't know "why", I presume it's a hardware limitation on the reference trigger. It is documented in the DAQmx help, though.

I believe the solution is to use the APFI0 (APFI1 if you have the right device) input instead of one of the sampled inputs. You can wire the same signal to both a ai input and to APFI0. Unfortunately, the APFI inputs have lower resolution than the analog inputs.

>My measurement equipment:
>- multifunction DAQ (M-series)
>- BNC-2110 board
>- LabView 7.1

Thank you for including some details on your set-up. It's surprising how often this information is left out, and a responder has to ask for it. I'd like to suggest a couple details you could include:

The exact DAQ device you're using (some M-series devices don't have analog triggering at all; that's the usual source of trouble).

The version number of DAQmx you're using.
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
Message 2 of 10
(4,693 Views)
I've attached a picture of the analog trigger circuitry so you can see how things differ when using an analog PFI pin as the trigger source versus an analog input channel.  The limitation of not being able to acquire multiple channels with an analog reference trigger when the trigger source is a channel is due to the multiplexing of the input channels.  As you can see from the picture, when triggering from a channel, the output of the PGIA (programmable gain instrumentation amplifier) is routed to the analog trigger comparator circuit.  If there are multiple channels in the acquisition, the input to the comparator circuit will change as the multiplexor in the front end switches through channels.  This is in effect means the trigger circuit sees the input from each channel in sequence rather than just a single channel.  This, in addition to noise generated from the multiplexor when switching channels, makes it impractical to acquire multiple channels while using one of the channels as the trigger source since you would almost certainly experience erroneous triggering.  When using APFI0, this restriction is lifted since the input signal to the comparator circuit remains constant regardless of the number of channels being acquired.
 
The advantage to using an analog channel versus APFI0 as the trigger source is that you can use the PGIA to perform some conditioning on the signal.  Specifically, you can apply gain, filtering if your board supports it, and various terminal configurations (e.g. differential, reference single ended, or non-reference single ended) to the signal.  If you use APFI0, the signal is always seen with a gain corresponding to +/- 10V range and a reference single ended terminal configuration.  Regardless of the trigger source, the resolution of the trigger circuit is always the same.  I hope this helps.
Message 3 of 10
(4,662 Views)
Reddog, I think you must have spent the weekend composing insightful explanations of NI hardware. Thanks for your hard work!
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 4 of 10
(4,640 Views)
Hello again,

Thank you both for your comments. For completion, I looked up the exact DAQ device and the DAQmx version:
M-series card: PCI-6251
DAQmx: version 8.0

Cheers
PhiB
0 Kudos
Message 5 of 10
(4,624 Views)
I guess Reddog answered your initial question, "why?" with his generalized description of how the hardware works.

This link:

http://digital.ni.com/public.nsf/websearch/E761255A5729CD2E862570310075A23A?OpenDocument

indicates that your 6251 does have analog trigger capability, answering my concern. I'm sure you already knew that 🙂
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 6 of 10
(4,605 Views)
So what is APFI0 referenced to? I seem to be getting eroneous triggers with my setup. (PCI6251 LV8) I have two differential analog inputs. I tied the high end of one to APFI0. Is this correct? Is APFI0 referenced to analog ground? Not sure how this works.
0 Kudos
Message 7 of 10
(4,552 Views)
According to the M-series help documentation, the APFI input goes straight into the analog input MUX, bypassing the analog input amplifier. Thus, it is referenced to analog ground, and lacks differential capability. If you have any significant common-mode signal you will be measuring the wrong signal.
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 8 of 10
(4,510 Views)
All your are confusing to our friends PhiB. He is having problem with "reference trigger". Furthermore, what you are saying is not true, because acquiring more than one signal in a task with trigger (posttrigger) is absolutely possible but it isn't with "reference trigger". WHY? you must ask this question. THERE ISN'T GOOD INFORMATION about this issue. The answer is "IT'S NOT possible", and the explanation given isn't correct. ¡PhiB must now be more confused than before!
0 Kudos
Message 9 of 10
(4,407 Views)
Hello CracKatoA,
 
First of all, thank you for contributing to my post. Although I'm not really sure if I understood all your comments, I want to sum up this thread by describing the solution to my problem--yes, my test installation works fine now.
 
After the suggestions by reddog and WM John W., I have been also in contact with our local NI support. It turned out that I do have to use the reference trigger. But because of some "labeling issues" (M-series board differs from older E-series boards, not updated documentation by NI), I must connect my triggering signal (using a split) to the "AO EXT REF" instead of the "PFI0/AI Start" port.
 
I hope this clarifies the problem.
0 Kudos
Message 10 of 10
(4,397 Views)