LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save 2chart data in excel,(volt,current)every 10 seconds?

hi,

I am new to labview,

I am trying to recieve 2different signals via DAQ,and plot them on 2seperate charts,now I am able to save them entirely in a simple excel,but I need my data to be saved in an excel every 10 seconds,(because otherwise it will save huge amount of info),so that later I want to have like several groups of my labview data,saved in the excel(every 10-15seconds gonna be in 1 group),so that later I can be able to work on each group,

if my description is not clear enough,just let me know that so that I will try to explain more.

(let's say some thing like this:

time:    0.0    0.1    0.2   0.3    0.4..................1

volt:       2      2.1   2.1   2.2    3....................1.8

current:  10    11    10    11.1  11...................10

 

(and this group is from time 0.0 till 10 seconds after,so the second group should now be created and start saving from 10th second till 20th second of the process,.........etc,

 

thx.

0 Kudos
Message 1 of 16
(4,719 Views)

Hi good girl,

 

first: what exactly do you mean by excel? Do you mean the program Excel (by Microsoft)?

What is a "simple excel"? Do you know the difference between a 'spreadsheet file' (aka tsv/csv file) and a 'Excel (binary) file'?

 

I would suggest to save the data as rows in a spreadsheet file. You can append data as you like, you can easily load that into Excel and you are also able to load it in a simple text editor...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 16
(4,695 Views)

Do you mean you want to save like this?

0 Kudos
Message 3 of 16
(4,692 Views)

Hi muks,

 

even in LV8 you should use proper functions to build a filename!

18169i8A40307EE314CEF9

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 16
(4,686 Views)

But what i showed is also a way right?

0 Kudos
Message 5 of 16
(4,680 Views)

Hi muks,

 

"But what i showed is also a way right?"

Yes, a way that may brake when porting to a different OS...

 

When helping someone, who made his/her first post here on a basic question and so seems to be new to LabVIEW, he/she should get a correct answer with correct use of LabVIEW primitives!

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 16
(4,675 Views)

hi friends and special thanks to GerdW,and also others who wanna help me,
as GerdW mentioned I am new to labview and also in hurry for making some small applications in short time,
I will go for your answers briefly:
I am using labview 8.2,

 

1.yea I mean microsoft excel file,(as I thought excel gonna be the best one to save my data in),if I am right,
2.I am not familiar with things that you've mentioned like:
'spreadsheet file' (aka tsv/csv file) and a 'Excel (binary) file',
I just tried to open the saved file that my labview-application,made........with the excel and when it opens it,it shows that it has been saved in 2coloumns(volt,current),but just all after each other,very huge data and messy,

 

so I need it to save let's say every 10seconds(in 1group,containing 10seconds time,volt,current),so that later I want to find the max,min.....etc of each group,

if you want I can send the application as well?

0 Kudos
Message 7 of 16
(4,649 Views)

Hi Good Girl,

 

Why you want to save data at every 10 sec, Why cont you save data online. Possibble send your VI i can help you.

0 Kudos
Message 8 of 16
(4,640 Views)

hi,
I attached my app. till now,
I have these problems:

1.saving the data for every 10 seconds(second1+sec2+.....+sec10) and then in another group or sheet,I need from sec11+sec12.....+sec20) then the same story....\
2.after that,I need to be able to find the min/max/average of each group,
4.I am also saving all the data from when I am starting the appl. but because it will be huge bunch of data,so I need it to be saved in different groups every 10sec so that I want to be able to reopen a saved data group of data and review them later.(for doing some analyze).
3.from my DAQ I should recieve 2fifferent signals(volt&current),as I set each of them on one separate channel of my device,and when I test the device it works,but when I run the appl,it just shows one of the signals and even it is not clear sequenced one,it appears like vague dots around the chart area,did I connect the wire wrong from DAQ to the charts?

thx.

0 Kudos
Message 9 of 16
(4,597 Views)

Hi good girl,

 

for the saving problem:

Use WriteToSpreadsheet file instead of the ExpressVI - as suggested before. That will easily write your data as new rows to an Excel-readable file.

 

For the DAQ-part:

You seem to love ExpressVIs - i don't. So I have two suggestions:

1) when there are two signals hidden in that dynamic datatype the you should split the signals...

2) forget about ExpressVIs and do real programming Smiley Wink
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 16
(4,577 Views)