Chapter 2: Software
Manual Number: 00650-014-4
Page 2-5
Example
Using the configuration file listed in
TABLE 2-1: CONFIGURATION FILE EXAMPLE
, the
information has the following meaning:
a. The base address is set to hex 300 in Pascal format.
b. Channel 0 of the AD12-8 has an AT16-P sub-multiplexer card attached. The unit of measure
for this card is
o
F. The AT16-P channel 0 is used for reference junction, channel 1 is a t
thermocouple type input, channel 2 has a gain code of 3, channels 3 through 10 are used (gain
code 0), and the remaining channels are skipped (unused).
c. Channel 1 of the AD12-8 has an LVDT8-P attached, with all eight channels unskipped.
d. Channel 2 of the A/D card is a direct channel that is unskipped.
e. All other A/D channels are direct and skipped.
VisualBasic Utility Driver
Extensions to the VisualBASIC language are on the diskette provided with your card. The exten-
sions are in a directory named VBACCES. These extensions are in the form of a .DLL, a .GBL,
and a VisualBASIC sample. Together these files allow you to access the port and main memory
space in a fashion similar to BASIC, QuickBASIC, Pascal, C/C
++
, Assembly, and most other stan-
dard languages.
To use these files in a VisualBASIC program, you must create a .MAK file (File l New Project)
similar to the sample provided (or else, modify your existing project file) and include the .GBL file
(File | Add File). Once this has been done, VisualBASIC will be enhanced with the addition of the
following functions.
InPortb
Function:
Reads a byte from a hardware port. Due to limitations of VisualBASIC, the
number is returned in an integer.
Declaration:
function InPortb(byval
address as integer) as integer
InPort
Function:
Reads an integer from a hardware port. This function returns the 16-bit
value obtained from reading the low byte from
address
and the high byte
from 1.
Declaration:
function InPort(byval
address as integer) as integer
OutPortb
Function:
Writes the lower eight bits of
value
to the hardware port at
address
. This
function returns the value output.
Declaration:
function OutPortb(byval
address as integer, byval value as
integer) as integer