file: vwnd4cf_cmd.html
12 May 2008
ASIMET WIND MODULE VERSION 4.xx with CompactFLASH 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.
CFLASH NOTE 1 - Firmware Ver 4.xx has been tested using SanDisk CompactFLASH
cards (256 MB and 64 MB) with SanDisk CompactFLASH PC Card (PCMCIA) Adapters on WHOI VO80053 Rev C/D CPU boards.
CFLASH NOTE 2 - CompactFLASH cards MUST be formatted using the I command
choice in the FOK command menu. CompactFLASH cards may be read on a PC and will contain 2 files:
a .INF user-defined Info file, and a .DAT Data file. Processing of the new .DAT file is identical to processing the
data files from older PCMCIA-based loggers, since the data file record format is unchanged.
Note 1: This module uses the PICWND type of sensor front-end with RM Young Wind Vane. Reference the
PICWND 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>
- example:
#WND01A WND01<crlfetx>
- NOTE: WND01 is the default address of the WND module; it
may be changed by the 'U' command but any failure of
EEPROM will result in the use of the default address. In
the event of EEPROM failure, a message is sent to the RS-
232 console port on startup. In addition, use of
defaults is reported in the 'L' command.
- C Output calibrated data
- outputs calibrated value as follows:
Ve Vn WSavg WSmax WSmin LastVane LastComp TiltXAvg TiltYAvg<crlfetx>
- example:
#WND01C 2.34 1.45 4.9 5.2 4.7 123.1 234.5 0.2 0.3<crlfetx>
- C language format: "%6.2f %6.2f %5.1f %5.1f %5.1f %6.1f %6.1f %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:
- #WND01D2007/04/18 10:35:15
will set the date to 18 April 2007 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.
- FOK Menu-driven CompactFLASH command operations
- Upon FOK command entry, and between each command, you will see a prompt:
Enter Flash Cmnd, ? or H for Help:
- a request for Help returns this message followed by another prompt:
Flash Help (All commands end with Enter)
C - Read card Capacity
D - Read the card Directory
E[I,D] - Erase the contents of the Info or Data files
F[W,R] - Write or Read the Info File
H{?} - Display this menu
I - Format & Initialize the card file structures
P - Read the next write & read sector Pointers
R{H,A}{SEC} - Read the next card sector (see P command above)
optional {H,A} -> Hex ASCII or printable ASCII
optional {SEC} -> specific sector number
S - Read the CF status (reg 7 and the ERRORs (reg 1), disp as HEX-ASCII
W{nnn} - Write 512 byte Test Msg to the Data file
optional {nnn} -> 1-3 digits of additional sectors to write
Q - Quit Flash operations
Enter Flash Cmnd, ? or H for Help:
- description of FOK Menu Commands:
- C - displays card capacity info
- D - displays a card directory (similar to a DOS "dir" command output):
Volume in drive is NEWLGR53
Directory of CF:
2007/04/24 19:10 35 LOGR001.INF
2007/04/25 16:42 523904 LOGR001.DAT
2 File(s) 523939 bytes
256179584 bytes free
- EI - erases the contents of the INFO file, and sets its size to 0
- ED - erases the contents of the DATA file, and sets its size to 0
- FR - reads the free-format ASCII contents of the INFO file
- FW - prompts for up to 600 characters of user info; CTRL-C terminates entry
into the INFO file
- I - formats & initializes the CFLASH card for use in the logger. A series of prompts
guides you through the process. This must be done before the logger will recognize the card and
use it for data storage.
- P - reads the next write and read sector pointers. In particular, the next
write sector pointer always indicates the last sector of data on the card. This is useful with the XMODE command.
Flash Write Pointer @ 1345
Flash Read Pointer @ 258
The write sector pointer is always restored to the currently available sector for new data whenever the logger
is powered up. The read pointer is reset to the INFO file sector on power up.
- R - read command allows a number of options, the most useful being the
RH and RH{SEC}
options. For example, to see what's in the last DATA sector, use the P command above to find the
current write sector, then use that in the RH{SEC} command to see the values. So, for the value
of the Flash Write Pointer above, send RH1345 to see the 512 bytes of that sector:
Reading Flash @ 1345
000 10 29 19 04 07 00 64 01 00 00 00 00 00 00 00 00 .)....d.........
010 00 00 0D F2 09 AC 00 00 08 F0 AD 2E 00 00 00 00 ................
020 00 00 00 00 00 00 00 00 00 00 00 00 30 D4 31 38 ............0.18
030 31 9C 32 00 07 5B CD 15 00 01 00 00 00 00 A5 A5 1.2..[..........
040 10 2A 19 04 07 00 65 01 00 00 00 00 00 00 00 00 .*....e.........
050 00 00 0D F2 09 AB 00 00 08 F5 AC F9 00 00 00 00 ................
060 00 00 00 00 00 00 00 00 00 00 00 00 30 D4 31 38 ............0.18
070 31 9C 32 00 07 5B CD 15 00 01 00 00 00 00 A5 A5 1.2..[..........
.
.
.
1B0 31 9C 32 00 07 5B CD 15 00 01 00 00 00 00 A5 A5 1.2..[..........
1C0 10 28 19 04 07 00 63 01 00 00 00 00 00 00 00 00 .(....c.........
1D0 00 00 0D F2 09 AA 00 00 08 D3 AD 6A 00 00 00 00 ...........j....
1E0 00 00 00 00 00 00 00 00 00 00 00 00 30 D4 31 38 ............0.18
1F0 31 9C 32 00 07 5B CD 15 00 01 00 00 00 00 A5 A5 1.2..[..........
If you want to read subsequent contiguous sectors, just do an RH at the next prompt, and the next
sector in sequence will display (1346 in this example). See Record Format
to decode the HEX dump.
- S - CF status info - internal WHOI use only
- W{nnn} - writes test data to the current write sector in the DATA file. Used only for
test. If you use this function, you should ED to erase the DATA file before deploying the
logger, unless you wish to incur the wrath of your data processing guru!
- Q - quit Flash ops and return to logger command mode
- New CFLASH Card Prep - when installing a CFLASH card for the first time, it must be initialized
for use in the logger. The "I" command, Format & Initialize card file structures is used
to prepare the CFLASH card for use. You will be prompted for a Volume name, an INFO File name,
and a DATA file name. The 3 character suffix of the INFO file is always .INF and the 3 character
suffix of the DATA file is always .DAT Once formatting is complete, you can get a directory with a
"D" command, or write user info into the INFO file with the "FW" command, then read the
INFO file back with the "FR" command.
- H Help
- #WND01H - 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 VOSWND53 V4.01cf
Module clock 2.4576 Mhz
A - Address acknowledge
C - Output calibrated data
D - Set RT clock date/time: 'YY/MM/DD HH:MM:SS'
F - Compact FLASH card access - password 'OK'
H - Display Help message
I - Report ID information
L - Report ID, serial #, cal info, etc.
P - Enter polled test mode
R - Output raw data
T - Enter test mode
U - Update EEPROM constants - password 'OK'
XMODE - XMODEM Dump CompactFLASH card via console
- Note: 'FOK' and 'XMODE' are not present unless a CompactFLASH card is
installed.
- I Report ID information
- L Report ID, serial #, cal info, etc.
- P Enter polled test mode
- same as 'T' command below, except after initial scan, waits
for any character (except ESC) to send next scan.
- R Output raw value
- outputs raw data values, as follows:
sample_time, pulse_count, compass degrees, east vector
(m/s), north vector (m/s)<crlfetx>
- example:
#WND01R 5.0 248 302.7 -0.968 0.250<crlfetx>
- C language format: "%5.2f %6d %5.1f %6.3f %6.3f\r\n\x03"
- T Enter test mode
- UOK 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. #WND01UOK. 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, VOSHPS calibration constants,
display entire info area, and exit with or without
update.
- Enable/Disable Compass use in vector calculations. A
special configuration setting allows compass use to be disabled
in all calculations while still displaying the current compass values
and logging the compass data to FLASH. This option is typically
used for testing purposes on ship-mounted systems only. This option
is NOT listed in the EEPROM menu.
- Enable/Disable NOAA/SEAS-Compatible message allows an ASIMET WND module
to be substituted for a complete AUTOIMET shipboard system, providing date, time, and
Ve and Vn values in a string that is broadcast out the console port once per minute.
The format is compatible with the standard AUTOIMET message, with other ASIMET
module values set to zero. This option will only broadcast the message if the
WND module is set for RS232 comms.
- the '0' choice for 'Exit without update' leaves the module
RAM and EEPROM in its original state.
- all responses to prompts must be terminated with <cr> (Enter)
The final response from the module upon exit is <crlfetx>
- NOTE 1: Upon completion, the newly updated module address, the compass enable/disable setting,
and the NOAA/SEAS message setting will not take effect until the next reset or power-up.
- XMODE XMODEM Dump CompactFLASH card via console
- XMODE command only works in RS232 mode and only if CompactFLASH card is installed
- CompactFLASH cards will take a LONG TIME to read this way -
the preferred method of reading a large .DAT data file is to remove the CFLASH card
from the module and read it on a PC. Two files will be recognized
by the PC, a .INF INFO file which can contain up to 600 characters of
user information, and a .DAT DATA file which contains the logger data records.
See the FOK command above.
- This command is somewhat rudimentary; if you must dump data this way,
use the L command to display the current directory and file sizes on the CFLASH
card. You can then estimate where to start dumping data, based on one 740 byte record
per hour, and a CFLASH sector size of 512 bytes. Or use the FOK command to look at
the HEX values of particular sectors to decide where to start the dump.
- Command dumps data from the requested starting sector for up to 2048 512-byte sectors
(i.e. a maximum of 1 MB of data). Sector 322 is the first sector of the data file on
the CFLASH card.
- On command entry, requests: Start sector # (322 is first, 0 aborts) ->
followed by: Number of sectors (1 to 2048, default is 512) ->
- i.e. to get first week of data (168 records -> 1 week), enter 322 as
the start sector, and 243 for the number of sectors.
- add 243 to your start sector number to find the start of subsequent week-long portions of data;
i.e. if you entered 322 to start at the first sector on the FLASH card, subsequent weeks
of data start at sector 565, 808, etc...
- Typical example - the following description assumes PCPLUS for terminal software,
but any terminal program capable of XMODEM transfer should work.
- On entry, module will first prompt for start sector:
Start sector # (322 is first, 0 aborts) ->
Enter a valid sector # (see discussion above)
- followed by a prompt for number of sectors:
Number of sectors (1 to 2048, default is 512) ->
Enter a valid sector count (see discussion above)
- Next, you'll be prompted:
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 something like:
Sent 160 blocks - done
Restore terminal speed to 9600 then hit any key
NOTE:"blocks" here are XMODEM blocks of 128 bytes each
- After resetting speed to 9600 baud and hitting a key, module will send a
"\r\n"
- Ignore occasional gibberish when changing baud rates!
- Note: Only the .DAT data file portion of the CompactFLASH card is dumped via
XMODEM; See CompactFLASH WND Record Format.
Revision history:
- Original Release - V4.0 (first instruments with Compact FLASH card capability)
adapted from vhrh3cmd.html