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

AVEVA™ Plant SCADA

TagWriteEventQue

  • Last UpdatedJul 18, 2023
  • 2 minute read

Opens the tag write event queue. The TagWriteEventQue is a queue of data containing details of tag value changes initiated by the process. To read events from the queue, use the QueRead() or QuePeek() functions. The queue contains timestamp, tagname and value data for each change event.

This queue is enabled by the corresponding INI parameter [General]TagWriteEventQue. Writes are logged to the queue for all tags whose I/O devices have their Log Write parameter enabled.

Syntax

TagWriteEventQue()

Return Value

The handle of the tag write event queue, or -1 if the queue cannot be opened.

AlarmEventQue, QueRead, QuePeek

Example

To enable tag logging:

  • On the client, set the INI param [General]TagWriteEventQue = 1.

  • Enable the IODevices that you want to be logged by setting their Log Write parameters to TRUE. See I/O Devices Properties.

To read the queue you need to create a Cicode function. For example:

FUNCTION

checkWrite()

STRING sTagAndValue = "";

INT nDateTime = 0;

INT hQue = TagWriteEventQue();

IF hQue = -1 THEN

RETURN;

END

WHILE 1 DO

QueRead(hQue, nDateTime, sTagAndValue, 1);

Message("Value written", sTagAndValue, 64);

END

END

Where:

  • nDateTime is the timestamp of the tag write.

  • sTagAndValue is the tagname and value written to the queue.

When the function is run, successful writes to tags on the IODevice will show as a message "Value written <tagname> <value>".

Note: The TagWriteEventQue is enabled on each process and will only log the data changes initiated by this process. By combining this data with the current user and machine name Plant SCADA can generate a user activity log with respect to setting data within the control system. This functionality can also be combined with Plant SCADA Reports to augment the detail of the historian data.

See Also

Tag Functions

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