LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Make XY Graph from string data with date and time

Solved!
Go to solution

1st of all sorry for my English.

I have file with some data. In this string array i have 2 columns with time and date. I want to show this data at XY Graph with time and date on X and some of DBL on Y. 

I tried do it by myself but cant add Date to Time on X axis.

0 Kudos
Message 1 of 15
(4,274 Views)

Could you post a picture of your block diagram? This will help us get a better idea of where your problem is coming from.


"Whether you think you can or can't, you're right."
~Henry Ford
0 Kudos
Message 2 of 15
(4,266 Views)

In this variant i get Graph with Time and data, but without Date. I have Date in 0 column.

 

Download All
0 Kudos
Message 3 of 15
(4,259 Views)

At this point, I can make a few suggestions:

 

Instead of using the date and time as two separate strings, try using the "Time Stamp Control." This would be better because one can easily convert the Time Stamp to a DBL value, which is a number. From there, you can convert your array to dynamic data. Attached is an example layout for you.

 

 

EDIT: I didn't see your post when I started this reply. I will take a look. (I don't understand Russian though, so it might be a little bit.)


"Whether you think you can or can't, you're right."
~Henry Ford
Download All
0 Kudos
Message 4 of 15
(4,258 Views)

Oh its nice solution, but i have date and time in 2 different columns. How can i combine it?

0 Kudos
Message 5 of 15
(4,228 Views)
Why do you want to use an xy graph? It appears to be regularly sampled where a normal graph could be used by specifying offset and multiple. None of that conversion would be required.

Concatenate strings would join the values in the first two columns of row 1. A scan from string would work better though.
0 Kudos
Message 6 of 15
(4,215 Views)

@olderon wrote:

Oh its nice solution, but i have date and time in 2 different columns. How can i combine it?


Concatenate the strings of the first two columns, then use "scan from string" with the appropriate time format.. 

0 Kudos
Message 7 of 15
(4,211 Views)

And error

0 Kudos
Message 8 of 15
(4,203 Views)

Your format string doesn't match your data.  Your data has periods separating the day, month, and year.  Your format string has slashes.

0 Kudos
Message 9 of 15
(4,193 Views)
Solution
Accepted by topic author olderon

Hi olderon,

 

you date string is something like "30.01.2014" but you scan for "%d/%m/%y". Do you spot the problem?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 15
(4,192 Views)