LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph time axis

Hi everybody,

I have a problem with the X axis of my XY graph.

I have a VI which generate a file.txt in which there are 2 columns. The first one is time (in seconds since 1904) and the second one is amplitude.

In my XY graph, I would like to have an axis which goes from the first value of mu time column until the last value of my time column, in this format 14:15:03.

How can I do that? I think it is a very common question, but I didn t find any answers on the Web.

When I put format\x axia\ decimal or time stampt there is always a problem.

I tried also to change the format of the first column in my file.txtr, in order to have 04:15:02 instead of the nubers of seconds, but the XY graph has some trouble to display it also
.

I don t what to do!

thank you very much for any suggestions,

Nicolas
Download All
0 Kudos
Message 1 of 6
(3,111 Views)
You're going to have to do a couple of things. First is to use an actual XY Graph instead of the Waveform Graph. You'll have to index the 2D array output of the Read From Spreadsheet File, you'll have to modify Read From Spreadsheet to create DBL data instead of SGL, and the X axis format of the XY Graph should be Time & Date. I've attached a modified version of your VI. In the Read From Spreadsheet, every place that you see a SLG representation, change it to DBL.
Message 2 of 6
(3,111 Views)
Hi,

thank you very much for your answer.

I am going to study it because I discover some new concept for me in it like sgl and dbl!

I have continued my work, and in fact I think my problems come from the digit precision BEFORE the decimal point:
in my data.txt, the first column is in seconds, like 3140431309.950000 (number of seconds since 1904)

but when I read it, this number becomes 3140431360.000000000000000

Then the date is wrong in my graph!

I modified the digit precision, but it only modifies the number of digit after the decimal point!

Thank you very much for any suggestions!!!

Nicolas
Download All
0 Kudos
Message 3 of 6
(3,111 Views)
OK

I think I have understood!

My problem is completely links to this SLG and DBL problems.

I am trying to replace each SLG by a DBL, but I have some trouble (again!). I can t delete some of them for example!

anyway thanks a lot,
Nicolas
0 Kudos
Message 4 of 6
(3,111 Views)
As I said, it's the representation and not the digit precision that you have to change. A SGL only has about 6 decimal digits and a DBL has about 15. Check the Numeric Data Types table in the help file. To change representation, right click on the control or indicator and select Representation.
0 Kudos
Message 5 of 6
(3,111 Views)
thank you very much, that s work!!!

I am very surprised of the way, but I understand it perfectly.

thanks also for your rapidity!

Nicolas
0 Kudos
Message 6 of 6
(3,111 Views)