Applies To:
  • CitectSCADA 5.xx, 6.xx, 7.xx
  • CitectHMI 5.xx, 6.xx, 7.xx

Summary:

How do you create an operator log that will record writes to variable tags?  


Solution:

There are a number of ways to accomplish this, depending on the specific needs. Methods 1 - 3 create a separate log file on each client PC.

1. Use the Tag Write Event Queue feature. Each CitectSCADA node creates a queue in memory and logs the tag name and value each time a write occurs. Logging is enabled at the I/O device level.

Pros: No graphic changes are necessary. Any desired information may be logged. Writes from Cicode, events, etc. is also logged.

Cons: Logging occurs for every tag in the selected I/O devices unless the Cicode filters out undesired tags.

See <link to new article: How to Use Tag Write Event Queues> for more information on using the Tag Write Event Queue feature.

2. Use the built-in command logging feature. The developer enters a log message and log device on all the graphic objects which write to tags that need to be logged.

Pros: Any custom text message may be logged. Only desired objects will be logged. Additional fields of information may be logged (see the 'Using Command Fields' help topic).

Cons: Every graphic object to be logged must be edited. If a tag can be written to from multiple objects or from multiple touch or key commands in one object, they must all be configured for logging. A custom logging function must be written in Cicode for logging writes from Cicode, events, etc. Only the predefined command fields may be logged. The new value may only be logged if it was entered as a keyboard command (Argx or ArgValuex).

3. Use a custom Cicode logging function. Each graphic object to be logged must be configured to call the function and pass the desired information (tag name, value, etc). See the OperLog() function in the Example project.

Pros: Any desired information may be logged.

Cons: Every graphic object to be logged must be edited. If a tag can be written to from multiple objects, they must all be configured for logging.

4. CitectSCADA v7.00 has a new TagSubscribe() Cicode function to monitor tags for changes. However it does not indicate if the new value came from Citect.

5. The CTAPI (Citect Application Programming Interface) function ctListEvent may be used to monitor tags for changes. However, it does not indicate if the new value came from Citect.

 

Keywords:
 

Attachments