General Object GUI

The General Object GUI (GOG) is a class that is designed for easy communication with the system. It can be used interactively as well a programmatically by sending events. A sample GOG with default parameters is the "UserGOG" that can be launched via the CS_Start.vi.

The GOG class has been designed to be used interactively by a normal user. The GOG has been designed as a general purpose GUI. The main aim is of the GOG is to provide GUIs in the start-up phase of an experiment (or control system). On the long run, users are free to develop their own dedicated GUIs.

Idea

Think object oriented!

Example: A control system is divided into sub systems. Each sub system has its own GOG object. A main GOG (MainGOG) object may be used to start up the control system automatically.

  1. The sub system GOGs are configured as "enabled' and "autocreate" objects in the MainGOG.
  2. By starting the MainGOG the sub system GOGs are created.
  3. When a sub system GOG is created, it creates all "enabled" and "autocreated" objects of the sub system and executes all "enabled" and "auto execute" methods of the sub system objects.
  4. If each sub system GOG has its "Execute" method configured in the MainGOG as "enabled", all parameters of the whole control system can be set by just doing an "Execute" of the MainGOG.

Configuration of the database

Have a look in the UserGOG entry in the data base. The main points here are the following:

  1. Default timeout [ms]: This value is used when waiting for a response. A good starting value are 10000ms.
  2. ODBC data base: The name of the ODBC source. This should be same as for you CS system.
  3. Front panel open flag: If set to "1" (TRUE), the front panel of the GOG object opens when it is created
  4. Update Interval: when displaying tag values for objects, this interval is used for possibly updating the GOG when a tag value has changed.
  5. Path to setting file: If this is a valid path, the setting file is loaded when the GOG object is created.
  6. Path to setting directory: Default folder where GOG settings are stored. Important: Lots of XML file scontaining the position of front panels will be created in that folder.

Loading a setting file

A setting file contains object names. For each object, methods may have been added. When a setting file is loaded, the following happens.

  1. The settings are loaded into the GOG object.
  2. The settings are analyzed.
  3. The GOG object requests to load all objects marked by "enable" AND "autocreate".
  4. For each "enabled" object, all methods marked by "enable" AND "autoexecute" are executed in the following order.
    1. For all "enabled" objects in their order of appearance and
    2. for all "enabled" and "autocreate" methods in their order of appearance.

Remark: The order of the objects/methods can be changed by "swap objects/methods".

This command can also be executed programmatically be sending an "LoadSettings" event to the GOG object.

Editing a setting file

A setting file can be edited interactively by using a GOG object with open front panel. Special care should be taken in the "Edit Object" and the "Edit Method" dialog.

  • Edit Object
    • flag "enable": the methods of this objects will be executed as configured in the "Edit Method" dialog.
    • flag "auto create": when the object is "enabled", it will be created via its Super process when loading a setting file.
  • Edit Method
    • flag "enable": the method will be executed, when executing the methods
    • flag "autoexecute": if the method is enabled, it will be executed when loading a setting file.
    • flag "reset method": if the method is enabled, it will not be executed when executing the methods but only if executing all methods.

Of course, the changed/edited setting can be save to a file.

Executing a method

Executes all "enabled" methods of all "enabled" objects, except methods marked by "reset method". This command can also be executed programmatically by sending an "Execute" event to the GOG object.

Executing all methods

Executes all "enabled" methods of all "enabled" objects including the "reset method"s.

Create all objects

Creates all "enabled" objects including those that are not marked by "autocreate".

Edit Object View

Allows to display values of configure DSC tags of an object in the Object View windows. Presently only number tags are supported.

Attach front panel

Attaches a front panel to one of the configured methods of an object.

Programmatically controlling a GOG object

A GOG object can be controlled programmatically by sending events to it. Presently, the events "Execute" and "LoadSettings" are supported

-- DietrichBeck - 06 Jul 2005
Topic revision: r3 - 2006-09-18, DietrichBeck - This page was cached on 2024-10-06 - 00:46.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Legal notice | Privacy Policy (german)