Tbkgetprotocol, Tbkgetscan – Measurement Computing TempBook rev.3.0 User Manual
Page 67

TempBook User’s Manual
tbkCommand Reference (Standard API) 9-7
tbkGetProtocol
DLL Function
int tbkGetProtocol(int *protocol)
C
tbkGetProtocol(int *protocol);
QuickBASIC
BtbkGetProtocol% (protocol%)
Visual Basic
VBtbkGetProtocol% (protocol%)
Turbo Pascal
tbkGetProtocol( protocol:DataP ):integer;
Parameters
protocol
A pointer to a value that will be set to the current protocol chosen from the protocol codes listed below
(additional EPP implementation codes may be described in the README file).
Name
Description
Value
TbkProtocolNone
TempBook/66Communication Disabled
0
TbkProtocol8
8-bit I/O
1
TbkProtocol4
4-bit I/O
2
TbkProtocol4FPort
Far Point F/Port EPP Interface
10
TbkProtocolSL
82360 SL EPP Interface
20
Returns
An error number, or 0 is no error.
See Also
tbkInit, tbkSetProtocol
Program References
None
tbkGetProtocol
returns the current parallel port communications protocol. tbkInit initially
sets the protocol set to either TbkProtocol8 or TbkProtocol4, indicating either 8-bit or 4-bit
standard parallel port protocol. tbkSetProtocol may be used to specify other protocols.
tbkGetScan
DLL Function
int tbkGetScan(uint *chans, uchar *gains, uchar *polarities, uint *count);
C
tbkGetScan(unsigned *chans, unsigned char *gains, unsigned char *polarity,
unsigned *count);
QuickBASIC
BtbkGetScan% (chans%, gains%, polarity%, ByVal count%)
Visual Basic
VBtbkGetScan% (chans%(), gains%(), polarity%(), count%)
Turbo Pascal
tbkGetScan( chans:WordP; gains:ByteP; polarity:ByteP; count:word ):integer;
Parameters
uint *chans
An array to hold up to 512 channel numbers or 0 if the channel information is not desired. See table
at end of chapter for valid values.
uchar *gains
An array to hold up to 512 gain values or 0 if the channel gain information is not desired. See table at
end of chapter for valid values.
uchar polarity
Zero value causes TempBook to default to Unipolar mode. Non-zero value causes default Bipolar
mode. All ADC conversions except those started with
tbkSetScan
will use the default polarity.
uint count
A variable to hold the number of values returned in the chans and gains arrays.
Returns
TerrNoError
- No error
See Also
tbkSetScan, tbkSetMux
Program References
None
tbkGetScan
reads the current scan sequence consisting of up to 512 channels, gains and
polarities.