Rockwell Automation 8520-9API 9/Series OCI API Developer's Guide User Manual

Page 40

Advertising
background image

3–19

OCI Basic Display Set (BDS)

Publication 8520-6.6 - August 1999

SetSPDPointer
You should not need to edit this file unless there are special
conditions you wish to apply to determine when and what screen is
loaded when a softkey is pressed. For example you may want to
add a condition that prohibits access to a servo configuration screen
when running a program.

SetSPDPointer is a routine found in the file SOFTKEY.BAS. This
subroutine uses the softkeys PD Number (PD_PTR) to determine
which softkey choice was made and sets the variable
“ScreenNumber” using a series of Case statements.

The Case Else statement at the end of this routine sets the variable
ScreenNumber = PD (PD_PTR).ScreenNum. The variable
ScreenNum is the screen number pointer assigned in the softkey tree
(see page 3–17) so by default this routine loads the assigned screen
number to the variable ScreenNumber whenever the softkey is
pressed. PD_PTR numbers are assigned in the file
PD_NUMS.BAS.

LoadScreenForm
This subroutine ,found in the file Softkey.BAS, is used to load the
final form. This routine uses the “ScreenNumber” variable assigned
in SetSPDPointer to determine what screen should be loaded. A
series of Case statements are used to define two variables which load
the appropriate form, CurrentForm (a form), and CurrentFormName
(a string).

Identify screen numbers with their corresponding screen names in
the file SR_NUMS.BAS. Any new screen numbers you are adding
should be defined in this file.

Advertising