LabJack U12 User Manual

Measurement and automation peripheral that enables the connection of a pc to the real-world
Hide thumbs Also See for U12:

Advertisement

LabJack U12 User's Guide
Revision 1.00
9/21/2001
LabJack Corporation
www.labjack.com
support@labjack.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the U12 and is the answer not in the manual?

Questions and answers

Summary of Contents for LabJack U12

  • Page 1 LabJack U12 User’s Guide Revision 1.00 9/21/2001 LabJack Corporation www.labjack.com support@labjack.com...
  • Page 2 PC to the real-world. Although the LabJack U12 has many redundant protection mechanisms, it is possible, in the case of improper and/or unreasonable use, to damage the LabJack and even the PC to which it is connected. LabJack Corporation will not be liable for any such damage. LabJack U12 Warranty The LabJack U12 comes with a 1 year limited warranty from LabJack Corporation (LC), covering this product and parts against defects in material or workmanship.
  • Page 3: Table Of Contents

    Table Of Contents 1. Installation ..........................5 1.1 Hardware Installation ....................... 5 1.2 Software Installation......................5 2. Hardware Description......................7 2.1 AI0 – AI7.......................... 8 2.2 AO0 & AO1........................10 2.3 IO0 – IO3 ........................11 2.4 D0 – D15 ........................11 2.5 CNT ..........................
  • Page 4 Table Of Figures Figure 2-1. LabJack U12 top surface..................7 Figure 2-2. Single-ended measurement..................8 Figure 2-3. Differential measurement..................9 Figure 2-4. Single-ended measurement with voltage divider circuit........... 9 Figure 2-5. IO used to detect the state of a switch..............11 Figure 3-1.
  • Page 5: Installation

    It doesn’t matter if the hardware or software is installed first. 1.1 Hardware Installation With the PC on and using the included cable, connect the LabJack U12 to the USB port on the PC or USB hub. The USB cable provides power and communication for the LabJack U12. The status LED should immediately blink 4 times (at about 4 Hz), and then stay off while the LabJack enumerates.
  • Page 6 To test the installation, start LJconfig by selecting Start => Programs => LabJack => LJconfig and make sure 1 LabJack is listed.
  • Page 7: Hardware Description

    Figure 2-1. LabJack U12 top surface. Figure 2-1 shows the top surface of the LabJack U12. Not shown is the USB and DB25 connector, which are both on the top edge. The DB25 connector provides connections for 16 digital I/O lines, called D0-D15. It also has connections for ground and +5 volts. All connections besides D0-D15, are provided by the 30 screw terminals shown in Figure 1.
  • Page 8: Ai0 - Ai7

    2.1 AI0 – AI7 Hardware The LabJack U12 has 8 screw terminals for analog input signals. These can be configured individually and on-the-fly as 8 single-ended channels, 4 differential channels, or combinations in between. Each input has a 12-bit resolution and an input bias current of ±90 µA.
  • Page 9: Figure 2-3. Differential Measurement

    Vs is the supply voltage (+5V in Figure 2-4). When Va is connected to AI0, as shown in Figure 2-4, the input bias current of the LabJack affects the voltage divider circuit, and if the resistance of R1 and R2 is too large, this effect must be accounted for or eliminated.
  • Page 10: Ao0 & Ao1

    2.2 AO0 & AO1 The LabJack U12 has 2 screw terminals for analog output voltages. Each analog output can be set to a voltage between 0 and the supply voltage (+5 volts nominal) with 10-bits of resolution. The output voltage is ratiometric with the +5 volt supply, which is generally accurate to ±5% (see Appendix A).
  • Page 11: Io0 - Io3

    20 digital I/O and the counter. 2.3 IO0 – IO3 Connections to 4 of the LabJack’s 20 digital I/O are made at the screw terminals, and are referred to as IO0-IO3. Each pin can individually be set to input, output high, or output low.
  • Page 12: Cnt

    2.4 +5V The LabJack has a nominal +5 volt internal power supply. Power can be drawn from this power supply by connecting to the +5V screw-terminals, or the +5V pins on the DB25 connector. The total amount of current that can be drawn from the +5V pins, analog outputs, and digital outputs, is 450 mA for most desktop computers and self-powered USB hubs.
  • Page 13: Example Applications

    The LabVIEW source code for LJlogger and LJscope is installed in the examples directory. 3.1 LJconfig Every LabJack has a local ID and serial number. The local ID is a value between 0 and 255 that can be changed by the user. The serial number is a value between 256 and 2,147,483,647 that is unique among all LabJacks and cannot be changed by the user.
  • Page 14: Ljlogger

    Figure 3-2. LJconfig Change Local ID Enter a new local ID between 0 and 255 and push the “Change” button. The new local ID will be written and the LabJack will be forced to re-enumerate. 3.2 LJlogger LJlogger sends and receives data in command/response mode. It is capable of saving data to disk, writing data to an HTML page on the Internet, and performing various actions (including email) on trigger events.
  • Page 15: Figure 3-4. Ljlogger Configuration

    LabJack. Clicking the button labeled “Save Panel Settings” will save the current values of the controls as the default values. If SDX is activated for a given analog input, the corresponding SDX DLL will be used to determine the scaled data.
  • Page 16: Figure 3-5. Ljlogger Internet Configuration

    Figure 3-5. LJlogger Internet Configuration Figure 3-6. LJlogger HTML Configuration...
  • Page 17: Ljscope

    Figure 3-7. LJlogger Trigger Configuration Figure 3-7 shows 9 example triggers: • Trigger #0: If the scaled data from analog input row 7 (Figure 3-3) is greater than 5, then set AO1 to 5 volts. Once triggered, there is a 10 second delay before it can be triggered again.
  • Page 18: Ljtest

    Figure 3-8. LJscope 3.4 LJtest LJtest runs a sequence of tests on the LabJack itself. Users will generally leave “Test Fixture Installed” unselected and execute the tests with nothing connected to the LabJack (except the USB of course).
  • Page 19: Figure 3-9. Ljtest

    Figure 3-9. LJtest...
  • Page 20: Programming Reference

    LabJack, while –1 means the first found LabJack. Every LabJack has a local ID and serial number. The local ID is a value between 0 and 255 that can be changed by the user. The serial number is a value between 256 and 2,147,483,647 that is unique among all LabJacks and cannot be changed by the user.
  • Page 21: Aiburst

    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.
  • Page 22 *stateIOout – Pointer to a 4096 element array where IO states are returned. Send filled with zeros. • transferMode – 0=automatic, 1=force normal, 2=force turbo. Outputs: • *idnum – Returns the local ID or –1 if no LabJack is found.
  • Page 23: Aistreamstart

    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.
  • Page 24 – Reserved for future use. Send 0. Outputs: • *idnum – Returns the local ID or –1 if no LabJack is found. • *scanRate – Returns the actual scan rate, which due to clock resolution is not always exactly the same as the desired scan rate.
  • Page 25: Aistreamread

    – 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.
  • Page 26: Aistreamclear

    – Voltage from 0.0 to 5.0 for AO0. • analogOut1 – Voltage from 0.0 to 5.0 for AO1. Outputs: • *idnum – Returns the local ID or –1 if no LabJack is found. • *stateD – States of D0-D15. • *stateIO – States of IO0-IO3.
  • Page 27: Bitstovolts

    4.7 BitsToVolts Converts a 12-bit (0-4095) binary value into a LabJack voltage. Volts=((2*Bits*Vmax/4096)-Vmax)/Gain where Vmax=10 for SE, 20 for Diff. Declaration: long __cdecl BitsToVolts ( long chnum, long chgain, long bits, float *volts ) Parameter Description: Returns: LabJack errorcodes or 0 for no error.
  • Page 28: Digitalio

    • resetCounter – If >0, the counter is reset to zero after being read. Outputs: • *idnum – Returns the local ID or –1 if no LabJack is found. • *stateD – States of D0-D15. • *stateIO – States of IO0-IO3.
  • Page 29: Geterrorstring

    Parameter Description: Returns: Version number of ljackuw.dll. 4.12 GetErrorString Converts a LabJack errorcode, returned by another function, into a string describing the error. Declaration: void __cdecl GetErrorString ( long errorcode, char *errorString ) Parameter Description: Returns: Nothing. Inputs: • errorcode – LabJack errorcode.
  • Page 30: Listall

    *numberFound, long *fcddMaxSize, long *hvcMaxSize ) Parameter Description: Returns: LabJack errorcodes or 0 for no error. Inputs: • *productIDList – Pointer to a 127 element array. Send filled with zeros. • *serialnumList – Pointer to a 127 element array. Send filled with zeros.
  • Page 31: Localid

    4.16 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. Declaration: long __cdecl LocalID (...
  • Page 32: Readmem

    • *idnum – Returns the local ID or –1 if no LabJack is found. 4.20 ReadMem Reads 4 bytes from a specified address in the LabJack's nonvolatile memory. Execution time for this function is 20 milliseconds or less. Declaration: long __cdecl ReadMem (...
  • Page 33: Writemem

    4.21 WriteMem 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 used for 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).
  • Page 34: Fourpack (Activex Only)

    – Send 0 for normal operation, >0 for demo mode. Demo mode allows this function to be called without a LabJack. • ledOn – If >0, the LabJack LED is turned on. • disableCal – If >0, voltages returned will be raw readings that are not corrected using calibration constants.
  • Page 35: Specifications

    A. Specifications Parameter Conditions Typical Units General USB Cable Length meters Supply Current (1) Operating Temperature °C Clock Error ~ 25 °C ±30 0 to 70 °C ±50 -40 to 85 °C ±100 +5 Volt Power Supply (+5V) Voltage (Vs) (2) Self-Powered 4.75 5.25...
  • Page 36 >1 (1) Current drawn by the LabJack through the USB. The status LED is responsible for 4-5 mA of this current. (2) Self-powered would apply to USB hubs with a power supply, all known desktop computer USB hosts, and some notebook computer USB hosts.

Table of Contents