LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

saving/writing data to text file (or excel)

Highlighted

Hello. I want to record the data which are from two devices. First one is temperature values, the other one is vacuum values. There are two vi in the way of screenshot (I added ss because i use version 2019).

When file runs, the text file should start to write device values. I'm going to apply your comment to .vi files separately. I attached block diagram and front panel. You can check. Thank you.

Download All
0 Kudos
Message 1 of 4
(398 Views)
Highlighted

Use three different Loops, two for acquiring data from different devices and 1 Loop for Logging data.

You can acquire fixed number of Values in the Acquisition Loop and Transfer to Logging Loop using LV2G.

Palanivel Thiruvenkadam,
CLA|| CTD
0 Kudos
Message 2 of 4
(378 Views)
Highlighted

@PalanivelThiruvenkadam wrote:

Use three different Loops, two for acquiring data from different devices and 1 Loop for Logging data.

You can acquire fixed number of Values in the Acquisition Loop and Transfer to Logging Loop using LV2G.


Is there any example that you can share with me ?

0 Kudos
Message 3 of 4
(353 Views)
Highlighted

Please do not attach pictures of a VI, rather attach the actual VI (so we can examine it easily, test changes, etc.).  It is much easier for us to modify your VI and return it to you than to have to create it ourselves from your pictures (unless, of course, you are paying us for our time and effort ...).

 

Ah, I see you "use screen shots" because you are using LabVIEW 2019.  Well, you should still attached the VIs, and embedded your pictures in the Message.  In fact, you could have created a Snippet, a PNG that can become LabVIEW code (look it up).

 

It appears that the data are coming in from two separate devices, through two separate COM ports.  Is it safe to assume that they are not being acquired at the same time?  Have you thought about how you are going to incorporate "time" in your data stream?

 

Serial data is generally slow.  You should be able to create a While Loop that has two sets of "data streams" inside it.  One would be the Serial Data Stream that acquires the data at some rate, with initialization outside to the left, and closing outside to the right.  Below it could be a File Data Stream, with File Creation/opening on the left, File closing on the right, and in the loop, writing the data (from the Data Stream) into the File.

 

Personally, I think you have two largely-independent (but slow) Data Streams, so I'd recommend (initially, at least) two separate File Data Streams, one associated with each Serial Data Stream loop.

 

Give it a try.  When you return, attach your VIs (I won't look at any more "pictures" that you attach).

 

Bob Schor

0 Kudos
Message 4 of 4
(311 Views)