LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does AI Clear return an -10608 error?

I receive an -10608 error from the AI Clear is the attached Test Program. I find that the first time Test Torque & Temp is run I get correct values from the channels. When stopped I get the specified error. When I restart the program the data values are incorrect. Why does I get the error code & incorrect data on subsequent executions? I found in another simpler test program if I omit the TS-1 channel I get good reads for the temp chnls on repeated runs. If the torque channel is inclused on all but the first run the data is bad. Why?
Download All
0 Kudos
Message 1 of 3
(2,352 Views)
Rick,

Let's first start with your acquisition. Within your For loop, you are using the AI single scan VI (in your subVI), which does NOT use buffering. Therefore, there is no need for your VPTS Init Analog Inputs VI and your VPTS Close Analog Input VI, because one initializes a buffer, and the other clears a buffer, neither of which you are using.

Therefore, your AI Clear is complaining that there's no buffer to be cleared (there's no buffered acquisition occurring)--that's the -10608 error.

You can remove both of these VIs, and I think your main VI should run just fine.

Mark
0 Kudos
Message 2 of 3
(2,352 Views)
Rick;

You are mixing some VIs that work on a buffered acquisition with others that don't.
The best way to go about that is to follow one of the Labview shipping examples way of coding.
You can particularly refer to the one named Continuous Acquisition and Chart (buffered).VI that can be found at Search Examples->I/O Interfaces->Data Acquisition-> Analog Input-> Continuous Analog Input.

Hope this helps.
Filipe A.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(2,352 Views)