Trend of 2 value [Float; Time]

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
5 posts • Page 1 of 1
MrKintaro
Posts:53
Joined: Fri Aug 16, 2013 6:56 pm

Trend of 2 value [Float; Time]

Post by MrKintaro »

Hi,

We have in our project a system sending us 2 value.

First Value is the speed of a Car and the second is the Time when the speed was detected.

I am not able to find the way how to trend this 2 value.

I tried with Trend Value over value but it doesn´t accept time format.

Do you have any Idea How to create a trend where I can associate the value with the time?

Thanks.

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Trend of 2 value [Float; Time]

Post by Gertjan van Schijndel »

It is not an option to store the speed with the received time in one datapoint element? So you can use a value over time trend. I assume the values are received in chronological order.

schneebergera
Posts:89
Joined: Sun Apr 03, 2016 5:52 pm

Re: Trend of 2 value [Float; Time]

Post by schneebergera »

One of the functions of the Trend diagram is to display value-over-time curves.
Trends are provided for visualizing the changes of data point values over a specific period of time or for relating changes in different data point values to each other.

For example [value related to time]. Image
Attachments
trend-20171204.png

RudiKreiner
Posts:198
Joined: Mon May 16, 2011 2:10 pm

Re: Trend of 2 value [Float; Time]

Post by RudiKreiner »

If the time at which you receive the event that the speed changed (the time can be found in dp:_original.._stime and seen in the _original view in para) is not the same as the time in the "time" datapoint (maybe caused by transmission delays) then I think you should archive an additional datapoint and assign values to it in a control function using dpSetTimed().
I've never done this myself, but reading the function description it looks to me like you can use this to tell the event manager at which time the speed actually changed.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Trend of 2 value [Float; Time]

Post by leoknipp »

If you have 2 dp elements (1 for the value, 2 for the time) you can read the values own your own for both elements, e.g. using dpGetPeriod()
With the trend function "curveVals" or "curveValues" you can display the information in a trend curve. At these function you have to pass the array with the values and an array with the times.

Best Regards
Leopold Knipp
Senior Support Specialist

5 posts • Page 1 of 1