Measurement-computing Personal488 rev.3.0 For DOS & Windows 3.Xi Uživatelský manuál Strana 98

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 400
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 97
II. SOFTWARE GUIDES - 8. Driver488/DRV 8H. Turbo C
Personal488 Users Manual, Rev. 3.0 II-83
if (st195 & 0x02)
printf(Illegal Command\n);
if (st195 & 0x04)
printf(No Remote\n);
if (st195 & 0x08)
printf(Trigger Overrun\n);
if (st195 & 0x10)
printf(Failed Selftest\n);
}
Use of Character Command Language
In order to simplify programming Driver488/DRV with Turbo Pascal 4.0 and Turbo Pascal 6.0, the
following files are provided on the Driver488/DRV program disk in the
\TURBOP40
directory:
IEEEIO.PAS:
Communications routines unit for Driver488/DRV.
IEEEIO.TPU:
Compiled unit for using Driver488/DRV.
The actual demonstration program is contained in
195DEMO.PAS
.
The
IEEEIO.PAS
unit contains initialization code that prepares for communication with
Driver488/DRV. It opens the
IeeeOut
and
IeeeIn
files, sets them into raw mode, resets
Driver488/DRV with
IOCTL
followed by
Writeln(IeeeOut,RESET)
, and enables
NO DATA
AVAILABLE
error detection by
Writeln(IeeeOut,FILLERROR)
.
These and several other declarations and subroutines contained in the
IEEEIO
unit, are further
discussed below:
VAR
Regs: REGISTERS;
IeeeOut, IeeeIn: TEXT;
PROCEDURE IOCTL;
PROCEDURE IOCTLRead(var Command:STRING);
PROCEDURE RawMode(var AFile:TEXT);
PROCEDURE IeeeComplete;
Regs
, defined as a
REGISTERS
type in the DOS unit, is a record that is used to pass the
microprocessor registers to and from the MS-DOS and IntrPascal procedures. Each of the
accessible registers is referred to as a component of
Regs
. For example
Regs.AX:=$1234
is the
same as
Regs.AH:=$12;Regs.AL:=$34
.
IeeeOut
and
IeeeIn
are two
TEXT
file variables that are used for writing to, and reading from,
Driver488/DRV, respectively. They are opened by the
IEEEIO
unit initialization code, and closed
by
IeeeComplete
.
8I. Turbo Pascal
Topics
Use of Character Command Language...................................... II-82
Initialization of the System.......................................................... II-83
Configuration of the 195 DMM.................................................... II-84
Taking Readings............................................................................. II-85
Buffer Transfers............................................................................. II-85
Interrupt Handling........................................................................ II-86
Sample Program............................................................................. II-88
Zobrazit stránku 97
1 2 ... 93 94 95 96 97 98 99 100 101 102 103 ... 399 400

Komentáře k této Příručce

Žádné komentáře