LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -2501 invalid TDMS but code doesn't run fully

Solved!
Go to solution

Hi All,

 

I only get this error when I have my DAQmx doing finite sampling (I had another forum post where I had empty arrays when using continuous data acquisition, finite sampling sorts that out) 

I have attached a screen shot of the code that errors, and probed it to find out what is executing, and it doesn't seem to be executing in the correct way. The for loop doesn't seem to run at all. If i run it on highlight execution it completes without error.

 

Any glaringly obvious things that I have missed?

Pete
Systems engineer (CLAD LV2013)
0 Kudos
Message 1 of 3
(2,861 Views)
Solution
Accepted by topic author WoodySLB

You are getting 0 items from your queue.  So the FOR loops will run as many times as you have items in the array (in this case, 0).  So what happens when you run a FOR loop 0 times?  Well, all of your output tunnels output the default value of the data type.  In the case of your references, you just lost them,  The simple cure is to use shift registers for your references.  This works since shift registers are a single memory location.  So whatever you initialize a shift register with you will get out when the FOR loop is ran 0 times.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,854 Views)

My hero, many thanks!

 

I falsly presumed the reference would be passed through the FOR loop. Will bear that in mind next time.

 

Thanks

Pete
Systems engineer (CLAD LV2013)
0 Kudos
Message 3 of 3
(2,836 Views)