05-26-2010 12:39 PM
In your nobuffer vi, you do not have a DAQmx Create Virtual Channel. You are using an uninitialized shift register for the tasks/channel in. Somewhere you must create the task/channel in order to run properly.
Also in your nobuffer vi, there is no Initiate function before the DAQmx Read function in the wait pretrigger case. It can't take a reading without some type of trigger. This code just cannot function properly.
Then you change the start trigger, but again there is no Initiate function to start the DAQmx Read in the read data case.
Look at your code that works and compare it to the code that doesn't work. If you are changing triggers, and you get bad results, you might have a trigger problem. I did not see a trigger setup function anywhere. At what voltage level does the trigger occur? Without a trigger setup function, no one knows.