DougMinard Posted October 30, 2013 Share Posted October 30, 2013 Is there a way to replay history? If it can, can it play back a different speeds? or is it possible to import the .csv file and replay it at different speed. I know that graph can be frozen and dragged. This is not what i'm looking. We have a schmatic with varible displays on one of the pages. We like to step thru the history file or log file data, and have all varible display updated as we move thru the data. Link to comment Share on other sites More sharing options...
AzeoTech Posted October 31, 2013 Share Posted October 31, 2013 Sure, there are a number of ways to do this. The easiest is to set all the channel's timing to 0, load the file into memory using the File. functions (probably File.ReadDelim()), then simply create a loop that starts at the top of the resultant array and updates each of the channels with the appropriate values (using myChannel.addValue()) , putting a delay() inside the loop to control the speed the channels are updated from the file. Make sense? Something close to this: global replayInterval = 1 private handle = file.open("somefile", 1, 0, 0, 1) private datain = file.readDelim(handle, -1, ",", chr(13), -1) file.close(handle) datain.time = datain[][0] // assuming time is in the first column for (private x = 0, x < numrows(datain), x++) myChannel.addValue(datain[x][1]) myOtherChannel.addValue(datain[x][2]) // etc... delay(replayInterval) endfor Link to comment Share on other sites More sharing options...
DougMinard Posted October 31, 2013 Author Share Posted October 31, 2013 Thank you for your quick reply, I will give it a try, but i will try it with a simple program before tring on one we need it on. There is a lot of stuff in this program that i don't under stand (not a programmer), I will must likly have questions later. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.