Accessing the Process Database

To access the Process database, select:

Edit -> Process

The following screen is displayed:

Figure 3-4. Process Database Menu Page

NOTE: This menu page can also be accessed by clicking Select on the Master Control Panel, orEdit on the Select Process screen.

The Process Section

1

Enter a process description that is displayed during the selection process.

2

Suppresses the display of a process without removing it from the database.

The On Select Section

This section of the menu page is dedicated to functions that are performed when you select this process from the Master Control Panel.

3 Unloads all current modules before any attempt is made to load the process module or any other modules that will be executed by a control sequence. This is used when an application uses multiple modules that may conflict with one another. For example, if an application uses two AIM modules that contain ObjectFinder models with identical names, the first module must be unloaded before the second module can be loaded in order to avoid a conflict. Through the use of this option, this action is completed automatically.
4 Executes the optional sequence when this process record is selected. If this option is enabled, AIM will first examine the In Module field and assign this module to the menu task. AIM will then execute the sequence that appears in the Sequence field.
5 Contains the name of the module that is assigned to the primary menu driver while the associated control sequence is executed. (The orignial module will be restored when the sequence is completed.) The module must contain the control sequences that are used during the selection process.

NOTE: This field must be completed if Run Sequence is selected.

6 Contains the name of the sequence that is executed by the primary menu driver during the selection of this process record. The sequence must be a control sequence when accessed from the operator panel, but it can be a noncontrol sequence when it is accessed using the Enable Remote feature. This task will normally use the SELECT_TASK statement to configure AIM application tasks.

The On Start/Stop Section

This section is dedicated to functions that are performed when a process record is executed by clicking on the Start/Stop buttons in the Master Control Panel.

7

Contains the name of the module assigned to the primary menu driver during the Start/Stop button push. The module must contain the control sequences that are executed when the Start/Stop buttons are pushed.

8 Contains the name of the control sequence that is executed when the Start button is pushed while this record is the selected process record. This sequence will normally use the START_TASK statement to start the AIM application tasks.
9 Contains the optional control sequence that is executed when the Stop button is pushed while this record is the selected process record. This sequence is normally used to set I/O to a known state. This sequence also uses the STOP_TASK statement to halt the desired AIM application tasks.

NOTE: If this field is left blank, no error is reported.

10

 Used either alone or in conjunction with a stop sequence. If this option is selected, all tasks are stopped when the Stop button is pushed. In remote mode, all tasks except the task that is processing the request are stopped.

 The Remote Lookup Section

11 This section is dedicated to functions that are performed during the remote lookup of a process record. Options in this section require the use of the Process AIM statement that remotely selects and starts a process.
12 Allows you to enter up to a 32-character match code. This option is also used with the PROCESS statement, which searches all process records for matches.

Enter up to a 32-character string that is used during the remote access of the process record.

 PROCESS Statement

This statement provides a way to select and execute a process remotely from a runtime AIM task.

The syntax is:

PROCESS MATCH CODE --string_var-- {SELECT --yes/no--}
	{START --yes/no--} {STOP --yes/no--} {STATUS--variable--} 

double-click --string var-- to enter an AIM string variable that is used for the compare operation during the search through the Process database. If SELECT is set to"yes", the "select" portion of the process is executed.

If START is set to "yes" and a match is found, the "start" portion of the process will be executed.

If STOP is set to "yes" and a match is found, the "stop" portion of the process will be executed.

STATUS returns the status code of the operations.

The following is an example sequence in which the PROCESS statement is used:

1.; Example io_control sequence that issues automatic process  
2.; selection and execution 
3.;  
4.  WHILE -1 
5.: 
6.   WAIT_FOR 1001 
7.   WAIT_FOR -1001 
8.;  Based on sensor input do the following 
9.   IF @1002 
10.    PROCESS MATCH CODE "lc_1_xx" STOP yes 
11.    PROCESS MATCH CODE "1c_2_xx" SELECT yes START yes 
12.  END 
13.; 
14.  IF @1003 
15.    PROCESS MATCH CODE "lc_2_xx" STOP yes 
16.    PROCESS MATCH CODE "1c_1_xx" SELECT yes START yes 
17.  END 
18.; 
19. END 
END