The downloadable zip file "LabVIEW_LJM.zip" extracts to a single folder called "LabVIEW_LJM" which contains a few subfolders. The folder can be stored anywhere, but if you want icons to show up on the LabVIEW function palette (after restarting LabVIEW), place this folder under ...\national instruments\labview #\vi.lib\addons\ (create the addons folder if it does not exist). Be sure the folder containing our LabVIEW functions is named "LabVIEW_LJM" when added to the LabVIEW addons folder or else the icons may not load properly. If you just see question marks, see this forum topic.
Many people, including us, do not use the palette icons but rather just copy paste from examples and use the "Select a VI..." balloon from the function palette. In that case you can put the LabVIEW_LJM folder wherever you want.
We recommend not having more than one copy of the VIs, and not changing these VIs. If you want to make your own variation of one of the examples, make a copy in a different location and modify that.
If you download new VIs from labjack.com, delete and replace the entire LabVIEW_LJM folder.
The \Functions folder contains simple VIs that do little more than call functions from LJM. Most of these need a valid Handle input so are intended to be sub-VIs not standalone top level VIs.
The \LVUtilities folder contains VIs that encapsulate some useful functions. These are used by other VIs from the \Functions\ and \Examples\ folders to handle things unique to LabVIEW.
The \Examples\Basics folder contains core examples that demonstrate the basics of interfacing LabVIEW with our LJM library. Included here is the very useful "Read Write Loop with Config.vi" example which forms the basis for most customer applications. Use the device datasheet (and/or Modbus Map) to determine what registers you need to write and read and the plug those register names into "Read Write Loop with Config.vi".
The \Examples\More folder has many more examples that demonstrate specific tasks. Some of these demonstrate unique techniques, but many are simply variations of the "Write Read Loop with Config.vi" example with different default register names and values.
The \LJLogM and \LJStreamM folders contain the source code for those sample programs. The executable versions (.exe) are part of the main LabJack software installer for Windows. Advanced LabVIEW programmers might find this source code useful, but most users are better off starting with a more basic example.

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 T7 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.
6000 is added to the LabJack errorcodes to shift them into the LabVIEW user range of 5000-9999. For example, if the open call cannot find the device you requested it will return LabVIEW-LJM errorcode 7227, which is LabJack-LJM errorcode 1227. Many errorcodes are listed in Section 4 of the LJM User's Guide, but no need to look there for the basic string as every LabVIEW program should use LJM_ErrorToString.vi to convert the errorcode to a readable string.
All sub-VIs, which means everything in the Functions and LVUtilities folders, are set to reentrant execution. In older versions of LabVIEW, debugging is not allowed when reentrant is enabled, so debugging is disabled in all sub-VIs.
To allow debugging in sub-VIs in older LabVIEW, you will have to disable reentrent execution. Go to File => VI Properties, set Category = Execution, un-check Reentrant execution, and check Allow debugging. In newer versions of LabVIEW, you can enable debugging with reentrant enabled.
**Note**: 2 substantial changes were made to the LabVIEW_LJM archive with the 2015_01_23 release:
1. In LJM function call VIs that have the NumFrames parameter, that parameter is now optional with a default value of -1 which means "Auto-Detect the Number of Frames". If you do not wire anything to NumFrames, or pass -1, this signals the VI to use the size of aNames or aAddresses to determine the number of frames. This should not break any code using previous versions of these VIs.
2. A few changes were made to the inputs & outputs of LJM_eStreamStart.vi, and these changes will break code using a previous version of this VI. See the front panel of LJM_eStreamStart.vi for more details.
LabVIEW_LJM_2020_01_27.zip contains:
dir.mnu
readme.txt
Examples\Basics\eNames Loop.vi
Examples\Basics\eReadName Multiple Call Loop.vi
Examples\Basics\eReadNames Loop.vi
Examples\Basics\LJM_eAddresses Example.vi
Examples\Basics\LJM_eNames Example.vi
Examples\Basics\LJM_eReadAddress Example.vi
Examples\Basics\LJM_eReadAddresses Example.vi
Examples\Basics\LJM_eReadName Example.vi
Examples\Basics\LJM_eReadNames Example.vi
Examples\Basics\LJM_eWriteAddress Example.vi
Examples\Basics\LJM_eWriteAddresses Example.vi
Examples\Basics\LJM_eWriteName Example.vi
Examples\Basics\LJM_eWriteNames Example.vi
Examples\Basics\Write Read Loop with Config with Constants.vi
Examples\Basics\Write Read Loop with Config.vi
Examples\Basics\WriteReadLoopWithConfig.bld
Examples\More\1-Wire\1-Wire-Read.vi
Examples\More\1-Wire\1-Wire-Search.vi
Examples\More\1-Wire\1-Wire-Write.vi
Examples\More\1-Wire\1-Wire.vi
Examples\More\AIN\Dual AIN Loop.vi
Examples\More\AIN\Read Multiple AIN.vi
Examples\More\AIN\Single AIN with config.vi
Examples\More\AIN\Single AIN.vi
Examples\More\AIN EF\AIN EF Config Tool for build.vi
Examples\More\AIN EF\AIN EF Config.vi
Examples\More\AIN EF\AIN EF Read Values.vi
Examples\More\AIN EF\AINEFConfigTool.bld
Examples\More\App-Notes\Rotary-Encoder\Quadrature-Input.vi
Examples\More\App-Notes\Rotary-Encoder\Quadrature_Input_Example_Application.bld
Examples\More\App-Notes\Rotary-Encoder\Quadrature_Input_Example_Application.vi
Examples\More\App-Notes\Rotary-Encoder\README.md
Examples\More\App-Notes\stepper-motor-control\LJ_Stepper_Data.txt
Examples\More\App-Notes\stepper-motor-control\Lua_Load_And_Start.vi
Examples\More\App-Notes\stepper-motor-control\stepper-controller-with-reads.vi
Examples\More\App-Notes\stepper-motor-control\stepper-motor-controller-app.vi
Examples\More\App-Notes\stepper-motor-control\stepper-steps.csv
Examples\More\App-Notes\stepper-motor-control\StepperController.vi
Examples\More\App-Notes\stepper-motor-control\Stepper_Config.txt
Examples\More\Asynch\Asynch.vi
Examples\More\Config\Cal Constants Array to Cluster.vi
Examples\More\Config\Cal Constants Cluster to Array.vi
Examples\More\Config\cc.txt
Examples\More\Config\Read Cal Constants.vi
Examples\More\Config\Read Config.vi
Examples\More\Config\Read DeviceName String.vi
Examples\More\Config\T7 Cal Constants Tool.vi
Examples\More\Config\T7CalConstantsTool.bld
Examples\More\Config\Write DeviceName String.vi
Examples\More\Config\Write Power Config.vi
Examples\More\DIO\Single DIO Read.vi
Examples\More\DIO\Single DIO Write.vi
Examples\More\DIO EF\DIO EF Config & Read 10 Counters Loop.vi
Examples\More\DIO EF\DIO EF Config 1 Pulse Out.vi
Examples\More\DIO EF\DIO EF Config 1 PWM and 1 Counter.vi
Examples\More\DIO EF\DIO EF Config 1 PWM Output.vi
Examples\More\DIO EF\DIO EF Config 2 Frequency Inputs.vi
Examples\More\DIO EF\DIO EF Config FIO0-3.vi
Examples\More\DIO EF\DIO EF Frequency Output.vi
Examples\More\DIO EF\DIO EF Line-to-Line with Constants.vi
Examples\More\DIO EF\DIO EF Read FIO0-3.vi
Examples\More\DIO EF\DIO0 EF Config & Read.vi
Examples\More\Ethernet\Read Ethernet Config.vi
Examples\More\Ethernet\Read Ethernet MAC.vi
Examples\More\Ethernet\TCPOpenTesting.bld
Examples\More\Ethernet\TCPOpenTesting.vi
Examples\More\Ethernet\Write Ethernet Config.vi
Examples\More\Ethernet\UD Calls\LJUD_Close.vi
Examples\More\Ethernet\UD Calls\LJUD_ErrorToString.vi
Examples\More\Ethernet\UD Calls\LJUD_OpenLabJackS.vi
Examples\More\I2C\I2C EEPROM Read.vi
Examples\More\I2C\I2C EEPROM Write-and-Read.vi
Examples\More\I2C\I2C EEPROM Write.vi
Examples\More\I2C\I2C LJTick-DAC DACA.vi
Examples\More\I2C\I2C Utility\I2C Utility Example EEPROM Read.vi
Examples\More\I2C\I2C Utility\I2C Utility Example EEPROM Repeat.vi
Examples\More\I2C\I2C Utility\I2C Utility Example EEPROM Write-and-Read.vi
Examples\More\I2C\I2C Utility\I2C Utility Example EEPROM Write.vi
Examples\More\I2C\I2C Utility\I2C Utility.vi
Examples\More\Misc\Buffer read loop.vi
Examples\More\Misc\Lots of Software Counters - T7.vi
Examples\More\Misc\Multiple T7 Loop.vi
Examples\More\Misc\Pulse Generation Using WAIT.vi
Examples\More\Misc\Read Write Loop with Connection Healing.vi
Examples\More\Misc\Parallel Execution\Parallel Execution A.vi
Examples\More\Misc\Parallel Execution\Parallel Execution B.vi
Examples\More\Misc\Parallel Execution\Parallel Execution.vi
Examples\More\SPI\SPI.vi
Examples\More\Stream\Stream Basic with autorestart.vi
Examples\More\Stream\Stream Basic with C-R Write.vi
Examples\More\Stream\Stream Basic with Config.vi
Examples\More\Stream\Stream Basic with Stream-Out.vi
Examples\More\Stream\Stream Basic with Waveform Data Type.vi
Examples\More\Stream\Stream Basic.vi
Examples\More\Stream\Stream Low Latency.vi
Examples\More\Stream\Stream No Loop.vi
Examples\More\Stream\Stream Sequential AIN.vi
Examples\More\Stream\Stream with External Scan Clock - T7.vi
Examples\More\Stream\Stream with FFT.vi
Examples\More\Stream\StreamBasic.bld
Examples\More\Stream\StreamWithFFT.bld
Examples\More\Testing\AIN Noise Test.bld
Examples\More\Testing\AIN Noise Test.vi
Examples\More\Testing\AIN-EF Speed Test.vi
Examples\More\Testing\C-R Speed Test AIN eAddresses.vi
Examples\More\Testing\C-R Speed Test AIN eNames LJMIntervals.vi
Examples\More\Testing\C-R Speed Test AIN eNames LVTiming.vi
Examples\More\Testing\C-R Speed Test AIN eNames.vi
Examples\More\Testing\C-R Speed Test eWriteAddresses.vi
Examples\More\Testing\Stream Scan Timing Demonstration.vi
Examples\More\Testing\Stream with autorestart and data checking.vi
Examples\More\Testing\StreamAutorestart.bld
Examples\More\Testing\Test for Floating AIN.vi
Examples\More\Testing\Write Read Loop with Config Speed Test eNames.bld
Examples\More\Testing\Write Read Loop with Config Speed Test eNames.vi
Examples\More\Watchdog\Read Watchdog Config.vi
Examples\More\Watchdog\Write Watchdog Config.vi
Examples\More\WiFi\Read WiFi Config.vi
Examples\More\WiFi\Read WiFi MAC.vi
Examples\More\WiFi\Read WiFi RSSI.vi
Examples\More\WiFi\Write WiFi Config.vi
Functions\LJM_AddressesToMBFB.vi
Functions\LJM_CleanInterval.vi
Functions\LJM_Close.vi
Functions\LJM_CloseAll.vi
Functions\LJM_eAddresses2D.vi
Functions\LJM_eNames2D.vi
Functions\LJM_eReadAddress.vi
Functions\LJM_eReadAddressArray.vi
Functions\LJM_eReadAddresses.vi
Functions\LJM_eReadName.vi
Functions\LJM_eReadNameArray.vi
Functions\LJM_eReadNames.vi
Functions\LJM_eReadNameString.vi
Functions\LJM_ErrorToString.vi
Functions\LJM_eStreamRead2D.vi
Functions\LJM_eStreamStart.vi
Functions\LJM_eStreamStop.vi
Functions\LJM_eWriteAddress.vi
Functions\LJM_eWriteAddressArray.vi
Functions\LJM_eWriteAddresses.vi
Functions\LJM_eWriteName.vi
Functions\LJM_eWriteNameArray.vi
Functions\LJM_eWriteNames.vi
Functions\LJM_eWriteNameString.vi
Functions\LJM_GetHandleInfo.vi
Functions\LJM_GetHostTick32Bit.vi
Functions\LJM_IPToNumber.vi
Functions\LJM_ListAllS.vi
Functions\LJM_LoadConstants.vi
Functions\LJM_MACToNumber.vi
Functions\LJM_NamesToAddresses.vi
Functions\LJM_NameToAddress.vi
Functions\LJM_NumberToIP.vi
Functions\LJM_OpenS.vi
Functions\LJM_ReadLibraryConfigS.vi
Functions\LJM_ReadLibraryConfigStringS.vi
Functions\LJM_ReadRaw.vi
Functions\LJM_StartInterval.vi
Functions\LJM_TCVoltsToTemp.vi
Functions\LJM_WaitForNextInterval.vi
Functions\LJM_WriteLibraryConfigS.vi
Functions\LJM_WriteLibraryConfigStringS.vi
Functions\LJM_WriteRaw.vi
Functions\Sub\LJM_eAddresses.vi
Functions\Sub\LJM_eNames.vi
Functions\Type Converters\LJM_ByteArrayToFLOAT32.vi
Functions\Type Converters\LJM_ByteArrayToINT32.vi
Functions\Type Converters\LJM_ByteArrayToUINT16.vi
Functions\Type Converters\LJM_ByteArrayToUINT32.vi
Functions\Type Converters\LJM_FLOAT32ToByteArray.vi
Functions\Type Converters\LJM_INT32ToByteArray.vi
Functions\Type Converters\LJM_UINT16ToByteArray.vi
Functions\Type Converters\LJM_UINT32ToByteArray.vi
LJLogM\LJLogM.bld
LJLogM\LJLogM.vi
LJLogM\LJLogM_2.ico
LJLogM\sub\change working directory.vi
LJLogM\sub\get app name.vi
LJLogM\sub\get user directory.vi
LJLogM\sub\get working directory - no dialog.vi
LJLogM\sub\get working directory.vi
LJLogM\sub\LJM read open config.vi
LJLogM\sub\Quit LabVIEW if Executable.vi
LJStreamM\LJStreamM.bld
LJStreamM\LJStreamM.vi
LJStreamM\LJStreamM_2.ico
LJStreamM\sub\Internet Version Check.vi
LJStreamM\sub\LJstreamM apply formula to array.vi
LJStreamM\sub\LJstreamM process data.vi
LJStreamM\sub\LJstreamM tc formula handler.vi
LJStreamM\sub\LJstreamUD add data to file.vi
LJStreamM\sub\LJstreamUD apply formula in tc.vi
LJStreamM\sub\LJstreamUD build header string.vi
LJStreamM\sub\LJstreamUD data file write.vi
LJStreamM\sub\LJstreamUD exec SignedMSWLSW.vi
LJStreamM\sub\LJstreamUD get file name.vi
LJStreamM\sub\LJstreamUD globals.vi
LJStreamM\sub\LJstreamUD graph processing.vi
LJStreamM\sub\LJstreamUD parse formula.vi
LJStreamM\sub\LJstreamUD prepare custom formula.vi
LJStreamM\sub\LJstreamUD read config.vi
LJStreamM\sub\LJstreamUD write config.vi
LJStreamM\sub\LJUD_TCVoltsToTemp.vi
LJStreamM\sub\Quit LabVIEW if Executable.vi
LJStreamM\sub\Write To File Util.vi
LVUtilities\2's Comp To Signed Double.vi
LVUtilities\8-Byte Array To MAC.vi
LVUtilities\Cal Constants Array to Cluster.vi
LVUtilities\Cal Constants Cluster to Array.vi
LVUtilities\eWriteName and eReadName.vi
LVUtilities\eWriteNames and eReadNames with Open.vi
LVUtilities\eWriteNames and eReadNames.vi
LVUtilities\Expand Array To Size.vi
LVUtilities\Expand1DValues.vi
LVUtilities\Flatten2DValues.vi
LVUtilities\Force Array To Size.vi
LVUtilities\Keep Last n Rows 2D.vi
LVUtilities\LibraryLogging.vi
LVUtilities\Noise & Accuracy Processing.vi
LVUtilities\Noise Processing.vi
LVUtilities\raw checksum.vi
LVUtilities\Read String.vi
LVUtilities\Write String.vi
Old\Flatten Array Of Strings.vi
9 comments
when I run "DIO EF Config 1
when I run "DIO EF Config 1 PWM and 1 Counter.vi" I have an error message: "LabJack Error #2508: HW_CNTR0_NOT_AVAILABLE occured at LJM_eWriteAddresses.vi"
The problem is that that
The problem is that that example enables Clock0 for the PWM output. Clock0 uses CounterA & CounterB so they are not available:
http://labjack.com/support/datasheets/t7/digital-io/extended-features/ef...
We will change the example to use CounterC on CIO2.
In the config list use:
DIO18_EF_TYPE
DIO18_EF_ENABLE
... and then read:
DIO18_EF_READ_A
Forgot to click the "List"
Forgot to click the "List" box. Now it is showing.
"LabJack Error #1298:
"LabJack Error #1298: LJME_ATTR_LOAD_COMM_FAILURE occured at LJM_OpenS.vi"
LV2014, 64bit machine. The LJControlPanel and LJStreamUD work just fine.
The .dll is installed in the systems32 folder.
What LabJack are you using?
What LabJack are you using? The LJM driver and examples only support the LabJack T7 and Digit. For UD devices (U3/U6/UE9) use the UD driver and examples:
http://labjack.com/support/ud/examples/labview
using counter inputs and analog inputs simultaneosly
is that possible to connect analog and counter input simultaneosly in labjack t7
Yes you can connect lots of
Yes you can connect lots of things at the same time.
I would start by going through the counter tutorial to learn how to configure it and confirm your signal works with the counter:
https://labjack.com/support/software/applications/t-series/kipling/register-matrix/counter-example
That shows you which register or registers you need to write to configure the feature, and which register to read to get the count value. Then you can do the same in LabVIEW using the example "Write Read Loop with Config.vi", and can read any "AIN#" registers at the same time.
FAST COUNTERS DIO16,DIO17 DOES NOT WORK IN STREAM MODE
when i try to the example stream program for fast counter 16 and 17 it shows the error message.
help me how to solve this .
LabJack Error #2509: HW_CNTRB_NOT_AVAILABLE Occurred at LJM_eWriteAddress.VI
See response on forum:
See response on forum:
https://labjack.com/forums/t7/counter-input-1617-not-working-t7-pro#comm...