Class DsFast
Version 1.0
Modified 15-JAN-2025 13:23:34.00
 Stores data for a fast graph à la storage oscilloscope.

 In every node where fast graphs should be stored there
 is a need for a DsFast job to search through the local
 data storage objects of the node.
 For every attribute to be plotted there has to be a
 data storage object. Attributes in the objects specify
 for example the name of the sampled attribute and how
 often it is to be stored, see figure below. An attribute
 may be referred to by several different data storage
 objects, for example to store at different frequencies.
 DsFast 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
 and Co-, Di-, Do-, and Dv-signals at the base frequency
 which is equal to the fastest running PLC program of
 the node. Highest possible base frequency is 50 Hz.
 Data is stored in a circular buffer with a size of
 NoOfBufElement.

 The cycle of samples is started when the Start-flag
 (see below) is set. This can be done by means of the
 Start-button in the fast graph. The attribute is
 sampled and the values are stored in the DataBuffer.
 When all elements in the buffer have got values once in
 this way, AllDataOK is set.
 The Trigged flag can be set by two different events:

 1  manually from for example the fast graph by the
    Trigger- button. In this case TrigManTrue is set.
 2  via the outer signal named by the TrigName
    attribute.

 The cycle of samples continues with further
 NoOfBufElement - SampBeforeTrig samples when the
 Trigged flag has been set and stops after that. Test
 values in the buffer are frozen and the plotting is
 done in the fast graph.
 The sampled attribute has to be a local quantity. So,
 DsFast objects have to reside at the same node as the
 sampled attribute in the runtime environment.

 The DsFast module is included in the EBUILD-file of the
 node by means of:
       program PWR_EXE:RS_DS_FAST.EXE_ELN /warm_debug
 The sampled attribute 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_tUInt32

RtBody attributes pwr_sClass_DsFast
String80 Description   Optional text.
Boolean Start   Specifies whether the storage will be done or not.
FALSE means that the storage shall be stopped. TRUE
causes the storage to start. This can be done by the
start button in the fast graph. The attribute is set
FALSE when a storage cycle is ended.
UInt32 BaseFrequency   The frequency of the DsFast job in Hz. See also
Multiple below.
The attribute is assigned the same value as the
corresponding attribute in the DsFastConf object of the
node. This is done at the initialisation of the DsFast
job.
UInt16 Multiple   The individual quantity is stored at the frequency of
BaseFrequency/ Multiple.
UInt16 NextMultiple   Specifies at which scan this data storage object has to
be updated. Is put equal to Multiple and is then
decreased at every scan. If NextMultiple = 0 storage
will take place and NextMultiple is put equal to the
value of Multiple.
UInt8 TrigMode   Specifies the trigger condition of the binary trigger
signal named by TrigName. The following values are
possible:

-- 0 the trigger signal is disabled.
-- 1 leading edge, i.e. the transition FALSE -> TRUE starts storage.
-- 2 trailing edge, i.e. the transition TRUE -> FALSE starts storage.
AttrRef TrigName   The complete name of an external binary trigger signal,
for example a local quantity, PROC1-Di123.ActualValue.
The attribute is left blank if no external trigger
signal will be used.
Pointer to Boolean TrigPointer   Pointer to the trigger signal specified by TrigName.
RefId TrigSubId   Identity at subscription of the trigger signal.
Boolean TrigManTrue   Specifies an unconditional setting of the trigger
signal independent of the state of TrigName. Is set
TRUE for example via the trigger button in the fast
graph and becomes FALSE when the cycle of the sample is
ended.
UInt8 DataType   Stores measurant's data type. It has to be of 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 an analog sampled attribute, for
example PROC1-TEMP1.ActualValue. The attribute has to
be represented by a local object.
Pointer to Float32 DataPointer   Pointer to the attribute which is to be stored.
RefId DataSubId   Identity at subscription of the sampled attribute.
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 is filled.
StorageTime, Multiple, BaseFrequency and NoOfBufElement
determines NoOfSample.
UInt32 NoOfSample   Number of samples which can be stored in the DataBuffer.
SampBeforeTrig
UInt32 SampBeforeTrig   Number of samples before the trigger point. These
samples are included in the testing result.
UInt32 TrigIndex   Specifies the first element in DataBuffer since the
triggering has taken place.
Boolean Trigged   Specifies if the trigger condition, under current cycle
of samples, has been satisfied or not. Becomes FALSE as
soon as the cycle of samples is ended. TRUE means that
the trigger condition is established.
UInt32 NextIndex   Specifies the location in the buffer where the next
writing will be done.
Boolean AllDataOK   Specifies if the whole buffer has been updated since
the Start attribute was set or not. Becomes FALSE as
soon as the cycle of samples is ended. TRUE means that
the DataBuffer has been updated at least once.
UInt16 NoOfBufElement   Maximum number of elements in DataBuffer. Specifies the
number of samples which can be stored at the same time.
DataBuffer[460]
Array of Float32 DataBuffer   Total accessible storage memory. The maximum size is
determined by NoOfBufElement.


Template Object
StorageTime 9
BaseFrequency 50
Multiple 1
NoOfBufElement 460


Attributes detail


Description Attribute
Class Attribute
Type String80
Flags
Body RtBody
 Optional text.

Start Attribute
Class Attribute
Type Boolean
Flags STATE | INVISIBLE
Body RtBody
 Specifies whether the storage will be done or not.
 FALSE means that the storage shall be stopped. TRUE
 causes the storage to start. This can be done by the
 start button in the fast graph. The attribute is set
 FALSE when a storage cycle is ended.

BaseFrequency Attribute
Class Attribute
Type UInt32
Flags STATE | INVISIBLE
Body RtBody
 The frequency of the DsFast job in Hz. See also
 Multiple below.
 The attribute is assigned the same value as the
 corresponding attribute in the DsFastConf object of the
 node. This is done at the initialisation of the DsFast
 job.

Multiple Attribute
Class Attribute
Type UInt16
Flags
Body RtBody
 The individual quantity is stored at the frequency of
 BaseFrequency/ Multiple.

NextMultiple Attribute
Class Attribute
Type UInt16
Flags STATE | INVISIBLE
Body RtBody
 Specifies at which scan this data storage object has to
 be updated. Is put equal to Multiple and is then
 decreased at every scan. If NextMultiple = 0 storage
 will take place and NextMultiple is put equal to the
 value of Multiple.

TrigMode Attribute
Class Attribute
Type UInt8
Flags
Body RtBody
 Specifies the trigger condition of the binary trigger
 signal named by TrigName. The following values are
 possible:

    -- 0   the trigger signal is disabled.
    -- 1   leading edge, i.e. the transition FALSE -> TRUE starts storage.
    -- 2   trailing edge, i.e. the transition TRUE -> FALSE starts storage.

TrigName Attribute
Class Attribute
Type AttrRef
Flags
Body RtBody
 The complete name of an external binary trigger signal,
 for example a local quantity, PROC1-Di123.ActualValue.
 The attribute is left blank if no external trigger
 signal will be used.

TrigPointer Attribute
Class Attribute
Type Pointer to Boolean
Flags POINTER | PRIVATE | STATE | INVISIBLE
Body RtBody
 Pointer to the trigger signal specified by TrigName.

TrigSubId Attribute
Class Attribute
Type RefId
Flags STATE | INVISIBLE
Body RtBody
 Identity at subscription of the trigger signal.

TrigManTrue Attribute
Class Attribute
Type Boolean
Flags STATE | INVISIBLE
Body RtBody
 Specifies an unconditional setting of the trigger
 signal independent of the state of TrigName. Is set
 TRUE for example via the trigger button in the fast
 graph and becomes FALSE when the cycle of the sample is
 ended.

DataType Attribute
Class Attribute
Type UInt8
Flags STATE | INVISIBLE
Body RtBody
 Stores measurant's data type. It has to be of 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 an analog sampled attribute, for
 example PROC1-TEMP1.ActualValue. The attribute 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 attribute which is to be stored.

DataSubId Attribute
Class Attribute
Type RefId
Flags STATE | INVISIBLE
Body RtBody
 Identity at subscription of the sampled attribute.

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 is filled.
 StorageTime, Multiple, BaseFrequency and NoOfBufElement
 determines NoOfSample.

NoOfSample Attribute
Class Attribute
Type UInt32
Flags STATE | INVISIBLE
Body RtBody
 Number of samples which can be stored in the DataBuffer.
 SampBeforeTrig

SampBeforeTrig Attribute
Class Attribute
Type UInt32
Flags
Body RtBody
 Number of samples before the trigger point. These
 samples are included in the testing result.

TrigIndex Attribute
Class Attribute
Type UInt32
Flags STATE | INVISIBLE
Body RtBody
 Specifies the first element in DataBuffer since the
 triggering has taken place.

Trigged Attribute
Class Attribute
Type Boolean
Flags STATE | INVISIBLE
Body RtBody
 Specifies if the trigger condition, under current cycle
 of samples, has been satisfied or not. Becomes FALSE as
 soon as the cycle of samples is ended. TRUE means that
 the trigger condition is established.

NextIndex Attribute
Class Attribute
Type UInt32
Flags STATE | INVISIBLE
Body RtBody
 Specifies the location in the buffer where the next
 writing will be done.

AllDataOK Attribute
Class Attribute
Type Boolean
Flags STATE | INVISIBLE
Body RtBody
 Specifies if the whole buffer has been updated since
 the Start attribute was set or not. Becomes FALSE as
 soon as the cycle of samples is ended. TRUE means that
 the DataBuffer has been updated at least once.

NoOfBufElement Attribute
Class Attribute
Type UInt16
Flags CONST | INVISIBLE
Body RtBody
 Maximum number of elements in DataBuffer. Specifies the
 number of samples which can be stored at the same time.
 DataBuffer[460]

DataBuffer Attribute
Class Attribute
Type Array of Float32
Flags ARRAY | STATE | INVISIBLE
Elements 460
Body RtBody
 Total accessible storage memory. The maximum size is
 determined by NoOfBufElement.