beautypg.com

Master.frm recommended subroutines – Rockwell Automation 8520-9API 9/Series OCI API Developer's Guide User Manual

Page 31

background image

3–10

OCI Basic Display Set (BDS)

Publication 8520-6.6 - August 1999

MASTER.FRM Recommended Subroutines

When you develop your new screen we recommend you use the
following subroutines to properly integrate your form into the Basic
Display Set.

Use this Subroutine:

Description:

APromptPressed (public)

Keyboard input is passed from the system form to

this subroutine. Use APromptPressed to identify

what actions should be taken when the user presses

a keyboard key. This routine receives the KeyCode

and Shift status from the system form

(FormKeyPressed).

ASoftkeyPressed (public)

Softkey inputs are passed from the softkey form to

this subroutine. Use ASoftkeyPressed to identify

what actions should be taken when the user presses

a softkey. This routine receives the softkey index (0

- 6) as variable SoftkeyChoice). Note softkey

management (changing of levels and softkey

names) is handled by the softkey form. Use this

index in this form only to identify what actions your

form should take.

Form_Activate (private)

Use this code to perform activities after the form is

loaded. This routine sets focus to the system form

to monitor keyboard inputs after a new form is

loaded. Most forms Activate module has the line

fmSystem setFocus".

Form_Unload (private)

This software module is typically used to shut off any

automatic data links to the CNC as well as set the

current form to whatever form should be shown

when your form is unloaded.

InitForm (private)

Most of the Basic Display Set forms make use of this

routine to position labels (based on MDI location)

and other assorted initialization parameters.

CreateDataLinks (private)

This module is used to create any necessary DDE

links to the CNC to load your form.

DisplayRows (private)

This module is used to format the data on the

display. It is typically called from the module

lnkdata_change and handles how data is presented

on the form.

InitformLevelVariables

This module is used to initialize all the form level

variables on a Form_Load event.