file: vlwr3cmd.html
09 Apr 2002

ASIMET LONGWAVE RADIATION MODULE VERSION 3.xx COMMAND SET

See ASIMET MODULE OPERATIONS document for instructions on how to hook up the comms link to your PC and RS-485 adapter.
Refer to Latest Version Information for reference info on latest firmware version numbers.

NOTE: this module uses the VOSLWRF type of sensor front-end. Also reference the VOSLWRF Front-End Module Command Set document.

Note: commands sent are indicated in BOLD, responses in normal text. <crlf> represents ASCII carriage return and line feed; <crlfetx> represents ASCII carriage return, line feed, ETX (03h).

Command Description


        A       Address acknowledge
                - returns address of module, terminated by <crlfetx>
                - e.g. #LWR01A LWR01<crlfetx>
                - NOTE: LWR01 is the default address of the LWR module; it 
                may be changed by the 'U' command but any failure of 
                EEPROM will result in the use of the default address. Use of 
                defaults is reported in the 'L' command.

        B       Output both calibrated and raw values
                - outputs both calibrated and raw data values, as follows:
                temp_dome  temp_body  res_dome  res_body  volts_pile  LW_flux
                domet_raw  bodyt_raw  tpile_raw <crlf> 
                - example:
                #LWR01B 292.21  289.33  31234.2  32337.6  203.6  122.7  34234  35984  32997 <crlf>
                - temperature is degrees Kelvin, resistance in ohms, thermopile microvolts,
                  LW flux in watts/meter^2, raw values are 16-bit counts.
                - C language format: "%7.2f %7.2f %8.1f %8.1f %6.1f %6.1f %7u %7u %7u\r\n\x03"

        C       Output calibrated data
                - outputs calibrated values as follows:
                temp_dome  temp_body  volts_pile  LW_flux <crlf> 
                - Dome and body temperatures in degrees Kelvin, thermopile voltage
                in microvolts, LW flux in watts/meter^2
                - example:
                #LWR01C 292.21  289.33  203.65  122.7 <crlf>
                - C language format: "%7.2f %7.2f %6.1f %6.1f\r\n\x03"

        D       Set RT clock date/time: 'YYYY/MM/DD HH:MM:SS'
                - on module startup, the date and time are initialized from 
                the battery-backed RTC on the DS87C530 chip.  The 'D' command 
                accepts a fixed format string of exactly 19 characters 
                representing date and time.  For example, sending the 
                following command:

                        #LWR01D2000/01/18 10:35:15

                will set the date to 18 January 2000 at 10:35:15 AM.
                - the module returns <crlfetx> in acknowledgement.
                - the time will be set at the instant that the last digit is 
                sent; thus you may enter the module address, command and 
                first 16 characters of the date and time, and finally 
                enter the 19th character in sync with your reference 
                clock.  The current date and time may be determined using 
                the 'L' command.

        F       PCMCIA card access (only if FLASH card installed)
                - there are 5 'F' commands available for accessing the Intel-
                Compatible FLASH memory card used for data storage. These
                commands allow reading the card contents via the RS-485
                command link, storing EEPROM contents for archival purposes, 
                and FLASH card erasure.
                - the lowest 128 kilobyte block of the FLASH card is 
                reserved for system information.  As of the current 
                revision (VOSLWR53 v3.2), only stored EEPROM contents 
                reside here, beginning at byte 257 (100h) and continuing 
                for 1024 bytes (4FFh).  The rest of the 128 kilobyte 
                block reads as all FFh.  This block may be erased without 
                affecting data stored in the rest of the FLASH card.

           FB - Read any 512 byte block, hex
                - any 512 byte block from 1 to 8192 may be chosen as the 
                starting block.  Block 1 is the default starting point.
                - blocks are formatted as 32 bytes (64 ASCII characters) of 
                HEX-ASCII per line by 16 lines per 512 byte block.
                - example (default start block - note EEPROM info stored by 
                'FS'):

                #LWR01FB
                Start block # [1] ->            (hit ENTER here for default)
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
                FFFFFFFFFFFFFFFF57484F492F47454F464600FFFFFFFFFF4D4B3100FFFFFFFF
                FFFFFFFFFFFFFFFF30303100FFFFFFFF31354D415239350041495200FFFFFFFF
                FFFFFFFFFFFFFFFF53422D324100FFFFFFFFFFFFFFFFFFFF2D00FFFFFFFFFFFF
                2D00FFFFFFFFFFFF47454F464600FFFFFFFFFFFFFFFFFFFF5454384250520000
                FFFFFFFFFFFFFFFF312E3100FFFFFFFF30344150523935002D00FFFFFFFFFFFF
                2D00FFFFFFFFFFFFFFFFFFFFFFFFFFFF2D00FFFFFFFFFFFFFFFFFFFFFFFFFFFF
                4E4F2043414C00FF425052303100FFFF25372E326600FFFFFFFFFFFFFFFFFFFF
                FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

                - to read the next block, hit ENTER.
                - to quit, hit X followed by ENTER.
                - Note 1: Blocks 1, 2, and 3 contain the 1024 bytes of 
                EEPROM image, if written by the 'FS' command below.  The 
                EEPROM image begins at the middle of block 1 and ends in 
                the middle of block 3.
                - Note 2: The first DATA record is written at block 257 
                (above the first 128 Kbyte reserved system info area at 
                card physical address 20000h).

           FR - Read data record, formatted
                - any record from 1 to ???? may be chosen as the 
                starting record.  Record 1 is the default starting point.
                - records are formatted as 1 line of date and time followed 
                by 60 minutes of two records per line, i.e. minutes 0 and 1
                on the first line, 2 and 3 on the second line, etc. 
                Readings occur on the minute, beginning with minute 0 and 
                ending at minute 59, with the record written to the FLASH card
                at 59 minutes, 01 seconds of each hour.
                - example (default start record):
                #LWR01FR
                Start record # -> 
                2000/01/09 09:59:00
                292.21, 289.33, 73.6, 434.2     292.21, 289.33, 73.6, 434.2<crlf>
                292.21, 289.33, 73.6, 434.2     292.21, 289.33, 73.6, 434.2<crlf>
                  .
                  .
                292.21, 289.33, 73.6, 434.2     292.21, 289.33, 73.6, 434.2<crlf>
                - to read the next hour record, hit ENTER.
                - to quit, hit X followed by ENTER.
                - Note 1: values of 0 indicates no reading was available 
                from the VOSLWRF for that minute; each minute's data is 
                placed at a fixed location in the storage array 
                corresponding to the minute when the data was acquired.  
                Values of Na indicates an unused portion of the FLASH 
                card has been accessed.  This value corresponds to the 
                all FFh condition of the erased FLASH card.
                - Note 2: The first data record is written at block 257 
                (above the first 128 Kbyte reserved system info area at 
                card physical address 20000h).  Using the 'FB' command 
                above and selecting block 257 as the start block, you may 
                inspect the packed binary format of the data at record 1. 
                Since each block is 512 bytes long, you will see data 
                from 1 records at a time.
                - See FLASH Record Format for FLASH card internal storage format.

           FS - Store EEPROM constants
                - on startup, 1024 bytes of the EEPROM are read into system 
                RAM and mapped onto a data structure of miscellaneous 
                system information and calibration constants.  This area 
                of system RAM may be modified using the 'U' command, and 
                the EEPROM may then be re-written with the modified 
                information.  As an additional backup for possible data 
                processing use later, this information may also be 
                written out, in binary format, to the system/info area of 
                the FLASH memory card.
                - example: #LWR01FS System info written to PCMCIA<crlfetx>
                - NOTE: The system/info area must be erased prior to each 
                use of the 'FS' command.
                - the system area may be read in HEX-ASCII format by reading 
                blocks 1, 2, and 3 with the 'FB' command above, or as 
                part of the binary dump of the entire FLASH card using 
                the 'XMODE' command below.
                - See FLASH Record Format for FLASH card internal storage format.

           FE - Erase entire card (Y/N)
                - use ONLY if you wish to erase the entire FLASH card.  This 
                command takes several seconds to complete.  After each 
                128 Kbyte block erase, a dot (.) is sent, followed by a 
                "Cleared" message when done.
                - upon entry, you are prompted "Do you really want to erase? 
                Y/[N]"  The default response is NO; in fact any response 
                other than uppercase Y will abort with 
                "Aborting<crlfetx>".
                - example: 
                #LWR01FE Do you really want to erase? Y/[N]<crlf>
                Y Erasing Flash Card................................<crlf>
                Cleared<crlfetx>
                - upon completion, the next hour record will be written at 
                record 1.

           FI - Erase system/info area (Y/N)
                - this command allows erasure of the system area ONLY, and 
                in particular, the EEPROM info stored with the 'FS' 
                command above.  The data area will NOT be erased by this 
                command.
                - upon entry, you are prompted "Do you really want to erase 
                system info? Y/[N]"  The default response is NO; in fact 
                any response other than uppercase Y will abort with 
                "Aborting<crlfetx>"
                - example: 
                #LWR01FI Do you really want to erase system info? 
                Y/[N]<crlf>
                Y Erasing...System info cleared<crlfetx>

        H       Help
                - #LWR01H - 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> and final line terminated <crlfetx>, as follows:

                Firmware VOSLWR53 V3.3
                Module clock 2.4576 Mhz
                A - Address acknowledge
                B - Output both raw and cal
                C - Output calibrated data
                D - Set RT clock date/time: 'YY/MM/DD HH:MM:SS'
                E - Sensor front end direct comms
                F - PCMCIA card access
                        FB - Read any block, hex
                        FR - Read data record, formatted
                        FS - Store EEPROM constants
                        FE - Erase entire card (Y/N)
                        FI - Erase system/info area (Y/N)
                H - Display Help message
                I - Report ID information
                L - Report ID, serial #, cal info, etc.
                P - Enter polled test mode
                Q - Request cal constants from VOSLWRF
                R - Output raw data
                T - Enter test mode
                U - Update EEPROM constants - password 'OK'
                V - Output last hour averaged data
                XMODE - XMODEM Dump PCMCIA card via console

                Note: 'F' and 'XMODE' are not present unless FLASH card is 
                installed.

        I       Report ID information
                - #LWR01I - displays the text information stored in EEPROM, 
                with headers as follows, each line terminated in crlf:
        
                MODADR: ( 5 bytes text)         module address
                MODMFG: (16 bytes text)         module manufacturer
                MODMOD: (16 bytes text)         model number
                MODSER: ( 8 bytes text)         serial number
                MODDAT: ( 8 bytes text)         manufacture date
                SENMFG: (16 bytes text)         sensor manufacturer
                SENMOD: (16 bytes text)         model number
                SENSER: ( 8 bytes text)         serial number
                SENDAT: ( 8 bytes text)         manufacture date
                SFTMFG: (16 bytes text)         program origin
                SFTNAM: (16 bytes text)         program name
                SFTREV: ( 8 bytes text)         serial number
                SFTDAT: ( 8 bytes text)         revision date
                CALFAC: (16 bytes text)         calibration facility
                CALPER: (16 bytes text)         calibration technician
                CALDAT: ( 8 bytes text)         calibration date
                DATFRM: (64 bytes text)         calibrated data output format
                DATDES: (64 bytes text)         calibrated data description
                DATUNI: (64 bytes text)         calibrated data units
                RAWFRM: (64 bytes text)         raw data output format
                RAWDES: (64 bytes text)         raw data description
                RAWUNI: (64 bytes text)         raw data units

                - the last scan sent is terminated by <crlfetx>.
                - NOTE: this information resides in EEPROM.  Most items are
                completed at time of manufacturing test, but may be modified
		using the 'U'pdate command.  Only module address is necessary
		for correct module operation.
        
        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 and
		PCMCIA card status.  Normally, after an initial <crlf>,
		8 lines of info are provided, as follows:
        
                #LWR01L<crlf>
                module id from EEPROM<crlf>
                module serial number from EEPROM<crlf>
                firmware name and version from program EPROM<crlf>
                crystal frequency from EPROM
                calibration date from EEPROM<crlf>
                current date and time<crlf>
                Set 1 cal constants A, B, C, D
                Set 2 cal constants A, B, C, D
                Set 3 cal constants A, B, C, D
                Set 4 cal constants A, B, C, D
                Set 5 cal constants A, B, C, D
                Set 6 cal constants A, B, C, D
                PCMCIA card installed - PCMCIA card status<crlf>
                PCMCIA card 1 hour records used, available<crlfetx>
        
                - example normal response (8 lines plus initial <crlf>):
                LWR01
                001
                VOSLWR53 v3.3
                2.4576 Mhz
                NO CAL
                99/02/10 11:23:35
                Set1:  0.00000e+00  2.40000e-02  0.00000e+00  0.00000e+00
                Set2:  0.00000e+00  2.40000e-02  0.00000e+00  0.00000e+00
                Set3:  0.00000e+00  2.40000e-02  0.00000e+00  0.00000e+00
                Set4:  0.00000e+00  2.40000e-02  0.00000e+00  0.00000e+00
                Set5:  0.00000e+00  2.40000e-02  0.00000e+00  0.00000e+00
                Set6:  0.00000e+00  2.40000e-02  0.00000e+00  0.00000e+00
                EDI Intel-compatible 8MB PCMCIA CARD present - CARD OK!
                Records used: 125; available: 7811
        
                - the last line is terminated by <crlfetx>.
                - NOTE 1: after initial startup, cal constants (which reside in
                the VOSLWRF sensor front-end) will not be displayed.  The message
                "Use 'Q'uery command to get constants from VOSLWRF front end" will
                be displayed.  See 'Q' command below.
                - NOTE 2: if an Intel or Compatible PCMCIA card is installed, the
                card present line will display:
                        Intel Type 2+ 4MB PCMCIA CARD present - CARD OK!
			                  or
			EDI Intel-compatible 8MB PCMCIA CARD present - CARD OK!
                - NOTE 3: if no PCMCIA card present, the last two lines will be
                replaced by "No PCMCIA card installed" message.
                 
        P       Enter polled test mode
                - responds with individual scans of data in the 'B' command 
                response format, except <crlf> terminator only. Upon 
                receipt of any character except ESC, another scan of LWR 
                data is sent.  For example:
        
                #LWR01P 292.21  289.33  31234.2  32337.6  203.6  122.7  34234  35984  32997 <crlf>
                        send <cr> (or other character)
                292.21  289.33  31234.2  32337.6  203.5  122.6  34234  35984  32997 <crlf>
                        send <cr> (or other character)
                292.21  289.33  31234.2  32337.6  203.5  122.6  34234  35984  32997 <crlf>
                .
                . 
                - the command terminates on receipt of an ASCII ESC (1Bh) 
                character. The last scan sent is terminated by <crlfetx>.

        Q       Query command retrieves cal constants from VOSLWRF sensor front-end.
                - this command will take several seconds to execute; it must
                power up the VOSLWRF board, wait for VOSLWRF initialization, then
                request 2 sets of cal constants.
                - the message "Requesting cal constants - " will be displayed
                immediately.  After the above noted delays, the message "OK!"
                will be appended if successful, "FAILED!" if not successful.
                - example: #LWR01Q Requesting cal constants - OK!
 
        R       Output raw value
                - outputs raw 16-bit data values, as follows:
                domet_raw, bodyt_raw, tpile_raw <crlfetx>
                - example: #LWR01R 43265 23183 34554 <crlfetx>
        
        T       Enter test mode
                - responds with continuous scans of data in the 'B' command 
                response format, except <crlf> terminator only. For 
                example:
        
                #LWR01T292.21  289.33  31234.2  32337.6  203.5  122.6  34234  35984  32997 <crlf>
                292.21  289.33  31234.2  32337.6  203.5  122.6  34234  35984  32997 <crlf>
                292.21  289.33  31234.2  32337.6  203.5  122.6  34234  35984  32997 <crlf>
                292.21  289.33  31234.2  32337.6  203.5  122.6  34234  35984  32997 <crlf>
                .
                . 
                - the command terminates on receipt of an ASCII ESC (1Bh) 
                character. The last scan sent is terminated by <crlfetx>.
        
        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. #LWR01UOK.  Upon 
                receipt of the correct password, a set of prompts will be 
                issued to allow entry of new module address, module 
                manufacturer's info, sensor info, software info, 
                calibration facility info, raw and calibrated output 
                format info, VOSLWRF calibration constants, 
                display entire info area, and exit with or without 
                update.
                - the '0' choice for 'Exit without update' leaves the module 
                RAM and EEPROM in its original state.  The VOSLWRF cal constants
                are handled separately, as these constants reside in VOSLWRF
                EEPROM on the sensor front-end board. 
                - the '8' choice for 'Enter VOSLWRF cal constants' passes commands
                through the LWR C51 logger board to the VOSLWRF sensor front-end 
                board vis RS-485.  There are some startup delays while the VOSLWRF
                is powered up, as well as some half-duplex comms delays.  After 
                selecting '8' from the menu, it will take several seconds to get 
                the 'OK' prompt from the VOSLWRF (if it fails to respond, try again
                after the menu re-displays).  At the OK prompt, you may read existing
                or write new cal constants only.  Unrecognized commands will result in
                a 'Bad command' response.  If you get stuck, enter 'Q' to quit VOSLWRF
                update without making any changes.  For complete details on the 
                VOSLWRF EEPROM Update command, see the document 
                "VOSLWRF Front-End Module Command Set". 
                - all responses to prompts must be terminated with <cr>.  
                The final response from the module upon exit is <crlfetx>.
                
                NOTE 1: Upon completion, the newly updated module address 
                will not take effect until the next reset or power-up.
        
        V       Output the latest 1 hour average values
                - outputs the average of the 1 minute values of the most
                recent hour; update is concurrent with the write to FLASH
                of the current hour's data at minute 59 of each hour.
                - example: #LWR01V 297.16 293.51 45.1 454.3<crlfetx>
                - see 'C' command for values and format

        XMODE   XMODEM Dump PCMCIA card via console in RS232 mode only;
                   (only if FLASH card installed)

                The following description assumes PCPLUS for terminal software, 
                but any terminal program capable of XMODEM transfer should work.

                On entry, the module will prompt:
                  Set terminal speed for 38400 then hit any key

                After setting speed and hitting a key, you will see:
                  XMODEM Send Function
                  Waiting for start...

                Start a transfer (PgDn in PCPLUS) - on completion, you will see:
                  Sent 89 blocks - done
                  Restore terminal speed to 9600 then hit any key

                After resetting speed to 9600 baud and hitting a key, the module
                will send a "\r\n"

                Ignore occasional gibberish when changing baud rates!

                Note:  Only data record portion of FLASH card is dumped via 
                XMODEM;  See FLASH Record Format.



Revision history: