LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView Plotting Datetime from CSV: Format Issues

Solved!
Go to solution

Hello everyone,

I am running into Problems with the formats of my X and Y values for the XY Graph. I am reading values from a CSV file which include 3 columns per row, seperated by a comma. I managed to read from this file and Output the values but I want to plot them also. My Problem is that i can not get my datetime, which currently is a string into a plottable Format. What can I do?

The files are attached below.

Download All
0 Kudos
Message 1 of 7
(3,283 Views)

Hi Enzo,

 

read the files as strings, convert timestamps and measurement data seperately:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(3,266 Views)

Dear GerdW,

I tried to use Your solution but I get an error.

The error is at the search in string function due to an invalid Input Parameter.

My VI is attached.

Also You copied the values of the CSV into Labview, I want to open them in the Program as new values will be added later -> Live Plot

Download All
0 Kudos
Message 3 of 7
(3,255 Views)

Hi,

The error is caused by the Index Array calling the first Column, whereas the Date/Time is in the first Row.

 

You will need to change the Input to the other terminal, that should work.

 

--------
Nico
Systems Engineer

Certified TestStand Architect Certified LabVIEW Architect

Message 4 of 7
(3,251 Views)

Hi Nico,

the error is fixed, it plots, but in this Format: 3,57476E+9

Is my Format string wrong?

I fixed the error by not transposing the Array.

 

0 Kudos
Message 5 of 7
(3,245 Views)
Solution
Accepted by topic author EnzoC

Hi,

That is just a configuration for the Graph. It is currently set to numerical values as the timestamp is a numerical count in seconds. You will need to change the X-Axis to Absolute Time under the Properties for the Graph.

--------
Nico
Systems Engineer

Certified TestStand Architect Certified LabVIEW Architect

Message 6 of 7
(3,232 Views)
Solution
Accepted by topic author EnzoC

This worked, example solution for everyone!

Thank You!

0 Kudos
Message 7 of 7
(3,223 Views)