ࡱ> 685xG 'bjbjَ X!]D,v~~~~~~~/s $fZ 61E~~~~~1~~~~~~~~~$,P@~~*~~ S~ Turbo-C Data Acquisition Program for ATI Sonic Anemometer This documentation describes the specific and general features of a "Borland Turbo C" program for the acquisition of serial (digital) data transmitted from ATI sonic anemometers. The main executable program has been given the generic name "FLUX_ATO". The program "FLUX_ATO" is actually a project file containing two source codes. The one source code is "ATO.C" does all the computations and graphics. "IBMCOM.C" are a set of functions that are used to acquire the serial data. The listings for each of these source codes are included. Most, if not all flexibility of running "FLUX_ATO" is obtained via a file called "SETUP". More will be said about this later. The Applied Technology sonic anemometer (K-probe) can be programmed to send data in either binary or ASCII format. For real time processing, binary format is preferred (the program is set up to acquire the data in binary format). Values of the three components of the wind vector (EMBED Equation.3), virtual temperature (EMBED Equation.3), and the other scalars such as water vapor (EMBED Equation.3) and CO2 (EMBED Equation.3) are transmitted from the sonic at 10 Hz. For each packet of data transmitted each 0.1 s, a sync byte (0x8000, that is 8000 in hexidecimal) is the first byte to be transmitted. This sync byte is followed by a total of channels x 2 bytes, with the high byte transmitted first. The order of the channels transmitted is EMBED Equation.3, EMBED Equation.3, EMBED Equation.3, EMBED Equation.3, analog 1, analog 2, etc. The units of EMBED Equation.3 and EMBED Equation.3 are cm s-1. EMBED Equation.3 is in C x 100; for example 20.04 C would be transmitted as 2004. Since a 12 bit A/D is used on the sonic system, the numbers transmitted from the sonic for the analog input channels range from 0 to 4096 which corresponds to EMBED Equation.3 5 volts (this is the configuration of our sonic, your may be configured differently). For example, 0 volts corresponds to 2048. When the data are received from the sonic, the program FLUX converts the wind velocities to m s-1, the virtual temperature to degrees Celsius, and the analog input channels to volts. The order of the wind velocities is also changed from EMBED Equation.3 to EMBED Equation.3. To terminate the program at any time, type "ALT-X" on the keyboard. The SETUP File Program flexibility is achieved via use of an input file called SETUP. In SETUP, the number of channels, boom direction, variable name, variable time lag, and calibration are set. If you are only using the wind velocity components and the virtual temperature, the total number of channels is 4. The boom direction is the direction the sonic is pointed into. If the sonic was pointed towards the south, the boom direction would be 180. The sonic A/D range for the analog input channels is assumed to be -5 to 5 volts. Other more common ranges are 0 - 5 volts, 0 - 1 volts. The disk drive for the "RAW" and "FLX" output can be set along with the serial port number that is used to acquire data from the sonic anemometer. The disk drive for "RAW" is usually a hard drive or some high capacity data storage device to store all the instaneous values. The "FLX" drive is usally a floppy, and contains half-hourly averaged turbulence statistics. A "printer output" option can also be initialized from the SETUP file, although it can be changed from the keyboard once the program has started. SETUP is a text or ASCII file that can be edited using SideKick, Wordstar (non-document) or any other text editor. Output Files At the end of a 30 min period, data are written to three files; ".FLX", ".NRT", and ".ERR". The file names are comprised of the Julian date and additional characters that are specified in the SETUP file. At the end of a 30 minute period, the program "FLUX_ATO" checks to see whether or not a "FLX", "ERR", and "NRT" files exist. If they do, the data are appended to the files. If not, new files are created. After midnight, new files are automatically created in order to have a daily data format. In the SETUP file, 2 characters besides the drive letter and a semicolon can be added to the disk drive identified for the "FLX", "NRT" and "ERR" files. For example, if in SETUP you put "A:WB" as the disk drive for the "FLX" file, the filename created in our example would be "WB98_150.flx", where 98 is the year and 150 the calender day. This is convenient if two flux systems are running simultaneously. The format of data in the "FLX" files is day, time, w_dir, EMBED Equation.3, EMBED Equation.3, EMBED Equation.3, EMBED Equation.3 (analog inputs), EMBED Equation.3, EMBED Equation.3 (scalars), EMBED Equation.3 (scalars) The data in this file has undergone a 2-dimensional coordinate rotation. The format for the "NRT" files that contains the non-rotated data is day, time, w_dir, EMBED Equation.3, EMBED Equation.3 (scalars) The third file to be created is the "ERR" file. This file contains information on the skewness, kurtosis, rotation angles, and number of samples for each 30 minute run. The format in the file is day, time, w_dir, skewness (# channels), kurtosis (# channels), rotation angle about y axis, rotation angle about the z axis, number of samples. Both the "NRT" and "ERR" files use the same name format as the "FLX" files. As long as a diskette is in the drive that was specified for the "FLX" file in "SETUP", the data from each 30 minute period will be appended to the end of the file. If you change diskettes (you want to look at the data in the evening), new files will be created. The raw data option can be invoked via initialization in the SETUP file or at any time while running "FLUX_ATO" by typing "R" or "r" on the keyboard during acquistion of the data. The raw data option can be turned off by typing "S" or "s" on the keyboard. The "RAW" data file names are similar to that for the "FLX" files with the exception that a file is written for each 30 minute period. For example, the file name "1501330.RAW" was created on Julian day 150 and writing of the data in the file began at 1330 hrs. If "RAW" data are being recorded, the FLUX program checks the raw drive at the end of a half hour run (usually a Bernoulli) and determines how much space (in kbytes) remains on the disk. This information is displayed on the screen in the upper right hand corner. Screen Display The real time data are displayed in strip chart fashion. When the program "FLUX_ATO" is first started, running means or averages are initialized with a 20 second average before the data appear on the screen. Every 2 seconds, the instantaneous value for each variable is displayed. At the end of each pass on the screen, the standard deviation is calculated and displayed next to the instantaneous values which are displayed at 0.5 Hz. The computed standard deviation is used to automatically scale the data traces on the screen. The time is displayed in the upper right hand corner. Below the time is amount of kbytes remaining on the "RAW" disk, if raw data are being taken. The drive specification for the raw files in SETUP needs to be capitalized if this function is to work properly. Below this is the name of the current "FLX" file that the 30 minute average data are written to. In the middle is a "fuel gauge" showing the capacity of the serial port buffer. Normally, it sits right near the bottom. To the right, is a wind direction indicator. It uses the boom direction angle specified in "SETUP" to determine the direction. Communication With the ATI Sonic Anemomete SONCOM The ATI sonic anemometer has a number of program and output control options that are communicated to the sonic with the slash "/" commands (see sonic manual). To communicate with the ATI sonic anemometer, set the thumbwheel to "07", and flip the switch up to "TEST" mode. From the command line on the computer, log on to the Turbo-C subdirectory "C:\TC" and type "SONCOM" which is a low level communication program to talk to the sonic. Hit "return" once or twice until the sonic returns with a "CMD>". From this point, enter the slash commands as needed and exit "SONCOM" by hitting "Alt-X". is not used in this program. ****I M P O R T A N T**** Before starting the program, be sure that: 1. the number of analog channels to A/D has been set correctly using the /AN command. 2. the binary format has been set using the /FB command. 3. the terse option is set using the /OT. 4. the /AO command is set to 0. ; 0123abrstu}~ zf]jjCJEHU&j49 CJOJQJUVhmHnHjCJEHU&j49 CJOJQJUVhmHnHCJH*jCJEHU&j49 CJOJQJUVhmHnHj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H:.`!r@툸HH_959771602F`!r@sOle CompObjfOle10Native   !"')*+02349;<=BDEFKMNOTVWX]_`afhijoqrsuy{|} FMicrosoft Equation 3.0 DS Equation Equation.39q u, v, w(dcIgI u, v, wEquation Native DObjInfo _959771605 Fs<=tOle    FMicrosoft Equation 3.0 DS Equation Equation.39q * v qCompObj fOle10Native Equation Native <ObjInfo dcIgI * v  FMicrosoft Equation 3.0 DS Equation Equation.39q * v r_959771607Fot@/uOle CompObjfOle10Native dcIgI * v  FMicrosoft Equation 3.0 DS Equation Equation.39q * c rEquation Native <ObjInfo_959771608 "FlQu{uOle CompObjfOle10NativeEquation Native #<ObjInfo$ dcIgI * c  FMicrosoft Equation 3.0 DS Equation Equation.39q_959771610F v evOle %CompObj&fOle10Native! ( udcIgI u FMicrosoft Equation 3.0 DS EqEquation Native ,,ObjInfo-_959771611($F,vP{wOle .CompObj#%/fOle10Native'&1Equation Native 5,ObjInfo6uation Equation.39q vdcIgI v_959771612*FwxOle 7CompObj)+8fOle10Native-,: FMicrosoft Equation 3.0 DS Equation Equation.39q wdcIgI wEquation Native >,ObjInfo?_959771614F0FSxDxOle @ FMicrosoft Equation 3.0 DS Equation Equation.39q * v q hcIgI * v CompObj/1AfOle10Native32CEquation Native G<ObjInfoH FMicrosoft Equation 3.0 DS Equation Equation.39q u, v, _9597716156F@ yyOle ICompObj57JfOle10Native98LEquation Native P@ObjInfoQ_9597716174@<F )zzOle R$lcIgI u, v,  FMicrosoft Equation 3.0 DS Equation Equation.39q wCompObj;=SfOle10Native?>UEquation Native Y,ObjInfoZlcIgI w FMicrosoft Equation 3.0 DS Equation Equation.39q * v q_959771618BFz`9{Ole [CompObjAC\fOle10NativeED^ pcIgI * v  FMicrosoft Equation 3.0 DS Equation Equation.39q Equation Native b<ObjInfoc_959771620:^HF ˼{֍|Ole dCompObjGIefOle10NativeKJgEquation Native k,ObjInfoldcIgI  FMicrosoft Equation 3.0 DS Equation Equation.39q_959771621NFh|,}Ole mCompObjMOnfOle10NativeQPp u, v, w(dcIgI u, v, w Equation Native tDObjInfov_959771623LXTF h} ~Ole wCompObjSUxfOle10NativeWVzEquation Native ~DObjInfo FMicrosoft Equation 3.0 DS Equation Equation.39q w, u, v(dcIgI w, u, v  FMicrosoft Equation 3.0 DS Equation Equation.39q u_959771624ZF@c~@Ole CompObjY[fOle10Native]\Equation Native 0ObjInfo_959771625Rj`F ^Ole lcIgI u FMicrosoft Equation 3.0 DS Equation Equation.39q "u"w CompObj_afOle10NativecbEquation Native @ObjInfo$pcIgI "u"w  FMicrosoft Equation 3.0 DS Equation Equation.39q * v q_959771627fF0Ole CompObjegfOle10Nativeih(dcIgI * v ymb FMicrosoft Equation 3.0 DS Equation Equation.39qEquation Native DObjInfo_959771628dvlFL l7Ole CompObjkmfOle10NativeonEquation Native 0ObjInfo xdcIgI x FMicrosoft Equation 3.0 DS Eq_959771630rF&b@E߂Ole CompObjqsfOle10Nativeutuation Equation.39q * 2 "u  , * 2 "v  , * 2 "w  ڔdcIgI * 2 "u  , * 2 "v  , * 2 "w  Equation Native ObjInfo_959771631pxF5旃Ole  FMicrosoft Equation 3.0 DS Equation Equation.39q * x2 sCompObjwyfOle10Native{zEquation Native @ObjInfo$hcIgI * x2  FMicrosoft Equation 3.0 DS Equation Equation.39q "w"x_959771633~Fӱ́Ole CompObj}fOle10Native lcIgI "w"x FMicrosoft Equation 3.0 DS Equation Equation.39q w, u, vEquation Native <ObjInfo_959771634|F * `Ole CompObjfOle10NativeEquation Native XObjInfo<lcIgI w, u, v FMicrosoft Equation 3.0 DS Equation Equation.39q_959771636Fᅸ@ Ole CompObjfOle10Native * 2 "w  , * 2 "u  , * 2 "v  , "u"w, "u"v, "w"v, <   "w"x, "u"x, "v"x, * x2 s >ڐlcIgI * 2 "wEquation Native ObjInfo1Table SummaryInformation(  , * 2 "u  , * 2 "v  , "u"w, "u"v, "w"v, <   "w"x, "u"x, "v"x, * x2  >< Oh+'0`4ߐ:I.|߶S[YIzJᡨ]G̭ib,IR)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S A? 2;" 22h`!" 22hH@ XJx5OKA}U;$&>XM,NX`eg ! EIQIu5!8ȁllQJtCEn:TM)a+* jeJh "x2]$t!1Z얳]obb*1PTԼ>}clÛfO"I\96p&%CVvgK<*.DSDdx|B * S A? 2KkԞɱƉ֨ `!KkԞɱƉ֨` 0_xRJ@4M hr '/zś`iFKnyxz #wv7 ov[ `%(me*/3BPm[ x-71 O;Ӆiv3c <"Yt)8툨:[u©skxW|o ܦ"ejВh% qȒf,xyXDd@hB + S A? 2LC R b(A#`! C R bj@ |xMOAjAn5*<,) h DpUXACސr];* e  Rev]ޱD[kЋ2]&W>ҵjxu&}K+U*$]`+4[b1q.Y%{pM~>d$z7cO0~T7<>P-!z=17i61BNu7ͤ4DdTB , S A? 2i$ SpE#%`!=$ Sp xtXJ xcdd``$D@9@, fbd02,(1dbfaR`z$d3H1ibYxP9FnĒʂT[~1AtF]F"LQ `0roAaabM-VK-WMcH0N@r&+ss0pV1bosA} F;=cdbR ,.Ieȃb0^@I; DdhB - S A? 2s 5 9;P;|O"'`!G 5 9;P;| @d|xUPJA}3{s x:R J>J-4]-. tV~_`JO1XA g E+OdL& {LfX Ydj&MddƠ'$9k~6'N W7o-7Vg.*CY,SwOMXouPgw, l%fTe;0S\%={::k't3i= tԸ !˷zJe;mZJ ZأSy% oS$ypqL}sY[ PqZ=ii&NޖGwhEy7tV|:}OUмQQbKGqġ9Ũ1JVtqq h^9 S]!XmQ3R5o,/vKKN8>OZ(Lt\F݃յu0{FG3]'|߳wچe)/g(LQ~֧faʟ\ʓAn9[YRsÐ|3BQ߬Tv|-/j    ( 4@HPXssJoeoe Normal.dotJoe2eMicrosoft Word 8.0@F#@:@:@^՜.+,D՜.+,, hp| DocumentSummaryInformation8CompObjj FIU;D"   Title 6> _PID_GUIDAN{7F987976-0776-11D2-B4BD-00A076A05BEB} [<@<Normal1$CJOJQJhmH nH <A@<Default      Paragraph Font4&@4Footnote Reference o !X-X]XX" e o ! @ ;'$'()*'%+'&02art(*Tegm~   " 3 5 *;=@QSVgil}!:::::::::::::::::::::::Joe A:\readme.doc@HP DeskJet 660CLPT1:HPFDJC07HP DeskJet 660CHP DeskJet 660C7d,,HP DeskJet 660CLPT1 ,,HP DeskJet 660C7d,,HP DeskJet 660CLPT1 ,,څ @ !@ @$@GTimes New Roman5Symbol3& Arial9CG Times" h&&&;" D"IJoeJoe  FMicrosoft Word Document MSWordDocWord.Document.89q