Skip to Navigation

U6

Everything tagged "U6"

HMC6352 Magnetometer - I2C (App Note)

 

This AppNote explains the operation and use of the I2C functionality of our LabJack devices with special regards to the Honeywell HMC6352 Magnetometer.  

tags:

Comments

No comments yet. Speak up. We're listening.

Modbus

DASYLab began offering support for Modbus TCP in version 11 service pack 1. The UE9 natively supports this protocol when connected over Ethernet.  With our continued work on LJSocket, any program capable of Modbus TCP can communicate with UD family devices over USB. Since DASYLab provides built in support for analog and digital I/O through this convenient protocol, we suggest that our clients utilize those native modules if possible. However, please note that Modbus does not expose some of our devices' more advanced functionality, particularly stream mode.

UE9 over Ethernet: Modbus over Ethernet will require version 1.41 of the communications firmware and version 2.04 of the control firmware. However, we suggest that you use more recent releases if possible. We conducted our testing with version 1.50 and 2.18 of the communication and control firmware respectively. As of this writing, both of these releases are in beta and, thus, we provide these versions on our beta firmware page. More information on firmware upgrades can be found on our firmware page.

Any UD Family Device over USB with LJSocket: Please refer to our LJSocket documentation.

File attachment: 
tags:

Comments

No comments yet. Speak up. We're listening.

UD Setup V3.15

This is an archived version of the LabJack Universal Driver(UD). If you would like the latest version, please get it from here.

This driver supports the U3, U6, and UE9. This install includes drivers, documentation, and the utility applications LJControlPanel and LJSelfUpgrade. August 12, 2009, 10.3 MB, Windows XP/Vista/7 32-bit.

The utility applications LJControlPanel and LJSelfUpgrade require the .NET framework available for free from Microsoft. The installer above will detect whether .NET framework V1.1 is installed, and if not will download and install it (~22 MB).

If you need a different version of the UD driver or use 64-bit architecture, please visit this support page.

File attachment: 

UD Setup Barebones

This is a barebones installer for the LabJackUD driver that people who distribute software that uses a LabJack can use.  It currently installs the WinUSB hardware driver, the LabJackUD.dll software driver and will also have an option to support the LJUDDotNet.dll component. 

This is still in development.  Currently, you should uninstall all other LabJack installations before testing it (it will prompt if not).  

There are two versions.  The only difference between the two is that the silent version has no GUI at all, thus it will display no dialogs, but will return a value of zero on success and non-zero on error.  Both these .exes can be called from your own installer.

If you would like any changes made or run into any problems please let us know at support@labjack.com.

LJFuse now supports Timers and Counters

There’s been some interesting uses of LJFuse in the forum, which has spurred the motivation to advance LJFuse to the next level. Starting today, the latest version of LJFuse can access timers and counters. It’s not a trivial as the rest of LJFuse, so we’re putting the instructions in an Advanced LJFuse section, but “advanced” in this context means only advanced relative to the rest of (simple) LJFuse. It’s easy once you know the right Modbus registers to use. Here’s an example of reading Counter 0:

  
# Register 50502 is a bitfield of which counters to enable
# This enables Counter 0
$ echo 1 > 50502
# Create the file for register 7300
$ touch 7300
# Register 7300 is the number of counts on Counter 0
$ cat 7300
0          
# Tap GND to FIO4 to generate counts
$ cat 7300
52         
# More counts
$ cat 7300
113
  

So try it out, and if there’s more interest we’ll make LJFuse even better.

tags:

Advanced LJFuse: Timers and Counters with Modbus

This is an advanced section. Visit it only after you’ve outgrown the material on the LJFuse page.

Requirements

This section requires LJFuse created on 9/16/2010 or later.

Timers and Counters with Modbus

In this section, we will use LJFuse with the timers and counters on a U3. By default, LJFuse does not provide an interface to timers and counters. There are no connections for them in the connection/ subdirectory, and there are no Modbus addresses for them in the modbus/ directory. What we will do in this section is create the files in the modbus/ directory for the necessary Modbus registers. While working through this section, you’ll need a copy of the LabJack Modbus Map:

http://labjack.com/support/modbus

open in a new window.

Accessing the Modbus directory

All the commands in this section work only in the modbus/ subdirectory of a device, so go there first.

  
# Change to the modbus/ directory
$ cd root-ljfuse/My\ U3-LV/modbus/
$ pwd
/Users/mikec/src/LJFuse/root-ljfuse/My U3-LV/modbus
# View the Modbus registers
$ ls
0           5002        6002        6006        6102        6106
2           6           6003        6007        6103        6107
4           6000        6004        6100        6104        README.txt
5000        6001        6005        6101        6105
  

Using the counters

Looking at the LabJack Modbus Map (you do have that open, right?), notice that register 50502 is a “Counter Mask”. We can write to that register to enable a counter.

But wait, look at the output of “ls” above. There is no file for 50502. This is the key point of this whole section:

In the modbus/ directory, you may create files for the Modbus addresses that are missing.

p.

Comments

No comments yet. Speak up. We're listening.

CINs are out, Call Library Function Nodes are in!

Two months ago we documented how to create and use Code Interface Nodes (CINs) for LabVIEW on Mac OS X and Linux. It’s a great way to call C code that uses the Exodriver, but we discovered that LabVIEW 2010 does not support CINs. In this post, we describe how we migrated our CIN work to Call Library Function nodes.

We created a library (a .framework on Mac OS X and a .so on Linux), which is now the preferred way to access LabJack devices from LabVIEW on Mac OS X and Linux. The result is really better than the old, CIN-based way. You can find the finished product on the LabVIEW on Mac OS X and Linux support page.

Here’s how we built the library.

Make a Mac OS X Framework

1. Start a new project using Xcode, and select “Cocoa Framework” from the “Framework & Library Section”

2. After you’ve given your project a name, right click on the project, and select “Get Info”

3. In the section labeled “Architectures”, find the sub-section called Architectures and select “Other…” from the pull down menu. Enter “i386” as the new value.

4. Make sure the “Base SDK” subsection has your OS selected. In my case, “Mac OS X 10.6”.

5. Changed the “Valid Architectures” to “i386”

6. In the section “Linking”, find the subsection “Other Linker Flags” and set it to “-llabjackusb -llabviewcin -llvexports -lc”

7. In the section “Search Paths”, change the “Header Search Paths” sub-section to have “/usr/local/include” and the path to the cintools directory.

tags:

Comments

No comments yet. Speak up. We're listening.

U6 Firmware

These firmware files require LJSelfUpgrade V1.21 or higher in order to upgrade the U6, which is included with the labjack installer.

U6 Firmware Revision History

1.39: Modified U6_Stream_ReadSample to handle extended channels. Added a function to load more than 25 stream channels. Using the LED IO type will now disable automatic LED operations. The L2L interrupt for timer 1 will no longer disable TMR3.

1.35: Analog channels 64 and above will now set the MIO lines properly. Changed the way digital IO are updated to prevent 2-10us output-high blips during startup. Added an idle check to I2C. Fixed a timing problem with 1-wire reads. Changed stream auto recover to cease operation when there is less than 1 packet worth of data in the buffer, was previously 2 packets. Added modbus feedback function (for internal testing), added modbus I2C. Attempted to elimate errors while reading the system timer through stream. I2C will now return ACK information when only reading. Only one ack for the address will be reported, even when the address needs to be transmitted twice. Improved timer reads in stream mode.

Older Versions

1.26: Fixed a problem that could cause random command-response time variances. Fixed a problem that was causing the extended muxing system to control MIO lines when using special channels.

1.24: Enabled special channels though feedback IO_Type 1. Fixed a problem that was causing the analog multiplexers to not be set correctly after reading a special channel when using a resolution of 1 or above. Fixed a problem that was causing the U6 to use resolution settings one higher then requested, only affected pro resolutions (9 and above).

File attachment: 
tags:

Comments

No comments yet. Speak up. We're listening.

LJFuse (File I/O Interface)

LJFuse makes communicating with a LabJack device simple on Linux and Mac OS X. Really simple. Trivial, really.

Introduction

It’s been said (many, many, times) that everything’s a file in UNIX. LJFuse adopts that philosophy and makes the connections on a LabJack device into files on the filesystem. To do so, it uses FUSE on Linux and MacFUSE on Mac OS X.

For example, to read analog input AIN0, read a file named “AIN0”.

  
$ cat MyU6/connection/AIN0
3.300
  

To set DAC0 to 2.4V, write “2.4” to a file named “DAC0”.

  
$ echo 2.4 > MyU6/connection/DAC0
$ cat MyU6/connection/DAC0   # Read the DAC0 to verify it was set
2.400
  

To set FIO0 to digital output high, write a “1” to “FIO0”.

  
$ echo 1 > MyU6/connection/FIO0-dir  # Set the direction to output
$ echo 1 > MyU6/connection/FIO0      # Set the state to output high
$ cat MyU6/connection/FIO0           # Read the value back
1    
  

You can do this from any program that knows how read and write files. Your program doesn’t need to know about USB communication, drivers, or the LabJack API. The details are hidden by LJFuse.

Quickstart

Check the requirements (in short, a working LabJackPython installation on Linux or Mac OS X), and download the source code for LJFuse from GitHub. Click the “ZIP” or “Download Source” button on the GitHub page to download.

Connect a LabJack and run LJFuse like this:

  
$ python ljfuse.py
  

p.