AlarmStorageConvertValueToString (FUN) ¶ FUNCTION AlarmStorageConvertValueToString : STRING Converts a value read from the alarm storage into a suitable string representation. InOut: Scope Name Type Comment Return AlarmStorageConvertValueToString STRING Input liValue LINT The value, that was read from TblAlarm iType TypeClass A TypeClass value representing the type of the value xValueNULL BOOL Indicates, whether NULL is stored in the alarm storage
AlarmStorageGetDefaultText (FUN) ¶ FUNCTION AlarmStorageGetDefaultText : CharBufferPtr This function can be used to determine the default text of a message of an alarm, that was read from the alarm storage. InOut: Scope Name Type Comment Return AlarmStorageGetDefaultText CharBufferPtr A CharBufferPtr containing the default text. A NULL pointer if the corresponding information cannot be retrieved Input udiAlarmGroupId UDINT The internal id of the alarm group, that was read from the alarm storage udiAlarmId UDINT The internal id of the alarm, that was read from the alarm storage iWhichMessage INT The 1-based index of the text id. stringType __SYSTEM.TYPE_CLASS A __SYSTEM.TYPE_CLASS indicating, which type of string has to be retrieved. Pass either __SYSTEM.TYPE_CLASS.TYPE_STRING or __SYSTEM.TYPE_CLASS.TYPE_WSTRING
AlarmStorageGetMessageCount (FUN) ¶ FUNCTION AlarmStorageGetMessageCount : USINT This function can be used to determine the number of messages an alarm belonging to a given alarm group has. InOut: Scope Name Type Comment Return AlarmStorageGetMessageCount USINT The number of messages. 0 if the corresponding information cannot be retrieved Input udiAlarmGroupId UDINT The internal id of the alarm group, that was read from the alarm storage udiAlarmId UDINT The internal id of the alarm, that was read from the alarm storage
Alarm storage API ¶ AlarmStorageConvertFromTimestamp (Function) AlarmStorageConvertToTimestamp (Function) AlarmStorageConvertValueToLREAL (Function) AlarmStorageConvertValueToREAL (Function) AlarmStorageConvertValueToString (Function) AlarmStorageGetDefaultText (Function) AlarmStorageGetMessageCount (Function) AlarmStorageGetTextId (Function) AlarmStorageGetTextListName (Function) AlarmStorageReader (FunctionBlock) AddAlarmStorageListener (Method) ContinueReading (Method) FB_Init (Method) GetFirstLastRowID (Method) GetMinMaxTimestamps (Method) Read (Method) RemoveAlarmStorageListener (Method) SemaphoreAcquire (Method) SemaphoreRelease (Method) private prvReadAlarmComment (Method) prvReadLatchVarString (Method) prvReadLatchVarString2 (Method) prvRetrieveLatchVarValue (Method) prvTblAlarmFindTimestamp (Method) AlarmStorageReaderGlobals (GVL) AlarmStorageRow (FunctionBlock) GetLatchVarValue (Method) ResetAlarmComments (Method) SetLatchVarValue (Method) AlarmStorageStaticData (Struct) EAlarmComment (Enum) EAlarmStorageReaderErrors (Enum) IAlarmStorageListener (Interface) AlarmAdded (Method) AlarmModified (Method) IAlarmStorageReaderConsumer (Interface) AlarmRead (Method) BeforeReading (Method) LatchVariableRead (Method) ReadingDataCompleted (Method) IAlarmStorageReaderConsumer2 (Interface) ByteOrder (Property)
AlarmStorageConvertFromTimestamp (FUN) ¶ FUNCTION AlarmStorageConvertFromTimestamp : SYSTIMEDATE Converts a timestamp into a SYSTIMEDATE (UTC value). InOut: Scope Name Type Comment Return AlarmStorageConvertFromTimestamp SYSTIMEDATE A SYSTIMEDATE variable representing the timestamp. Input liTimestamp Timestamp The timestamp from the alarmstorage
AlarmStorageConvertToTimestamp (FUN) ¶ FUNCTION AlarmStorageConvertToTimestamp : Timestamp This function provides the inverse functionality of function AlarmStorageConvertFromTimestamp. Converts SYSTIMEDATE (UTC value) into a timestamp. InOut: Scope Name Type Comment Return AlarmStorageConvertToTimestamp Timestamp The timestamp in the alarm storage format. Input timeDate SYSTIMEDATE A SYSTIMEDATE struct containing the date and time (UTC)
AlarmStorageGetTextId (FUN) ¶ FUNCTION AlarmStorageGetTextId : STRING This function can be used to determine the text id of a message of an alarm, that was read from the alarm storage. InOut: Scope Name Type Comment Return AlarmStorageGetTextId STRING The text id. An empty string if the corresponding information cannot be retrieved Input udiAlarmGroupId UDINT The internal id of the alarm group, that was read from the alarm storage udiAlarmId UDINT The internal id of the alarm, that was read from the alarm storage iWhichMessage INT The 1-based index of the text id.
AlarmStorageGetTextListName (FUN) ¶ FUNCTION AlarmStorageGetTextListName : POINTER TO STRING This function can be used to determine the name of the textlist of an alarm group, that was read from the alarm storage. InOut: Scope Name Type Comment Return AlarmStorageGetTextListName POINTER TO STRING A pointer to a STRING containing the name of the textlist. A NULL pointer if the corresponding information cannot be retrieved Input udiAlarmGroupId UDINT The internal id of the alarm group, that was read from the alarm storage udiAlarmId UDINT The internal id of the alarm, that was read from the alarm storage
AlarmStorageReader (FB) ¶ FUNCTION_BLOCK AlarmStorageReader EXTENDS AlarmStorageManager This function block is used to read data from the alarm storage. We use a function block instead of functions to be able to store some state like the already opened table or alarm storage. InOut: Scope Name Type Initial Comment Input _hLock RTS_IEC_HANDLE RTS_INVALID_HANDLE Used to synchronize the access to THIS instance, because there might be a potential usage from the application code, not only from the visualization code Methods: AddAlarmStorageListener ContinueReading FB_Init GetFirstLastRowID GetMinMaxTimestamps Read RemoveAlarmStorageListener SemaphoreAcquire SemaphoreRelease prvReadAlarmComment prvReadLatchVarString prvReadLatchVarString2 prvRetrieveLatchVarValue prvTblAlarmFindTimestamp Structure: AddAlarmStorageListener (Method) ContinueReading (Method) FB_Init (Method) GetFirstLastRowID (Method) GetMinMaxTimestamps (Method) Read (Method) RemoveAlarmStorageListener (Method) SemaphoreAcquire (Method) SemaphoreRelease (Method) private prvReadAlarmComment (Method) prvReadLatchVarString (Method) prvReadLatchVarString2 (Method) prvRetrieveLatchVarValue (Method) prvTblAlarmFindTimestamp (Method)
AlarmStateTransition (ENUM) ¶ TYPE AlarmStateTransition : This enumeration defines the possible state changes an alarm can have. InOut: Name Initial Comment NoTransition 0 Value signals, that there is no alarm state transition Pending -1 An inactive alarm is going to be pending (alarm condition is true, but alarm is not yet active). Activate 1 An inactive (resp. pending) alarm is going to be active (alarm condition is true). Deactivate 2 An active alarm is going to be inactive (alarm condition is no longer true). Acknowledge 3 Alarm is still active and will be acknowledged. Confirm 4 Alarm is no longer active and will be confirmed. ReAlarm 5 Alarm gets re-alarmed