LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Entering continuously measured data into same file

I have three different subvi within my main vi which run in parallel and each of them measures voltage and current continiously for some predefined time (in a while loop), the duration of each subvi can be different from others and measurment is done every 10 seconds. I want to record the voltage and current of each sub vi in the same file in different columns. for example measurments of  subvi 1 will be written in column 1 and 2 with multiple rows.

 

right now I can log the measureed data in three separate files by using write to spreadsheet.vi and creat a different name for it, but if I want to write it in the same file I should be able to select which colmun it needs to be written based on the subvi that sent the measurment, but I could not find such capability in the write to spreadsheet.vi 

 

and since the measurment is continious I cannot wait till end of the test to log all the data.

is there any way to select which columns it needs to be written? or any other way of doing it?

0 Kudos
Message 1 of 16
(3,634 Views)

Sounds like you will have to make a collecting function for your log.  You will want a single queue that each of your loops sends data to.  Your collecting loop will have to somehow keep track of who sent it what data.  Once you have a data point from each loop, it can write that sample to the file.


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 16
(3,620 Views)

how should I create the Queue? 

0 Kudos
Message 3 of 16
(3,599 Views)

Producer/Consumer


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 4 of 16
(3,590 Views)

Hi parissa_wall3, 

 

one thing that works for me (maybe it´s a dirty way to obtain data, but it works) is create an "open file" outside the loop and "write to text file" things as headers and other things outside the loop. Then, join this "write to text file" to the one inside the loop (check the file attached). At least for me, it works. But it is true that other people have advised me to use shift registers or other alternatives (that I still must learn how to implement). 

 

Good luck!

0 Kudos
Message 5 of 16
(3,564 Views)

Thanks lacorgui, do you mind sending a file with higher resolution? I couldn't read the components you had.

0 Kudos
Message 6 of 16
(3,547 Views)

Here you are, I hope it is useful for you! 

 

By the way, if someone knows how to improve the code, any help is welcome!! 😉

0 Kudos
Message 7 of 16
(3,526 Views)

I am using labview and NI-PXI1042 for strain measurement. 

 

I want to run the test almost for 5-10 mins and want to record whole data just in one file. I am just measuring the voltage coming out of the gauges and want it to save.  

 

I used option 'write to measurement file' but it is showing me .lvm file having data of latest 2 secs. 

 

Can anybody please help me?

 

Thanks 

 

Ankush

 

0 Kudos
Message 8 of 16
(3,282 Views)
We can only give concrete help if we can see you code, how fast are you collecting daya and writing to the file?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 9 of 16
(3,275 Views)

Hello Mike 

 

 

Thanks for your quick response. 

 

I have attached the file that i m using for voltage measurement. I took help from another friend and he suggested to use sample frequency of 10HZ and 10 samples per channel & this way i could record all the information for 5-10 mins.

 

But still i would appreciate your suggestion on this file.

 

 

Thanks

 

Ankush  

0 Kudos
Message 10 of 16
(3,258 Views)