Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Download the Solution Example here: TrendCustomDataSource.dbsln

Solution Name: TrendCustomDataSource

Software Version:  10.0.6

Keywords:  Trend. Data.

1

Summary

This example shows how to use

Trend

TrendCharts, and solutions on basic archiving, creating and

creating

charting of Data.

Image Added


Technical Information

When creating a TrendChart, you can associate a Historian Tag with a Historian Table to supply data points. This configuration is done through the Historian section. These tables can either receive data from databases accessed via FrameWorX or from a script within a script class, accessible under Scripts > Classes.

In this example, the GetSamples method is applied in two different ways:

  1. In the ServerMain ScriptClass, the method is used to create a custom signal and send it to the historian for plotting.
  2. In the MyClass ScriptClass, the method is used to retrieve data stored in a table within a database, which is then sent to the historian for plotting.

When creating a

trend chart

TrendChart, if you have data logging

defined

set up in FactoryStudio (

at

via Edit

-

> Tags

-

> Historian)

,

or if you

are

're using FactoryStudio

for use

with the OSIsoft PI System, the system will automatically

look

search for

the

archived

Data

data to plot

the chart

.

When

If you want to

draw the Trend chart mapping to

use data other than what the

one created by the system itself

system archives by default, you have

the following

two options:

1) You can populate the Historian
  • Populate the historian archive (Tatsoft Database, Microsoft SQL, or other
Database
  • databases,
or
  • including the PI System) from another application.
2) You can customize
  • Customize the GetSamples method used by the
trend chart when plotting the Data as described in this example.
  • TrendChart, as demonstrated in the ServerMain and MyClass ScriptClasses

In this section:

Page Tree
root@parent
spacesV10

One more advanced example of custom Trend chart drawing, where a curve model is created from a recipe: (TrendWithRecipe.rar).

Reference

See Trend Settings for more information