Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Help requested using external sample triggering

I'm using an AT-MIO-16DE-10 and have assigned PFI2 as the external trigger input [Select_Signal (AT_MIO, ND_IN_CONVERT, ND_PFI_2, ND_LOW_TO_HIGH);]. My source is a peak-held signal which can vary between 0 and 5v (hold time is 80 uS after the trigger signal) and repeats at a rate of 430Hz. I'm using DAQ_Op to synchronously acquire the signal peaks followed by DAQ_VScale to convert them to a voltage level.
My problem is this: instead of digitizing the level of the signal at the trigger, the system seems to be returning the mean value of the signal as a whole. In the example described here, the signal is ~ 4v for ~90 uS and 0v for the remaining 233 uS. Taking 10 samples using the DAQ_Op, DAQ_VScale sequence retur
ns ~1.5v for each sample and 1.5 happens to be the time averaged value for the signal (4*(90/233)).
Does anybody out there in NI-land have a clue as to why this is happening? (I'm developing my app in CVI.I've attachecd two files, showing the input signal and a code snippet. This message says the snippet is an executable, but it's just a c file.)
Thanks in advance for all your help.
Jesse Evans
Download All
0 Kudos
Message 1 of 4
(2,651 Views)
Hello jevans,

Have you tried using a similar shipping example program just to try things out? I did look over your code and I do have a few comments/questions/clarifications. It looks like you have the CONVERT clock as an input on PFI2 and DAQ_Config() is set up for a software start trigger with an external sample clock. I think you are calling this external signal going into PFI2 the trigger, but it is actually the CONVERT/sample clock. I believe you are just taking one sample per trigger. I think you are intending to take 10 samples per trigger.

In fact, I think you'll see much different behavior if you just reverse the 0, and 1 parameters in your DAQ_Config() call.

DAQ_Config (AT_MIO, 1, 0);

Also, you could delete the Select_Signal() statement. Y
ou actually want an interal CONVERT clock. Then apply your trigger signal to PFI0 as that is the default.

Now, you should also be aware that you may only have one trigger per DAQ_Op call. After that, you will need to reconfigure to prepare for the next trigger. This may not be a problem if your program is fast enough to keep up with the triggers however. If not, there is another method you can use that will basically use a counter to gate the sample clock.

Anyway, I hope this hasn't been too wordy.

Russell
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 4
(2,651 Views)
This is same question as "Help requested using AT-MIO-16DE-10 (samples are being averaged)" (reworded subject line to clarify the issue). Further discussion activity will proceed in that thread.

Jesse
0 Kudos
Message 3 of 4
(2,651 Views)
Jesse, I just wanted to let you know that I still intend to respond to your latest post. I will write you back on Monday.

Russell
0 Kudos
Message 4 of 4
(2,651 Views)