The GEM Items Database

The GEM Items database contains information that defines GEM alarms, collection events, reports, and states. (The structure of this database is shown in Structure of the GEM Items Database.) There are four record types in the GEM Items database: the Alarm record type, the Collection Event record type, the Report record type, and the State record type. The records in the database are always sorted into those four groups.

Item IDs

Each record in the GEM Items database is identified by an item ID. These IDs are integer values in the range 1 to 32,767, with the range 9000 to 9999 reserved for items predefined in the baseline AdeptGEM system.

Item IDs must be unique within each record type, but they do not need to be unique throughout the entire database. For example, there cannot be two Alarm records with the same ID, but there can be an Alarm record and a Collection Event record with the same ID.

For any menu-page field that holds the ID for some other item, or for a GEM variable, the operator can double-click on the field to request a pick list of all the existing database records that could be referenced by that field. Then the operator can select the line for the desired record and choose the Retrieve button (or simply double-click on the line) to have that ID inserted in the menu-page field.

The GEM Items Menu Page

To GEM Items menu page is used to create records that define GEM alarms, collection events, reports, and states. These records are all stored in the GEM Items database.

To create a new GEM Items record:

Edit -> GEM Items -> Edit -> New Record

GEM Items Database, Menu Page for New Record displays the opening page.

Figure 7-11. GEM Items Database, Menu Page for New Record

NOTE: The features of the menu page will change based on the record type selection (see item 2.)

1 Displays the date and time that the record was created or revised.

2 Choose a record type. The menu page changes based on the record type chosen.

The record types are described in detail in the following sections.

NOTE: The record type cannot be changed after the record name or item ID has been entered.

The Alarm Record Type

The Alarm records define the alarms, their enabled status, and other parameters. These records are used to maintain the alarm monitoring that has been defined by the user and requested by the host. To open an Alarm record, a sample of which is shown in GEM Items Database, Alarm Record:

Edit -> GEM Items -> Seek -> Index -> double-click on line for
desired record

Figure 7-12. GEM Items Database, Alarm Record

The Alarm ID for this example record is 1. The text "This is the alarm text for the operator." will be used in all messages requiring alarm text. That text is also displayed on the GEM Control Panel when the alarm is set. The record shows the events that will be triggered when the alarm is set or cleared, respectively. You can also specify an AIM sequence to be run when the alarm is set. See Alarm Management for details on how alarms are set.

NOTE: For any existing Alarm record, the host can enable or disable the alarm with a SECS-II S5F3 message.

To define a new Alarm record:

  1. Create a new GEM Items record.

  2. Select Alarm as the GEM Items record type (item 4).

  3. Enter a name for the new record (item 1).

  4. Enter a unique Alarm ID (ALID) number (item 2).

  5. Enter an optional description for this record (item 3).

  6. Optionally select Alarm is Enabled: (item 5) to enable the alarm. The Alarm is Set: checkbox (item 6) is checked whenever the alarm is set (this is a read-only item).

Refer to item 7 for steps 7 through 10:

  1. Enter optional text (ALTX) that will be reported when an alarm is sent to the host, and will be displayed on the GEM Control Panel when the alarm is set.

  2. Optionally, enter the numbers of the events (CEID) that will be generated when the alarm is set or cleared.

  3. Enter the name of the optional AIM sequence to run when this alarm is set. This sequence must be in the default control module. This resource module is normally MOWCTL, VWCTL, or PCBCTL unless the value of the default control module has been changed in the initialization database.

  4. 1Enter the optional Alarm Category number, which can range from 0 to 127. This number is reported to the host in the alarm code byte (ALCD).

NOTE: Although the alarm category is specified by the SECS-II standard, it is not required by the GEM standard. This value is supported by the AdeptGEM system for situations for which it is desirable to categorize alarms.

  1. 11. Optionally choose Force Alarm to Happen Now (item 8) to force the alarm to be set (even if the alarm is not enabled). This is useful for testing the alarm set-up.

The Collection Event Record Type

The Collection Event records define the Collection Events required by the GEM specification and those needed for the user's application. To access an existing Collection Event record:

Edit -> GEM Items -> Seek -> index -> double-click the line of the desired record

Figure 7-13. GEM Items Database, Collection Event Record

The Collection Event ID number for this Collection Event record is 5. It references three Report records. When this collection event occurs, all the reports specified in this record are transmitted to the host. These reports are in turn defined by Report records in the GEM Items database.

NOTE: For any existing Collection Event record, the host can enable or disable the event with a SECS-II S2F37 message, and it can create and delete report "links" with S2F35 messages.

To define a new Collection Event record:

  1. Create a new GEM Items record.

  2. Select Collection Event as the GEM Items record type (item 4).

  3. Enter a name for the new record (item 1).

  4. Enter an ID number (CEID) for this Collection Event (item 2).

  5. Enter an optional description for this record (item 3).

  6. Optionally select Event is Enabled: (item 5) to enable this event.

  7. Enter the ID numbers (RPID, item 6) for the Report records that will be processed when this Collection Event occurs.

NOTE: Report IDs must be added to the collection event contiguously starting with field number 1. The software stops processing reports when it finds the first empty field (or 0) in the list. Other than that requirement, the reports can be listed in any order.

  1. Optionally choose Force Event to Happen Now (item 7) to force the collection event (even if the event is not enabled). This is useful for testing collection events.

Predefined Collection Event Records

Predefined Collection Events details the Collection Event records that are predefined in the baseline AdeptGEM system.
Table 7-5. Predefined Collection Events
Event ID
Record Name
Description
9000
equipoffline
Control: Entry into OFF-LINE state
9001
controlstateloc
Control: Entry into LOCAL state
9002
controlstaterem
Control: Entry into REMOTE state
9003
controlstatechg
Control: 9000, 9001, or 9002 will follow immediately
9004
operatorcmdiss
Control: Operator executes command while in the ON-LINE/REMOTE state
9100
processstart
Processing: AIM sequence started
9101
processcomplete
Processing: AIM sequence completed
9102
processstopped
Processing: AIM sequence stopped early (by the operator or host)
9103
procstatechange
Processing: Entry into any new processing state
9200
operatorconchg
Equipment Constants Capability: Operator changes constant locally
9300
procprogchange
Process Program Management: AIM sequence created, deleted, or modified.
9301
procprogverval
Process Program Management: Program verified and validated
9400
procprogselect
AIM sequence selected for execution
9500
messagerecog
Terminal Services: Message acknowledged by operator.

The Report Record Type

The Report record stores a list of the GEM variables that are to have their values reported when that report is generated. Report records can be created, modified, and deleted by the equipment operator. The host can use SECS-II S2F33 messages to create new Report records and to delete individual or all Report records.

The type of report, either unannotated or annotated, that is transmitted to the host is determined by the setting of equipment constant 9133 (AnnotatedRpts) at the time the report is generated.

To open an existing Report record, a sample of which is shown in GEM Items Database, Report Record:

Edit -> GEM Items -> Seek -> Index -> double-click on line for desired record.

Figure 7-14. GEM Items Database, Report Record

This example record shows a report record that references three Variable IDs: 9001, 9002, and 9051. These Variable IDs are defined in the GEM Variables database. When a report needs to be generated, the AdeptGEM system searches the variables database and automatically builds a report in the proper SECS-II message format for delivery to the host.

To define a new Report record:

  1. Create a new GEM Items record.

  2. Select Report as the GEM Items record type (item 4).

  3. Enter a name for the new record (item 1).

  4. Enter a unique ID number (RPID) for this Report record (item 2).

  5. Enter an optional description for this record (item 3).

  6. Enter the ID numbers (VID, item 5) for the variables that will be collected when this report is generated.

NOTE: Variable IDs must be listed in the record contiguously starting with field number 1. The software stops processing variables when it finds the first empty field (or 0) in the list. Other than that requirement, the variables can be listed in any order.

In general, the host requests the reports it is interested in. The host can request predefined reports, or it can create and link its own reports. You need define only any predefined reports that the host will request.

When the host generates and links a report, the AdeptGEM system creates a Report record with a "random" name. This process is handled automatically by the system. If you view the Report records, you may notice new report records with random record names. These reports were created at the request of the host.

The State Record Type

The State records store information for user-defined state models used by a GEM implementation. A user-defined state model consists of two parts:

  1. A State Variable (defined in the GEM Variables database; see page 142) that stores the ID of the current state in the state model.

  2. A set of State records (in the GEM Items database) that define the effects of transitions to the various states in the model.

To open an existing State record, a sample of which is shown in GEM Items Database, State Record:

Edit -> GEM Items -> Seek -> Index -> double-click on line for desired record

Figure 7-15. GEM Items Database, State Record

The Associated State Variable field in GEM Items Database, State Record identifies the State Variable that is used for the state model to which this State record belongs. (The same state variable must be referenced by all the State records for the state model associated with that state variable.)

The State Data panel on this menu page defines the actions that will result when there is a transition to this state. Any combination of the following can be specified:

To define a new State record:

  1. Create a new GEM Items record.

  2. Select State as the GEM Items record type (item 4).

  3. Enter a name for the new record (item 1).

  4. Enter a unique identifier (item2) for this state within its state model associated with the Associated State Variable (item 5). (Thedatabase cannot contain duplicate State IDs, even if the Associated State Variables are different.) Normally, a state model has several different State records to describe the possible states.

  5. Enter an optional description for this record (item 3).

  6. Enter the ID (item 5) of the state variable that is associated with the state model of which this State record is part.

Refer to item 6 for the following steps, all of which are optional:

  1. Enter the ID of a status variable in the GEM Variables database. The variable specified here will be given the value specified in "Action Value". (Note that this is not the same record as the "Associated State Variable".)

  2. Enter the value to assign to the "Action Variable" when this state transition occurs.

  3. Enter the name of the V+ routine to run when this state is entered. See the routine user.state.spawn (vid, state_id)( ) for the calling parameters for this routine.

  4. Enter the ID of the alarm to set when entering the state.

  5. Enter the ID of the collection event to trigger when this state is entered.

The following example shows four states (State ID 5, 6, 7 & 8) associated with state model 1.