The HistorySource node represents the source data (most often a NiagaraAX history) and defines the data schema for data that is processed by the Transform Graph. Unlike other graph nodes, this graph node does not have an input property displayed in the wiresheet. This is because the node itself is a data source and will use the node configuration to obtain the source data. The HistorySource node should be placed on a Transform Graph node.
Each graph may have more than one HistorySource node, with each node defining a single input for the graph. The actual source may be provided at graph resolution time as a graph parameter. The value of that property must be set when the graph is resolved. The property value can be set manually, by a program object, or by an interface, such as the transform chart binding.
To use the HistorySource node, select the history source ORD from the HistorySource Source property. Select the Source ORD by clicking the folder icon next to the text field. The source ord must point to a data series. Usually this is limited to a history ord. You can also type the ORD path directly in the text field.
When the Source value is set to a valid history ORD, the Source Schema table is automatically populated with the schema of the ORD's history schema. In Figure 18 the schema is the same as the column names in the corresponding source History Table view. Beside each column name is the data type that the column represents.
When you set the HistorySource ORD you can also take advantage of the following features:
Parameterized History ORD
The source ORD uses the BFormat syntax at time of graph resolution. This allows the source ORD to be parameterized. This is especially useful when creating a transform graph that will be displayed in a Px file. The history ORD can be set using BFormat syntax to create a transform graph that can be used in many Px files, or the same Px file set as a view on different components. In the latter case, the BFormat syntax resolves against the component that contains that Px view.
Just In Time Source ORD
The transform graph can assign values to attributes of a graph node at the time the graph is resolved. In the case of the HistorySource node, the history ORD for the data source can be given at resolve time.
If a Source ORD is not set at design time, a Source Schema must be defined for the node. The Source Schema is the schema of
the data that history source represents. This schema data is used by other graph nodes to create instructions on how to manipulate
the data. The schema of a History Source node can be manually configured using the Schema Source Editor. Click the chevron
button
next to the Source Schema table to display the editor.
Configure the schema by setting a string field name value and then define the data type for that field value. You can think of a field value as a column of data. The data type is a baja “Type” that you can define by selecting (from the first option list) the module that the data type belongs to (usually baja) and then (from the second option list) the specific type in the module that the column represents.
Along with the name and data type information, each schema field can be configured with facet information. This information
will tag the data column with important information such as the unit type associated with the value of the column (for example,
Fahrenheit). If you design your own schema, you must select the key field of the schema. Each schema includes a key field. The key field is the data field that will include a unique value for each data row at the time that the graph node
cursor is resolved. The key field is similar to the primary key field used in relational databases.
In the case of histories, the key field is the Timestamp field. Each record returned by a history has a unique Timestamp value. By using the Timestamp field as the key field, the transform framework can perform tasks such as grouping a collection of records together in five minute intervals. This is possible because key field allows the framework to uniquely identify each cursor record, or “table row”, as a unique record.
Copyright © 2000-2014 Tridium Inc. All rights reserved.