Overview of Background Programs

As mentioned, a Background Program (BP) is a collection of steps that will execute on the LI-6800 console "in the background" to accomplish various tasks. These steps can be put together by the user with tools provided on the console's user interface.

Figure 12‑6 illustrates how to access the BP screens.

Figure 12‑6. The Open/New tab of the Background Program interface.

The BP environment has five tabs along the bottom: Open/New, Build, Set, Start, and Monitor.

Open/New - Load BPs from the file system for running or editing.

Build - Assemble a list of program steps from the menu on the left. Steps can be re-ordered, moved around, etc.

Set - Each program step has associated parameters that can be edited and adjusted as needed.

Start - At any point, you can try out all or part of your program. This screen shows what step is being executed, and shows messages and output generated by the BP as it runs. You can execute your program in real time or step by step.

Monitor - Similar to the Start screen, but for any running BP.

Work flows

To start with background programs, go to the Programs screen.

See The Open/New screen

See The Build screen

See The Set screen

See The Start screen

Figure 12‑7. The BP workflows.

A tour

For this introductory tour, we will launch an existing BP and watch it a bit, then - while the first BP continues to run - we will build a second BP from scratch, and run it.

Start an existing BP

Tap Program Builder in the Program page (top of Figure 12‑6). This will bring up the BP screens. Follow the steps in Figure 12‑9. (You don’t need to have a log file open for this demo.)

Figure 12‑8. Launching the CO2 response BP, which has an opening dialog.

The BPs in the apps/basic directory all have opening dialogs, allowing settings to be modified from the default. Tap Continue and you can then monitor the progress of the BP in the Monitor tab (Figure 12‑9).

Figure 12‑9. Launching and monitoring a BP.

Use Trigger to skip waits, try out Pause and Resume. Don’t tap Cancel - we’ll keep this BP running while we continue the tour, building a simple BP from scratch.

Build a new BP

Let’s make a simple program to do the following: 1) Turn on the chamber fan, set it to 12,000 rpm. 2) Wait 30 seconds. 3) Turn the fan off.

To do this, following the steps:

  1. Create an empty program.
  2. Select the Open/New tab (lower left) and tap the New button (Figure 12‑10).
  3. Figure 12‑10. Preparing the build a BP from scratch.
  4. Add four steps (PROPERTIES, SETCONTROL, WAIT, and SETCONTROL) to the program.
  5. To add a step, select it in the left-hand window, then tap Insert → to put a copy of it on the right. To arrange steps in the right window, use ↓  and  ↑  at the bottom of the right view.
  6. Figure 12‑11. Building a simple program.
  7. Now tap Set.
  8. This is the screen in which we configure the steps to do what we need. Our 4-step BP is on the left; tap a step to select it. On the right is the configuration interface for the selected BP step.
  9. Figure 12‑12. Setting the parameters for each step in the BP.
  10. Select each BP step, and configure it as shown in Figure 12‑13.
  11. As you make edits on the right, the step summary on the left will change to reflect the changes.
  12. Figure 12‑13. Setting the parameters for each step in the BP.
  13. The PROPERTIES step is there so you can turn on “verbosity”, which means every step will produce some output in the run log when you run it.
  14. Now tap Start and we will try out the program.
  15. Figure 12‑14. The Start screen allows you to test your program.
  16. When you start running the program (tap Start), you should see things start to appear in the right-hand run log (Figure 12‑15).
  17. Figure 12‑15. The step currently being executed in the program is highlighted in the left list.
  18. Tap Monitor.
  19. In our tour we should now have two BPs running (at least for the 30 seconds the latest one has the fan on), so we can view both in the Monitor (Figure 12‑16).
  20. Figure 12‑16. Multiple BPs running concurrently.
  21. When a process ends (as our PID=0 will after 30 seconds), it will disappear from the monitor screen. If it was the selected BP when it ended, its run log will remain visible until you selected a different process to view.
  22. Now tap the remaining process that we launched at the start of the tour, and see in the run log what it has been doing (Figure 12‑17).
  23. Figure 12‑17. The program we first launched has been busy while we were the second program.
  24. Tap Cancel to end that program, and our tour.