LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increment not incrementing

Hi All,

 

I have a new and wierd problem.

 

I have a series of data files which have saved 30 seconds worth of data each.  I have 3000+ of them (although the way the saving is executed they only represent around 1700 chunks of 30 seconds) , lucky me!!!

 

The first thing that I need to do is check that the data in the files is continuous, I can do this as I have numbered each data point during the acquisition process.

 

My code (See attached) works fine the first time it picks up a non continuous data set (Showing 10400 points missing), working it's way through the for loop until the code generated number has been incremented enough times to be equal to the number pulled from the data file, it then falls out of the conditional for loop and carries on fine.

 

However when it hits the next non continuous data file (Which seems to have dropped a mere 2 data points) it runs to the end of the forloop counter (10M iterations).

 

After investigating this it seems on this occasion the incremental process just doesn't work.  IT seems to just hold onto the original value put into the shift register (16777216) through each of the iterations.

 

I am confused!

 

For anyone interested the vi you need to run is Read Data and Assess v2.vi, Unfortunately, even after compressing the data files are over 1.2GB........  Otherwise I would post them.

 

Dom

 

 

0 Kudos
Message 1 of 20
(1,548 Views)

hi dominic,

  I think you are not initialising the shift register properly if you are using in your code.Unfortunately i could not be able to open it as file version is greater.Use break point or probe to correctly debug the code.

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 2 of 20
(1,539 Views)

Can you include a data file so that we can see what you are trying to do?

Tim
GHSP
0 Kudos
Message 3 of 20
(1,533 Views)

@DominicRoberton wrote:

However when it hits the next non continuous data file (Which seems to have dropped a mere 2 data points) it runs to the end of the forloop counter (10M iterations).


You are terminating the FOR loops based on an equal comparison of two DBLs. That sounds really dangerous and unpredictable.


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 4 of 20
(1,529 Views)

Hi,

 

Here are the files from which problems are found.

 

The first problem seems to occur in file 710SS at second 9 (When Numeric 3 = 9)

 

I have run the vi using the files in this folder and it seems to display the same error (and a few others)

 

Cheers for any help 😄

 

0 Kudos
Message 5 of 20
(1,495 Views)

Hi Altenbach,

 

That is a fair point, I have now converted the U32's to I32's as soon as they are pulled out of the array.

 

I have also done a few minor updates, which haven't really solved the problem but make a bit more sense logically!

0 Kudos
Message 6 of 20
(1,490 Views)

hi

I was trying to solve the problem but I have LabVIEW 2010

would you plaese save it as 2010 comaptible

0 Kudos
Message 7 of 20
(1,477 Views)

Here you go, the vi I am having issues with is Read Data and Assess v2.

 

Although I am now trying something different in version 3.

 

Thanks.

0 Kudos
Message 8 of 20
(1,470 Views)

Why do you flush the queue every 2nd second? Dont you mean to Remove from queue so you process all queued items?

The top right loop can probably be a for-loop with autoindex from your read file which'll make it easier on the code (instead of that strange while loop and case-stop).

You still haven't initialized the shift register, which'll retain the value between runs, just add a constant 0 and you'll set.

 

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 20
(1,464 Views)

Hi Yamada,

 

As I understand it flushing the queue empties the queue of all of the remaining elements into the array of clusters, hence the For Loop auto indexed by the size of the array.  Whether this array can be processed within the 2 second time limit or not though is up for debate (At the moment I am fairly sure the answer is no.  TDMS file saving takes a LONG time!)

 

I can't remember why I chose a while loop over a for loop, I will look into that.

 

If you look the shift register is actually initialised with the values from the outer for loop which is inturn initialised by it's outer forlooop which finally is initialised by a 0 on the first run of the code, so I am happy the initialisation is correct.

 

I have actually gone through some of the data files and there are issues with the continuity of the data, but only with the sample number which is very confusing.  But this is a completely different issue.  IT also means that I am happy my code is working right, it is just saving too much information to be processed in the time I have given it!!

 

Thanks for looking,

 

Dom

0 Kudos
Message 10 of 20
(1,454 Views)