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 IODevices have their Log Write parameter enabled.
The handle of the tag write event queue, or -1 if the queue cannot be opened.
AlarmEventQue, QueRead, QuePeek
To enable tag logging:
To read the queue you need to create a Cicode function. For example:
STRING sTagAndValue = "";
INT nDateTime = 0;
INT hQue = TagWriteEventQue();
IF hQue = -1 THEN
WHILE 1 DO
QueRead(hQue, nDateTime, sTagAndValue, 1);
Message("Value written", sTagAndValue, 64);
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 CitectSCADA can generate a user activity log with respect to setting data within the control system. This functionality can also be combined with CitectSCADA Reports to augment the detail of the historian data.