EasyManua.ls Logo

LabJack U12 - 4.32 - SHTComm

LabJack U12
61 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Declaration:
long SHTComm ( long *idnum,
long softComm,
long waitMeas,
long serialReset,
long dataRate,
long numWrite,
long numRead,
unsigned char *datatx,
unsigned char *datarx)
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:
*idnum – Local ID, serial number, or -1 for first found.
softCommIf >0, forces software based communication. Otherwise software communication is only used if the LabJack
U12 firmware version is less than V1.1.
waitMeasIf >0, this is a T or RH measurement request.
serialReset If >0, a serial reset is issued before sending and receiving bytes.
dataRate0=no extra delay (default), 1=medium delay, 2=max delay.
numWrite Number of bytes to write (0-4).
numRead – Number of bytes to read (0-4).
*datatxArray of 0-4 bytes to send. Make sure you pass at least numWrite number of bytes.
Outputs:
*idnum – Returns the local ID or 1 if no LabJack is found.
*datarxReturns 0-4 read bytes as determined by numRead.
ActiveX Function Differences:
Transmit and receive data arrays are replaced with 4 individual parameters which each pass 1 transmit byte and return 1 read
byte.
Declaration (ActiveX):
long SHTCommX ( long FAR* idnum,
long softComm,
long waitMeas,
long serialReset,
long dataRate,
long numWrite,
long numRead,
long FAR* data0,
long FAR* data1,
long FAR* data2,
long FAR* data3 )
4.33 - SHTCRC
Checks the CRC on an SHT1X communication. Last byte of datarx is the CRC. Returns 0 if CRC is good, or
SHT1X_CRC_ERROR_LJ if CRC is bad.
Declaration:
long SHTCRC ( long statusReg,
long numWrite,
long numRead,
unsigned char *datatx,
unsigned char *datarx)
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:
statusReg – Current value of the SHT1X status register.
numWrite Number of bytes that were written (0-4).
numRead – Number of bytes that were read (1-4).
*datatxArray of 0-4 bytes that were sent.
*datarxArray of 1-4 bytes that were read.
38

Other manuals for LabJack U12