Documente Academic
Documente Profesional
Documente Cultură
Chapter 9 Control
Introduction
Controls are one of the relatively independent program units that can be called repeatedly
by other application programs. The interface of the controls is standard, controls developed by
third party software, which satisfies the interface conditions and can be called directly by
KingView. The engineer places the control in the picture, defines properties and connects the
corresponding functions the control can then carry out a complicated function.
2. Select from the toolbox, insert the following text on to the graph: XY control.
3. Select from the toolbox, double-click the X-Y axis curve control from the trend
curve section of the popup window, draw the XY curve in the picture as shown below:
4. Double-click on the graph and the following control settings dialogue box will popup:
Chapter 9 Control 2
From this dialogue box you can set the control name (named: control 1) and decide the style
of the control window. To make the XY curve control respond to the variable value in real time
you need to add some function syntax for control. Input the following to the picture property
script:
5. Select Save all pictures from the file menu to save the settings.
6. Select Switch to View from the file menu to enter the running system, as shown
below:
Introduction
Although KingView has its own controls it also supports Windows Active X controls, which,
includes standard Active X control offered by Microsoft and Active X controls developed by the
user (such as the KVTHREND control introduced in chapter 5). Introduction to Active X
controls makes the system more convenient for the user; the user can finish a complicated task
using a standard control or programming a specific one to suit their needs. General Active X
controls have properties, methods and events, which help users, finish their project.
Calendar controls
Minimum: 0
Maximum: 10000
Minimum: 0
Maximum: 12
Minimum: 0
Maximum: 31
3. Select from the toolbox, select the following control from the Insert General
Controls window, as follows:
Chapter 9 Control 4
Click confirm to exit the dialogue box, draw the calendar control in the picture as shown
below:
4. Double-click anywhere in the calendar box to open the following animation link
properties dialogue box:
Double-click the CloseUp event in the event property card; insert the following script
in dialogue box as shown:
Chapter 9 Control 5
5. Close the dialogue box, add three text boxes to the graph, connect the variables \\local
site\year variable, \\local site\month variable and \\local site\day variable in the Analog
Value Display animation textbox, select year, month and day of data in calendar in the control
shown.
6. Select save all pictures from the file menu to save the setting.
7. Select Switch to View from the File menu to enter the running system, as follows:
Click the pulling downwards button from the controls, select data from the pulling
downwards box, then the year, month and day will be shown in the textbox connecting \\local
site\year variable, \\local site\month variable and \\local site\day variable.
Chapter 9 Control 6
Review:
1. Understand the use of temperature control curve.
2. Read appendix three about KVADODBGrid control, grasp control usage.