kmagas,
Thanks for posting to the NI Forums. You are correct in placing a Start Task outside the loop; however, their can only be one timed analog input task on a single M-Series board running at a time. You can actually place all 28 channels in a single task. If you place all the channels in a single task you will also be able to read with a single read call rather than 28 different calls. The call will return samples for all the channels.
For example you can write:
DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai1","",DAQmx_Val_Cfg_Default,-10.0,10.0,DAQmx_Val_Volts,NULL));
and both channel 0 and 1 will be added to the task represented by taskHandle. This will allow both to be controlled by the same
DAQmxCfgSampClkTiming call.
As far as the speed is concerned it would be helpful to have a few more details about your application: Are you doing finite or continuous acquisition? At what rate are you looking to aquire? How are you performing the reads? Are you registering a callback function?
If you haven't yet you may also want to check out the CVI examples that are included with DAQmx. These can be found in c:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C
Hopefully this is helpful in getting started. Let me know if you need clarification or if you have additional questions.
Regards,
Neil Stoddard
Applications Engineer
National Instruments