05-06-2008 03:28 AM
05-07-2008 05:06 AM
Hi Biswa,
Odds are under DAQmx your not stopping the task after a read or write before re-enabling any triggers as noted in this KB:
http://digital.ni.com/public.nsf/allkb/BFCE83133C0ECAD786256E6000814B68?OpenDocument
All the best,
05-07-2008 08:14 AM
05-08-2008 02:46 AM
05-19-2008 09:53 AM
Hi Biswa,
I have a few remarks about the code as I cannot understand what you are trying to do.
1) You are creating two tasks on the left (namely Input_data, Output_data) and then you use a for loop to assign the channels. You do not need to create 4 separate tasks for the AI channels and in fact it will not work correctly the way you have implemented it. You need to specify the channels as Dev1/ai0:1:2:3 . Have a look at the examples on NI DAQmx on how to acquire data from multiple channels. It may be easier if you create the tasks in MAX ( by right-clicking on Data Neighbourhood). The benefit of creating the tasks in MAX is that you can specify the acquisition mode and triggering inside a configuration dialog box. I can't see where you specify how many samples to acquire in this VI. It is usually done in the DAQmx Timing VI.
2) I am trying to see if you are looking to do finite or continuous acquisition. If you are trying to do continuous acquisition, then you do not need to stop the task unless you want to terminate the program.
Regards,
KostasB
NIUK Applications Engineering