LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read from text file and plot in real time

Hello to everybody,
I recently started using labview and so I know very few features, I apologize for any crap I'm about to write.
My problem is as follows:
_ A wireless node is sampling, with a known frequency, the voltage and the current of an electronic device
_ These data are sent to a coordinator connected to the PC
_ Each packet sent includes a single column with: Letter V followed by voltage samples, Letter I followed by current samples (all in a single column as in the attached example)
_ The coordinator saves it in a .txt file

 

I want to do a labview application that:
_ Reads that file (continuosly update by the coordinator)
_ Plots on two different graphs the values (over the time) of current and voltage

 

Thanks for your help

 

Danilo

0 Kudos
Message 1 of 2
(2,058 Views)

There are File IO examples that ship with LV which show you how to write to red from a file . A more fundamental question though is why have the file at all? Is it serving strictly as a data communication channel, or will it be used for something else?

 

The "coordinator" that you mention, can it be accessed directly? Serial IO? TCP/IP? Telnet? ActiveX? .NET? Anything?

 

If so, that would be the preferred way to handle this situation.

 

Mike...

 

PS: Sorry for the next bit, but I used to be a magazine editor and my grandmother was a school teacher so I am just a tiny bit anal retentive about word usage: In English "data" is a funny word in that while it is a singular form, it is (depending upon context) often understood to referring to multiple things and so can be sort of plural. Consequently, it is proper to say: "This data is sent.. " or "The data indicates...", but not, "The data are showing..". Likewise it is always incorrect to try to make it plural by saying "datas".

 

PPS: The same goes for the word "code" when used as a noun. It can also be a verb, but that's a whole different rant...

 

PPPS: Also be aware that many of the people who know me well would object to the "tiny bit" part...


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 2 of 2
(2,046 Views)