LabJack U3 Manuale utente

LabJack U3 User’s Guide
Revision 1.02
2/6/2007
LabJack Corporation
www.labjack.com

For the latest version of this and other documents, go to www.labjack.com.
LabJack designs and manufactures measurement and automation peripherals that enable the
connection of a PC to the real-world. Although LabJacks have various 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.
Except as specified herein, LabJack Corporation makes no warranties, express or implied,
including but not limited to any implied warranty or merchantability or fitness for a particular
purpose. LabJack Corporation shall not be liable for any special, indirect, incidental or
consequential damages or losses, including loss of data, arising from any cause or theory.
LabJacks and associated products are not designed to be a critical component in life support or
systems where malfunction can reasonably be expected to result in personal injury. Customers
using these products in such applications do so at their own risk and agree to fully indemnify
LabJack Corporation for any damages resulting from such applications.
LabJack assumes no liability for applications assistance or customer product design.
Customers are responsible for their applications using LabJack products. To minimize the risks
associated with customer applications, customers should provide adequate design and
operating safeguards.
Reproduction of products or written or electronic information from LabJack Corporation is
prohibited without permission. Reproduction of any of these with alteration is an unfair and
deceptive business practice.
Copyright ©2007, LabJack Corporation
2

LabJack U3 User’s Guide Revision History
V1.00 released December 14th, 2006
V1.01 released January 31st, 2007
Section 2.13 – New section describing changes with hardware revision 1.21.
Section 4.2 – Various minor typo corrections.
Section 5.2.12 – Various changes to StreamData section.
Section 5.3 – Updated low-level errorcode list.
V1.02 released February 6th, 2007
Section 1.1 – Updated for current software.
Section 1.2 – Updated for current software.
Section 2.6.3.7 – Updated figures and various details in current measurement section.
3

Table Of Contents
1. Installation on Windows ...........................................................................................................7
1.1 Control Panel Application (LJControlPanel) .......................................................................7
1.2 Self-Upgrade Application (LJSelfUpgrade).......................................................................10
2. Hardware Description.............................................................................................................12
2.1 USB ..................................................................................................................................12
2.2 Status LED .......................................................................................................................13
2.3 GND and SGND ...............................................................................................................13
2.4 Vs .....................................................................................................................................13
2.5 Flexible I/O (FIO/EIO).......................................................................................................13
2.6 AIN....................................................................................................................................14
2.6.1 Channel Numbers ......................................................................................................15
2.6.2 Converting Binary Readings to Voltages ...................................................................15
2.6.3 Typical Analog Input Connections .............................................................................17
2.6.4 Internal Temperature Sensor .....................................................................................23
2.7 DAC ..................................................................................................................................23
2.7.1 Typical Analog Output Connections............................................................................24
2.8 Digital I/O..........................................................................................................................25
2.8.1 Typical Digital I/O Connections...................................................................................26
2.9 Timers/Counters ...............................................................................................................30
2.9.1 Timer Mode Descriptions ............................................................................................32
2.9.2 Timer Operation/Performance Notes ..........................................................................36
2.10 SCL and SDA (or SCA) ..................................................................................................36
2.11 DB15...............................................................................................................................36
2.11.1 CB15 Terminal Board ...............................................................................................37
2.11.2 RB12 Relay Board ....................................................................................................37
2.12 U3-OEM..........................................................................................................................38
2.13 Hardware Revision Notes...............................................................................................39
3. Operation ...............................................................................................................................40
3.1 Command/Response........................................................................................................40
3.2 Stream Mode ....................................................................................................................42
3.2.1 Streaming Digital Inputs, Timers, and Counter0 .........................................................43
4. LabJackUD High-Level Driver................................................................................................44
4.1 Overview...........................................................................................................................44
4.1.1 Function Flexibility .....................................................................................................45
4.1.2 Multi-Threaded Operation ..........................................................................................46
4.2 Function Reference ..........................................................................................................48
4.2.1 ListAll().......................................................................................................................48
4.2.2 OpenLabJack() ..........................................................................................................49
4.2.3 eGet() and ePut() .......................................................................................................50
4.2.4 eAddGoGet()..............................................................................................................51
4.2.5 AddRequest().............................................................................................................51
4.2.6 Go()............................................................................................................................52
4.2.7 GoOne() .....................................................................................................................53
4.2.8 GetResult().................................................................................................................53
4.2.9 GetFirstResult() and GetNextResult()........................................................................54
4.2.10 DoubleToStringAddress() ........................................................................................55
4.2.11 StringToDoubleAddress() ........................................................................................55
4.2.12 StringToConstant()...................................................................................................56
4.2.13 ErrorToString() .........................................................................................................56
4.2.14 GetDriverVersion() ...................................................................................................57
4.2.15 TCVoltsToTemp() ....................................................................................................57
4.2.16 ResetLabJack()........................................................................................................57
iv

4.2.17 eAIN().......................................................................................................................58
4.2.18 eDAC() .....................................................................................................................58
4.2.19 eDI() .........................................................................................................................59
4.2.20 eDO() .......................................................................................................................59
4.2.21 eTCConfig() .............................................................................................................60
4.2.22 eTCValues().............................................................................................................61
4.3 Example Pseudocode.......................................................................................................62
4.3.1 Open ...........................................................................................................................62
4.3.2 Configuration...............................................................................................................62
4.3.3 Analog Inputs..............................................................................................................63
4.3.4 Analog Outputs ...........................................................................................................65
4.3.5 Digital I/O ....................................................................................................................65
4.3.6 Timers & Counters ......................................................................................................66
4.3.7 Stream Mode ..............................................................................................................68
4.3.8 Raw Output/Input........................................................................................................72
4.3.9 Easy Functions ...........................................................................................................72
4.3.10 Miscellaneous ...........................................................................................................73
4.4 Errorcodes........................................................................................................................75
5. Low-Level Function Reference ..............................................................................................78
5.1 General Protocol...............................................................................................................78
5.2 Low-Level Functions.........................................................................................................80
5.2.1 BadChecksum............................................................................................................80
5.2.2 ConfigU3 ....................................................................................................................81
5.2.3 ConfigIO.....................................................................................................................84
5.2.4 ConfigTimerClock ......................................................................................................86
5.2.5 Feedback ...................................................................................................................87
5.2.6 ReadMem (ReadCal) .................................................................................................95
5.2.7 WriteMem (WriteCal) .................................................................................................96
5.2.8 EraseMem (EraseCal) ...............................................................................................97
5.2.9 Reset..........................................................................................................................98
5.2.10 StreamConfig ...........................................................................................................99
5.2.11 StreamStart............................................................................................................101
5.2.12 StreamData............................................................................................................102
5.2.13 StreamStop ............................................................................................................103
5.3.14 Watchdog...............................................................................................................104
5.3.15 SPI .........................................................................................................................106
5.3.16 AsynchConfig.........................................................................................................108
5.3.17 AsynchTX...............................................................................................................109
5.3.18 AsynchRX ..............................................................................................................110
5.3.19 I2C .........................................................................................................................111
5.3.20 SHT1X ...................................................................................................................113
5.3 Errorcodes......................................................................................................................114
A. Specifications.......................................................................................................................116
B. Enclosure & PCB Drawings .................................................................................................119
v

Table Of Figures
Figure 1-1. LJControlPanel Main Window....................................................................................7
Figure 1-2. LJControlPanel U3 Configure Defaults Window ........................................................8
Figure 1-3. LJControlPanel U3 Test Window...............................................................................9
Figure 1-4. LJControlPanel Settings Window ..............................................................................9
Figure 1-5. Self-Upgrade Application .........................................................................................10
Figure 2-1. LabJack U3..............................................................................................................12
Table 2-1. Analog Input Pin Locations .......................................................................................13
Table 2-2. ConfigIO Factory Default Values .............................................................................14
Table 2-3. ConfigTimerClock Factory Default Values ................................................................14
Table 2-4. Positive Channel Numbers .......................................................................................15
Table 2-5. Negative Channel Numbers......................................................................................15
Table 2-6. Nominal Analog Input Voltage Ranges (DAC1 Disabled) .........................................16
Table 2-7. Calibration Constant Memory Locations ...................................................................16
Table 2-8. Fixed Point Conversion Examples ............................................................................17
Table 2-9. Nominal Analog Input Voltage Ranges (DAC1 Enabled)..........................................17
Figure 2-2. Non-Inverting Op-Amp Configuration ......................................................................20
Figure 2-3. Voltage Divider Circuit .............................................................................................21
Figure 2-4. Buffered Voltage Divider Circuit...............................................................................21
Figure 2-5. Current Measurement With Arbitrary Load or 2-Wire 4-20 mA Sensor ...................22
Figure 2-6. Current Measurement With 3-Wire 4-20 mA (Sourcing) Sensor .............................22
Figure 2-7. ±10 Volt DAC Output Circuit....................................................................................25
Figure 2-8. Driven Signal Connection To Digital Input ...............................................................26
Figure 2-9. Driven Signal Connection To Digital Input ...............................................................27
Figure 2-10. Basic Mechanical Switch Connection To Digital Input...........................................28
Figure 2-11. Passive Hardware Debounce ................................................................................28
Figure 2-12. Relay Connections (Sinking Control, High-Side Load Switching)..........................29
Table 3-1. Typical Feedback Function Execution Times (QuickSample=0, LongSettling=0) ....40
Table 3-2. Typical Feedback Function Execution Times (QuickSample=1, LongSettling=0) ....40
Table 3-3. Typical Feedback Function Execution Times (QuickSample=0, LongSettling=1) ....40
Table 3-4. Stream Performance.................................................................................................42
Table 3-5. Special Stream Channels .........................................................................................43
Table 4-1. Request Level Error Codes (Part 1)..........................................................................75
Table 4-2. Request Level Error Codes (Part 2)..........................................................................76
Table 4-3. Group Level Error Codes ..........................................................................................77
vi

1. Installation on Windows
It is recommended to install the software before making a USB connection to the LabJack U3.
The LabJack UD driver requires a PC running Windows 98, ME, 2000, or XP. For other
operating systems, go to labjack.com for available support, if any. Software will be installed to
the LabJack directory which defaults to c:\Program Files\LabJack\.
Check labjack.com for the latest software & drivers, but in order to install DAQFactory Express
the CD must be used before installing updates.
When the USB cable is connected from the PC to the U3, on a USB port that has not
enumerated a U3 before, Windows will bring up the add new hardware wizard. If this is the first
time a U3 has been enumerated on any port on the PC, use the “specify location” option and
browse to the appropriate driver folder. There is a folder for Windows 98/ME and another folder
for Windows 2000/XP. These folders are installed in:
c:\Program Files\LabJack\drivers\install\U3\
If a U3 has been enumerated on the PC before, but just not on this particular port, the “install
automatically” option can be used in the Windows new hardware wizard.
After installation of the software, run LJControlPanel to configure and test the unit. Then run
LJSelfUpgrade to check for newer firmware.
1.1 Control Panel Application (LJControlPanel)
The LabJack Control Panel application (LJCP.exe) handles configuration and testing of the U3.
Click on the “Find LabJacks” button to search for connected devices.
Figure 1-1. LJControlPanel Main Window
7

Figure 1-1 shows the results from a typical search. The application found one U3 connected by
USB. The USB connection has been selected in Figure 1-1, bringing up the configuration
window on the right side.
• Refresh: Reload the window using values read from the device.
• Write Values: Write the Local ID from the window to the device.
• Config. IO Defaults: Opens the window shown in Figure 1-2.
• Reset: Click to reset the selected device.
• Test: Opens the window shown in Figure 1-3.
Figure 1-2. LJControlPanel U3 Configure Defaults Window
Figure 1-2 shows the configuration window for U3 defaults. These are the values that will be
loaded by the U3 at power-up or reset. The factory defaults, as shown above, are all lines
configured as digital input.
Figure 1-3 shows the U3 test window. This window continuously (once per second) writes to
and reads from the selected LabJack.
8

Figure 1-3. LJControlPanel U3 Test Window
Selecting Options=>Settings from the main LJControlPanel menu brings up the window shown
in Figure 1-4. This window allows some features to of the LJControlPanel application to be
customized.
Figure 1-4. LJControlPanel Settings Window
9

• Search for USB devices: If selected, LJControlPanel will include USB when searching
for devices.
• Search for Ethernet devices using UDP broadcast packet: Does not apply to the U3.
• Search for Ethernet devices using specified IP addresses: Does not apply to the U3.
1.2 Self-Upgrade Application (LJSelfUpgrade)
The processor in the U3 has field upgradeable flash memory. The self-upgrade application
shown in Figure 1-5 programs the latest firmware onto the processor.
USB is the only interface on the U3, and first found is the only option for self-upgrading the U3,
so no changes are needed in the “Connect by:” box. There must only be one U3 connected to
the PC when running LJSelfUpgrade.
Click on “Get Version Numbers”, to find out the current firmware versions on the device. Then
use the provided Internet link to go to labjack.com and check for more recent firmware.
Download firmware files to the …\LabJack\LJSelfUpgrade\upgradefiles\ directory.
Click the Browse button and select the upgrade file to program. Click the Program button to
begin the self-upgrade process.
Figure 1-5. Self-Upgrade Application
If problems are encountered during programming, try the following:
1. Unplug the U3, wait 5 seconds then reconnect the U3. Click OK then press
program again.
10
Indice
Manuali Unità di controllo popolari di altre marche

Festo
Festo Compact Performance CP-FB6-E Manuale elenco delle parti

Elo TouchSystems
Elo TouchSystems DMS-SA19P-EXTME Manuale utente

JS Automation
JS Automation MPC3034A Manuale utente

JAUDT
JAUDT SW GII 6406 Series Guida rapida

Spektrum
Spektrum Air Module System Manuale utente

BOC Edwards
BOC Edwards Q Series Manuale utente











