LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RT: Different number of sample is stored to TDMS file

Hi!

 

I have a VI flushing queues and then put all data together and save it to the TDMS file if there is data in the merge WF.  In the end (when the program stops putting data into the queue there shoudl be the same number of samples stored to the file. However when wiring my function checking if there is something to save to the first case-structure data is missed in the one named pers3 but when i wire true constant to the structure then the same number of samples is stored. I think that it might be that when putting data into the queues first data is added in pres3-queue so that might be the only available data and the first case structure do not occur if not have wire the true constand in the first iteration. However I can't see what is in the first case-structure that make it impossible to save pres3 data. Below I have attached a image of the VIs.

ni_pic.png

 

 

What Check if data existis do is to take the WF-component y and check if size is greater than 0. So whats happning in the first case-structure that needs to be done in order to save data in the following structures?

 

0 Kudos
Message 1 of 3
(2,750 Views)

1. You really should not use Flush Queue.  That causes memory to be constantly allocated and deallocated.  This could potentially really slow down your RT system.  Just use Dequeue.

2. Why do you have 3 queues?  You typically just want 1 queue to be read by the data logger.  The queue data should include something to tell it what the data is.

3. Why are you adding the same data to 3 different channels?  That just seems redundant to me.


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,725 Views)

 

Thanks for the tips I will change that but it is not the same data going into the the three channels. However that did not really answer my question.

0 Kudos
Message 3 of 3
(2,717 Views)