New AW-SRAD and AW-GRAPH STUFF KEYS -K arg as well as new AW-SRAD ASCII out args. -A and -P


A new command line argument has been added to AW-SRAD as well as AW-GRAPH. If you start AW-SRAD (or AW-GRAPH) with the -K(keypress) arg, AW-SRAD will process all the characters contained within the string "keypress" as though you typed them on the keyboard. The string "keypress" can contain any normal keyboard character except the character ` = ENTER KEY and ~(tilde) = ESC KEY. For example lets say from a batch file you want AW-SRAD to load a rad. file named MYRAD.RAD and generate an ASCII output data file with name MYRAD.TXT. First run:
(Note in RM-60 manual an arg. of -DMYRAD.RAD will force AW-SRAD to load a file named MYRAD.RAD and display information about it). Now write down on a piece of paper all the keystrokes you make to get AW-SRAD to generate an ASCII output file with name of MYRAD.TXT. Note that these keystrokes are M``````MYRAD.TXT``~~~. Now add to your batch file the line:
When the batch file runs the line, in the blink of an eye AW-SRAD will load MYRAD.RAD then generate the ASCII output file MYRAD.TXT using all the default AW-SRAD settings then exit. Note the last three escape keys (~~~) force AW-SRAD to exit, and we added an extra ~ in case AW- SRAD prompts "Save Settings".

You must think ahead and remember if MYRAD.TXT already exists AW-SRAD will produce an extra prompt so first add line to batch file:
before the AW-SRAD line to make sure the file does not exist.

As regards Aw-Graph, it also includes the -K arg but with an additional feature. If the -K arg is followed by the @ character, as-in AW-GRAPH -K@, Aw-Graph will look for then process any keystrokes within the env. variable AW_KEY. For example, if the following three lines are placed in a batch file:

SET AW_KEY=DC1Basement`ASAG~~~~

running the batch file will cause Aw-graph to load the rad file MYRAD.RAD, label the curve as Basement, generate a gif file named Aw-gif.gif, then exit.


As stated in the manual one can include command-line arguments when launching AW-SRAD.EXE (either from the command-line, a batch file or a Windows short-cut PIF file). One of these arguments is the -T switch, as in:
which tells AW-SRAD to auto-start collecting radiation data and store it into a file made-up from system date-time. Optionally you can include a filename after the -T as in:
in-which-case AW-SRAD will auto-start storing data into a file named C:\TEST.RAD. Note if you provide the file name NUL as in:
then AW-SRAD will auto-start but not save data to a file.

We added two new ASCII out command line args to AW-SRAD. If you start AW- SRAD with the
-A(filename)~#~# switch, as in:
and then start collecting rad. data (either by-way-of another command line arg. or manually by-way-of the menus), as each new rad. bar is displayed, AW-SRAD will:
1. Open the file C:\FILE.HTM (it will create the file if not there);
2. Seek (move file pointer) to byte position 10;
3. Write the bar's value as a five digit number. If value is less than five digits, it will left pad with blanks (space character) unless you include the -P arg. (see below).
4. Seek to position 20;
5. Write Alarm value as a 0 if value is below alarm set point or 1 if it is above.
6. Close file.

If you leave out the ~#~# portion (as in -AC:\FILE.HTM) Aw-srad will open the file, seek to start of file then write the count (left padded as above) then insert a carriage return - line feed then write "Alarm " then 0 or 1 as above.

If either of the #s are not a number, the program will not write the coresponding text to the file for example:
will cause program to write the current radiation level to the file at offset 10 but leave out the Alarm text.

(Please note we use the character ~ (tilde) to isolate filename from the offset because the OS will pass it as one arg. even through batch files, but it also means you can't use the ~ character as part of the file name).

Notice the value is printed with five characters. If the value is less than five characters, the value is left padded with blanks (space character). The padding is useful in that any larger old value in the file will be completely over written by the new value. For example, if the file contained an old value of 3456 and the program wrote a new value of 12, without left padding, the file would then contain 1256.

If you would rather have the program left pad with zeros, as in 00012, include the -P0 arg. as in:

If you would rather have no padding, include -PX.

With no padding you may wish to have the program first erase everything in the file before writing the new values, in-which-case append E to the end of the -P arg. as in:
AW-SRAD -AC:\FILE.TXT -PXE in which case the program will:
1. Open file;
2. Erase eveything in file;
3. Write non-padded values;
4. Close file.

An example: Create a file C:\COOLWEB\FLOAT.HTM with the following in it:

<HTML> <HEAD> <TITLE>Example HTML file showing AW-SRAD ASCII OUT feature</TITLE> <META HTTP-EQUIV="refresh" CONTENT="20; URL=c:\coolweb\float.htm"> </HEAD> <BODY> Current Value: 00005 Program Alarm: 0 </BODY> </HTML>

Start AW-SRAD in a Window (under WINDOWS) with a command line arg in the ShortCut properties:
then start your Internet Explorer with a URL of C:\COOLWEB\FLOAT.HTM (type at dos prompt EXPLORER C:\COOLWEB\FLOAT.HTM). Now every 20 seconds, Internet Explorer will update the display.

Note each time the ASCII data is written to the file, the hard drive will activate when Windows has some free time. To avoid this, and for fastest performance, add this to your CONFIG.SYS file:

device=c:\windows\ramdrive.sys 4 /E

The 4 tells ramdrive to make a 4K ram disk (you can increase size if you want) and the /E tells it to use extended memory. This will make a 4K ram drive when you re-boot, using the next available disk drive letter, for example drive E: if drive D: was your last used drive letter.

Now you can tell AW-SRAD to write the ASCII file to this RAM disk as
in: AW-SRAD -AE:\RM1.TXT -T (value left padded with blanks, new line, Alarm 0 or Alarm 1)
or: AW-SRAD -AE:\RM1.TXT -PXE -T (no left padding of value and first erase anything in file)
or: AW-SRAD -AE:\RM1.TXT~0~X -PXE (no left padding and no alarm data)

See: Google search for ramdrive
for more info. about RAMDRIVE.

If reading the ASCII file through network, network card will read file from RAM disk and therefore be much faster and use less CPU time. (Anywhere on the network if you want to know latest value of RM1, open-read-close the E:\RM1.TXT file).