Section 10. custom keyboard display menus – Campbell Scientific CR9000X Measurement and Control System User Manual

Page 391

Advertising
background image

Section 10. Custom Keyboard Display
Menus

CRBasic has the capability of creating a custom keyboard display menu for a
the CR1000KD Keyboard Display. The custom menu can either appear as
submenu of the standard menu or it can take the place of the standard menu
and contain the standard menu as a submenu. An item in the custom menu
may do one of four things:

1) display the value of a variable or a field in a data table.
2) display the value of a variable/flag and allow the user to change it.
3) provide a link to another custom menu.
4) provide a link to the standard menu.

Figure 10-1 shows windows from a simple CR1000KD custom menu named
“DataView”. “DataView” appears as the main menu on the CR1000KD.
DataView has menu item, “Counter”, and submenus “PanelTemps”,
“TCTemps”, and “System Menu”. “Counter” allows selection of 1 of 4 values.
Each submenu displays two values from the CR9000X's memory. PanelTemps
shows the CR9000X module temperature at each scan, and the one minute
average of the module temperature. TCTemps displays two thermocouple
temperatures.

PanelTemps:
Scan

|23.4960

Final Stg

|23.5000

TCTemps:
TC_Temp_1

|29.4355

TC_Temp_2

|32.3133

Data
Run/Stop Program
File
Ports and Status
Configure, Settings

DataView
PanelTemps

>

Counter

|0.00000

TCTemps

>

System Menu

>

FIGURE 10-1. CR1000KD custom menu example

SYNTAX

DisplayMenu (MenuName, 0)

DisplayValue ("MenuItemName", tablename.fieldname )

MenuItem ("MenuItemName", Variable )

MenuPick (Item1, Item2, Item3...Item512 )

SubMenu

(MenuName

)

MenuItem ("MenuItemName", Variable )

EndSubMenu
EndMenu

The DisplayMenu and EndMenu instructions mark the beginning and ending
of a custom menu definition. Variables and stored data can be displayed as an
item in a menu with the DisplayValue instruction.

10-1

Advertising