Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Save a file using LabVIEW

Hello,

 

I am using a RS-232 cable to communicate with a hot water bath.  The project I am working on is to have the hot water bath start at 30 C go to 50 C hold there for a limited time and end at 30 C.  I am using a sign wave to accomplish this. So far everything has worked out great! However the problem I now have is saving the Graph (its data points to a file).  I believe that I will end up analyzing the graph by means of excel but I am not sure yet.  

 

So, How do I save a file that could possibly be converted to an excel file using lab view?  Would I want to save it as a binary file and then be able to convert it from there?

 

Thanks for the help,

Jack 

 

P.S. I have attached my Block Diagram below

0 Kudos
Message 1 of 11
(5,247 Views)

I don't Know if the attached file works.....I hope this works.

0 Kudos
Message 2 of 11
(5,241 Views)
0 Kudos
Message 3 of 11
(5,240 Views)

You really should look into the Producer/Consumer architecture.  The idea is to have another loop that will save the data to file.  You send the other loop the data using a queue.


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
Message 4 of 11
(5,217 Views)

I am new to labview.....what is a queue? Is there any examples on youtube? Or easy to follow tutorials?

0 Kudos
Message 5 of 11
(5,198 Views)

Also I want the hot water bath to run from the low and high setpoints and then once it has finished its cycle THEN I want it to save the file.....

0 Kudos
Message 6 of 11
(5,194 Views)

NI has some online tutorials you might want to look through.  After looking at these, have another look at the link I gave you earlier on the Producer/Consumer.

LabVIEW Basics

LabVIEW 101 


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
Message 7 of 11
(5,189 Views)

You have been extremely helpful!  And I did glance through the Producer/Consumer Architecture and I WILL use that in the future.  However for right now I will just keep it simple.

 

I want to save the data in excel.  I want to accomplish this by using a A File I/O (write to spreadsheet) and  File Dialog. However I am confused on how to wire them correctly....In order to produce the Temperature and times in an excel file...

 

Can you help me hook both of them up to the right places?

 

Jack

 

P.S. Thank You so much!

0 Kudos
Message 8 of 11
(5,180 Views)

Do not use the event structure this way.

all your code is in th event structure.

the event structure should be used to detect an event, then in the while loop next to the event have a case statement to handle events.

even better to handle the events in a separate loop, but that ca be done later.

 

th idea is to have subvi's that contain the real code.

in your case to calculate, measure and output a value, and even write the data to a file.

 

build a 2d array of doubles and have your data inside such an array,

then use the array to spreadsheet vi to transform that into a string and finally write that string to a file.

 

good luck

 

greetings from the Netherlands
0 Kudos
Message 9 of 11
(5,173 Views)

How would I do it if I kept my Block Diagram the way it is???

0 Kudos
Message 10 of 11
(5,170 Views)