Strange Line At Beginning Of Trend


raining010

Recommended Posts

Hi, Admin

 

I defined a channel against time trend, while started the trend, found the first 1 or 2 minutes, the shape is quite strange, not line, but some closed polygon. And after 2 minutes, it became ok, and the previous polygon recovered to a line.

 

I compared trend setting with your examples, they are similar. Don't know why 

post-8996-0-66518300-1381400172_thumb.jp

post-8996-0-71516700-1381400181_thumb.jp

post-8996-0-90869400-1381400187_thumb.jp

Link to comment
Share on other sites

It appears that the time stamps in the arrays you are plotting is not sorted.  All DAQFactory graphs are XY graphs.  Trend graphs are just XY graphs with time as the X axis.  But since DAQFactory treats it as XY, if you don't have the data sorted by time, it will draw lines connecting points that wouldn't necessary be next to each other if they were sorted.  You can use the sorttime() function to sort it, but its better to figure out why you have out of order data points.  Often this can occur if you do something like this:

 

x.addvalue(y)

 

where y is a channel.  This will add the entire contents of y to x, at the end of x, resulting in a sort of sawtooth of time.  You more likely want:

 

x.addValue(y[0])

Link to comment
Share on other sites

Archived

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