Skip to Navigation

Windows

5.2.4 - IP Address Filter

Sets a list of up to five IP addresses that are the only IP addresses that can connect to the UE9. Any unused Addresses can be set to 0xFFFFFFFF (255.255.255.255). If IP #0 is set to 0xFFFFFFFF than the feature is disabled and any IP address can connect.

  • Write: Set to non-zero if new values should be updated. Pass 0×00 if only reading. A value of non-zero will only work if the command is sent via USB.
  • IP #0: First IP address allowed to connect. A value of 0xFFFFFFFF disables feature.
  • IP #1: Second IP address allowed to connect.
  • IP #2: Third IP address allowed to connect.
  • IP #3: Fourth IP address allowed to connect.
  • IP #4: Fifth IP address allowed to connect.

Comments

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

Python Examples (LJM Library)

Cross-platform (Windows, Mac OS X and Linux) Python wrapper and examples for the LJM library. Refer to the package's README.TXT file for requirements, installation, documentation and license information.

Currently has untested Mac OS X and Linux support.

Last updated 04/18/2013.

File attachment: 

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 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.

64-bit LabJackUD.dll (Outdated)

This is an old version of the driver that is no longer necessary. The current LabJack Installer includes both 32-bit and 64-bit versions of everything needed for both 32-bit and 64-bit applications.

This is a beta of a 64-bit version of the LabJackUD.dll and can be used with 64-bit applications runing on 64-bit versions of Windows. However, it is not required for 64-bit versions of Windows since those will run 32-bit applications. All 64-bit applications using the LabJackUD driver will require this version. This includes the 64-bit versions of MATLAB and LabVIEW as well as applications you write.

To install, simply unzip and place the LabJackud.dll and and LabJackWUSB.dll files into the C:\windows\system32 folder, which is where Windows stores 64-bit .dlls.

Currently, there are some limitations with how pointers and arrays are handled. These will be cleared up in a future version. For now this version should work fine on systems with less than 4 GB of memory.

Since this is still strongly in development, if you run into any issues with it please let us know so they can be addressed.
File attachment: 

LJSelfUpgrade

The processor in the UD series devices have field upgradeable flash memory. The self-upgrade application shown in Figure 1-5 programs the latest firmware onto the processor. The figure below demonstrates the self-upgrad process for the U6. There can only be one target LabJack device 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

LJSelfUpgrade.exe, V1.28, July 25, 2011 (newer than version in UD installer V3.25)

LJSelfUpgrade is a Windows application to program new firmware onto a UD series LabJack's processor.  LJSelfUpgrade is normally installed by the UD installer, but this web page always has the current version (which might be newer).

The unzipped executable is ready to run.  To overwrite the version installed by the UD software installer, copy the executable to the "C:\Program Files\LabJack\LJSelfUpgrade" directory (default install location).

The latest firmware files are located on the firmware page.

Version 1.28 Notes:

File attachment: 

DASYLab

We currently offer two options for communicating with DASYLab. If you are can use version 11 or higher, we strongly suggest that you use Modbus to communicate with your device.

The other option is LabJackDASY, which is very rough.  This alpha-release was done with the old style Dasylab DDK, but our next release will be done with the extension toolkit which requires Dasylab 9+.

 

 

tags:

LJSocket (TCP Interface)

LJSocket provides a socket interface to a LabJack. It’s one of many ways to communicate with a USB LabJack over Ethernet or WiFi. Using LJSocket, anything that you could write to a LabJack over USB, you can now write over a TCP socket. This allows, for example, to send Modbus TCP packets to a U3 or U6. (The UE9 natively supports Modbus TCP over its Ethernet interface.)

Even without using Modbus, LJSocket is useful because a socket interface is easier than a USB interface. Any software or programming language that can communicate using sockets (e.g., LabVIEW or Python) can communicate with a LabJack without any drivers or knowledge about USB.

Because it uses TCP sockets, network transparency is built into LJSocket. You can plug a LabJack into a remote computer and access it from another.

In this picture, a Chumby is running LJSocket, and making the U3 available over the WiFi network.

LabJack U3 connected to Chumby

The source code for LJSocket is available on GitHub. If you use Windows there is an executable attached to the bottom of this page.

If you use Python to talk to LJSocket, start LJSocket on one computer (IP address 192.168.1.2 in this example) connect a U3, and on another computer on the local network, run this code:

  
>>> import u3
>>> d = u3.U3(LJSocket = "192.168.1.2:6000")
>>> d.configU3()
  

and it would be just like your U3 was connected locally.

h3.

4.3.7.1 - Stream DAC

Stream DAC is a feature where the DACs (digital-to-analog outputs or analog outputs) are updated by hardware in each stream scan.  A buffer for each DAC (DAC0 and/or DAC1) is loaded with 1-128 values, and the UE9 steps through the buffer(s) updating the DAC(s) with each stream scan.

Requires UD driver V3.06+ and UE9 Control firmware V1.93+.

The DAC updates are done in addition to a normal input stream, so at least 1 input channel must be streamed.

There is one IOType to enable/disable this feature and load a buffer:

LJ_ioADD_STREAM_DAC  //Channel= channel (0 or 1). Value= number of updates (0-128). x1= array of doubles.

Typical pseudocode would look like the following:

ePut(lngHandle, LJ_ioADD_STREAM_DAC, dacNum, numUpdates, padblUpdates);

The Channel parameter of the ePut call is 0 or 1 to specify DAC0 or DAC1 (two calls are used if both DACs are to be streamed). The Value parameter specifies the number of updates in the buffer. The x1 parameter is an array with that many doubles.

Note that LJ_ioCLEAR_STREAM_CHANNELS does not affect Stream DAC. Rather, to disable a call like above must be made for each enabled DAC with numUpdates=0.

If the special channel LJ_chDAC_BINARY has been used to specifiy that binary updates will be passed for the DACs, that is supported with this Stream DAC feature, and the binary updates are still passed in the array of doubles.

A little trick in C:  Since the x1 parameter is just defined as a long, cast the pointer to the array as a long and pass that for x1:

double adblUpdates[128] = {0};
long padblUpdates = (long)&adblUpdates[0];
tags:

Comments

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

UE9 Modbus TCP Example

The UE9 natively supports Modbus TCP. Check the Modbus map for a list of addresses to send. This is an example using LabJackPython of what bytes to send on the wire to talk to the UE9 over Modbus TCP:

  
>>> import ue9
>>> d = ue9.UE9(ipAddress =  "192.168.1.209", ethernet = True)
>>> d.debug = True
>>> d.readRegister(0)  #Reads AIN0
Sending:  [0, 0, 0, 0, 0, 6, 255, 3, 0, 0, 0, 2]
Response:  [0, 0, 0, 0, 0, 7, 255, 3, 4, 59, 97, 232, 0]
0.0034470558166503906
>>> d.writeRegister(5000, 3.3)    #Sets DAC0 to 3.3 V
Sending:  [0, 0, 0, 0, 0, 11, 255, 16, 19, 136, 0, 2, 4, 64, 83, 51, 51]
Response:  [0, 0, 0, 0, 0, 6, 255, 16, 19, 136, 0, 2]
3.2999999999999998
>>> d.readRegister(0)    #Reads AIN0 again
Sending:  [0, 0, 0, 0, 0, 6, 255, 3, 0, 0, 0, 2]
Response:  [0, 0, 0, 0, 0, 7, 255, 3, 4, 64, 83, 52, 90]
3.3000702857971191
  

In the example above, each line that starts with “Sending” contains the bytes that the PC sends to the UE9. The “Response” lines contain what the UE9 sent back to the PC.

Comments

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