LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write data to a text file

Hi,

New to Labview here, with no programming background, so this will probably seem like a no-brainer to most of you. I need to continuously 2 channels of pressure data over time (two pressure transducers). I'd like to save this data, along with a time stamp so I can plot in excel pressure vs. time data. When I run my VI, it only saves to text file the most recent iteration. I added the feedback node because I found it on a past example for a similar VI, but I'm not really sure I understand what it does. I've attached my VI here.

 

Any thoughts or suggestions?

0 Kudos
Message 1 of 7
(4,721 Views)

1. There is no need for that feedback node.  Just use the control directly.

2. There is an input to the Write To Delimited File VI for "Append to File".  Set that value to TRUE.  When it is FALSE (the default), then file is overwritten each time the VI is called.



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 7
(4,705 Views)

Great. That seems to have taken care of it. Thanks!

0 Kudos
Message 3 of 7
(4,687 Views)

Wow, an Instrument Assistant!  I usually recommend that LabVIEW Beginners avoid the Dreaded DAQ Assistant and Dynamic Data Wires, but in your case, I'm wondering why you didn't start there, especially as I think it has a data logging option that takes you right to Excel or a .CSV file.  [I still would recommend that you "stretch your mind" and learn some more LabVIEW by looking up (on the Web) "Learn 10 Functions in NI-DAQmx" and avoiding the DAQ Assistant, but that's another story].

 

Bob Schor

0 Kudos
Message 4 of 7
(4,647 Views)

Bob, 

 

Thanks for your reply. I was interfacing non NI components, thus, from my understanding, DAQmx would not work. The components I am using are made from MKS instruments. I couldn't find any drivers, so that was the only way I could figure out how to do it. It was actually easy, as the MKS manual provided the proper syntax for communication. 

I will soon need to control Bronkhorst pressure/flow controllers from Labview. If you have an article about instrument control for beginners, please point me in that direction. 

 

Thanks again. 

0 Kudos
Message 5 of 7
(4,626 Views)

From the Bronkhorst Web Site -- Manual FLOW-BUS LabVIEW Driver.  So they do know about LabVIEW, so maybe it can interface with DAQmx ...

 

Bob Schor

0 Kudos
Message 6 of 7
(4,620 Views)

@Bob_Schor wrote:

From the Bronkhorst Web Site -- Manual FLOW-BUS LabVIEW Driver.  So they do know about LabVIEW, so maybe it can interface with DAQmx ...


Not likely.  DAQmx is NI's driver suite for NI equipment.  Bronkhorst likely made a DLL driver and possibly a LabVIEW wrapper for that DLL.



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 7 of 7
(4,604 Views)