EasyManua.ls Logo

LI-COR LI-6800 - Page 70

LI-COR LI-6800
152 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Section 5. Using dialogs
Figure 5-2. A dialog front-end for the light response program.
Happily, setting up such a dialog for a BP is fairly simple, since there is a DIALOG
step that does most of the work for you. If there are variables in your BP you want
to edit, or if you want to let the user control the program's actions via buttons or
checkboxes, there will be a few code additions needed to handle that. In general,
however, there are three basic steps:
1
Insert a DIALOG step in the BP at an appropriate place in the execution flow that you want the
dialog to appear.
2
If the dialog allows for editing program variables, revisit the ASSIGN steps for those variables
and fill in the dialog-related information for whatever interface you choose.
3
If your program flow is going to depend on what button was pressed, or the state of edited vari-
ables, add that code.
How to make the BP in Figure 5-1 on the previous page produce the dialog in Figure
5-2 above is shown in Figure 5-3 on the facing page, with the program additions
shown in the red box. We put the DIALOG step after count is assigned, but before
setpoints is computed, since that uses the potentially edited values. We also are
handling the Cancel button by IF and RETURN steps. To make start, stop, and count
appear in the dialog, they are a) listed in Grid items in the DIALOG setup, and b)
they have interfaces specified in their ASSIGN statements.
5-2 Using LI-6800 Background Programs

Table of Contents