This widget could not be displayed.

From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String array of time into XY graph

Solved!
Go to solution

Hi guys

I got a problem i need to solve.

Ive got an array of strings comtaining time and array of numeric(DBL) values

 

 

These values i need to plot in an XY graph with time on X-axes and the values on the Y-axes. Any ideeas how to fix this problem.??

 

a

0 Kudos
Message 1 of 8
(3,513 Views)

You can use the Scan From String to get a timestamp (%<%H:%M:%S>T) or relative time (%<%H:%M:%S>t) but since you have repeated times, your graph is going to show different y values for the same x.

 

 

0 Kudos
Message 2 of 8
(3,509 Views)

Im trying to use the example u sendt me but it aint working

 

My problem are that i want the string array containing "20:50:27" turned into a DBL value containing "20:50:27" ,that wil say the same value as shown in the string . In the exampl abov only 20 get stored, not :50:27

0 Kudos
Message 3 of 8
(3,497 Views)

Take a closer look at the format string you are using versus the one in the Snippet.

0 Kudos
Message 4 of 8
(3,494 Views)

Dosent make any diffrent it stil shows 20..Smiley Sad not 20:50:27 in the dbl

0 Kudos
Message 5 of 8
(3,491 Views)
Solution
Accepted by topic author LCT2

Then go to Graph Properties -> Display Format and set the X-Axis format to Relative Time.

0 Kudos
Message 6 of 8
(3,486 Views)

Why did you use "f" in your format string and not "t" or "T"?  That is what Darin is talking about.

0 Kudos
Message 7 of 8
(3,481 Views)

It is good information for me. Thanks.Smiley Happy

 

0 Kudos
Message 8 of 8
(3,240 Views)