Back

Topic

[KB246]Resource allocation for graphical objects

Tags: Drawing

14 years ago
By RM
Options
Print
Applies to:

PcVue version 7.20c onwards.
While the basic content of this article remains valid, details may have changed since it was written.


Summary:

This article describes how to check the limits on the Windows operating system resources that are allocated to graphical objects: GDI (Graphics Design Interface), USER and RAM. See the sections on differences between versions, below.


Details:

Displaying graphic resource meters

When a project is started, PcVue requires Windows to allocate graphic resources to it.  To display these resources:

  1. Open the Process tab of the Task Manager (Ctrl+Alt+Del).
  2. Select the menu View.Select Columns to open the Select Columns dialog.
  3. Tick the boxes for USER Objects and GDI Objects.

Task_Manager_View_Columns_dialog

The numbers of USER and GDI objects allocated to PcVue are then shown:

Task_Manager_SV32_objects_dialog

Low resource warnings

You can cause a warning dialog to be displayed when a PcVue project has exceeded the default resources allocated to it (see below). This helps to monitor the PcVue application’s use of memory ( RAM ), USER objects and GDI objects. It also helps to avoid problems of memory leaks and loss of graphic resources.

Max_resources_exceeded_warning

These values are also available in system variables:

SYSTEM.<StationName>.Resource.GDI

SYSTEM.<StationName>.Resource.USER

SYSTEM.<StationName>.Resource.RAM

SYSTEM.<StationName>.Mimic.OpenCount

where StationName = LocalHost identifier.

In the case of a single-station project, the warning dialog is displayed when any of the default values below is exceeded:

Task_Manager_GDI_tab

The warning dialog is useful in development mode because it enables the developer to optimize the use of the machine resources. It can appear in Run mode, which can interfere with use of the supervisory application. For instance when a mimic with many animations opens, the RAM resource warning may be displayed.

Version 8.10 and earlier

In versions of PcVue before 8.10, the resource warnings were disabled by default. However you can enable or disable each of the warnings by preventing the activation of the resource meters:

  1. Open the file OPTIONS.DAT in the C folder of the project.
  2. To its [WATCHRESOURCE] section, add the following lines:

[WATCHRESOURCE]

WatchGDI=0

WatchGDIMax=9000

WatchUSER=0

WatchUSERMax=9000

WatchRAM=0

WatchRAMMax=90

WatchDOC=0

WatchDOCMax=50

Version 8.10 and later

From version 8.10, this information will reside in the file OPTIONS.DAT, with the following default values:

[WATCHRESOURCE]

WatchGDI=1

WatchGDIMax=9000

WatchUSER=0

WatchUSERMax=9000

WatchRAM=0

WatchRAMMax=90

WatchDOC=0 WatchDOCMax=50

These values can be set directly as follows:

  1. Use the menu Configure/Options to open the Options dialog.
  2. In the section on Low Resource Warnings, tick the resources you wish to monitor.

Options_dialog_GDI_resources


Created on: 01 Dec 2010 Last update: 13 May 2024