Reinitialize a trend

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
Hi-Volt
Posts: 29
Joined: Mon Sep 12, 2011 4:52 am

Reinitialize a trend

Post by Hi-Volt »

Hi. I need to reinitialize a trend, deleting the old values of the curve when a user logs out. Is it possible? In which way?
Thank you!
Best regards

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Reinitialize a trend

Post by mark.monroe »

Hi Hi-Volt,

There is no way to clear the trend lines on the screen. You can start and stop individual trend lines and you can hide or show the trend line control.

Code: Select all

    public partial class Screen1
    {
		static ICurve aCurve;

		
		void Button1_Click(System.Object sender, System.EventArgs e)
		{
			//Stop aCurve from being updated
			this.Trend1.Curves.Remove(aCurve);			
		}
		
		void Button2_Click(System.Object sender, System.EventArgs e)
		{
			//Start aCurve up again
			this.Trend1.Curves.Add(aCurve);
		}
		
		void Screen1_Opened(System.Object sender, System.EventArgs e)
		{
			//Which curve to start/stop
			aCurve = this.Trend1.Curves[0];
		}	
    }
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

ladin79
Posts: 19
Joined: Tue Nov 13, 2012 12:25 pm

Re: Reinitialize a trend

Post by ladin79 »

Hi,
how can I use the same function for a chart?

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Reinitialize a trend

Post by mark.monroe »

The chart object is control by puting data into tag arrays. If you want the chart to display something different, then you need to change the data that is stored in the array that the chart is graphing.

So to zero out a chart, put zeros in the tag arrays that the chart is graphing.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

Post Reply