|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.LabJack.LabJackJNI
This class contains the Java Native Interface (JNI) definitions for the LabJack U12 analog/digital USB I/O box.
The Java methods defined here attempt to map directly to the ljackuw.dll functions. The primary difference in the API is the use of arrays in the Java methods where pointers were used in C.
This class works in conjunction with labjackjni.dll (and ljackuw.dll), which must in the current directory or located somewhere on the default path when the program is executed.
Currently supported on the Windows platform only.
| Field Summary | |
static int |
G_01
Constant for specifying differential input gain, range ±20V. |
static int |
G_02
Constant for specifying differential input gain, range ±10V. |
static int |
G_04
Constant for specifying differential input gain, range ±5V. |
static int |
G_05
Constant for specifying differential input gain, range ±4V. |
static int |
G_08
Constant for specifying differential input gain, range ±2.5V. |
static int |
G_10
Constant for specifying differential input gain, range ±2V. |
static int |
G_16
Constant for specifying differential input gain, range ±1.25V. |
static int |
G_20
Constant for specifying differential input gain, range ±1V. |
| Constructor Summary | |
LabJackJNI()
|
|
| Method Summary | |
static int |
AIBurst(int[] idnum,
int demo,
int stateOin,
int updateIO,
int ledOn,
int numChannels,
int[] channels,
int[] gains,
float[] scanRate,
int disableCal,
int triggerIO,
int triggerState,
int numScans,
int timeout,
float[][] voltages,
int[] stateIOout,
int[] overVoltage,
int transferMode)
Performs a burst scan. |
static int |
AISample(int[] idnum,
int demo,
int[] stateIO,
int updateIO,
int ledOn,
int numChannels,
int[] channels,
int[] gains,
int disableCal,
int[] overVoltage,
float[] voltages)
Reads the voltages from 1,2, or 4 analog inputs and controls/reads the 4 IO ports. |
static int |
AIStreadRead(int localID,
int numScans,
int timeout,
float[][] voltages,
int[] stateIOout,
int[] reserved,
int[] ljScanBacklog,
int[] overVoltage)
Waits for a specified number of scans to be available and reads them. |
static int |
AIStreamClear(int localID)
This function stops the continuous acquisition. |
static int |
AIStreamStart(int[] idnum,
int demo,
int stateIOin,
int updateIO,
int ledOn,
int numChannels,
int[] channels,
int[] gains,
float[] scanRate,
int disableCal,
int reserved1,
int readCount)
Starts a hardware timed continuous acquisition where data is sampled and stored in the LabJack RAM buffer, and can be simultaneously transferred out of the RAM buffer to the PC application. |
static int |
AOUpdate(int[] idnum,
int demo,
int trisD,
int trisIO,
int[] stateD,
int[] stateIO,
int updateDigital,
int resetCounter,
int[] count,
float analogOut0,
float analogOut1)
Sets the voltages of the analog outputs and controls/reads all 20 digital I/O and the counter. |
static int |
Asynch(int[] idnum,
int demo,
int portB,
int enableTE,
int enableTO,
int enableDel,
int baudrate,
int numWrite,
int numRead,
int[] data)
This function writes and then reads half-duplex asynchronous data on 1 of two pairs of D lines (8,n,1). |
static int |
AsynchConfig(int[] idnum,
int demo,
int timeoutMult,
int configA,
int configB,
int configTE,
int fullA,
int fullB,
int fullC,
int halfA,
int halfB,
int halfC)
This function writes to the asynch registers and sets the direction of the D lines (input/output) as needed. |
static int |
BitsToVolts(int chnum,
int chgain,
int bits,
float[] volts)
Converts a 12-bit (0-4095) binary value into a LabJack voltage. |
static int |
Counter(int[] idnum,
int demo,
int[] stateD,
int[] stateIO,
int resetCounter,
int enableSTB,
int[] count)
Controls and reads the counter. |
static int |
DigitalIO(int[] idnum,
int demo,
int[] trisD,
int trisIO,
int[] stateD,
int[] stateIO,
int updateDigital,
int[] outputD)
Reads and writes all 20 digital I/O. |
static int |
EAnalogIn(int[] idnum,
int demo,
int channel,
int gain,
int[] overVoltage,
float[] voltage)
Reads one analog input value from a single channel. |
static int |
EAnalogOut(int[] idnum,
int demo,
float analogOut0,
float analogOut1)
Sets analog output value. |
static int |
ECount(int[] idnum,
int demo,
int reset,
double[] count,
double[] ms)
Reads digital counter. |
static int |
EDigitalIn(int[] idnum,
int demo,
int channel,
int readd,
int[] state)
Reads digital input. |
static int |
EDigitalOut(int[] idnum,
int demo,
int channel,
int writed,
int state)
Sets digital output. |
static float |
GetDriverVersion()
Returns the version number of ljackuw.dll. |
static void |
GetErrorString(int errorCode,
char[] errorString)
Converts a LabJack errorcode, returned by another function, into a string describing the error. |
static float |
GetFirmwareVersion(int[] idnum)
Retrieves the firmware version from the LabJack's processor. |
static int |
GetWinVersion(int[] majorVersion,
int[] minorVersion,
int[] buildNumber,
int[] platformID,
int[] servicePackMajor,
int[] servicePackMinor)
Uses a Windows API function to get the OS version. |
static int |
ListAll(int[] productIDList,
int[] serialnumList,
int[] localIDList,
int[] powerList,
int[][] callMatrix,
int[] numberFound,
int[] reserved1,
int[] reserved2)
Searches the USB for all LabJacks, and returns the serial number and local ID for each. |
static int |
LocalID(int[] idnum,
int localID)
Changes the local ID of a specified LabJack. |
static int |
NoThread(int[] idnum,
int noThread)
This function is needed when interfacing TestPoint to the LabJack DLL on Windows 98/ME (see ljackuw.h for more information). |
static int |
PulseOut(int[] idnum,
int demo,
int lowFirst,
int bitSelect,
int numPulses,
int timeB1,
int timeC1,
int timeB2,
int timeC2)
This command creates pulses on any/all of D0-D7. |
static int |
PulseOutCalc(float[] frequency,
int[] timeB,
int[] timeC)
This function can be used to calculate the cycle times for PulseOut or PulseOutStart. |
static int |
PulseOutFinish(int[] idnum,
int demo,
int timeoutMS)
See PulseOutStart for more information. |
static int |
PulseOutStart(int[] idnum,
int demo,
int lowFirst,
int bitSelect,
int numPulses,
int timeB1,
int timeC1,
int timeB2,
int timeC2)
PulseOutStart and PulseOutFinish are used as an alternative to PulseOut (See PulseOut for more information). |
static int |
ReadMem(int[] idnum,
int address,
int[] data3,
int[] data2,
int[] data1,
int[] data0)
Reads 4 bytes from a specified address in the LabJack's nonvolatile memory. |
static int |
ReEnum(int[] idnum)
Causes the LabJack to electrically detach from and re-attach to the USB so it will re-enumerate. |
static int |
Reset(int[] idnum)
Causes the LabJack to reset after about 2 seconds. |
static int |
SHT1X(int[] idnum,
int demo,
int softComm,
int mode,
int statusReg,
float[] tempC,
float[] tempF,
float[] rh)
This function retrieves temperature and/or humidity readings from an SHT1X sensor. |
static int |
SHTComm(int[] idnum,
int softComm,
int waitMeas,
int serialReset,
int dataRate,
int numWrite,
int numRead,
byte[] datatx,
byte[] datarx)
Low-level public function to send and receive up to 4 bytes to from an SHT1X sensor. |
static int |
SHTCRC(int statusReg,
int numWrite,
int numRead,
byte[] datatx,
byte[] datarx)
Checks the CRC on an SHT1X communication. |
static int |
Synch(int[] idnum,
int demo,
int mode,
int msDelay,
int husDelay,
int controlCS,
int csLine,
int csState,
int configD,
int numWriteRead,
int[] data)
This function performs SPI communication. |
static int |
VoltsToBits(int chnum,
int chgain,
float volts,
int[] bits)
Converts a voltage to it's 12-bit (0-4095) binary representation. |
static int |
Watchdog(int[] idnum,
int demo,
int active,
int timeout,
int reset,
int activeD0,
int activeD1,
int activeD8,
int stateD0,
int stateD1,
int stateD8)
Controls the LabJack watchdog function. |
static int |
WriteMem(int[] idnum,
int unlocked,
int address,
int data3,
int data2,
int data1,
int data0)
Writes 4 bytes to the LabJack's 8,192 byte nonvolatile memory at a specified address. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int G_01
public static final int G_02
public static final int G_04
public static final int G_05
public static final int G_08
public static final int G_10
public static final int G_16
public static final int G_20
| Constructor Detail |
public LabJackJNI()
| Method Detail |
public static int EAnalogIn(int[] idnum,
int demo,
int channel,
int gain,
int[] overVoltage,
float[] voltage)
Reads one analog input value from a single channel.
Easy function. This is a simplified version of AISample. Reads the voltage from 1 analog input. Calling this function turns/leaves the status LED on.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.channel - Channel command is 0-7 for single-ended, or 8-11 for differential.gain - Gain value (DI only, must be 0 for SE).overVoltage - Out: Set >0 if overvoltage on analog input detected.voltage - Out: Returns the voltage reading.
public static int EAnalogOut(int[] idnum,
int demo,
float analogOut0,
float analogOut1)
Sets analog output value.
Easy function. This is a simplified version of AOUpdate. Sets the voltage of both analog outputs.
If either passed voltage is less than zero, the DLL uses the last set voltage. This provides a way to update 1 output without changing the other. Note that when the DLL is first loaded, it does not know if the analog outputs have been set, and assumes they are both the default of 0.0 volts. Similarly, there are situations where the LabJack could reset without the knowledge of the DLL, and thus the DLL could think the analog outputs are set to a non-zero voltage when in fact they have been reinitialized to 0.0 volts.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.analogOut0 - Voltage from 0.0 to 5.0 for AO0.analogOut1 - Voltage from 0.0 to 5.0 for AO1.
public static int ECount(int[] idnum,
int demo,
int reset,
double[] count,
double[] ms)
Reads digital counter.
Easy function. This is a simplified version of Counter. Reads & resets the counter (CNT). Calling this function disables STB (which is the default anyway).
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
Regarding counter operation, the LabJack User Guide states:
The input connection to the 32-bit counter is made at screw-terminal CNT. The counter is incremented when it detects a falling edge followed by a rising edge. This means that if you reset the counter while your signal is low, you will not get the first count until it goes high-low-high. In situations where this first count is important, you should simply substract the initial count from the final count, rather than doing a reset.
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.reset - If >0, the counter is reset to zero after being read.count - Current count, before reset.ms - Value of Window’s millisecond timer at the time of the counter read (within a few ms).
Note that the millisecond timer rolls over about every 50 days. In general, the
millisecond timer starts counting from zero whenever the computer reboots.
public static int EDigitalIn(int[] idnum,
int demo,
int channel,
int readd,
int[] state)
Reads digital input.
Easy function. This is a simplified version of DigitalIO that reads the state of one digital input. Also configures the requested pin to input and leaves it that way.
Note that this is a simplified version of the lower level function DigitalIO, which operates on all 20 digital lines. The DLL (ljackuw.dll) attempts to keep track of the current direction and output state of all lines, so that this easy function can operate on a single line without changing the others. When the DLL is first loaded, though, it does not know the direction and state of the lines and assumes all directions are input and output states are low.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.channel - Line to read. 0-3 for IO or 0-15 for D.readd - If >0, a D line is read as opposed to an IO line.state - The selected line is TRUE/Set if >0. FALSE/Clear if 0.
public static int EDigitalOut(int[] idnum,
int demo,
int channel,
int writed,
int state)
Sets digital output.
Easy function. This is a simplified version of DigitalIO that sets/clears the state of one digital output. Also configures the requested pin to output and leaves it that way.
Note that this is a simplified version of the lower level function DigitalIO, which operates on all 20 digital lines. The DLL (ljackuw.dll) attempts to keep track of the current direction and output state of all lines, so that this easy function can operate on a single line without changing the others. When the DLL is first loaded, though, it does not know the direction and state of the lines and assumes all directions are input and output states are low.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.channel - Line to write. 0-3 for IO or 0-15 for D.writed - If >0, a D line is written as opposed to an IO line.state - If >0, a D line is written as opposed to an IO line.
public static int AISample(int[] idnum,
int demo,
int[] stateIO,
int updateIO,
int ledOn,
int numChannels,
int[] channels,
int[] gains,
int disableCal,
int[] overVoltage,
float[] voltages)
Reads the voltages from 1,2, or 4 analog inputs and controls/reads the 4 IO ports.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.stateIO - In/out parameter. In: Output states for IO0-IO3. Has no effect if IO are configured as inputs, so a
different function must be used to configure as output. Out: Returns input states of IO0-IO3.updateIO - If >0, state values will be written. Otherwise, just a read is performed.ledOn - If >0, the LabJack LED is turned on.numChannels - Number of analog input channels to read (1,2, or 4).channels - Array of channel commands with at least numChannels elements. Each channel command is 0-7 for
single-ended, or 8-11 for differential.gains - Array of gain commands with at least numChannels elements. Gain commands are 0=1, 1=2, ..., 7=20.
This amplification is only available for differential channels.disableCal - If >0, voltages returned will be raw readings that are not corrected using calibration constants.overVoltage - If >0, an overvoltage has been detected on one of the selected analog inputs.voltages - Array where numChannels voltage readings are returned. Send in zeros.
public static int AIBurst(int[] idnum,
int demo,
int stateOin,
int updateIO,
int ledOn,
int numChannels,
int[] channels,
int[] gains,
float[] scanRate,
int disableCal,
int triggerIO,
int triggerState,
int numScans,
int timeout,
float[][] voltages,
int[] stateIOout,
int[] overVoltage,
int transferMode)
Performs a burst scan.
Reads a specified number of scans (up to 4096) at a specified scan rate (up to 8192 Hz) from 1,2, or 4 analog inputs. First, data is acquired and stored in the LabJack’s 4096 sample RAM buffer. Then, the data is transferred to the PC.
If the LED is enabled (ledOn>0), it will blink at about 4 Hz while waiting for a trigger, turn off during acquisition, blink rapidly while transferring data to the PC, and turn on when done.
The execution time of this function, in milliseconds, depends on transfermode and can be estimated with the below formulas. The actual number of samples collected and transferred by the LabJack is the smallest power of 2 from 64 to 4096 which is at least as big as numScans*numChannels. This is represented below as numSamplesActual.
Normal => 30+(1000*numSamplesActual/sampleRate)+(2.5*numSamplesActual)
Turbo => 30+(1000*numSamplesActual/sampleRate)+(0.4*numSamplesActual)
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.stateOin - Output states for IO0-IO3. Has no effect if IO are configured as inputs, so a different function must
be used to configure as output.updateIO - If >0, state values will be written. Otherwise, just a read is performed.ledOn - If >0, the LabJack LED is turned on.numChannels - Number of analog input channels to read (1,2, or 4).channels - Array of channel commands with at least numChannels elements. Each channel command is 0-7 for
single-ended, or 8-11 for differential.gains - Array of gain commands with at least numChannels elements. Gain commands are 0=1, 1=2, ..., 7=20.
This amplification is only available for differential channels.scanRate - In/out parameter. In: Scans acquired per second. A scan is a reading from every channel (1,2, or 4).
The sample rate (scanRate * numChannels) must be between 400 and 8192. Out: Returns the actual scan
rate, which due to clock resolution is not always exactly the same as the desired scan rate.disableCal - If >0, voltages returned will be raw readings that are not corrected using calibration constants.triggerIO - The IO port to trigger on (0=none, 1=IO0, or 2=IO1).triggerState - If >0, the acquisition will be triggered when the selected IO port reads high.numScans - Number of scans which will be returned. Minimum is 1. Maximum numSamples is 4096, where numSamples
is numScans * numChannels.timeout - This function will return immediately with a timeout error if it does not receive a scan within this
number of seconds.voltages - 4096 by 4 array where voltage readings are returned. Send filled with zeros.stateIOout - 4096 element array where IO states are returned. Unused locations are filled with 9999.0. Send filled
with zeros.overVoltage - If >0, an overvoltage has been detected on at least one sample of one of the selected analog
inputs.transferMode - 0=auto, 1=normal, 2=turbo. If auto, turbo mode is used unless timeout is >= 4, or
numScans/scanRate >=4.
public static int AIStreamStart(int[] idnum,
int demo,
int stateIOin,
int updateIO,
int ledOn,
int numChannels,
int[] channels,
int[] gains,
float[] scanRate,
int disableCal,
int reserved1,
int readCount)
Starts a hardware timed continuous acquisition where data is sampled and stored in the LabJack RAM buffer, and can be simultaneously transferred out of the RAM buffer to the PC application. A call to this function should be followed by periodic calls to AIStreamRead, and eventually a call to AIStreamClear. Note that while streaming the LabJack U12 is too busy to do anything else. If any function besides AIStreamRead is called while a stream is in progress, the stream will be stopped.
If the LED is enabled (ledOn>0), it will toggle every 40 samples during acquisition and turn on when the stream operation stops.
Execution time for this function is 30 milliseconds or less (typically 24 milliseconds in Windows).
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.stateIOin - Output states for IO0-IO3.updateIO - If >0, state values will be written. Otherwise, just a read is performed.ledOn - If >0, the LabJack LED is turned on.numChannels - Number of analog input channels to read (1,2, or 4). If readCount is >0, numChannels should be 4.channels - Array of channel commands with at least numChannels elements. Each channel command is 0-7 for
single-ended, or 8-11 for differential.gains - Array of gain commands with at least numChannels elements. Gain commands are 0=1, 1=2, ..., 7=20.
This amplification is only available for differential channels.scanRate - In/out parameter. In: Scans acquired per second. A scan is a reading from every channel (1,2, or 4).
The sample rate (scanRate * numChannels) must be between 200 and 1200. Out: Returns the actual scan
rate, which due to clock resolution is not always exactly the same as the desired scan rate.disableCal - If >0, voltages returned will be raw readings that are not corrected using calibration constants.reserved1 - Reserved for future use. Send 0.readCount - If >0, the current count (CNT) is returned instead of the 2nd, 3rd, and
4th analog input channels. 2nd channel is bits 0-11. 3rd channel
is bits 12-23. 4th channel is bits 24-31. This feature was added to the LabJack U12
starting with firmware version 1.03, and this input has no effect with earlier firmware versions.
public static int AIStreadRead(int localID,
int numScans,
int timeout,
float[][] voltages,
int[] stateIOout,
int[] reserved,
int[] ljScanBacklog,
int[] overVoltage)
Waits for a specified number of scans to be available and reads them. AIStreamStart should be called before this function and AIStreamClear should be called when finished with the stream.
Note that while streaming the LabJack U12 is too busy to do anything else. If any function besides AIStreamRead is called while a stream is in progress, the stream will be stopped.
localID - Send the local ID from AIStreamStart.numScans - Function will wait until this number of scans is available. Minimum is 1. Maximum numSamples is
4096, where numSamples is numScans numChannels. Internally this function gets data from the LabJack
in blocks of 64 samples, so it is recommended that numSamples be at least 64.timeout - Function timeout value in seconds.voltages - 4096 by 4 array where voltage readings are returned. Unused locations are filled with 9999.0.
Send filled with zeros.stateIOout - 4096 element array where IO states are returned. Unused locations are filled with 9999.0. Send filled
with zeros.reserved - Reserved for future use. Send 0.ljScanBacklog - Returns the scan backlog of the LabJack RAM buffer. The size of the buffer in terms of scans
is 4096/numChannels.overVoltage - If >0, an overvoltage has been detected on at least one sample of one of the selected analog
inputs.
public static int AIStreamClear(int localID)
This function stops the continuous acquisition. It should be called once when finished with the stream. The sequence of calls for a typical stream operation is: AIStreamStart, AIStreamRead, AIStreamRead, AIStreamRead, ..., AIStreamClear.
localID - Send the local ID from AIStreamStart/Read.
public static int AOUpdate(int[] idnum,
int demo,
int trisD,
int trisIO,
int[] stateD,
int[] stateIO,
int updateDigital,
int resetCounter,
int[] count,
float analogOut0,
float analogOut1)
Sets the voltages of the analog outputs and controls/reads all 20 digital I/O and the counter.
If either passed voltage is less than zero, the DLL uses the last set voltage. This provides a way to update 1 output without changing the other. Note that when the DLL is first loaded, it does not know if the analog outputs have been set, and assumes they are both the default of 0.0 volts. Similarly, there are situations where the LabJack could reset without the knowledge of the DLL, and thus the DLL could think the analog outputs are set to a non-zero voltage when in fact they have been reinitialized to 0.0 volts.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.trisD - Directions for D0-D15. 0=Input, 1=Output.trisIO - Directions for D0-D15. 0=Input, 1=Output.stateD - Output states for D0-D15.stateIO - Output states for IO0-IO3.updateDigital - If >0, tris and state values will be written. Otherwise, just a read is performed.resetCounter - If >0, the counter is reset to zero after being read.count - Current value of the 32-bit counter (CNT). This value is read before the counter is reset.analogOut0 - Voltage from 0.0 to 5.0 for AO0.analogOut1 - Voltage from 0.0 to 5.0 for AO1.
public static int AsynchConfig(int[] idnum,
int demo,
int timeoutMult,
int configA,
int configB,
int configTE,
int fullA,
int fullB,
int fullC,
int halfA,
int halfB,
int halfC)
This function writes to the asynch registers and sets the direction of the D lines (input/output) as needed.
The actual 1-bit time is about 1.833 plus a "full" delay (us).
The actual 1/2-bit time is about 1.0 plus a "half" delay (us).
full/half delay = 0.833 + 0.833C + 0.667BC + 0.5ABC (us) Common baud rates (full A,B,C; half A,B,C):
1 55,153,232 ; 114,255,34 10 63,111,28 ; 34,123,23 100 51,191,2 ; 33,97,3 300 71,23,4 ; 84,39,1 600 183,3,6 ; 236,7,1 1000 33,29,2 ; 123,8,1 1200 23,17,4 ; 14,54,1 2400 21,37,1 ; 44,3,3 4800 10,18,2 ; 1,87,1 7200 134,2,1 ; 6,9,2 9600 200,1,1 ; 48,2,1 10000 63,3,1 ; 46,2,1 19200 96,1,1 ; 22,2,1 38400 3,5,2 ; 9,2,1 57600 3,3,2 ; 11,1,1 100000 3,3,1 ; 1,2,1 115200 9,1,1 ; 2,1,1 or 1,1,1
When using data rates over 38.4 kbps, the following conditions need to be considered:
When enabled, STB does the following to aid in debugging asynchronous reads:
Execution time for this function is 60 milliseconds or less (typically 48 milliseconds in Windows).
Requires firmware V1.1 or higher.
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.timeoutMult - If enabled, read timeout is about 100 milliseconds times this value (0-255).configA - If >0, D8 is set to output-high and D9 is set to input.configB - If >0, D10 is set to output-high and D11 is set to input.configTE - If >0, D12 is set to output-low.fullA - Time constants for a "full" delay (1-255).fullB - Time constants for a "full" delay (1-255).fullC - Time constants for a "full" delay (1-255).halfA - Time constants for a "half" delay (1-255).halfB - Time constants for a "half" delay (1-255).halfC - Time constants for a "half" delay (1-255).
public static int Asynch(int[] idnum,
int demo,
int portB,
int enableTE,
int enableTO,
int enableDel,
int baudrate,
int numWrite,
int numRead,
int[] data)
This function writes and then reads half-duplex asynchronous data on 1 of two pairs of D lines (8,n,1). Call AsynchConfig to set the baud rate. Similar to RS232, except that logic is normal CMOS/TTL (0=low=GND, 1=high=+5V, idle state of transmit line is high). Connection to a normal RS232 device will probably require a converter chip such as the MAX233.
PortA => TX is D8 and RX is D9
PortB => TX is D10 and RX is D11
Transmit Enable is D12
Up to 18 bytes can be written and read. If more than 4 bytes are written or read, this function uses calls to WriteMem/ReadMem to load/read the LabJack's data buffer.
Execution time for this function is about 20 milliseconds to write and/or read up to 4 bytes, plus about 20 milliseconds for each additional 4 bytes written or read. Slow baud rates can result in longer execution time.
Requires firmware V1.1 or higher.
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.portB - If >0, asynch PortB is used instead of PortA.enableTE - If >0, D12 (Transmit Enable) is set high during transmit and low during receive.enableTO - If >0, timeout is enabled for the receive phase (per byte).enableDel - If >0, a 1 bit delay is inserted between each transmit byte.baudrate - This is the bps as set by AsynchConfig. Asynch needs this so it has an idea how long the transfer
should take.numWrite - Number of bytes to write (0-18).numRead - Number of bytes to read (0-18).data - In/out parameter. In: Serial data buffer. Send an 18 element array. Fill unused locations with
zeros. Out: Returns any serial read data. Unused locations are filled with 9999s.
public static int BitsToVolts(int chnum,
int chgain,
int bits,
float[] volts)
Converts a 12-bit (0-4095) binary value into a LabJack voltage. No hardware communication is involved.
Volts=((2*Bits*Vmax/4096)-Vmax)/Gain where Vmax=10 for SE, 20 for Diff.
chnum - Channel index. 0-7=SE, 8-11=Diff.chgain - Gain index. 0=1, 1=2, …, 7=20.bits - Binary value from 0-4095.volts - Returns voltage.
public static int VoltsToBits(int chnum,
int chgain,
float volts,
int[] bits)
Converts a voltage to it's 12-bit (0-4095) binary representation. No hardware communication is involved.
Bits=(4096*((Volts*Gain)+Vmax))/(2*Vmax) where Vmax=10 for SE, 20 for Diff.
chnum - Channel index. 0-7=SE, 8-11=Diff.chgain - Gain index. 0=1, 1=2, …, 7=20.volts - Voltage.bits - Returns binary value from 0-4095.
public static int Counter(int[] idnum,
int demo,
int[] stateD,
int[] stateIO,
int resetCounter,
int enableSTB,
int[] count)
Controls and reads the counter. The counter is disabled if the watchdog timer is enabled.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.stateD - States of D0-D15.stateIO - States of IO0-IO3.resetCounter - If >0, the counter is reset to zero after being read.enableSTB - If >0, STB is enabled. Used for testing and calibration. (This input has no effect with firmware
V1.02 or earlier, in which case STB is always enabled)count - Current value of the 32-bit counter (CNT). This value is read before the counter is reset.
public static int DigitalIO(int[] idnum,
int demo,
int[] trisD,
int trisIO,
int[] stateD,
int[] stateIO,
int updateDigital,
int[] outputD)
Reads and writes all 20 digital I/O.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.trisD - In/out parameter. In: Directions for D0-D15. 0=Input, 1=Output. Out: Returns a read of the direction
registers for D0-D15.trisIO - Directions for IO0-IO3. 0=Input, 1=Output.stateD - In/out parameter. In: Output states for D0-D15. Out: States of D0-D15.stateIO - In/out parameter. In: Output states for IO0-IO3. Out: States of IO0-IO3.updateDigital - If >0, tris and state values will be written. Otherwise, just a read is performed.outputD - Returns a read of the output registers for D0-D15.
public static float GetDriverVersion()
public static void GetErrorString(int errorCode,
char[] errorString)
Converts a LabJack errorcode, returned by another function, into a string describing the error. No hardware communication is involved.
errorCode - LabJack errorcode.errorString - Pointer to a 50 element array of characters.public static float GetFirmwareVersion(int[] idnum)
Retrieves the firmware version from the LabJack's processor.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found. If error, returns 512 plus a normal LabJack errorcode.
public static int GetWinVersion(int[] majorVersion,
int[] minorVersion,
int[] buildNumber,
int[] platformID,
int[] servicePackMajor,
int[] servicePackMinor)
Uses a Windows API function to get the OS version.
Outputs.
Platform Major Minor Build Windows 3.1 0 - - - Windows 95 1 4 0 950 Windows 95 OSR2 1 4 0 1111 Windows 98 1 4 10 1998 Windows 98SE 1 4 10 2222 Windows Me 1 4 90 3000 Windows NT 3.51 2 3 51 - Windows NT 4.0 2 4 0 1381 Windows 2000 2 5 0 2195 Windows XP 2 5 1 -
majorVersion - Operating system version, major number.minorVersion - Operating system version, minor number.buildNumber - Operating system build number.platformID - Platform ID.servicePackMajor - Service pack version, major number.servicePackMinor - Service pack version, minor number.
public static int ListAll(int[] productIDList,
int[] serialnumList,
int[] localIDList,
int[] powerList,
int[][] callMatrix,
int[] numberFound,
int[] reserved1,
int[] reserved2)
Searches the USB for all LabJacks, and returns the serial number and local ID for each.
productIDList - 127 element array. Send filled with zeros.serialnumList - In/out parameter, 127 element array. In: Send filled with zeros. Out: Serial numbers are
returned. Unused locations are filled with 9999.0.localIDList - In/out parameter, 127 element array. In: Send filled with zeros. Out: Local ID numbers are
returned. Unused locations are filled with 9999.0.powerList - 127 element array. Send filled with zeros.callMatrix - 127 by 20 element array. Send filled with zeros.numberFound - Number of LabJacks found on the USB.
public static int LocalID(int[] idnum,
int localID)
Changes the local ID of a specified LabJack. Changes will not take effect until the LabJack is re-enumerated or reset, either manually by disconnecting and reconnecting the USB cable or by calling ReEnum or Reset.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
idnum - In/out: Local id, serial # or -1 in. Local id out.localID - New local ID for LabJack.
public static int NoThread(int[] idnum,
int noThread)
This function is needed when interfacing TestPoint to the LabJack DLL on Windows 98/ME (see ljackuw.h for more information). Call this function to disable/enable thread creation for other functions. Normally, thread creation should be enabled, but it must be disabled for LabJack functions to work when called from TestPoint. One other situation where disabling thread creation might be useful, is when running a time-critical application in the Visual C debugger. Slow thread creation is a known problem with the Visual C debugger.
If the read thread is disabled, the "timeout" specified in AIBurst and AIStreamRead is also disabled.
Execution time for this function is about 80 milliseconds.
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.noThread - If >0, the thread will not be used.
public static int PulseOut(int[] idnum,
int demo,
int lowFirst,
int bitSelect,
int numPulses,
int timeB1,
int timeC1,
int timeB2,
int timeC2)
This command creates pulses on any/all of D0-D7. The desired D lines must be set to output using another function (DigitalIO or AOUpdate). All selected lines are pulsed at the same time, at the same rate, for the same number of pulses.
This function commands the time for the first half cycle of each pulse, and the second half cycle of each pulse. Each time is commanded by sending a value B & C, where the time is,
1st half-cycle microseconds = ~17 + 0.83*C + 20.17*B*C,
2nd half-cycle microseconds = ~12 + 0.83*C + 20.17*B*C,which can be approximated as,
microseconds = 20*B*C.
For best accuracy when using the approximation, minimize C. B and C must be between 1 and 255, so each half cycle can vary from about 38/33 microseconds to just over 1.3 seconds.
If you have enabled the LabJack Watchdog function, make sure it's timeout is longer than the time it takes to output all pulses.
The timeout of this function, in milliseconds, is set to:
5000+numPulses*((B1*C1*0.02)+(B2*C2*0.02))
Execution time for this function is about 20 milliseconds plus pulse output time.
Requires firmware V1.1 or higher.
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.lowFirst - If >0, each line is set low then high, otherwise the lines are set high then low.bitSelect - Set bits 0 to 7 to enable pulsing on each of D0-D7 (0-255).numPulses - Number of pulses for all lines (1-32767).timeB1 - B value for first half cycle (1-255).timeC1 - C value for first half cycle (1-255).timeB2 - B value for second half cycle (1-255).timeC2 - C value for second half cycle (1-255).
public static int PulseOutStart(int[] idnum,
int demo,
int lowFirst,
int bitSelect,
int numPulses,
int timeB1,
int timeC1,
int timeB2,
int timeC2)
PulseOutStart and PulseOutFinish are used as an alternative to PulseOut (See PulseOut for more information). PulseOutStart starts the pulse output and returns without waiting for the finish. PulseOutFinish waits for the LabJack's response which signifies the end of the pulse output.
If anything besides PulseOutFinish is called after PulseOutStart, the pulse output will be terminated and the LabJack will execute the new command. Calling PulseOutStart repeatedly, before the previous pulse output has finished, provides a pretty good approximation of continuous pulse output.
Note that due to boot-up tests on the LabJack U12, if PulseOutStart is the first command sent to the LabJack after reset or power-up, there will be no response for PulseOutFinish. In practice, even if no precautions were taken, this would probably never happen, since before calling PulseOutStart, a call is needed to set the desired D lines to output.
Also note that PulseOutFinish must be called before the LabJack completes the pulse output to read the response. If PulseOutFinish is not called until after the LabJack sends it's response, the function will never receive the response and will timeout.
Execution time for this function about 10 milliseconds.
Requires firmware V1.1 or higher.
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.lowFirst - If >0, each line is set low then high, otherwise the lines are set high then low.bitSelect - Set bits 0 to 7 to enable pulsing on each of D0-D7 (0-255).numPulses - Number of pulses for all lines (1-32767).timeB1 - B value for first half cycle (1-255).timeC1 - C value for first half cycle (1-255).timeB2 - B value for second half cycle (1-255).timeC2 - C value for second half cycle (1-255).
public static int PulseOutFinish(int[] idnum,
int demo,
int timeoutMS)
See PulseOutStart for more information.
Requires firmware V1.1 or higher.
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.timeoutMS - Amount of time, in milliseconds, that this function will wait for the PulseOutStart response.
public static int PulseOutCalc(float[] frequency,
int[] timeB,
int[] timeC)
This function can be used to calculate the cycle times for PulseOut or PulseOutStart.
Requires firmware V1.1 or higher.
frequency - In/out parameter. In: Desired frequency in Hz. Out: Actual best frequency found in Hz.timeB - B value for first and second half cycle.timeC - B value for first and second half cycle.
public static int ReEnum(int[] idnum)
Causes the LabJack to electrically detach from and re-attach to the USB so it will re-enumerate. The local ID and calibration constants are updated at this time.
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.
public static int Reset(int[] idnum)
Causes the LabJack to reset after about 2 seconds. After resetting the LabJack will re-enumerate. Reset and ResetLJ are identical
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.
public static int SHT1X(int[] idnum,
int demo,
int softComm,
int mode,
int statusReg,
float[] tempC,
float[] tempF,
float[] rh)
This function retrieves temperature and/or humidity readings from an SHT1X sensor. Data rate is about 2 kbps with firmware V1.1 or higher (hardware communication). If firmware is less than V1.1, or TRUE is passed for softComm, data rate is about 20 bps.
DATA = IO0
SCK = IO1
The EI-1050 has an extra enable line that allows multiple probes to be connected at the same time using only the one line for DATA and one line for SCK. This function does not control the enable line.
This function automatically configures IO0 has an input and IO1 as an output.
Note that internally this function operates on the state and direction of IO0 and IO1, and to operate on any of the IO lines the LabJack must operate on all 4. The DLL keeps track of the current direction and output state of all lines, so that this function can operate on IO0 and IO1 without changing IO2 and IO3. When the DLL is first loaded, though, it does not know the direction and state of the lines and assumes all directions are input and output states are low.
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.softComm - If >0, forces software based communication. Otherwise software communication is only used if the
LabJack U12 firmware version is less than V1.1.mode - 0=temp and RH,1=temp only,2=RH only. If mode is 2, the current temperature must be passed in for the
RH corrections using tempC.statusReg - Current value of the SHT1X status register. The value of the status register is 0 unless you have
used advanced functions to write to the status register (enabled heater, low resolution, or no
reload from OTP).tempC - Returns temperature in degrees C. If mode is 2, the current temperature must be passed in for the
RH corrections.tempF - Returns temperature in degrees F.rh - Returns RH in percent.
public static int SHTComm(int[] idnum,
int softComm,
int waitMeas,
int serialReset,
int dataRate,
int numWrite,
int numRead,
byte[] datatx,
byte[] datarx)
Low-level public function to send and receive up to 4 bytes to from an SHT1X sensor. Data rate is about 2 kbps with firmware V1.1 or higher (hardware communication). If firmware is less than V1.1, or TRUE is passed for softComm, data rate is about 20 bps.
DATA = IO0
SCK = IO1
The EI-1050 has an extra enable line that allows multiple probes to be connected at the same time using only the one line for DATA and one line for SCK. This function does not control the enable line.
This function automatically configures IO0 has an input and IO1 as an output.
Note that internally this function operates on the state and direction of IO0 and IO1, and to operate on any of the IO lines the LabJack must operate on all 4. The DLL keeps track of the current direction and output state of all lines, so that this function can operate on IO0 and IO1 without changing IO2 and IO3. When the DLL is first loaded, though, it does not know the direction and state of the lines and assumes all directions are input and output states are low.
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.softComm - If >0, forces software based communication. Otherwise software communication is only used if the
LabJack U12 firmware version is less than V1.1.waitMeas - If >0, this is a T or RH measurement request.serialReset - If >0, a serial reset is issued before sending and receiving bytes.dataRate - 0=no extra delay (default), 1=medium delay, 2=max delay.numWrite - Number of bytes to write (0-4).numRead - Number of bytes to write (0-4).datatx - Array of 0-4 bytes to send. Make sure you pass at least numWrite number of bytes.datarx - Returns 0-4 read bytes as determined by numRead.
public static int SHTCRC(int statusReg,
int numWrite,
int numRead,
byte[] datatx,
byte[] datarx)
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.
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).datatx - Array of 0-4 bytes that were sent.datarx - Array of 1-4 bytes that were read.
public static int Synch(int[] idnum,
int demo,
int mode,
int msDelay,
int husDelay,
int controlCS,
int csLine,
int csState,
int configD,
int numWriteRead,
int[] data)
This function performs SPI communication. Data rate is about 160 kbps with no extra delay, although delays of 100 us or 1 ms per bit can be enabled.
Execution time for this function is about 20 milliseconds to write and/or read up to 4 bytes, plus about 20 milliseconds for each additional 4 bytes written or read. Extra 20 milliseconds if configD is true, and extra time if delays are enabled.
Control of CS (chip select) can be enabled in this function for D0-D7 or handled externally via any digital output.
MOSI is D13
MISO is D14
SCK is D15
If using the CB25, the protection resistors might need to be shorted on all SPI connections (MOSI, MISO, SCK, CS).
The initial state of SCK is set properly (CPOL), by this function, before !CS is brought low (final state is also set properly before !CS is brought high again). If chip-select is being handled manually, outside of this function, care must be taken to make sure SCK is initially set to CPOL.
All modes supported (A, B, C, and D).
Mode A: CPHA=1, CPOL=1
Mode B: CPHA=1, CPOL=0
Mode C: CPHA=0, CPOL=1
Mode D: CPHA=0, CPOL=0
If Clock Phase (CPHA) is 1, data is valid on the edge going to CPOL. If CPHA is 0, data is valid on the edge going away from CPOL. Clock Polarity (CPOL) determines the idle state of SCK.
Up to 18 bytes can be written/read. Communication is full duplex so 1 byte is read at the same time each byte is written. If more than 4 bytes are written or read, this function uses calls to WriteMem/ReadMem to load/read the LabJack's data buffer.
This function has the option (configD) to automatically configure default state and direction for MOSI (D13 Output), MISO (D14 Input), SCK (D15 Output CPOL), and CS (D0-D7 Output High for !CS). This function uses a call to DigitalIO to do this. Similar to EDigitalIn and EDigitalOut, the DLL keeps track of the current direction and output state of all lines, so that these 4 D lines can be configured without affecting other digital lines. When the DLL is first loaded, though, it does not know the direction and state of the lines and assumes all directions are input and output states are low.
Requires firmware V1.1 or higher.
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.mode - Specify SPI mode as: 0=A,1=B,2=C,3=D (0-3).msDelay - If >0, a 1 ms delay is added between each bit.husDelay - If >0, a hundred us delay is added between each bit.controlCS - If >0, D0-D7 is automatically controlled as CS. The state and direction of CS is only tested if control is enabled.csLine - D line to use as CS if enabled (0-7).csState - Active state for CS line. This would be 0 for the normal !CS, or >0 for the less common CS.configD - If >0, state and tris are configured for D13, D14, D15, and !CS.numWriteRead - Number of bytes to write and read (1-18).data - In/out parameter. In: Serial data buffer. Send an 18 element array of bytes. Fill unused locations with zeros. Returns any serial read data. Unused locations are filled with 9999s.
public static int Watchdog(int[] idnum,
int demo,
int active,
int timeout,
int reset,
int activeD0,
int activeD1,
int activeD8,
int stateD0,
int stateD1,
int stateD8)
Controls the LabJack watchdog function. When activated, the watchdog can change the states of digital I/O if the LabJack does not successfully communicate with the PC within a specified timeout period. This function could be used to reboot the PC allowing for reliable unattended operation. The 32-bit counter (CNT) is disabled when the watchdog is enabled.
If you set the watchdog to reset the LabJack, and choose too small of a timeout period, it might be difficult to make the device stop resetting. To disable the watchdog, reset the LabJack with IO0 shorted to STB, and then reset again without the short.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.demo - Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without
a LabJack.active - Enables the LabJack watchdog function. If enabled, the 32-bit counter is disabled.timeout - Timer reset value in seconds (1-715).reset - If >0, the LabJack will reset on timeout.activeD0 - If >0, D0 will be set to stateD0 upon timeout.activeD1 - If >0, D1 will be set to stateD1 upon timeout.activeD8 - If >0, D8 will be set to stateD8 upon timeout.stateD0 - Timeout state of D0, 0=low, >0=high.stateD1 - Timeout state of D1, 0=low, >0=high.stateD8 - Timeout state of D8, 0=low, >0=high.
public static int ReadMem(int[] idnum,
int address,
int[] data3,
int[] data2,
int[] data1,
int[] data0)
Reads 4 bytes from a specified address in the LabJack's nonvolatile memory.
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.address - Starting address of data to read (0-8188).data3 - Returns byte at address.data2 - Returns byte at address+1.data1 - Returns byte at address+2.data0 - Returns byte at address+3.
public static int WriteMem(int[] idnum,
int unlocked,
int address,
int data3,
int data2,
int data1,
int data0)
Writes 4 bytes to the LabJack's 8,192 byte nonvolatile memory at a specified address. The data is read back and verified after the write. Memory 0-511 is reserved for configuration and calibration data. Memory from 512-1023 is unused by the LabJack and available for the user (this corresponds to starting addresses from 512-1020). Memory 1024-8191 is used as a data buffer in hardware timed AI modes (burst and stream).
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
idnum - In/out parameter. In: Local ID, serial number, or -1 for first found. Out: Returns the local ID or -1
if no LabJack is found.unlocked - If >0, addresses 0-511 are unlocked for writing.address - Starting address for writing (0-8188).data3 - Byte for address.data2 - Byte for address+1.data1 - Byte for address+2.data0 - Byte for address+3.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||