Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Retrigger Analog Input, M Series, Daqmx Base

I am using an M series 6281 DAQ board and would like to read 8
AIN channels.  I would like to read 1000 samples/channel.  I have a
15hz analog trigger at APFI0 to trigger the data acquisition.  Once
the trigger is received the data is read and analyzed and a DOUT is
performed then I wait for the next trigger.  This sequence is
performed about 200 times.

I am running OSX which unfortunately means I have to use Daqmx
Base.

The problem I am having, as described in many other posts, is that
in order to detect the analog trigger you must start and stop the
task for each iteration.  Starting and stopping the task slows the
acquisition time and triggers are missed.

The fix as I have read is to use a counter which is retriggerable as
the sample clock.  An example is provided for Daqmx (Multi-
Function-Ctr Retrigg Pulse Train Generation for AI Sample Clock.vi)
but is not available in Daqmx Base.

Looking into the code it appears that you cannot use an analog
trigger to trigger the counter in Daqmx Base.  Is there a way to get
around this?

I do not have an available AIN channel to read the trigger from and
do not want to perform continuous sampling.

Knowing how slow the Start and Stop Task functions are, has NI
attempted to trim the overhead in these functions so that only the
functions needed to rearm the trigger etc. are performed,
eliminating the need to Start and Stop the task within the loop?
Perhaps it could be called Rearm Trigger.  hummm…  Has anyone
out there done this?

My problem on the forefront appears to be a very basic DAQ
process (and it is with other vendor’s boards and software).  I am
attempting to replace a windows based PC using a Data Translation
board and LabView drivers with a Mac and an NI board.  My thought
was that since we use LabView exclusively that an NI DAQ board
was the obvious chose.  Because of Daqmx Base it is painfully
apparent that I made a mistake.

I have spent many many hours trying to hack through Daqmx Base.
The overhead in these vi’s is absurd (try searching for a text string
through a couple thousand loaded vi’s of which 100 are password
protected, it takes about 5 minuets and 100 clicks of the mouse!)
the documentation is poor (the RLP’s are a black box) and it limits
the functionality of the DAQ board.

With that said, I love programming in LabView and would hope that
NI would bring Daqmx Base for the Mac up to speed soon!

0 Kudos
Message 1 of 3
(3,765 Views)

Larry,

There should not be a problem using a counter to trigger your analog input, as KB 3LDIORN5 lets us know that pulse generation can be done. You can also use a digital channel as the counter trigger, therefore saving your analog channels for other measurements. You may also check that you have DAQmx Base 2.1, and not an earlier version.

David L.
Systems Engineering
National Instruments
0 Kudos
Message 2 of 3
(3,744 Views)

David,

Thanks for your response.

I guess I was looking for a little more information.  I am new to Daqmx Base and do not know all the ins and outs.  I was hoping you could point me towards an example in Daqmx Base that might help me out.

Let me clarify what I am trying to do.

I would like to acquire a finite amount of analog data triggered by an analog trigger which is connected to the APFI0 channel.

Using the Start and Stop Tasks within a loop cannot keep up with the triggers therefore I have read that I need to use a counter which is retriggerable to trigger the analog input.

I realize that counter pulse generation can be performed, what I can’t figure out is what I should be using as the source for the counter trigger.  It appears that the counter trigger has to be a digital trigger.  In some examples I have seen in Daqmx they are using the Analog Comparison Event or the AI Start Trigger as the counter trigger.  Looking at the trigger.vi it appears that they can not be used as a clock source in Base.

This post (http://forums.ni.com/ni/board/message?board.id=170&message.id=189503#M189503) suggests using a dummy analog output in order to initiate an Analog Comparison Event to trigger the counter.  But again the Analog Comparison Event is not an available trigger source for the counter in Daqmx Base.

It is also not clear how to program the counter to be retriggerable.  In Daqmx there are property nodes for this but not in Base.  I have not found any vi that sets the counter to be retriggerable.

You state that I could also use a digital channel as the counter trigger.  I am not sure if you are suggesting that I add hardware which would detect the analog trigger and output a digital trigger or if you’re suggesting some sort of routing scheme.

Thanks for your help.

Larry

 

0 Kudos
Message 3 of 3
(3,733 Views)