thermans Posted September 29, 2010 Share Posted September 29, 2010 Im am writing values to channels in an event, then using Max(Mychan) command to get the highest stored value. I also need a way to get the subset value of this maximum value. Any suggestions? Link to comment Share on other sites More sharing options...
AzeoTech Posted September 29, 2010 Share Posted September 29, 2010 I don't know what you mean by "get the subset value of this maximum value" Link to comment Share on other sites More sharing options...
thermans Posted September 30, 2010 Author Share Posted September 30, 2010 oh sorry. I mean the row number, or the value inside the" [] ", dont know what its called. I im getting the history maximum value, but also need the " [] " for that value. Link to comment Share on other sites More sharing options...
AzeoTech Posted September 30, 2010 Share Posted September 30, 2010 well, doing: gettime(max(mychannel)) will return the time of that maximum point. To get the index, you'd have to use the search function: search(mychannel.time == gettime(max(mychannel))) For performance reasons, if you are using the same max() more than once you should probably store max(mychannel) in a local variable and then call gettime on that variable. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.