LI-COR LI-6800 Manual
Hide thumbs Also See for LI-6800:

Advertisement

Using Background Programs
on the LI-6800 Portable Photosynthesis System
Version 1.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the LI-6800 and is the answer not in the manual?

Questions and answers

Summary of Contents for LI-COR LI-6800

  • Page 1 Using Background Programs on the LI-6800 Portable Photosynthesis System Version 1.4...
  • Page 3 Using Background Programs on the LI-6800 Portable Photosynthesis System for Bluestem OS™ version 1.4 LI-COR Biosciences 4647 Superior Street Lincoln, Nebraska 68504 Phone: +1-402-467-3576 Toll free: 800-447-3576 (U.S. and Canada) envsales@licor.com Regional Offices LI-COR Biosciences GmbH Siemensstraße 25A 61352 Bad Homburg...
  • Page 4 LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. LI-COR shall not be held liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.
  • Page 5 Notes on Safety This LI-COR product has been designed to be safe when operated in the manner described in this manual. The safety of this product cannot be assured if the product is used in any other way than is specified in this manual. The product is intended to be used by qualified personnel.
  • Page 7: Table Of Contents

    Contents Section 1. Things you should know Nomenclature and symbols Python If you don't know Python Pay attention to the hints If you do know Python Consider using VNC Section 2. Overview Work flows A tour Start an existing BP Build a new BP Section 3.
  • Page 8 Section 6. Screen reference The Open/New screen The Build screen The Set screen The Start screen The Monitor screen Set screen interface tools Simple objects Control table 6-11 Data dictionary 6-12 Control dictionary 6-13 Status dictionary 6-13 Debug mode 6-14 Directory information 6-15 Saving BPs...
  • Page 9 LOOP 7-27 Count 7-27 Duration 7-28 List 7-29 File 7-29 PROPERTIES 7-31 RETURN 7-31 7-31 SETCONTROL 7-32 SHOW 7-33 TABLE 7-34 Structure of a TABLE variable 7-35 Custom executions 7-37 WAIT 7-37 Duration 7-38 Stability 7-38 Until 7-39 Event 7-41 WHILE 7-42 Appendix A.
  • Page 10 viii...
  • Page 11: Section 1. Things You Should Know

    Things you should know 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 with tools provided on the console’s user interface.
  • Page 12: Python

    Even through BPs are Python files, you do not need to be a Python programmer to build or run them, since the LI-6800 software provides a graphical user interface for doing those tasks. However, knowing a little bit of Python syntax can be very helpful if you wish to design your own BPs and take advantage of some powerful options that are available.
  • Page 13: Pay Attention To The Hints

    Section 1. Things you should know The same name rule also applies to functions. A is a named collection of function instructions that can be invoked by using the name followed by a list of zero or more (information passed to the function). Examples: arguments Calls the function doSomething, sending to it three doSomething(a,5,c66)
  • Page 14 Figure 1-3. Examples of edit boxes with in the hint. eval() Lists: "Must eval() to a list" means to enter a sequence that is comma separated. You can use [], or (), or leave them off: [1,2,3] or (1,2,3) or 1,2,3 Using LI-6800 Background Programs...
  • Page 15 Section 1. Things you should know In Python, is a list that can be modified; otherwise, it is a tuple, a list that [1,2,3] cannot be modified. For lists you enter in a BP interface, that distinction is usually not important. To enter a single valued list, use a trailing comma. [1,] or (1,) or 1, Trailing commas like this are always allowed, regardless of the size of the...
  • Page 16: If You Do Know Python

    30/(1+50*math.exp(-0.03*x))+0"), # Assign a variable to an expression: ASSIGN('varname', exp="expression" [,dlg=Nothing()]) ASSIGN("test", exp="lambda x: x if x >= 1 else 0"), # Loop through a list: LOOP(list=itemList [,var=varname] [,mininc='']) LOOP(list="1500,50,1500", var="x", steps=( # Set a control: Using LI-6800 Background Programs...
  • Page 17 Section 1. Things you should know SETCONTROL('target', 'value', 'eval' [,opt_target='']) SETCONTROL("Qin","x","float"), # Loop for a duration: LOOP(dur="float" [,units='Seconds' Second|Minutes|Hours ] [,var=''] [,mininc='']) LOOP(dur="15", units="Minutes", var="t", mininc="test(logint(t))", steps=( # Log a data record: LOG([avg='Default'] [,match='Default] [,flr='Default'] [flash='Default']) LOG(avg="Off", match="Off", flr="0: Nothing"), Listing 1-1.
  • Page 18: Consider Using Vnc

    Python, to eliminate syntax errors in the editing stage. Consider using VNC The touch screen keyboard on the LI-6800 console does not lend itself well to typ- ing long expressions and names that may be needed when developing BPs.
  • Page 19: Section 2. Overview

    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 inter- face.
  • Page 20 BP as it runs. You can execute your program in real time or step by step. - Similar to the Start screen, but for any running BP. Monitor Using LI-6800 Background Programs...
  • Page 21: Work Flows

    Section 2. Overview Work flows See The Open/New screen on page 6-1 See The Build screen on page 6-2 See The Set screen on page 6-5 See The Start screen on page 6-6 See The Monitor screen on page 6-8 Figure 2-2. The BP workflows. Work flows...
  • Page 22: A Tour

    BP screens. Follow the steps in Figure 2-4 on the facing page. (You don’t need to have a log file open for this demo.) Figure 2-3. Launching the CO response BP, which has an opening dialog. Using LI-6800 Background Programs...
  • Page 23 Section 2. Overview The BPs in the apps/basic directory all have opening dialogs, allowing settings to be modified from the default. Tap and you can then monitor the progress of Continue the BP in the tab (Figure 2-4 below). Monitor Figure 2-4.
  • Page 24: Build A New Bp

    12,000 rpm. 2) Wait 30 seconds. 3) Turn the fan off. To do this, following the steps: Create an empty program. Select the tab (lower left) and tap the button (Figure 2-5 below). Open/New Figure 2-5. Preparing the build a BP from scratch. Using LI-6800 Background Programs...
  • Page 25 Section 2. Overview Add four steps ( , and ) to the program. PROPERTIES SETCONTROL WAIT SETCONTROL Insert → To add a step, select it in the left-hand window, then tap to put a copy of it ↓ ↑ on the right. To arrange steps in the right window, use at the bottom of the right view.
  • Page 26 Figure 2-8. Setting the parameters for each step in the BP. step is there so we can turn on “verbosity”, which means every PROPERTIES step will produce some output in the run log when we run it. Using LI-6800 Background Programs...
  • Page 27 Section 2. Overview Now tap and we will try out the program. Start Figure 2-9. The screen allows you to test your program. Start When you start running the program (tap ), you should see things start to appear in the Start right-hand run log (Figure 2-10 below).
  • Page 28 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. 2-10 Using LI-6800 Background Programs...
  • Page 29 Section 2. Overview 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 2-12 below). Figure 2-12. The program we first launched has been busy while we were the second pro- gram.
  • Page 30 Section 2. Overview 2-12 Using LI-6800 Background Programs...
  • Page 31: Section 3. Some Examples

    Get the instrument out of sleep mode ( SETCONTROL Wait a few minutes to let things warm up ( WAIT Open a log file ( Log, getting an FoFm ( Close the file ( Go back to sleep ( SETCONTROL Using LI-6800 Background Programs...
  • Page 32 Continue, until the list looks as shown in Figure 3-1 below. Figure 3-1. The program steps necessary - and not yet configured - for the early morning FoFm example. Tap on the tab, and configure each step according to Figure 3-2 on the facing page. Using LI-6800 Background Programs...
  • Page 33 Section 3. Some examples Figure 3-2. How each step is to be configured for the early morning FoFm example. Note that we are doing three different things with open, write to, and close a LOG: file. Section 3. Some examples...
  • Page 34 Test the program by tapping the tab, and then tap the button. Imme- Start Start diately we are waiting until 5:00 the next morning. Tap if you don’t want to Trigger wait that long. Figure 3-3. Test running the program. Using LI-6800 Background Programs...
  • Page 35: Variations On Autolog

    Section 3. Some examples Variations on AutoLog Autologging (logging at regular intervals for some fixed amount of time) is very simple with a BP, but there are some useful variations on this theme that are good to know, including Log events can take variable amounts of time (matching, fluorometry, etc.), so how can we get precise log intervals? What if we want the log interval to change with time? What if we want to start or stop based on some environmental condition, rather...
  • Page 36 WHILE cified to regulate how often the loop repeats. At the end of the loop, it does an implicit wait if necessary to enforce that timing so we can get rig of our state- WAIT ment. Using LI-6800 Background Programs...
  • Page 37: Log Until Sundown

    Section 3. Some examples Figure 3-7. Replace the with the minimum interval specifier. WAIT Another advantage of this last method is that both parameters for the autolog (dur- ation and interval) are contained in the settings. LOOP Log until sundown Now that we know how to do an autolog program, let’s try another variation, this time adjusting the duration.
  • Page 38 Figure 3-8. Configuring the program to log until dark. Now let’s test this program, making sure there is enough light on the external quantum sensor so it will act like daytime. To simulate sunset after a test loop or two, simply cover the sensor. Using LI-6800 Background Programs...
  • Page 39 Section 3. Some examples Figure 3-9. Configuring LogTilDark. Running this program with Verbose=False (in the step) will decrease PROPERTIES the output to just the start and stop message, and the log events in between. This is how a repetitive program like this should normally be run. Log until sundown...
  • Page 40: Varying The Log Interval

    DEFINE AutoLog CALL section of the box on the left, tap on , and tap Library DEFINEs Define AutoLog Insert→ Figure 3-10. The first steps in building a four stage autolog program. 3-10 Using LI-6800 Background Programs...
  • Page 41 Section 3. Some examples Change to the screen, and configure the to call the correct subroutine Figure 3-11 CALL below. Figure 3-11. Configuring the first call to AutoLog. Now change back to , highlight the on the right. Tap , then, Build CALL AutoLog Copy...
  • Page 42 DEFINE each parameter. You can also specify if each parameter is passed in by value or ref- erence (Step reference on page 7-1). Figure 3-13. How the AutoLog is configured. DEFINE 3-12 Using LI-6800 Background Programs...
  • Page 43 Section 3. Some examples If you are wondering how the is printing the run log message you see in SHOW Figure 3-14 below, it uses the built-in function format() for building a formatted string. Because this AutoLog is in the library, and we haven’t changed anything DEFINE about the copy we added to our BP, we don’t really need it: We can delete it from our BP and the program will still work just fine.
  • Page 44 The only thing in the loop is a statement to print out elapsed time and the computed loop trig- SHOW ger interval (formatted to show 3 significant digits). 3-14 Using LI-6800 Background Programs...
  • Page 45 Section 3. Some examples Figure 3-16. Program to test using a continuous function for log interval. When run, this program produces the output as in Figure 3-17 below. The loop starts out running about every 0.5 s, and increases from there. Figure 3-17.
  • Page 46 Section 3. Some examples At this point, we need to interject a bit of reality: the LI-6800 gets new data sets at 2 Hz, so it makes no sense trying to log any faster, and even if you could, you prob- ably do not want to log two identical records.
  • Page 47 Section 3. Some examples Let’s expand this program to do a couple of large step changes in light, and track the response with this timing function. The program is illustrated in Figure 3-19 below, and is available at /home/licor/apps/examples/VariableLogInt.py Figure 3-19. Program to log at increasing intervals following an abrupt light change. Varying the log interval 3-17...
  • Page 48: Monitoring Match Mode

    (match mode puts reference air to both cells). A simple BP can monitor the system, and set a spare DAC channel to signal when match mode is active. Figure 3-20. A simple program to signal when a match is active. 3-18 Using LI-6800 Background Programs...
  • Page 49 Section 3. Some examples Figure 3-21. Listing of /home/licor/apps/utilities/MatchWatcher.py Monitoring match mode 3-19...
  • Page 50: Record And Replay A Time Series

    (Strictly for debugging - we’ll get rid of this in the final SHOW version.) Write the line to the file using , putting it all in an statement. EXEC print() When the loop is done, close the file with , inside an EXEC f.close() 3-20 Using LI-6800 Background Programs...
  • Page 51 Section 3. Some examples The real version of this program is in /home/licor/apps/examples/GetTimeSer- , minus the statement, and set to run for 1 hour. SHOW ies.py Variations. For higher speed data, set the system averaging time to 0 (add a before the , and target it to , which you’ll...
  • Page 52 BP (use the keyword and the program’s file name), or you could launch the autolog BP from the light control BP, or vice versa. Those are exercises left to the reader. 3-22 Using LI-6800 Background Programs...
  • Page 53: Section 4. Response Curves

    A simple BP to generate a response curve for CO2 can be found in the Library GROUPS source, and is shown in Figure 4-1 below. To change setpoints, edit the LOOP step, and to change target, edit the SETCONTROL step. Figure 4-1. Single variable response using LOOP [List] Using LI-6800 Background Programs...
  • Page 54 Table 4-1. Examples of , and randomList() linearList() Expression Result [1.0, 4.0, 7.0, 10.0] linearList(1,10,4) linearList(5, -5, 6) [5.0, 3.0, 1.0, -3.0, -5.0] [4.0, 3.0, -1.0, -3.0, 2.0, 1.0, -2.0, -4.0, -5.0, 0.0, 5.0] randomList(5, -5, 11) Using LI-6800 Background Programs...
  • Page 55 Section 4. Response curves The sample program (Figure 4-3 /home/licor/apps/basic/GenericResponse.py below) illustrates the use of a , which makes it easy to coordinate targets and TABLE setpoints. entries do not by default pass through eval() (i.e., no expressions, Table no variables), so set points have to be explicitly entered. Figure 4-3.
  • Page 56 Section 4. Response curves The GenericResponse.py program does support an opening dialog (Figure 4-4 below), from which you can also edit the table. Figure 4-4. The opening dialog for /home/licor/apps/basic/GenericResponse.py. Using LI-6800 Background Programs...
  • Page 57: Multiple Controls

    Section 4. Response curves Multiple controls How to change multiple controls in a response loop? For example, how could you make a light response with the color becoming more red as intensity drops? One method is to use the control table interface (such as with /home/licor/apps/- ), and make the table look something like this (Figure basic/GenericResponse.py...
  • Page 58 Section 4. Response curves Figure 4-6. Programming color, from /home/licor/apps/examples/LightCo- lorCurve.py Using LI-6800 Background Programs...
  • Page 59 Section 4. Response curves If we test run this program in verbose mode, we can see the values it picks for the each setpoint (Figure 4-7 below). Figure 4-7. Test running /home/licor/apps/examples/LightColorCurve.py Multiple controls...
  • Page 60: Higher Dimensions

    Well, why not use 12 light and 12 CO points, and just one loop, setting both each time (Figure 4-9 on the facing page)? That way, we could be done in 12 × 5 = 60 minutes. Using LI-6800 Background Programs...
  • Page 61 Section 4. Response curves Figure 4-9. Trying to combine responses leaves you with a very poor sampling of the surface. Plotting out that strategy (Figure 4-9 above) makes it clear why it is not helpful: every point we get is on a unique light or CO curve, leaving us with little or no knowledge of what that response surface actually looks like.
  • Page 62 Figure 4-11. Creating orthogonal setpoint lists in a test program using the makeOrtho() function from the list_utility module. Now all we need is to add a with , and , and we LOOP SETCONTROL WAIT have the program /home/licor/apps/examples/OrthoLightCO2.py (Figure 4-12 on the facing page). 4-10 Using LI-6800 Background Programs...
  • Page 63 Section 4. Response curves Figure 4-12. A program to measure a CO and light response surface, using orthogonal set- points. There are two optional parameters provided by (see The list_utility makeOrtho() module on page 10-1), that are illustrated in the following example. Suppose you want three independent variables: light, CO , and temperature.
  • Page 64 (Listing 4-1 on the facing page). corr_coeff= 0.076648340643 15.0 1105.0 568.0 16.36 182.0 827.0 17.73 1368.0 741.0 19.09 50.0 223.0 20.45 1500.0 309.0 4-12 Using LI-6800 Background Programs...
  • Page 65 Section 4. Response curves 21.82 314.0 482.0 23.18 445.0 136.0 24.55 973.0 1000.0 25.91 841.0 50.0 27.27 709.0 655.0 28.64 577.0 914.0 30.0 1236.0 395.0 Listing 4-1. Listing of /home/licor/logs/ortho3_values.txt (line 7, ) - Added temp to the list. SHOW (line 9, ) - Set lef temperature to the i value of temp.
  • Page 66: Variable Stability Wait Times

    A method of accom- modating that is shown in (Figure 4-14 below). Figure 4-14. Adding wait time variables to a table. 4-14 Using LI-6800 Background Programs...
  • Page 67 Section 4. Response curves The equivalent to Figure 4-14 on the previous page without using could be TABLE done as illustrated in Figure 4-15 on the next page. Here we take advantage of being able to easily generate set points (linearList()). minWait is a normal minimum wait time, and firstWait is the time to use on the first pass through the light curve each time.
  • Page 68 Section 4. Response curves Figure 4-15. Nest control loop with computed wait times. 4-16 Using LI-6800 Background Programs...
  • Page 69: Section 5. Using Dialogs

    - they could inadvertently render the pro- gram unworkable. It would be better if the program simply presented the user with something like Figure 5-2 on the next page. Using LI-6800 Background Programs...
  • Page 70 To make start, stop, and count Cancel RETURN appear in the dialog, they are a) listed in in the setup, and b) Grid items DIALOG they have interfaces specified in their statements. ASSIGN Using LI-6800 Background Programs...
  • Page 71 Section 5. Using dialogs Figure 5-3. The LinearLightResponse program uses a DIALOG to configure itself. An exercise, let's add a "dark adapt" feature to this program. It's an on/off sort of thing, so would lend itself well to a check box in the dialog and a boolean variable in the program.
  • Page 72 Dark Adapt in this example). GROUP Figure 5-4. Adding a dark adapt option to the opening dialog. For more on using , see DIALOG on page 7-15. DIALOG Using LI-6800 Background Programs...
  • Page 73: Section 6. Screen Reference

    BP, load one and make changes, or start Open/New building one from scratch. Figure 6-1. The screen lets you pick a BP, or start a new one. See Directory Open/New information on page 6-15 for information about folders. Using LI-6800 Background Programs...
  • Page 74: The Build Screen

    6-1 on the facing page for a summary of the steps; more details on each step is avail- able in Step reference on page 7-1. Pre-configured step collections (of type DEFINE and GROUP) are also available (Table 6-2 on page 6-4). Figure 6-2. The screen for adding, removing, and rearranging steps in a program. Build Using LI-6800 Background Programs...
  • Page 75 Section 6. Screen reference Insert → copies selected item on left to below highlighted item on right. Child → appends selected item on left to list of children of highlighted parent item on right. ↓ ↑ moves selected step (and all contained children, if any) up or down. →...
  • Page 76 Template for a simple dialog. only Light Response Does a simple light curve. Time examples Useful time functions. Trigger User Displays the user-prompts page. Prompts Wake if sleeping Wakes the instrument if in sleep or standby Using LI-6800 Background Programs...
  • Page 77: The Set Screen

    Section 6. Screen reference screen Each program step has attributes that define its behavior. , for example, can WAIT suspend the BP's operation for a fixed time duration, or until stability to be achieved, or until a specific time of day. Figure 6-3.
  • Page 78: The Start Screen

    It also will output any messages about that step even if the Verbosity is False (by default, but is set by ). More details PROPERTIES are in Debug mode on page 6-14. Using LI-6800 Background Programs...
  • Page 79 Section 6. Screen reference clears the run log. Note that if you tap this accidentally, you can still see the Clear entire run log for that program by going to the screen and - if it still run- Monitor ning - selecting the BP there (it will have PID=0). When a program is running in the screen, you can continue editing in the Start...
  • Page 80: The Monitor Screen

    , etc. Debug mode on page 6-14 can be used, as well as the Cancel Pause screen. Start Figure 6-6. Running a BP. There is a second method to access the Monitor Screen(Figure 6-7 below). Figure 6-7 . Access the Monitor Screen from Start Up. Using LI-6800 Background Programs...
  • Page 81: Set Screen Interface Tools

    Section 6. Screen reference Set screen interface tools The interface tools for setting steps are explained below. Simple objects A dropdown menu displays a fixed list of choices when you tap it (Figure 6-8 below). Note: There may be more items in the list than are shown; you won't know until you try scrolling (touch and drag) down.
  • Page 82 Figure 6-11. When editing BPs, buttons access dialogs. File names are sometimes specified with a combination of button and edit box (Fig- ure 6-12 on the facing page). Don't forget that strings should be quoted. 6-10 Using LI-6800 Background Programs...
  • Page 83: Control Table

    Section 6. Screen reference Figure 6-12. Picking a file name can be done by simply typing or picking (if the file exists), or any combination. Control table The Control Table window is used in the interface. It is a table LOOP [Control] whose rows correspond to controls, and whose columns correspond to set points.
  • Page 84: Data Dictionary

    The Data Dictionary dialog is used in for assigning a local variable. It is a ASSIGN dialog similar to the one used in Data Dictionary in Start Up. Items are arranged by Group. Figure 6-16. The Data Dictionary dialog. 6-12 Using LI-6800 Background Programs...
  • Page 85: Control Dictionary

    Section 6. Screen reference Control dictionary The Control Dictionary is used for selecting a control or constant that can be set. steps use it. For contents, see Control dic- SETCONTROL AUTOENV [Define] tionary map on page 8-1. Figure 6-17. The Control Dictionary user interface. Status dictionary The Status Dictionary is used for selecting a system value (that is not in the Data Dictionary) to be monitored with the...
  • Page 86: Debug Mode

    . The run log indicates it is about to do a , setting Qin to f, Trigger SETCONTROL which is 100. . The run log indicates it is about to do . Tap again to actu- Trigger WAIT Trigger ally begin the WAIT 6-14 Using LI-6800 Background Programs...
  • Page 87: Directory Information

    Section 6. Screen reference . The run log indcicates it is about to do SETCONTROL. Tap Trigger Trigger again to actually do the SETCONTROL Directory information The "home" directory for BPs is /home/licor/apps. You are free to store your BPs here, or in any subdirectories you may care to make.
  • Page 88 . Contains Python modules (.py files) that you /home/licor/resources/lib might want to link to BPs via the step. EXEC Figure 6-19. These items come from the file system, so you can add your own and make them available here (after a restart). 6-16 Using LI-6800 Background Programs...
  • Page 89: Saving Bps

    Section 6. Screen reference Saving BPs BPs can be saved from either the screen or the screen. Build The edit box at the top of either screen shows the name of the last loaded or saved file ( if you tapped Clear All Build /home/licor/apps/unnamed...
  • Page 90 Note: No quotes needed here: this is not processed at run time, but is live. Note: You have to actually tap the button to save it. Just typing in a name Save on the keyboard dialog and tapping only sets the file name, it doesn't save Done 6-18 Using LI-6800 Background Programs...
  • Page 91: Section 7. Step Reference

    The result of the eval() determines Name the Python type (str, float, int, list, etc.) of your variable. Values assigned to an expression have 5 interface options for appearing in DIALOG Using LI-6800 Background Programs...
  • Page 92 Section 7. Step reference Figure 7-2. ASSIGN to an expression. See Grid items on page 7-16 for more details. Using LI-6800 Background Programs...
  • Page 93: Data Dictionary Value

    Section 7. Step reference Data Dictionary value A local variable can be assigned to anything that can be found in the Data Dic- (Figure 7-3 below). The assignment can be a 'snap shot' (capture the value, tionary and keep it) or tracked (variable continually updated automatically). Figure 7-3.
  • Page 94: Status Dictionary Value

    A local variable can be assigned to anything that can be found in the Status Dic- (Figure 7-4 below). The assignment can be a 'snap shot' (capture the value, tionary and keep it) or tracked (variable continually updated automatically). Figure 7-4. Status. Using LI-6800 Background Programs...
  • Page 95: (Advanced) Topic And Key

    The system's Data Dictionary shows group, label, name, and topic (Figure 7-5 below). Topic: the topic under which this item is published in internal LI-6800 com- munications. Except for its appearance in the Data Dictionary, topic is otherwise hidden from the user interface.
  • Page 96 It’s real name is PPFD_out, and it can be gotten via the topic (licor/li6850/output/DATA), or the group (Meas). Figure 7-7 on the facing page shows how to use to access ASSIGN [Topic and Key] the entire collection of items in group Meas Using LI-6800 Background Programs...
  • Page 97 Section 7. Step reference Figure 7-7. Leaving the ‘Key’ black returns a dictionary of everything in the Group or Topic. What can you do with this? Here is an example: the program illustrates how to log everything in the /home/licor/apps/examples/LogMeas.py group to a comma separated file, with elapsed time, as fast as new data sets Meas are available.
  • Page 98 4.261619 , 162.42, 164.214, 0, 600.008, 4.26816, 4.2471, 0, 0, 0.822646, 11.1801, -0.0055487, 97.3793, 1549397998.1, 26.6169, 21.7655, 997.922 4.794935 , 162.444, 164.221, 0, 600.03, 4.2682, 4.24693, 0, 0, 0.810461, 11.1801, -0.00549713, 97.3787, 1549397998.6, 26.6164, 21.7421, 997.929 Using LI-6800 Background Programs...
  • Page 99: (Advanced) Xml Value

    Section 7. Step reference 5.244639 , 162.491, 164.239, 0, 600.011, 4.26834, 4.24663, 0, 0, 0.810461, 11.1801, -0.00545026, 97.3785, 1549397999.1, 26.6156, 21.7197, 997.943 5.888604 , 162.547, 164.228, 0, 600.003, 4.26827, 4.24641, 0, 0, 0.807415, 11.1801, -0.00548854, 97.3784, 1549397999.6, 26.6146, 21.6891, 997.945 6.246275 , 162.608, 164.239, 0, 599.998, 4.26845, 4.24642, 0, 0, 0.792185, 11.1801, -0.00545416, 97.3788, 1549398000.1, 26.6135, 21.6532, 997.938 6.887768 , 162.666, 164.233, 0, 599.985, 4.26856, 4.24679, 0, 0, 0.778478,...
  • Page 100: Autoenv

    Figure 7-10. How the controls of map to the user interface. AUTOENV [Define] With set to (Figure 7-11 on the facing page), you can set Action Set time & direction direction and location on the time axis. 7-10 Using LI-6800 Background Programs...
  • Page 101 Section 7. Step reference Figure 7-11. The controls set the direction and location AUTOENV [Set time & direction] (time). With set to (Figure 7-12 below), you can turn the AutoEnv on Action Start Stop or off. Figure 7-12. AUTOENV [Start] [Stop] Figure 7-13 on the next page illustrates the use of AUTOENV...
  • Page 102 AutoEnv; it is write-only, basically. You can, however, get a dictionary of AutoEnv configuration information via ASSIGN[Topic and Key], using the topic licor/li6850/scripts/autoenv/x/constants where x is 1, 2, ... 6. 7-12 Using LI-6800 Background Programs...
  • Page 103: Call And Define

    Section 7. Step reference BREAK BREAK provides a way to exit from a LOOP or WHILE (Figure 7-14 below). Figure 7-14. Using to exit a LOOP. BREAK CALL and DEFINE DEFINE is the BP equivalent of a subroutine or function. It defines a collection of program steps that can be called from anywhere (CALL), and have parameters passed to it.
  • Page 104 Figure 7-16. Comparison of pass-by-value and pass-by-reference. Thus, passing by reference is typically the method to use if you want to get some information back from a DEFINE, rather than just pass information to it. 7-14 Using LI-6800 Background Programs...
  • Page 105: Dialog

    Section 7. Step reference DIALOG displays a dialog box for obtaining input from the user (Figure 7-17 below) DIALOG Figure 7-17. The parts of a BP dialog, and how they are configured in a step. DIALOG 's setup interface (Figure 7-17 above bottom) allows you to specify the DIALOG dialog's parameters: DIALOG...
  • Page 106: Grid Items

    True or False value. The item label tells how the check box is to be labeled. Figure 7-18. Check box. (Figure 7-19 on the facing page) is appropriate for letting the user Dropdown list select from a scrollable list. 7-16 Using LI-6800 Background Programs...
  • Page 107 Section 7. Step reference Figure 7-19. Dropdown list. (Figure 7-20 below) is suitable for strings or values. There is also a Editbox checked option. Figure 7-20. Edit boxes can be checked or unchecked. option (Figure 7-21 on the next page) is appropriate for letting Radio buttons the user select from a small selection.
  • Page 108 ASSIGN Figure 7-22. The text option shows current value. dialog options (Figure 7-23 on the facing page) are Table Text summary available for variables assigned to the ; one is editable, one is not. TABLE 7-18 Using LI-6800 Background Programs...
  • Page 109 Section 7. Step reference Figure 7-23. Dialog options for TABLE Grid items 7-19...
  • Page 110: Dlg Variables

    'units': 'cm\u00b2', 'interface': 2, 'label': 'Damaged area', 'checkable': False, 'width': 0} The checkable version of edit box does this: abc = {'value': 4.5, 'checked': False} abc_dlg = {'target': 'abc', 'description': 'Your best estimate', 'units': 'cm\u00b2', 7-20 Using LI-6800 Background Programs...
  • Page 111: Things To Consider

    Section 7. Step reference 'interface': 2, 'label': 'Damaged area', 'checkable': True, 'width': The radio button configuration in Figure 7-21 on page 7-18 is doing this Python equivalent: loc = 'Plot AD157' loc_dlg = {'interface': 8, 'values': ('Plot AD157', 'Plot AE200', 'Plot AE201', 'Greenhouse'), 'label': 'Where', 'target': 'loc'} Things to consider Some facts about...
  • Page 112: Exec

    EXEC occurs. The option Global means whatever is defined in the is available anywhere (e.g., in any function) EXEC in the rest of the program. See Figure 7-26 on the facing page. 7-22 Using LI-6800 Background Programs...
  • Page 113: Group

    Section 7. Step reference Figure 7-26 . Local (top) vs Global (bottom). The locally defined linearList is not avail- able from within the subroutine. MyFct GROUP is a container for program steps. It has an ‘Enabled’ property that determ- GROUP ines whether or not the contained steps execute at run time.
  • Page 114: If, Else If, Else

    ELSE IF is optional, there can be only one, and it must come last. ELSE If there is a misplaced , then you will get an error message: ELSE ELSE IF 7-24 Using LI-6800 Background Programs...
  • Page 115: Log

    Section 7. Step reference statement cover all aspects of the normal LI-6800 log operations; it can open a log file, log a remark, log data, or close the file. Open file Figure 7-29 below illustrates opening a log file with a programmatically determined name.
  • Page 116: Record Remark

    Figure 7-31. allows you to temporarily override log options. Close file option takes no parameters. If no file is open when this is LOG[Close file] executed, it does nothing. Figure 7-32. Closing a log file. 7-26 Using LI-6800 Background Programs...
  • Page 117: Loop

    Section 7. Step reference LOOP contains steps that execute repeatedly. It comes in five types: Count, Dur- LOOP ation, Control, List and File. Count If you wish to cycle a fixed number of times, use the option. You can LOOP [Count] define a variable to access the count (0, 1, ...).
  • Page 118: Duration

    Figure 7-34. , 5 seconds total, with timing via when new data is avail- LOOP [Duration] able (‘Min time = 0’) 7-28 Using LI-6800 Background Programs...
  • Page 119: List

    Section 7. Step reference List If you wish to cycle through a list of items of any type, use . On each LOOP [List] pass through, the associated variable that you name is assigned to an item from the list. It also works on variables.
  • Page 120 Turning a string into a number in Python is easy ( func- float() tion), but you may not need to. If you were using these values to set a control, the controls will do the conversion for you. SETCONTROL 7-30 Using LI-6800 Background Programs...
  • Page 121: Properties

    Section 7. Step reference PROPERTIES The PROPERTIES lets you programmatically pause a BP, and also controls the BP’s verbosity (run log output). Figure 7-38. Using the step to pause a program. PROPERTY , which defaults to , controls how much gets written to the run log. Verbose With set to False, the only output to the run log will be start and stop mes-...
  • Page 122: Setcontrol

    When the 'Value' is a ComboBox, as in the Dio1 example above, the non-fixed entry allows you to select the choice at run time, rather than design time. Table 7-1 on the facing page illustrates some entry choices for Dio1. 7-32 Using LI-6800 Background Programs...
  • Page 123: Show

    Section 7. Step reference Table 7-1. Options for entering SETCONTROL Dio1. Typed in Result Value high At design time, same as selecting high from the menu. 'high' At run time, evaluates to a string, so becomes high. At run time, sets Dio1 like you had picked low. At run time, assuming you have defined xxx, and it evaluates to 'high', 'low', 'input', 1, 0, or -1, then this is fine.
  • Page 124: Table

    If an entry is blank, it skips that target. Thus, if only the first column in the table for a particular row has an entry, that value will only be set once. 7-34 Using LI-6800 Background Programs...
  • Page 125: Structure Of A Table Variable

    Section 7. Step reference Structure of a TABLE variable Consider a with two controls, one for light intensity, and one color, and an TABLE auxiliary constant for wait times (Figure 7-43 below). Figure 7-43. A table with two controls and an auxiliary constant. A variable table is a Python dictionary with two keys: "values"...
  • Page 126 "Qin",[1500,1000,500,100] "Color_Qin",["r60","r70","r80","r90"] "wait",[2,3,4,5] "aux": { "Color_Qin": { "control": True, "staticmeta": False "wait": { "units": "mins", "format": ["f",1,2], "control": False, "staticmeta": True "Qin": { "control": True, "staticmeta": False Listing 7-2. An example of a variable. TABLE 7-36 Using LI-6800 Background Programs...
  • Page 127: Custom Executions

    Section 7. Step reference Custom executions If you need to customize how a is handled during run time, then you TABLE should start with Figure 7-44 below which illustrates the functional equivalent of the standard processing that provides. LOOP [List] Figure 7-44.
  • Page 128: Duration

    In the interval between 30 seconds after the start of the wait, and 60 seconds before the maximum time, a match will occur if Early matching True and if the reference IRGAs (C and H ) meet the following stability criteria: 7-38 Using LI-6800 Background Programs...
  • Page 129: Until

    Section 7. Step reference Figure 7-47. example. Wait [stability] Until waits for a time of day. Figure 7-48 on the next page shows multiple WAIT [Until] ways to achieve the same thing. Until 7-39...
  • Page 130 The ‘String’ format (lower left in Figure 7-48 above) is an alternative way to specify time and date; the advantage is that allows you to programmatically specify it if you 7-40 Using LI-6800 Background Programs...
  • Page 131: Event

    True. The example in WAIT [Event] Figure 7-49 on the next page is as close as you may come to a game on the LI-6800. It simply times how long it takes you to get the flow rate below 400.
  • Page 132: While

    20 µmol/sec, so if you have the chamber closed and the pump running before running this program, it will loop until you either open the chamber, or stop the flow, or 1 minute has expired. 7-42 Using LI-6800 Background Programs...
  • Page 133 Section 7. Step reference Figure 7-50. example. WHILE WHILE 7-43...
  • Page 134 Section 7. Step reference 7-44 Using LI-6800 Background Programs...
  • Page 135: Appendix A. Control Dictionary Map

    Dio6 Digital I/O port 6 (pin 11). Dio7 Digital I/O port 7 (pin 12). Dio8 Digital I/O port 8 (pin 13). Excite5 5V Excitation (pin 25). Power12 12V Power (pin 23). Power5 5V Power (pin 14). Using LI-6800 Background Programs...
  • Page 136 T2 LTConst:fTeb Fractional contribution of leaf energy balance Soil Soil:#Reps Soil measurement rep count per measurement Soil:CircPump_% Circulation pump speed Soil:Duration Soil measurement duration System SysConst:AvgTime System average time SysConst:Oxygen Oxygen concentration User Defined User:myfirst User:mysecond Using LI-6800 Background Programs...
  • Page 137 Appendix A. Control dictionary map Type Group Name Description CO2 On/Off Controller on/off Controls CO2_% injector setting (0-100) CO2_r Reference CO control set point CO2_s Sample CO control set point Color Color_All Color specifier for all sensors Color_Con Color specifier for light source attached to console Color_Flr Color specifier for fluorometer...
  • Page 138 Pressure Chamber over-pressure pressure set point Pressure_On/Off Pressure Controller on/off Pressure_% Chamber over-pressure control setting Temp Tair Chamber air temperature set point Temp_On/Off Temp Controller on/off Tleaf Leaf temperature set point Txchg Heat exchanger set point Using LI-6800 Background Programs...
  • Page 139 Appendix A. Control dictionary map Type Group Name Description Flr Settings Dark DARK:After Far red off time after actinic off DARK:Before Turn far red on time prior to actinic DARK:Duration Dark pulse duration DARK:FarRed target Dark pulse far red target Induction IND:Duration Induction flash duration...
  • Page 140 Auto match stats averaging time Mch:CO2 limit delta rate of change green light threshold Mch:H2O limit O delta rate of change green light threshold Mch:Mode Match mode action Mch:Timeout Auto mode timeout time Power PowerState Sleep/Standby mode control Settings Using LI-6800 Background Programs...
  • Page 141: Appendix B. Status Dictionary Map

    Pin 12: low, high, input Dio8 Pin 13: low, high, input Excite5 5V excitation (pin 25) GPIO State summary (pins 13-6) GPIOdir Direction summary (pins 13-6) Power12 12V power (pin 23) Power5 5V power (pin 14) Using LI-6800 Background Programs...
  • Page 142 % Desiccant (manual) H2O:PercentH % Humidifier (manual) H2O:SetPoint H2O setpoint (target units) H2O:Status 0=off, 1=manual, 2=off target, 3=on target H2O:Target H2O_r, H2O_s, RH air, etc. H2O:Teff Coolest temp in chamber H2O:TlowLab Label of coolest chamber temp Using LI-6800 Background Programs...
  • Page 143 Appendix B. Status dictionary map Type Group Name Description Env Controls Light Con:ColorMix Mix resulting from color spec (continued) Con:ColorSpec Color specification Con:Control off, setpoint, percent or test Con:Info Console light source info Con:Percent Manual %s: red blue farred Con:Setpoint Actinic setpoint mol m s Con:Status Con: 0=off, 1=manual, 2=off target,...
  • Page 144 Match: 0=Never, 1=Always, 2=If MchOpt:Elapsed Match opt: elapsed time > MchOpt:H2OChange Match opt: H2O changed > MchOpt:H2ODelta Match opt: |H2O| < Standard LogOps:MakeExcel Also create Excel log file LogOpts:AvgTime Additional averaging time LogOpts:Beep Beep on log Using LI-6800 Background Programs...
  • Page 145 Appendix B. Status dictionary map Type Group Name Description Matching Auto Mch:AvgTime Auto match stats averaging time Config Mch:CO2 limit delta rate of change green light threshold Mch:H2O limit O delta rate of change green light threshold Mch:Timeout Auto mode timeout time Status Mch:AutoFrac Fraction complete of an automatic...
  • Page 146 Appendix B. Status dictionary map Using LI-6800 Background Programs...
  • Page 147: Appendix C. The List_Utility Module

    Appendix C. module list_utility The following is a listing of the file on the LI-6800. list_utility.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- # Thanks to Ari Kornfeld @ akorn@carnegiescience.edu import numpy as np from random import sample def linearList(vv1, vv2, nn, rounded=2):...
  • Page 148 = '' for j in range(listCount): line += str(result[j,:].tolist()[0][i])+' ' print(line, file=file) except Exception as e: print('Exception in makeOrtho:', str(e)) return [result[i,:].tolist()[0] for i in range(listCount)] # return a list of lists 10-2 Using LI-6800 Background Programs...
  • Page 149 Appendix C. The list_utility module if __name__ == '__main__': n=12 t = linearList(25, 15, 3) + linearList(17, 45, n-3) # make temp efficient to work through - no big jumps, and start at ambient. c = linearList(50, 1000, n, rounded=0) # test size mismatch q = linearList(20, 2000, n, rounded=0) (t,c,q) = makeOrtho((t,c,q), lock_index=0, outfile="/Users/jon/out.txt")
  • Page 150 Appendix C. The list_utility module 10-4 Using LI-6800 Background Programs...
  • Page 152 Regional Offices LI-COR Biosciences GmbH Siemensstraße 25A 61352 Bad Homburg Germany Phone: +49 (0) 6172 17 17 771 envsales-gmbh@licor.com LI-COR Biosciences UK Ltd. St. John’s Innovation Centre Cowley Road Cambridge CB4 0WS United Kingdom Phone: +44 (0) 1223 422102 envsales-UK@licor.com LI-COR Distributor Network: www.licor.com/env/distributors...

Table of Contents

Save PDF