determine data index value from timestamp

  • Software
  • determine data index value from timestamp
Phillip Neir

Posted on 03.04.2018 19:05

Greetings,

I am using rosette math. After determining the max value of Epsilon(max), I would like to return the values of other channels at that same instant. I have used the "Time of MAX" calculation to determine the timestamp. My plan was to determine the data index at that time and use that index to return values from other channels using channel.data(index). My problem is that I don't know how to determine the data index at a specific timestamp. Can someone help me out.

Also, if there is a simpler method of syncing values, I am open to that as well.

DEWESoft Support
Technical support
Posted on 09.04.2018 11:19

Hi,

rather than looking at the index, I think a time comparison should be good enough for this case. In the attached data file, I have three demo signals. I then find the time using time of MAX, and compare that time to another time channel. When the results match, I latch the values of the other three channels, which are then displayed on the tabular values visual control.

After I did that, I realized that looking at the maximum would be even easier. I've used that method in the "randomData2" file.

Please check out the attached data and let me know if either of the two methods will work for you.


Attached files:
Phillip Neir

Posted on 09.04.2018 14:00

Hello,

I used the second (maximum) method. It worked exactly as desired. Elegantly simple. Thank you.

I had looked briefly at Latch Math, but I couldn't grasp what to use for a trigger. It is odd how you can completely overlook an obvious and simple solution.

Thanks again.

DEWESoft Support
Technical support
Posted on 09.04.2018 16:19

Hi,

you're very welcome. I'm glad to hear that the solution was what you were looking for.

Login to reply to this topic. If you don't have account yet, you can signup for free account .