LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading from a .txt and displaying in XY graph with time stamp

Hi,
I am a newbie to LAbView. I need to read from a text file having two columns, one carrying the temp value and other the time stamp. I need to plot this in XY graph on a real time basis. Please help as how can I do this..
I am attaching my files for your reference.
Thanks in advance

Ratnesh
0 Kudos
Message 1 of 7
(4,174 Views)
save your data in Excel file.After use VI Matlab and use matlab command "alldata=load('filename.xls')".I do not write english very well.I speek french...
0 Kudos
Message 2 of 7
(4,148 Views)


@joly wrote:
save your data in Excel file.After use VI Matlab and use matlab command "alldata=load('filename.xls')".I do not write english very well.I speek french...




Bonjour Joly !

Pensez-vous sérieusement qu'il faille utiliser MatLab pour tracer un graphe ?

CC
Chilly Charly    (aka CC)
0 Kudos
Message 3 of 7
(4,137 Views)
Since I can't find your files, I'll do a bit of guessing. There are two important factors here. First, how is the timestamp value stored? Is it in LabVIEW format (the number of seconds that have passed since Jan 1904) or is it in a string format (i.e. 08/12/2003 19:32)? The second is what do you mean by "real time basis"? Is the file being updated constantly or do you just mean displaying the correct time and temperature?
To read the data you should use the "Read from spreadsheet file" VI in the File I/O pallete and you'll recieve a 2D Double array. If the file is saved in LV format this is good, but if it's another, you'll have to change the read VI to output a string array. Once you have the array, you convert it into an array of clusters, each holding the temp and the timestamp and you wire that into your graph. you set your X axis to absolute time (right click the axis and select "format and precision") and that's it. Now, if your timestamp isn't LV, you'll have to convert it by taking it apart and rebuilding it using the cluster. These things can be seen in the attached LLB. All this is only relevant if you're not trying to get the data in real time. If you need more help, write in with some more details.

___________________
Try to take over the world!
Message 4 of 7
(4,125 Views)
So what is the question about... I have to use XY graph in my program. It is used in Loop while cycle. It shows the statistic of a variable. I am using cursors in this graph to check the actual value of a variable in different period of time. But there are 7 variables and it is extremely hard for user to check each value independently. So I tried to make them moving on the X axis (TIME) together using the property node (cursors reading the position (only X axis, Y axis status lock to plot) of the major cursor and follow it... Everything looks great? But it did not work when I am trying to move the major cursor manually on graph... It works only when I am using the cursor movement buttons... But they work very slowly when there is a lot of data in graph.

I want to find out is it possible to make seven coursers mouthing together By the X axe and be Locked each at its plot by Y axe manually (Using mouse moving on a graph). Is it possible? If it is than how to do it?
0 Kudos
Message 5 of 7
(4,105 Views)

@Shidla wrote:
So what is the question about... I have to use XY graph in my program. It is used in Loop while cycle. It shows the statistic of a variable. I am using cursors in this graph to check the actual value of a variable in different period of time. But there are 7 variables and it is extremely hard for user to check each value independently. So I tried to make them moving on the X axis (TIME) together using the property node (cursors reading the position (only X axis, Y axis status lock to plot) of the major cursor and follow it... Everything looks great? But it did not work when I am trying to move the major cursor manually on graph... It works only when I am using the cursor movement buttons... But they work very slowly when there is a lot of data in graph.

I want to find out is it possible to make seven coursers mouthing together By the X axe and be Locked each at its plot by Y axe manually (Using mouse moving on a graph). Is it possible? If it is than how to do it?




Hello Shidla,

The attached VI should help give you an idea of how to create a VI that allows all cursors to move together. The main idea is to keep track of the current location of all cursors and move all of them when you see a change in one's position.

Good luck with your development.

-Matt F
0 Kudos
Message 6 of 7
(4,071 Views)
Thanks for help Matt F, and Happy New year!
0 Kudos
Message 7 of 7
(4,051 Views)