Hello Vivek,
The last error you mentioned is caused because your computer is not
able to read one sample at a time fast enough. For example if your
computer is capable of running that acquisition loop 500 times a
second, but you tell the hardware to acquire at 1000 Hz you will get
this error. You need to make sure your loop runs faster than your
acquisition. To make sure the example runs you can decrease your
acquisition rate in the DAQ Assistant to something much smaller.
Alternatively, you can use one sample on demand or buffer your input
with N Samples or Continuous acquisition. You can find more
information on these timing types inside of the DAQmx help manual
(Start >> Programs >> National Instruments >> NI-DAQ
>> NI-DAQmx Help). If you search for "Sample Timing Types" it
should be the first item found.
I hope this helps. If there is anything else I can do please let me know.
Regards,
Jesse Ormston
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D