LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert data from column and insert new column with converted data into the array

Probably an easy question for the experienced users......( I am totaly new).

I have a bunch of large csv files and I have to plot particular columns (y-axis) vs time (x-axis).

The first column in the csv file is in timestamp which I `ve managed to convert to human readable time.

I have also managed to get rid of the headers because Labview includes them in the graphs. For example, it reads the label “Timestamp” as 0 and that converted to time shows 31 of December 1899. Considering the fact that this is my x-axis I got a graph with data starting 111 years back.

Now I have inserted new column (next to the timestamp using Insert Into Array Function) and my problem is to display the converted timestamp into the new column but I got stuck. If someone can help me with this problem the next step which is selecting particular columns to create multi-plot waveform graphs should be easy for a newbie like me (or not?)

Please, see the attached files and if you have any suggestions I will be more than happy to discuss them.

Thanks!

Download All
0 Kudos
Message 1 of 3
(2,288 Views)

Here's a quick way, replacing the time column with the adjusted time column. probably needs a few tweaks.

0 Kudos
Message 2 of 3
(2,280 Views)

Hello altenbach,

 

Thanks for the quick response but I am having hard time with this code.

Actually two problems have arisen.

  1. This method for converting the column still does not give me what I need to obtain. I need to convert the timestamp to human readable time in the same array or in a different one in a way which allows me to use the converted timestamp as x-axis and other columns as y-axis in waveform graphs. I want to have the x-axis in 00:00:00.000 AM/PM; DD/MM/YYYY format. How can I do that?
  2. Because each csv file has different number of rows somehow I have to tell labview to read only the rows that contain data otherwise the code fills automatically the rest of the rows with zeroes and -1.26302E+8 for the timestamp which causing me problems when I try to plot the data (connects the last data point with 0 - diagonal line). I guess I have to use some kind of a loop (probably while loop)?! But my knowledge about Labview stops here and I need help if you

Is there any way to use the timestamp array and bundle it with particular columns from a different array in the code (where I could pick columns from) in order to plot them? Maybe there isn`t but you are experienced user so I guess you will know.

Thanks for your time. I really appreciate your help.

0 Kudos
Message 3 of 3
(2,263 Views)