4 the autoexec.bat file, 5 unattended user programs – Campbell Scientific PC208 Datalogger Support Software User Manual

Page 86

Advertising
background image

SECTION 5. TELCOM

5-12

regains control. See the DOS manual for
details on the commands.

NOTE: It is very easy to get the computer
locked up from a remote terminal! Without
the PC201 and PC203, someone will have
to visit the computer to reset it.

5.4.4 THE AUTOEXEC.BAT FILE

The simplest AUTOEXEC.BAT file calls only
two programs. First, the program to load the
PC clock from the battery backed clock
(e.g.,'CLKTOIBM' PC201 software), then
'TELCOM' followed by the script file name (e.g.,
'TELCOM STATIONS'). The script file ends
with either the /W or /D option (see previous
section).

The AUTOEXEC.BAT file can be created using
the PC-DOS Line Editor (EDLIN), COPY CON:,
or some other editor program. Using COPY
CON:, the file would be created by entering:

A>COPY CON: AUTOEXEC.BAT
CLKTOIBM
TELCOM STATIONS

Press enter after each line, then press F6
(control Z), then enter.

FLOPPY DISK SYSTEM

To start the unattended process, the user must
put the disk with the PC-DOS system and the
AUTOEXEC.BAT file in the default drive (drive
A: for IBM PC) and either reset the PC or
execute AUTOEXEC. If the PC203 is
connected then flip switch to off. IF THE PC
MAIN POWER SWITCH IS TURNED OFF THE
PC WILL NOT BE ABLE TO PERFORM ITS
UNATTENDED TASKS. Care must be taken to
see that the main power switch of the PC is left
on and only the PC203 switch is turned off.
When using the done option, the computer may
not always shut off when PC203 is turned off.
In this case, the watchdog will soon reset the
PC, and things will go as they should from
there. The critical things are that the
telecommunications disk or disks are in the
proper drives with the drive doors closed and
the switch on the PC203 is turned off with the
switch on the PC left on.

When it is desired to make use of the PC in an
attended mode, the user removes the

telecommunications disk, places a different
system disk in the default drive, and either turns
the PC203 power switch to on or hits control C
(or control Break) to terminate the wait option
on systems without the PC203.

HARD DISK SYSTEMS

With the PC set up to boot off the hard drive,
the AUTOEXEC.BAT file is usually created on
the root directory of the hard drive. Any
additional commands that the user wants as
part of the AUTOEXEC file should follow
TELCOM, that way they will not have to be
executed each time the computer powers up to
call a station or answer a call and COM ports
disabled by TELCOM can be reinitialized
subsequent to its operation (see COM PORT in
station options). To start the unattended
process, the user either resets the PC or runs
AUTOEXEC, and then turns off the switch on
the PC203 if it is present (PC SWITCH MUST
BE LEFT ON).

To gain control of the PC for attended
operation, the user either turns on the switch on
the PC203 or hits control C (or control Break)
on systems without the PC203.

When the PC is switched on TELCOM will go
through the stations in the script file before
executing the rest of the AUTOEXEC file. This
should not take much time since it will not be
time to call any of the stations.

It is also possible to use a floppy disk with the
DOS system and AUTOEXEC.BAT file in the
default floppy drive, and proceed as described
for floppy drives.

5.5 UNATTENDED USER PROGRAMS

Unattended user programs can be executed
from within TELCOM by selecting "DOS
Command" in the station file under the
"Datalogger or Command Type" parameter.
Once this option has been selected, the user
enters the name of the program (or batch file) to
be executed. Only one command line can be
entered per "Dos Command". This option is
useful for doing tasks after the data has been
retrieved from dataloggers, such as printing
reports or plotting graphs.

Advertising