LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

String array to waveform graph

Solved!
Go to solution

Hi All,

 

I am using LabView7.0 and need to plot channel data on waveform graph. i have attach the image of table containing data.The table or the data in a table is of string datatype  It has got date, time and the data of all 16 channels at that particular time. My requirement is to plot date n time of all records on x-axis and its corresponding channel value on

y- axis of waveform Graph.

.

Kindly give me example code and brief details for developing the same otherwise, i will get stuck in a big

mess Smiley Sad

 

Regards,

John

0 Kudos
Message 1 of 15
(7,364 Views)
A few details: Export your table data to a CSV or TSV format and use the Read From Spreadsheet.vi to get the data into LabVIEW. Your data is not equally spaced in time so you'll need to use XY Graph instead of a Waveform Graph. You'll need to combine your date and time columns and convert the combination into timestamps. Will you be plotting all 16 channels at once or just channels of interest?
0 Kudos
Message 2 of 15
(7,355 Views)

You do not have to conver it to CSV or TSV. as long as it is text and is delimited you can use what ever format you need. (i.e. TXT, ASCII, etc...)

 

You can use the read from spreadsheet to read these files too.

Tim
GHSP
0 Kudos
Message 3 of 15
(7,352 Views)

Hi aeastet n tim,

 

As u suggested i combined the date and time columns but still its in string array format (Refer stack sequence 1 in block diagram) . Kindly tell me how can i convert it into timestamp array format. Also all channels data array (refer stack sequence 2 in block diagram)  i  transfered it to spreadsheet as i need to convert some channel status to values (i.e OPEN to 30000,rPOL to -30000 etc...) and then again convert that spreadsheet string to array. So i got all channel data in double precision form but how can i concate it with timestamp and plot it on XY graph?????

 

Kindly reply the solution for the attached vi (Using Labview7.0).

 

Regards;

John

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

I can't save back to LV 7.0, but I'd recommend going through the LabVIEW tutorials.

 

Stacked sequences and local variables should be avoided.  You should learn about auto-indexed for loops as well.

 

I'll post a picture of something which will do string to timestamp a bit later.

0 Kudos
Message 5 of 15
(7,322 Views)

Date Time Columns to Timestamps and Graph.PNG

I'm pretty sure everything I've used above is available in LV7.0.

0 Kudos
Message 6 of 15
(7,313 Views)

Hi Taki,

 

I am feeling helplessSmiley Sad as i am facing lots of problem in converting string timestamp into timestamp format. I tried your suggestion but its giving me error for the tool Scan from string as too many format specifiers etc....... listed in the error.png image. Even i tried same thing with some different way but still it is giving me the error. The area of error is cicled with red colour in the trial.png image, where the Scan from string does'nt show the timestamp format icon as it is present in ur case (Refer trial.png).

 

To overcome all this error i thought first to convert string timestamp into DBL and then to timestamp format using

To Timestamp tool present in Function palette/Numeric/Conversion. But here the problem i m facing is wen i convert string into DBL the date seprator is not available also wen i convert DBL to timestamp format, its giving me date as 01/01/04 which is not correct (Refer DBL.png image). I think there is some bug in Timestamp indicator or Scan from string tool of Labview 7.0

 

So, Kindly suggest me some other way to convert string date/time into timestamp format. 

 

Please do reply, i m waiting for your valuable reply.

 

Thanks and Regards,

John

 

Download All
0 Kudos
Message 7 of 15
(7,298 Views)

Ah, I'd forgotten that conversion to absolute timestamp using %T wasn't available in LabVIEW 7.0.

 

Does it work with relative timestamps?  (i.e. change the capital T to a lower case t.  You should get two doubles which you can add together and then use the To Timestamp function.)

 

 

0 Kudos
Message 8 of 15
(7,280 Views)

hi

 

There is no question of using T or t bcoz the scan from string tool itself giving error of too many format specifiers and contains unwired of bad terminal . See the error.png image

 

 

 

John

0 Kudos
Message 9 of 15
(7,254 Views)

 

Hi vijtin,

 

duplicate post, continue here!

 

Don't you think, it ok to ask just once/at one place in the forum? And please: attach a VI instead of just pictures...

Best regards,
GerdW


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