VEE for LJM - Windows
A Keysight VEE example for the LJM library.
VEE is a graphical programming language, as demonstrated in the code snippet below, but understand that it is still a programming language, not a simple software tool.
Note that using a LabJack in VEE is not identical to using Keysight hardware in VEE. Keysight hardware interfaces with the "Instrument Manager," while LabJack hardware talks through the LJM driver. That means that you will not use the "Instrument Manager" or similar Keysight wizards.
Prerequisites
A T-series LabJack Device
LJM Library - Install the LJM Library
VEE 9.2 or newer - VEE is not free, see VEE Home Page
Operating system - Windows
Latest Example Package
Communication Basics
With the LJM library, pretty much everything you might want to do with a device is accomplished by writing and/or reading some registers. Look at the T-series Datasheet or the Modbus Map to determine what registers you need to write and read, then use eWriteName (or eWriteNames) to write the desired registers and eReadName (or eReadNames) to read the desired registers.
Instructions
Go to your device Quickstart Tutorial and follow the steps to install LabJack software and confirm basic operation.
Download/extract the .zip file attached at the top of this page.
Navigate to the extracted VEE_LJM root directory.
Copy LabJackM_VEE.h into your LabJack drivers folder. e.g.: C:\Program Files (x86)\LabJack\Drivers
Open any example files. The code snippet below is eReadName.
Currently developed and tested on Windows only.
Code Snippet
This example uses 5 calls to the LJM library:
LJM_OpenS specifies which device you want to open and returns a handle for that device.
LJM_GetHandleInfo returns information about the device we just opened.
We pass a register name to LJM_eReadName and it reads the value of that register. In this case we are reading the register named "SERIAL_NUMBER" which returns the serial number of the device. For more names refer to the T-Series Datasheet or Modbus Map.
LJM_Close closes the connection to the device so it is available to other processes.
LJM_ErrorToString converts the numeric error code to a readable string.
Note that Keysight used to be Aligent Technologies, so this download may contain references to Aligent.
File List
VEE_LJM_2014_07_16.zip contains:
LabJackM_VEE.h
ReadMe.txt
VEE-Code-Snippet.png
Examples\LJM_eAddresses Example.vee
Examples\LJM_eNames Example.vee
Examples\LJM_eReadAddress Example.vee
Examples\LJM_eReadAddresses Example.vee
Examples\LJM_eReadName Example.vee
Examples\LJM_eReadNames Example.vee
Examples\LJM_eWriteAddress Example.vee
Examples\LJM_eWriteAddresses Example.vee
Examples\LJM_eWriteName Example.vee
Examples\LJM_eWriteNames Example.vee
Examples\AIN\Dual AIN Loop.vee
Examples\AIN\Single AIN with config.vee
Examples\AIN\Single AIN.vee
Examples\Config\Read Config.vee
Examples\Config\Read DeviceName String.vee
Examples\Config\Write DeviceName String.vee
Examples\Config\Write Power Config.vee
Examples\DIO\Single DIO Read.vee
Examples\DIO\Single DIO Write.vee
Examples\Ethernet\Read Ethernet Config.vee
Examples\Ethernet\Read Ethernet MAC.vee
Examples\Ethernet\Write Ethernet Config.vee
Examples\I2C\I2C EEPROM Read.vee
Examples\I2C\I2C EEPROM Write-and-Read.vee
Examples\I2C\I2C EEPROM Write.vee
Examples\SPI\SPI.vee
Examples\Stream\Stream Basic.vee
Examples\Watchdog\Read Watchdog Config.vee
Examples\Watchdog\Write Watchdog Config.vee
Examples\WiFi\Read WiFi Config.vee
Examples\WiFi\Write WiFi Config.vee
functions\LJM.vbl.vee