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

AVEVA™ Plant SCADA

CitectInfo

  • Last UpdatedFeb 20, 2024
  • 6 minute read

Gets information about a Plant SCADA variable. This function returns internal statistics and other information about the Plant SCADAruntime system.

Note: This function is a non-blocking function and can only access data contained within the calling process; consequently it cannot return data contained in a different server process. This function is not redirected automatically by Plant SCADA runtime. If you want to make a call from one process to return data in another, use MsgRPC() to make a remote procedure call on the other process. Alternatively, include the server process that has the information that CitectInfo requires in the calling process.

Syntax

CitectInfo(sGroup, sName, sType)

sGroup:

The name of the group to which the variable belongs. Valid group names are: "General", "Port", "IODevice", "Network", "Stats", "Memory", "Disk", "Queue" or "Security".

sName:

The name of the variable. This name depends on sGroup:

"General" - the name is ignored.

"Port" - the name of the I/O port configured in the database (with the Ports database). The port information is only valid for an I/O server. If the port name is "total", the total statistics for the I/O server are returned.

"IODevice" - the name of the I/O device configured in the I/O devices database.

"Network" - the name is ignored.

"Stats" - The name of the statistics buffer or Statistical Information Record (SIR):

• "Alarm Proc" - Alarm Processing (includes Digital, Analog, Advanced and High Resolution alarms).

• "Citect n" - The Plant SCADA window where n is the window number (returned from the WinNumber() function)

• "Code n" - The user Cicode task (thread) where n is the task handle (returned from the TaskHnd() function)

• "Reset" - Reset the Plant SCADA statistics.

• "ElapsedTimeMS" - The elapsed time since statistics have been reset. Returns -1 if more than 20 days has elapsed.

"Memory" - the measurement used

• 0 = bytes

• KB = kilobytes

• MB = megabytes

• GB = gigabytes

"Disk" - The disk drive to access:

• 0 = The current drive

• 3 = C:

• 4 = D: and so on.

"Queue" - The name of the queue.

sType:

The type of information to get, depending on sGroup:

"General" - General statistics:

0 - CPU usage

1 - Plant SCADA Kernel cycles per second

2 - Plant SCADA Kernel tasks per second

3 - Plant SCADA Kernel boot time

4 - Plant SCADA Kernel running time (in seconds)

5 - Plant SCADA startup time

6 - Plant SCADA running time in seconds

7 - Not supported in v7.10 or later

8 - Total read requests

9 - Total read requests per second

10 - Total write requests

11 - Total write requests per second

12 - Total Physical read requests

13 - Total Physical read requests per second

14 - Total Physical write requests

15 - Total Physical write requests per second

16 - Total Blocked read requests

17 - Total Blocked write requests

18 - Total Digital read requests

19 - Total Register read requests

20 - Total Digital read requests per second

21 - Total Register read requests per second

22 - Total Cache reads count

23 - Total Cache reads %

24 - Overall Average response time (ms)

25 - Overall Minimum response time (ms)

26 - Overall Maximum response time (ms)

27 - Request sample for response times

28 - Static point count is no longer supported. Calling the function with parameter 28 returns a value of 0 and a hardware alarm is raised.

29 - Dynamic point count currently in use

30 - Number of pending read requests from the device

31 - Number of pending write requests to the device

32 - Determines if Plant SCADA Kernel window is open

33 - Percentage of the CPU used by the current Plant SCADA process

34 - Total CPU time spent by the current Plant SCADA process in milliseconds

35 - Total number of handles opened by the current Plant SCADA process

36 - Total number of threads owned by the current Plant SCADA process

"Port" - Port information for the I/O Server:

0 - Read requests

1 - Write requests

2 - Physical read requests

3 - Physical write requests

4 - Cached read requests

5 - Cached write requests

6 - Blocked read requests

7 - Blocked write requests

8 - Read requests per second

9 - Write requests per second

10 - Error count

11 - Read bytes counter

12 - Channel usage %

13 - Read bytes per second

14 - Statistics, minimum read time

15 - Statistics, maximum read time

16 - Statistics, average read time

17 - Statistics, time of samples

18 - Statistics, number of sample

100 - 119 - Driver specific counter values. Plant SCADA drivers can maintain up to 20 unique counters that can be accessed via this function. They are zero based, indexed from 100 to 119. If a value is not defined or maintained by the driver, 0 is returned for the value of the counter.

"IODevice" - I/O device information for the I/O device:

0 - Client side status:

• 1 = Running - Client is either talking to an online IO device or talking to a scheduled device that is not currently connected but has a valid cache

• 2 = Standby - Client is talking to an online standby IO device

• 4 = Starting - Client is talking to an IO device that is attempting to come online

• 8 = Stopping - Client is talking to an IO device that is in the process of stopping

• 16 = Offline - Client is pointing to an IO device that is currently offline

• 32 = Disabled - Client is pointing to a device that is disabled

• 66 = Standby write - Client is talking to an I/O device configured as a standby write device

1 - I/O Server status:

• 1 = Running - I/O Server is either talking to an online IO device or talking to a scheduled device that is not currently connected but has a valid cache

• 2 = Standby - I/O Server is talking to an online standby IO device

• 4 = Starting - I/O Server is talking to an IO device that is attempting to come online

• 8 = Stopping - I/O Server is talking to an IO device that is in the process of stopping

• 16 = Offline - I/O Server is pointing to an IO device that is currently offline

• 32 = Disabled - I/O Server is pointing to a device that is disabled

• 66 = Standby write - I/O Server is talking to an I/O device configured as a standby write device

2 - If this I/O device is a standby device

3 - Last generic error

4 - Last driver error

5 - Error count

6 - Initialization count

7 - Statistics, minimum read time

8 - Statistics, maximum read time

9 - Statistics, average read time

10 - Statistics, number of samples

"Network" - Network statistical information:

0 - Read Network Control Blocks (NCBs)

1 - Maximum pending read NCBs

2 - Minimum pending read NCBs

3 - Current pending read NCBs

4 - Number of short read NCBs

5 - Write NCBs

6 - Maximum pending write NCBs

7 - Minimum pending write NCBs

8 - Current pending write NCBs

9 - Number of short write NCBs

10 - Total NCBs

11 - Maximum pending total NCBs

12 - Minimum pending total NCBs

13 - Current pending total NCBs

14 - Number of short total NCBs

15 - Minimum send response time in milliseconds

16 - Maximum send response time in milliseconds

17 - Average send response time in milliseconds

18 - Send packet count

"Stats" - Statistical information:

0 - Minimum time between code executions (cycles)

1 - Maximum time between code executions (cycles)

2 - Average time between code executions (cycles)

3 - Total cycle time in milliseconds

4 - Minimum time to execute the code in milliseconds

5 - Maximum time to execute the code in milliseconds

6 - Average time to execute the code in milliseconds

7 - Total execute time in milliseconds

"Memory" - Memory information:

0 - Free virtual memory

1 - Free windows system resources as %

2 - Free Physical Memory

3 - Memory Paging File Size

4 - Total Physical Memory

5 - Total % of Physical Memory Used

6 - Total working set size counter for current Plant SCADA process

7 - Private bytes counter of current Plant SCADA process

"Disk" - Disk information:

0 - Free disk space in bytes

1 - Total disk space in bytes

2 - Free disk space in kilobytes

3 - Total disk space in kilobytes

4 - Free disk space in megabytes

5 - Total disk space in megabytes

"Queue" - Queue information:

0 - Returns the length of the queue from the process that this is being called on.

"Security" - Encryption information:

0 - Returns the encryption status:

• 0 = Insecure
• 1 = Mixed
• 2 = Encrypted.

Return Value

The type of information (as an integer).

IODeviceInfo, WinNumber, TaskHnd

Example

! Get free memory
FreeMemory = CitectInfo("Memory", "", 0);
! Get free disk space on C:
FreeDisk = CitectInfo("Disk", 3, 0);
! Get max cycle time for digital alarms
MaxCycleTime = CitectInfo("Stats","Digital Alm","1");

See Also

Miscellaneous Functions

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