Volume pwrb | |
Attributes: Runtime | Development | System | Template | Detail C Binding: Struct | Class  ClassTree | INDEX NO INDEX |
Class DsTrend![]() |
||
---|---|---|
Version | 1.0 | |
Modified | 15-JAN-2025 13:23:36.00 |
Long time storage of data for a trend graph. In every node where trend graphs shall be stored there is a need of a DsTrend job, which is searching through the local data storage objects of the node. Every measurant which has to be plotted demands a data storage object. Attributes in the objects specify for example the name of the measurant and how often it is to be stored, see figure 3-13. A measurant may be used by several different data storage objects, for example to store at different frequencies.
DsTrend Job with Data Storage Objects Note! Remember that the sampling rate of physical hardware is finite. At present Ai-signals are sampled at 5 Hz, Co-, Di-, Do-, and Dv-signals at the base frequency determined by the fastest running PLC program of the node. Highest possible base frequency is 50 Hz. A trend graph consists of measurant data collected at some frequency. Collected values are stored in DataBuffer. Internally DataBuffer is divided into two equal sub-buffers. The way of working is to update every element in one of the sub-buffers and then continue with the first element in the other sub-buffer. When also the last element in the second sub-buffer has been updated the updating process continues with the first element in the first sub-buffer. The sub-buffers are updated in turn. BufferStatus specifies how the sub-buffers are used in a certain moment. The measurant has to be a local quantity. So, DsTrend objects have to reside at the same node as the mesurants in the runtime environment. The dsTrend module is included in the EBUILD-file of the node by means of program PWR_EXE:RS_DS_TREND.EXE_ELN /warm_debug The measurant is supposed to be of any of the types: - pwr_tBoolean - pwr_tFloat32, pwr_tFloat64 - pwr_tInt8, pwr_tInt16, pwr_tInt32 - pwr_tUInt8, pwr_tUInt16, pwr_tUInt32Hints
If a signal is associated with an object by the type DsTrend, DsFast, or DsHist this relation may be marked by putting the object direct below the current signal object.
Configuration of a DsTrend ObjectObject graph
RtBody attributes pwr_sClass_DsTrend | |||
---|---|---|---|
String80 | Description | Optional text. | |
UInt32 | ScanTime | The scanning period, in seconds, of the DsTrend job. See also Multiple. The attribute, is assigned the same value as corresponding attribute in the DsTrendConf object of the node. This is done at the initialisation of the DsTrend job. |
|
UInt16 | Multiple | The individual quantity is stored at the period of ScanTime * Multiple. |
|
UInt16 | NextMultiple | Specifies at which scan this data storage object has to be updated. It is set equal to Multiple and then decreased at every scanning. If NextMultiple = 0 storage will take place, and NextMultiple is set equal to the value of Multiple. |
|
UInt32 | DataType | The datatype of stored measurant. It has to be any of the types pwr_tBoolean, pwr_tFloat32, pwr_tFloat64, pwr_tInt8, pwr_tInt16, pwr_tInt32, pwr_tUInt8, pwr_tUInt16, or pwr_tUInt32. |
|
AttrRef | DataName | The complete name of the analog measurant, for example PROC1-TEMP1.ActualValue. The measurant has to be represented by a local object. |
|
Pointer to Float32 | DataPointer | Pointer to the analog measurant which is to be stored. | |
RefId | DataSubId | Identity at subscription of the measurant. | |
UInt32 | StorageTime | Length, in seconds, of the testing result. If the time exceeds what is possible to store in DataBuffer, the storage is stopped when DataBuffer has been filled. StorageTime, Multiple , BaseFrequency and NoOfBufElement determines NoOfSample. |
|
CurveLayoutMask | Layout | Curve window layout. | |
UInt32 | NoOfSample | Number of samples per sub-buffer. | |
UInt16 | WriteBuffer | Specifies which sub-buffer is used for writing at the moment. = 0, .... (NoOfBuffers - 1) NextWriteIndex[2] |
|
Array of UInt16 | NextWriteIndex | Specifies the location in the current sub-buffer where the next writing will be done. |
|
Array of UInt16 | BufferStatus | Specifies the current status of the sub-buffers. -- 0 The sub-buffer is not used for writing. -- 1 The sub-buffer is used for writing. |
|
UInt16 | NoOfBuffers | Specifies the number of sub-buffers in the area DataBuffer. |
|
UInt16 | NoOfBufElement | Specifies the number of elements in every sub-buffer. BufferTime[2] |
|
Array of Time | BufferTime | Time (per sub-buffer) when the first storage in a writing session was made. |
|
Array of Float32 | DataBuffer | Total accessible storage memory. The maximum size is determined by NoOfBuffers NoOfBufElement, which is equal to the maximum number of samples in the same storage cycle. |
Template Object | |
---|---|
Multiple | 1 |
StorageTime | 239 |
BufferStatus[0] | 1 |
BufferStatus[1] | 1 |
NoOfBuffers | 2 |
NoOfBufElement | 239 |
Description Attribute | ||
---|---|---|
Class | Attribute | |
Type | String80 | |
Flags | ||
Body | RtBody |
Optional text.
ScanTime Attribute | ||
---|---|---|
Class | Attribute | |
Type | UInt32 | |
Flags | STATE | INVISIBLE | |
Body | RtBody |
The scanning period, in seconds, of the DsTrend job. See also Multiple. The attribute, is assigned the same value as corresponding attribute in the DsTrendConf object of the node. This is done at the initialisation of the DsTrend job.
Multiple Attribute | ||
---|---|---|
Class | Attribute | |
Type | UInt16 | |
Flags | ||
Body | RtBody |
The individual quantity is stored at the period of ScanTime * Multiple.
NextMultiple Attribute | ||
---|---|---|
Class | Attribute | |
Type | UInt16 | |
Flags | STATE | INVISIBLE | |
Body | RtBody |
Specifies at which scan this data storage object has to be updated. It is set equal to Multiple and then decreased at every scanning. If NextMultiple = 0 storage will take place, and NextMultiple is set equal to the value of Multiple.
DataType Attribute | ||
---|---|---|
Class | Attribute | |
Type | UInt32 | |
Flags | STATE | INVISIBLE | |
Body | RtBody |
The datatype of stored measurant. It has to be any of the types pwr_tBoolean, pwr_tFloat32, pwr_tFloat64, pwr_tInt8, pwr_tInt16, pwr_tInt32, pwr_tUInt8, pwr_tUInt16, or pwr_tUInt32.
DataName Attribute | ||
---|---|---|
Class | Attribute | |
Type | AttrRef | |
Flags | ||
Body | RtBody |
The complete name of the analog measurant, for example PROC1-TEMP1.ActualValue. The measurant has to be represented by a local object.
DataPointer Attribute | ||
---|---|---|
Class | Attribute | |
Type | Pointer to Float32 | |
Flags | POINTER | PRIVATE | STATE | INVISIBLE | |
Body | RtBody |
Pointer to the analog measurant which is to be stored.
DataSubId Attribute | ||
---|---|---|
Class | Attribute | |
Type | RefId | |
Flags | STATE | INVISIBLE | |
Body | RtBody |
Identity at subscription of the measurant.
StorageTime Attribute | ||
---|---|---|
Class | Attribute | |
Type | UInt32 | |
Flags | ||
Body | RtBody |
Length, in seconds, of the testing result. If the time exceeds what is possible to store in DataBuffer, the storage is stopped when DataBuffer has been filled. StorageTime, Multiple , BaseFrequency and NoOfBufElement determines NoOfSample.
Layout Attribute | ||
---|---|---|
Class | Attribute | |
Type | CurveLayoutMask | |
Flags | ||
Body | RtBody |
Curve window layout.
NoOfSample Attribute | ||
---|---|---|
Class | Attribute | |
Type | UInt32 | |
Flags | STATE | INVISIBLE | |
Body | RtBody |
Number of samples per sub-buffer.
WriteBuffer Attribute | ||
---|---|---|
Class | Attribute | |
Type | UInt16 | |
Flags | STATE | INVISIBLE | |
Body | RtBody |
Specifies which sub-buffer is used for writing at the moment. = 0, .... (NoOfBuffers - 1) NextWriteIndex[2]
NextWriteIndex Attribute | ||
---|---|---|
Class | Attribute | |
Type | Array of UInt16 | |
Flags | ARRAY | STATE | INVISIBLE | |
Elements | 2 | |
Body | RtBody |
Specifies the location in the current sub-buffer where the next writing will be done.
BufferStatus Attribute | ||
---|---|---|
Class | Attribute | |
Type | Array of UInt16 | |
Flags | ARRAY | STATE | INVISIBLE | |
Elements | 2 | |
Body | RtBody |
Specifies the current status of the sub-buffers. -- 0 The sub-buffer is not used for writing. -- 1 The sub-buffer is used for writing.
NoOfBuffers Attribute | ||
---|---|---|
Class | Attribute | |
Type | UInt16 | |
Flags | CONST | INVISIBLE | |
Body | RtBody |
Specifies the number of sub-buffers in the area DataBuffer.
NoOfBufElement Attribute | ||
---|---|---|
Class | Attribute | |
Type | UInt16 | |
Flags | CONST | INVISIBLE | |
Body | RtBody |
Specifies the number of elements in every sub-buffer. BufferTime[2]
BufferTime Attribute | ||
---|---|---|
Class | Attribute | |
Type | Array of Time | |
Flags | ARRAY | STATE | INVISIBLE | |
Elements | 2 | |
Body | RtBody |
Time (per sub-buffer) when the first storage in a writing session was made.
DataBuffer Attribute | ||
---|---|---|
Class | Attribute | |
Type | Array of Float32 | |
Flags | ARRAY | STATE | INVISIBLE | |
Elements | 478 | |
Body | RtBody |
Total accessible storage memory. The maximum size is determined by NoOfBuffers NoOfBufElement, which is equal to the maximum number of samples in the same storage cycle.