Home | Downloads | Support | Buy Now | Top Users | Company
 
Instrumentation Pack
 
Components
Animation
AirGauge
AniLine
Annunciator
Gauge
Indicator
Knob
Led
Meter
NumberLed
Odometer
Percent
Selector
Slider
Toggle
Trend

Application
Comport Wizard

Bundled Products
OPCWare
HMITalk
 
Links
Developersdex
 

.NET | ActiveX | VCL
 

How to connect Trend .NET component to a database or data file?
Which version of framework is the Instrumentatation Studio for .NET 3.0 based on?
How to add controls to the toolbox of VS.NET?
Does Instrumentation Studio for .NET Support WinCE?
Is there any incompatibility with Windows Vista?
Why does Trend.NET report an array index error when I use cstAllocateBuffer in some events?
How to delete, copy and paste a control in VS.NET?
I have some data saved in SQL Server, how to use Trend.NET to draw a discontinuous curve?

How to connect Trend.NET component to a database or data file?
Trend .NET 2.0 does not support directly to read data from a file because we don't know your file format. You can read data by your self and use the cstAddXY or cstAddXYArray method to add the data to the control. Trend.NET 3.0 already provides a module, please see the example.

C#
//Read the last record for x axis and set the value to XMax
......
//Read the first record for x axis and set the value to XMin
......

Trend2.XMax = [last record];
Trend2.XMin = [first record];
Trend2.cstSetXDisplay(Trend2.XMin, Trend2.XMax);

double[,] XY = new double[2,RecordNum-1]; //two dimensions array, 0 dimension is for x value, 1 dimension is for y value

for (i = 0; i <= RecordNum-1; i++)
{
//XValue = ......
XY[0, i] = XValue;
//YValue = ......
XY[1, i] = YValue;
}
Trend2.cstAddXYArray(0, ref XY); //0 is the index of Vars
//that is say, for 1st line(Var 0), the control will link RecordNum-1 XY data points
//if there is more vars,continue to add data
......
Trend2.cstRedrawDynamic();

VB.NET

'Read the last record for x axis and set the value to XMax
......
'Read the first record for x axis and set the value to XMin
......

Trend2.XMax = [last record]
Trend2.XMin = [first record]
Trend2.cstSetXDisplay(Trend2.XMin, Trend2.XMax)

Dim XY(1, RecordNum-1) As Double 'two dimensions array, 0 dimension is for x value, 1 dimension is for y value

For i = 0 To 99
'XValue = ......
XY(0, i) = XValue
'YValue = ......
XY(1, i) = YValue
Next
Trend2.cstAddXYArray(0, XY) '0 is the index of Vars
'that is say, for 1st line(Var 0), the control will link RecordNum-1 XY data points
'if there is more vars,continue to add data
......
Trend2.cstRedrawDynamic()

Back to Top

Which version of framework is the Instrumentation Studio for .NET 3.0 based on ?
The Instrumentation Studio for .NET 3.0 need framework 2 or later.

Back to Top
How to add controls to the toolbox of VS.NET?
Right click the toolbox, select the "Choose Items" and browse the .NET FrameWork Components, then find the components of CSTSOFT.

Back to Top
Does Instrumentation Studio for .NET Support WinCE?
Compact framework does not support GDI+ now. We are waiting for next generation compact framework to support GDI+. As you know, it is impossible to implement great graphics without GDI+.

Back to Top
Is there any incompatibility with Windows Vista?
There is not any incompatibility with Vista. Please try to install the software as administrator on Vista.

Back to Top
Why does Trend.NET report an array index error when I use cstAllocateBuffer in some events?
cstAllocateBuffer is very important and used to allocate memory. This method should usually be called in the onload of a form to initialize the buffer for the control.

Back to Top
How to delete, copy and paste a control in VS.NET?
In Instrumentation Studio for.NET, normally a control usually contains several sub-objects, such as CaptionItems, etc. When you delete the control from your form, those sub-objects will not be deleted automatically. At this time you should call propertypages of the control to remove those sub-objects first, then delete the control.
Similarly when you copy and paste a control, a new control is created, but no new sub-objects are created. The new control shares the sub-objects with the old one. For example, those two controls contains the same one CaptionItem. In some cirsumstance, this is useful to save the system resource. If you want to add some new sub-objects, it is wise to modify the form designer's code.

Back to Top
I have some data saved in SQL Server, how to use Trend.NET to draw a discontinuous curve?
1.Read the DateTime(for X axis) and Y value from your databse.
2.Add the dataset to Trend and identify the point is a broken point or not.
3.If it is, use cstAddBrokenPoint method to add it to Trend.NET.
4.Goto 1 for more data.
The key of your question is how to specify a broken point. In your figure, the third point does be a broken point.
You may write some code to identify which is a broken point, for example:
If [DateTime of point4] -[DateTime of pointe3] >1 hour then pointe3 is a broken point.

Back to Top
CSTSOFT All rights reserved.