file: vlwrfcmd.html
21 Oct 2002


See ASIMET MODULE OPERATIONS document for instructions on how to hook up the comms link to your PC and RS-485 adapter. This board may be used both as a front-end interface board in conjunction with an VOS/ASIMET C51 logger board or in a "standalone IMET-compatible module" mode.
Refer to Latest Version Information for reference info on latest firmware version numbers.

Note: commands sent are indicated in BOLD, responses in normal text. <crlf> represents ASCII carriage return and line feed.

Command Description

        A       Address acknowledge
                - returns address of module, terminated by <crlf>
                - e.g. #LWF01A LWF01<crlf>
                - NOTE 1: LWF01 is the default address of the LWRF module;
                it may be changed by the 'U' command but any failure of 
                EEPROM will result in the use of the default address.  In
                addition, use of defaults is reported in the 'L' command.
                - NOTE 2: The ASIMET module (LWR3) based on
                this board expects address LWF01 only.

        C       Output calibrated interval mode data; also switch
                to 1 minute interval mode if currently in polled mode
                - outputs most recent calibrated values of dome temperature
                (degrees K), body temperature, thermopile voltage (microvolts)
				and Long Wave flux (w/m^2). 
                That is, as follows:

                temp_dome, temp_body, volts_pile, LW_flux <crlf> 

                - example:
                #LWF01C 292.21, 289.33, 203.6, 327.2 <crlf>

        H       Help
                - #LWF01H - a multiple line response with text similar to 
                the first line of each command description in this 
                document as the help line, with each line terminated 
                <crlf>, as follows:
                Firmware VOSLWRF V1.4
                A - Address acknowledge
                C - Calibrated data (and goto IMET-style interval mode 1)
                H - Display Help message
                L - Report ID, serial #, cal info
                Mx - Report cal constant set x [1-7]: A B C D
                P - Calibrated data (and goto polled mode 0)
                T - Enter test mode
                U - Update EEPROM constants - password 'OK'
                    - A,Cxy,D,M,Q,S,WOK

        L       Report ID, serial #, cal info, etc.
                - the 'L' command provides miscellaneous status information
                about the module in a multi-line response. 
                - The number of lines in the response may vary depending upon
                the EEPROM status.  Normally, after an initial <crlf>, 8 lines of info
                are provided, as follows:
                module id from EEPROM
                module serial number from EEPROM
                firmware name and version from program EPROM
                Set1 cal constant from EEPROM (res_dome)
                Set2 cal constant from EEPROM (temp_dome)
                Set3 cal constant from EEPROM (res_body)
                Set4 cal constant from EEPROM (temp_body)
                Set5 cal constant from EEPROM (volts_pile)
                Set6 cal constant from EEPROM (LW_flux)
                Set7 cal constant from EEPROM (LW_flux polynomial)

                - example normal response (10 lines plus initial <crlf>):
                VOSLWRF v1.4
                Set 1: -5.76401e+05  1.75810e+01  0.00000e+00  0.00000e+00
                Set 2:  1.01694e-03  2.41658e-04  1.43645e-07  0.00000e+00
                Set 3: -5.76367e+05  1.75800e+01  0.00000e+00  0.00000e+00
                Set 4:  1.02224e-03  2.40520e-04  1.49538e-07  0.00000e+00
                Set 5: -2.01341e+04  6.12140e-01  0.00000e+00  0.00000e+00
                Set 6:  4.13600e+02  4.14000e+00  0.00000e+00  0.00000e+00
                Set 7:  0.31200e+00  0.00000e+00  0.00000e+00  0.00000e+00

        Mx      Output Xth set of calibration constants
                - returns cal set 1,2,3,4,5,6 or 7 values A B C D, space
                separated (for easy access from VOS/ASIMET C51/C530 logger board)
                - example:
                #LWF01M2 Set2:  1.01694e-03  2.41658e-04  1.43645e-07  0.00000e+00

        P       Output polled mode data; also switch to polled mode if
                currently in 1 minute IMET-style interval mode
                - outputs both calibrated and raw data, after slight delay to acquire
                new data, as follows:
                temp_dome, temp_body, res_dome, res_body, volts_pile, LW_flux <crlf>
                - example:
                #LWF01P 292.21, 289.33, 31234.2, 32337.6, 203.6, 327.2 <crlf>

        T       Enter test mode
                - responds with continuous scans (about 1 second interval) of all
                9 parameters including raw counts from A/D converter, as follows:

                temp_dome, temp_body, res_dome, res_body, volts_pile, LW_flux,
                domet_raw, bodyt_raw, tpile_raw <crlf> 

                - example:
                #LWF01T 292.21, 289.33, 31234.2, 32337.6, 203.6, 327.2, 34234, 35984, 32997 <crlf>

                - exits on receipt of ESC character.

        U       Update EEPROM contents
                - enters the update mode after confirmation of 'OK' password.
                New EEPROM values may be entered in this mode.
                - upon initial entry, you must send the letters OK after the 
                command or the command is ignored, e.g. #LWF01UOK may be sent
                as one.  Upon receipt of the correct 'password', the response will
                be OK if current parameters are valid, or NEW if parameters
                have never been entered or BAD if values are suspicious 
                (i.e. EEPROM failure or bad internal checksum).
                - response to an unknown command is '?'
                - IMPORTANT! command letter or letters A, Cxy, or S
                will respond with the current setting when issued followed
                by <cr> only .  If followed by =xxxxx<cr>, where xxxxx is some
                appropriate value, the EEPROM setting will be changed pending
                receipt of 'WOK' command to make it permanent.  Subsequent
                requests for current settings will report the new value while
                still in update mode.  However, if update mode is exited with
                'Q', the original settings of all parameters will remain intact.
                - the following commands are available in EEPROM update mode:

                    A - module Address (1 to 5 characters)
                    Cxy - Cal Constants, where x is set 1 to 7, and y is
                          constant A to D
                    Q - Quit without writing new info to EEPROM
                    WOK - Write new info to EEPROM and exit

                - Cal Constant Sets apply as follows (see Note 2 below):
                            1 - dome resistance in ohms
                            2 - dome temperature in degrees K
                            3 - body resistance in ohms
                            4 - body temperature in degrees K
                            5 - thermopile voltage in microvolts
                            6 - longwave flux in watts per meter^2
                            7 - polynomial correction to longwave flux 

                - Examples:
                    To change the current module address:

                    To see the address:

                    To see the current C2A cal constant:

                    To change it:

                NOTE 1: Upon completion, the newly updated module address
                will not take effect until the next reset or power-up.

NOTE 2: - Cal constants for temperature are used as shown in the following code fragment: /* compute thermistor temperature from resistance using Steinhart-Hart Equation; first get log of resistance */ log_resval = log(resistance_val); /* and compute Kelvin temperature */ temperature = 1 / ( Cterm * (log_resval * log_resval * log_resval) + (Bterm * log_resval) + Aterm ); /* subtract 273.16 for deg C */ - Cal constants for resistance, thermopile voltage and LW_flux correction are used in a polynomial of form: A + Bx + Cx^2 + Dx^3 - Cal constants for longwave flux are used as follows: /* routine to calculate total LW flux - per Dick Payne equations of 13 Nov 96 A = cal constant A (from cal constant set 6) B = cal constant B Tb = Kelvin Body Temp (temp_body) Td = Kelvin Dome Temp (temp_dome) Vt = microvolts from thermopile Ts = Tb + (Vt / 1440.0) s = 5.6705e-8 LW_flux = s * Ts^4 + B * s * (Ts^4 - Td^4) + A * (Ts - Tb) */ void calc_flux(void) { float Td_4, Ts, Ts_4, A, B; /* calculate intermediate value */ Ts = temp_body + (volts_pile / 1440.0); /* calculate Td^4 and Ts^4 */ Td_4 = temp_dome * temp_dome * temp_dome * temp_dome; Ts_4 = Ts * Ts * Ts * Ts; /* get cal constants */ A = page0_ptr->calset[5][Aterm]; B = page0_ptr->calset[5][Bterm]; /* now compute flux */ LW_flux = (5.6705e-8 * Ts_4) + (B * 5.6705e-8 * (Ts_4 - Td_4)) + (A * (Ts - temp_body)); }

Revision history: