Next: File CONFIG.SYS
Up: ZY Boot Diskette Archive
Previous: Directory PCTCP
  Contents
File AUTOEXEC.BAT
The AUTOEXEC.BAT file sets environment variables, loads the
network software, retrieves the ZY software and then runs the software.
The AUTOEXEC.BAT file for ZY102 looks like this:
@echo off
rem ********************************************************************
rem System setup
rem ********************************************************************
prompt $p$g
path a:\;a:\pctcp
rem ********************************************************************
rem Environment variables for this ZY
rem
rem variable: Function:
rem
rem ziy The location of the ZIY, ZY executables and init files
rem user The user account for the initialization files
rem pass The password for the user account
rem initdir The directory for the initialization files
rem zyid The ID number of this ZY. For example, for ZY0 zyid = 0
rem zyaz The I/O address of the AZ LM628 servo controller
rem zyel The I/O address of the EL LM628 servo controller
rem pctcp The location of the FTP PCTCP initialization files
rem *******************************************************************
set ziy=ziyp
set user=ftp
set pass=laser
set initdir=GBTMetrology\init
set zyid=102
set zyaz=256
set zyel=260
set pctcp=a:\pctcp\pctcp.ini
rem *******************************************************************
rem Software to execute:
rem
rem Program: Function:
rem
rem netbind Binds the NDIS driver to the Packet Driver
rem ethdrv The FTP Software PCTCP kernel
rem setclock NTP client that sets the PC's clock to current date/time
rem rload Retrieves the ZY executable from ZIY host
rem zy The ZY
rem *******************************************************************
a:\ndis\netbind.exe
ethdrv
setclock
rload hostdir=GBTMetrology\zy102 remote=zy.exe local=zy.exe
zy
A line by line breakdown of what AUTOEXEC.BAT does follows:
- prompt $p$g: Sets the style of the command line prompt.
This is not required in any way by the ZY. It is here in case
a technician needs to use the ZY computer's console for troubleshooting
or maintenance.
- path a:;a:
pctcp: Sets the path DOS will use
in executing subsequent commands, including the ones following in
the autoexec.bat file.
- set ziy=ziyp: This sets the environment variable ziy to
the host name of the ZIY computer. The RLOAD.EXE and ZY.EXE
will use the ftp protocol to retrieve the ZY.EXE executable and
the ZY.EXE configuration files, respectively, from this host.
- set user=ftp: This environment variable holds a valid
ftp account name on the ZIY host computer named by the ziy
environment variable. This account will be used by RLOAD.EXE
and ZY.EXE to retrieve files.
- set pass=laser: This variable holds the password for the
account named in variable user. This password
will be used by the RLOAD.EXE and ZY.EXE when retrieving
files from the ZIY host. See remarks below.
- set initdir=init: Specifies that the initialization files needed
by ZY.EXE are to be found in the directory init in the
home directory of the laser account.
- set zyid=102: The variable zyid is used by the ZY program
to find out which specific ZY it is running. In this case, this
is ZY102. This allows the ZY to download the proper configuration
files, allowing the ZY program to act as ZY102 should.
- set zyaz=256: sets the I/O port address (in decimal) of the
Azimuth LM628.
- set zyel=260: Sets the I/O port address (in decimal) of the
Elevation LM628.
- set set pctcp=a:
pctcp
pctcp.ini: Sets
the location of the PC/TCP initialization file [21].
- a:
ndis
netbind.exe: Runs
NETBIND.EXE. See subsection A.2.2.
- ethdrv: Runs the PC/TCP kernel [21].
- setclock: Runs SETCLOCK.EXE, a Network Time Protocol
(NTP) client. This sets the PC clock to current UTC time and date.
- rload hostdir=zy102 remote=zy.exe local=zy.exe: Retrieves the
ZY program file from the ZIY host. RLOAD.EXE is a small FTP
protocol client that, given the right command line arguments and/or
environment variables, will retrieve a specified file from an FTP server.
(see subsection A.2.6).
- zy: Runs the ZY. At this point, the ZY computer is under
control of the ZY program.
Note that the AUTOEXEC.BAT file must store the user account name
and password for the account on the ZIY host where the ZY executable and its
initialization files are stored. To ease security concerns and to make
this aspect of the ZY immune to changes in passwords on the ZIY host,
the files needed are placed a read-only ftp directory structure in the
anonymous ftp area of the ZIY computer.
Next: File CONFIG.SYS
Up: ZY Boot Diskette Archive
Previous: Directory PCTCP
  Contents
Ramon E. Creager
2002-03-11