07-21-2011 07:45 AM
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 ![]()
Regards,
John
Solved! Go to Solution.
07-21-2011 07:57 AM
07-21-2011 07:59 AM
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.
07-22-2011 07:41 AM
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
07-22-2011 08:08 AM
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.
07-22-2011 09:22 AM
I'm pretty sure everything I've used above is available in LV7.0.
07-23-2011 07:30 AM
Hi Taki,
I am feeling helpless
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
07-23-2011 11:56 AM
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.)
07-25-2011 02:05 AM
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
07-25-2011 02:19 AM
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...