Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

HwAlarmQue

  • Last UpdatedJul 18, 2023
  • 2 minute read

Returns the handle of the hardware alarm queue. The Alarms Server writes hardware alarm information into this queue as each hardware alarm occurs. To read events from this queue, use the QueRead or QuePeek functions. The data written into the queue is the hardware alarm format, and is stored in the Str field.

To use this function, you need to enable the hardware alarm queue by specifying the [Alarm]HwAlarmQueMax parameter. This parameter specifies the maximum length that the queue can grow to. The [Alarm]HwAlarmFmt parameter defines the format of the data placed into the string field. If HwAlarmFmt is not specified then the format defaults to "Time: {Time,12} Date:{Date,11} Desc:{Desc,40}".

The following format fields are relevant to hardware alarms:

  • {Tag,n}

  • {TagEx,n}

  • {Cluster,n}

  • {Name,n}

  • {State,n}

  • {Time,n}

  • {Date,n}

  • {Desc,n}

  • {ErrDesc,n}

  • {ErrPage,n}

For a description of the fields see the "Alarm Display Fields" help page.

The number of buffers available for user queues is controlled by the [Code]Queue parameter. Each entry in any user queue consumes one buffer. When all buffers have been used the alarms server will not be able to add new hardware alarms to the queue, and the error message "Out Of Buffers Usr.Que" will be written to syslog.dat.

Note: When similar hardware alarms are triggered, for example "Tag not found" alarms, the hardware alarm page and hardware alarm queue show the last invalid entry. The previous entry of the same description is overwritten.

Syntax

HwAlarmQue( )

Return Value

The handle of the hardware alarm queue, or -1 if the queue cannot be opened.

QueRead, QuePeek

Example


hQue = HwAlarmQue()
WHILE TRUE DO
QueRead(hQue, nAlarmType, sHwAlarmString, 1);
/* do whatever with the alarm information */
....
Sleep(0);
END

See Also

Alarm Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in