How do I display logged data?


jfiddler

Recommended Posts

I'm doing runs of a process. I see how to log the data from a run, but I don't see how to display the data from a prior run. Is there a way to open the same program I use in real time, but have it in a virtual mode, where I can replay a previously logged run?

Thanks

Link to comment
Share on other sites

I wrote this whole post and then remembered that we actually have a knowledgebase / sample download for this here. Its even better because it has transport controls to allow you to scroll back and forth:

http://www.azeotech.com/index.php?_m=downl...wnloaditemid=50

I'll keep the rest of the post just in case:

Yes, but its not really a built in feature. Here are the general steps:

1) you would have to have all your channels have a timing of 0. Technically you could change the timing dynamically using script, just remember to reset the timing loops once they are changed. Use mychannel.Timing = 0 to set the timing of mychannel to 0. Do this for all channels. Then do Channel.Restart() to reset the timing loops. See the Channel Functions and Channel List Functions sections of the Channels and Conversions chapter of help.

2) Now you can load the data into DAQFactory, again with script. This time with the low level File. functions. If you are logging as CSV, you can use the readdelim() function to do it quickly. See File. functions in the Logging chapter of help.

3) Once loaded, you can create a simple loop to stuff the data into the channels at intervals. It would just be a while loop with a delay and AddValue() functions to put the data into the channels. AddValue() is also in the Channel Functions section of the help.

Now depending on how big your files are, you might instead want to read one line of data at a time in that loop as you stuff it into the channels rather than reading the entire file first. The nice part about

Its tough to be more specific as the best method really depends on how your application is setup and your data is logged. If, for example, you were logging to an odbc database, you'd have to query the database instead of using File. functions. Fortunately, its not terribly difficult.

Link to comment
Share on other sites

  • 4 years later...

First of all thanks for DAQFactory software and for the precious help from the forum. I m looking how to download .csv files back to DAQfactory for example to export a chart afterwards. I found similar querry above . Unfortunately the link to the sample is directing me to the home page. Is it possible to get a sample in .ctl file ?

Thanks in advance

Link to comment
Share on other sites

Almost working !

I ve tried to to download a .csv file (extract of the content below) by replacing .dat with .csv in the "change" button properties.

I get the graph with the right date , time and scale for Y values.

Missing item : the data are not plotted.

Any suggestion ?

Thanks in advance and looking forward to see it running

Time_Pressure Pressure Time_Temperature Temperature

1.337.437.225.100 0.4527726 1.337.437.225.100 0.6986279

1.337.437.225.150 0.2339403 1.337.437.225.150 0.6985501

1.337.437.225.200 0.4545637 1.337.437.225.200 0.6985501

Link to comment
Share on other sites

Your data appears to be tab or space delimited? If so, you'll need to change the delimiter in the readDelim() call of updateGraph from "," to either chr(9) or " "

Also please note that these forums are moderated. You only need to submit your query once. It won't appear until we have viewed it and approved it. If we didn't moderate the forum, we would be inundated by spam posts.

Link to comment
Share on other sites

It's working! I 've changed the file type : each time stamp is now recorded on a line with ";" separators between time and channels. The file is a txt file and I also modified the change button properties to read all types of file (*.*). I also indicated in ReadDelim () the correct separator (;). I ve only one remark : the display of the historical trend is picking all points (no effect visible of the delay in data read). I don't really need this function. Thanks again for the great support !!!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.