beautypg.com

A.10 custom keyboard and display menus – Campbell Scientific CR1000 Measurement and Control System User Manual

Page 508

background image

Appendix A. CRBasic Programming Instructions

508 

 

 

VoiceSpeak 
Defines the voice string that should be spoken by the voice modem. 

Syntax 

VoiceSpeak("String" + Variable + "String"…, Precision)

A.10 Custom Keyboard and Display Menus

Read More! More information concerning use of the keyboard is found in
sections Using the Keyboard Display

(p. 399)

and Read More! To implement

custom menus, see CRBasic Editor Help for the DisplayMenu() instruction.

CRBasic programming in the CR1000 facilitates creation of custom menus for the
external keyboard / display.

Figure Custom Menu Example

(p. 70)

shows windows from a simple custom menu

named DataView. DataView appears as the main menu on the keyboard display.
DataView has menu item Counter, and submenus PanelTemps, TCTemps and
System Menu. Counter allows selection of one of four values. Each submenu
displays two values from CR1000 memory. PanelTemps shows the CR1000
wiring-panel temperature at each scan, and the one-minute sample of panel
temperature. TCTemps displays two thermocouple temperatures.

.

Custom menus are constructed with the following syntax before the BeginProg
instruction.

DisplayMenu

("MenuName", AddToSystem)

MenuItem

("MenuItemName", Variable)

MenuPick

(Item1, Item2, Item3...)

DisplayValue

("MenuItemName", tablename.fieldname)

SubMenu

(MenuName)

MenuItem

("MenuItemName", Variable)

EndSubMenu

EndMenu

BeginProg

[program body]

EndProg

 

DisplayMenu / EndMenu 
Marks the beginning and ending of a custom menu.  

Syntax: 

DisplayMenu("MenuName", AddToSystem)
[menu definition]
EndMenu

 

MenuItem 
Defines the name and associated measurement value for an item in a custom 
menu. 

Syntax: 

MenuItem("MenuItemName", Variable)

DisplayLine 
Displays a full line of read‐only text in a custom menu. 

Syntax: 

DisplayLine(Value)