VEE for LJM - Windows | LabJack
 
« Close

Datasheets and User Guides

App Notes

Software & Driver

 

VEE for LJM - Windows

LJM VEE Examples Top (Referencable)


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.

Keysight VEE Quick Start

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

LJM Examples Where Is An Example To Do XYZ Minimal (Referencable)

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 device's datasheet (T7 or T4) 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.

LJM VEE Examples Bottom (Referencable)

Instructions

  1. Go to the T4 or T7 Quickstart Tutorial and follow the steps to install LabJack software and confirm basic operation.
  2. Download/extract the .zip file attached at the top of this page.
  3. Navigate to the extracted VEE_LJM root directory.
  4. Copy LabJackM_VEE.h into your LabJack drivers folder. e.g.: C:\Program Files (x86)\LabJack\Drivers
  5. 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:

  1. LJM_OpenS specifies which device you want to open and returns a handle for that device.
  2. LJM_GetHandleInfo returns information about the device we just opened.
  3. 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 T4 or T7 Datasheet or Modbus Map.
  4. LJM_Close closes the connection to the device so it is available to other processes.
  5. 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

2 comments

hanswennerstrom22's picture

I am using Vee and so far I am very happy with the LabJack. Loaded the Vee library and it worked as expected, no issues. The examples are all that I needed to complete about 95% of the coding, but I have a few minor issues. I am using the FIO4 output to drive a stepper motor contoller. The issue is that the software and laptop and the USB does not output a fast enough pulse train to get the stepper motor up to the desired RPM. So how do you control a timer and the output through the Vee program? I didn't see any expamples of this, so I am not sure of the library includes this functionality, or I am missing something?

I wrote a simple Lau script in Kipling, which does work and gets me the desired RPM. How do I load the Lau script and execute it from the Vee software? I normally need to control the T4 from the laptop, and then intermittently need the Lau script to run and output a certain number of pulses at a high speed, so how do I get it to do that using Vee?

 

LabJack Support's picture

To set up and use the timer features in Vee you would need to do configuration with some eWriteName, eWriteAddress, etc. calls similar to the configurations done in Lua. Communication overhead will limit how quickly you can update the timer feature in Vee, so Lua is still the ideal option if you need to update the feature quickly. See our Pulse Out feature page:

https://labjack.com/support/datasheets/t-series/digital-io/extended-feat...

In the Lua script debugger of Kipling, you could click the "Save Script to Flash" button to save your script to the device, then start the script in Vee by writing the value "1" to the register LUA_RUN. You could also send control flags to Lua from Vee using the USER_RAM registers:

https://labjack.com/support/datasheets/t-series/lua-scripting#user-ram