C#, VB .NET for LJM - Windows | LabJack
 
« Close

Datasheets and User Guides

App Notes

Software & Driver

 

C#, VB .NET for LJM - Windows

LJM .NET Examples (Software Platform)

C# and Visual Basic .NET examples for the LJM library.

Release

LJM .NET Examples Top (Referencable)

Prerequisites

  • LabJack T7 or T4
  • LJM Library and .NET assembly - Install the LJM Library
  • .NET 2.0 or newer
  • Visual Studios 2008 or newer for projects. Code will work with Visual Studios 2005.
  • Operating system - Windows

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 DotNet_LJM folder.
  4. Open the example projects in Visual Studios to edit, build and run.

Refer to the download's README.txt file for more details. 

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

Overview

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.  The following examples in the Basic folder are a great place to start:

  • LJM_eWriteName Example
  • LJM_eWriteNames Example
  • LJM_eReadName Example
  • LJM_eReadNames Example
  • Write Read Loop with Config

Where is an example to do XYZ?

You will find lots of examples in this archive, but there is not an example for everything the LabJack can do.  The reason for this stems from the "Overview" section above.  Most operations simply involve writing and reading different registers, so you really just need examples that show you how to write and read any register.  If we had examples for every operation, they would just be copies of the example "Write Read Loop with Config" with different registers. The typical workflow to do almost anything beside stream is:

  1. Look at the T-series Datasheet or the Modbus Map to determine what registers you need to write and read.
  2. Use the Register Matrix in Kipling to test writing and reading your desired registers and confirm you see what you expect to see.  This step is optional and not always applicable.
  3. Use eWriteName (or eWriteNames) to write the desired registers and eReadName (or eReadNames) to read the desired registers. Or just use "Write Read Loop with Config", which provides the basic structure used by many user applications.

Stream mode and other operations that don't fit in "Write Read Loop with Config" will usually have specific examples, and if something seems to be missing let us know.

LJM .NET Examples Bottom (Referencable)

Code Snippets

C#

using System;
using LabJack;

namespace ReadSerialNumber
{
    class ReadSerialNumber
    {
        static void Main(string[] args)
        {
            int handle = 0;
            try
            {
                //Open first found LabJack.
                LJM.OpenS("ANY", "ANY", "ANY", ref handle);
                
                //Call eReadName to read the serial number from the LabJack.
                string name = "SERIAL_NUMBER";
                double value = 0;
                LJM.eReadName(handle, name, ref value);

                Console.WriteLine("eReadName result: ");
                Console.WriteLine("  " + name + " = " + value);
            }
            catch (LJM.LJMException e)
            {
                Console.Out.WriteLine("Error: " + e.ToString());
            }
        }
    }
}

Visual Basic

Imports LabJack

Module ReadSerialNumber

    Sub Main()
        Dim handle As Integer
        Dim name As String
        Dim value As Double = 0

        Try
            ' Open first found LabJack.
            LJM.OpenS("ANY", "ANY", "ANY", handle)

            ' Call eReadName to read the serial number from the LabJack.
            name = "SERIAL_NUMBER"
            LJM.eReadName(handle, name, value)

            Console.WriteLine("eReadName result: ")
            Console.WriteLine("  " & name & " = " & value)
        Catch ljme As LJM.LJMException
            Console.WriteLine("Error: " & ljme.ToString)
        End Try

    End Sub

End Module

LJM .NET Examples File List (Referencable)

File list

Click to expand DotNet_LJM_2018_03_14.zip contents

LICENSE.txt
README.txt
Examples\C#\Basic\EasyFunctions\EasyFunctions.cs
Examples\C#\Basic\EasyFunctions\EasyFunctions.csproj
Examples\C#\Basic\EasyFunctions\EasyFunctions.sln
Examples\C#\Basic\EasyFunctions\Properties\AssemblyInfo.cs
Examples\C#\Basic\WriteReadLoopWithConfig\WriteReadLoopWithConfig.cs
Examples\C#\Basic\WriteReadLoopWithConfig\WriteReadLoopWithConfig.csproj
Examples\C#\Basic\WriteReadLoopWithConfig\WriteReadLoopWithConfig.sln
Examples\C#\Basic\WriteReadLoopWithConfig\Properties\AssemblyInfo.cs
Examples\C#\More\AIN\DualAINLoop\DualAINLoop.cs
Examples\C#\More\AIN\DualAINLoop\DualAINLoop.csproj
Examples\C#\More\AIN\DualAINLoop\DualAINLoop.sln
Examples\C#\More\AIN\DualAINLoop\Properties\AssemblyInfo.cs
Examples\C#\More\AIN\SingleAIN\SingleAIN.cs
Examples\C#\More\AIN\SingleAIN\SingleAIN.csproj
Examples\C#\More\AIN\SingleAIN\SingleAIN.sln
Examples\C#\More\AIN\SingleAIN\Properties\AssemblyInfo.cs
Examples\C#\More\AIN\SingleAINWithConfig\SingleAINWithConfig.cs
Examples\C#\More\AIN\SingleAINWithConfig\SingleAINWithConfig.csproj
Examples\C#\More\AIN\SingleAINWithConfig\SingleAINWithConfig.sln
Examples\C#\More\AIN\SingleAINWithConfig\Properties\AssemblyInfo.cs
Examples\C#\More\Config\ReadConfig\ReadConfig.cs
Examples\C#\More\Config\ReadConfig\ReadConfig.csproj
Examples\C#\More\Config\ReadConfig\ReadConfig.sln
Examples\C#\More\Config\ReadConfig\Properties\AssemblyInfo.cs
Examples\C#\More\Config\ReadDeviceNameString\ReadDeviceNameString.cs
Examples\C#\More\Config\ReadDeviceNameString\ReadDeviceNameString.csproj
Examples\C#\More\Config\ReadDeviceNameString\ReadDeviceNameString.sln
Examples\C#\More\Config\ReadDeviceNameString\Properties\AssemblyInfo.cs
Examples\C#\More\Config\WriteDeviceNameString\WriteDeviceNameString.cs
Examples\C#\More\Config\WriteDeviceNameString\WriteDeviceNameString.csproj
Examples\C#\More\Config\WriteDeviceNameString\WriteDeviceNameString.sln
Examples\C#\More\Config\WriteDeviceNameString\Properties\AssemblyInfo.cs
Examples\C#\More\Config\WritePowerConfig\WritePowerConfig.cs
Examples\C#\More\Config\WritePowerConfig\WritePowerConfig.csproj
Examples\C#\More\Config\WritePowerConfig\WritePowerConfig.sln
Examples\C#\More\Config\WritePowerConfig\Properties\AssemblyInfo.cs
Examples\C#\More\DIO\SingleDIO\SingleDIO.cs
Examples\C#\More\DIO\SingleDIO\SingleDIO.csproj
Examples\C#\More\DIO\SingleDIO\SingleDIO.sln
Examples\C#\More\DIO\SingleDIO\Properties\AssemblyInfo.cs
Examples\C#\More\Ethernet\ReadEthernetConfig\ReadEthernetConfig.cs
Examples\C#\More\Ethernet\ReadEthernetConfig\ReadEthernetConfig.csproj
Examples\C#\More\Ethernet\ReadEthernetConfig\ReadEthernetConfig.sln
Examples\C#\More\Ethernet\ReadEthernetConfig\Properties\AssemblyInfo.cs
Examples\C#\More\Ethernet\ReadEthernetMac\ReadEthernetMac.cs
Examples\C#\More\Ethernet\ReadEthernetMac\ReadEthernetMac.csproj
Examples\C#\More\Ethernet\ReadEthernetMac\ReadEthernetMac.sln
Examples\C#\More\Ethernet\ReadEthernetMac\Properties\AssemblyInfo.cs
Examples\C#\More\Ethernet\WriteEthernetConfig\WriteEthernetConfig.cs
Examples\C#\More\Ethernet\WriteEthernetConfig\WriteEthernetConfig.csproj
Examples\C#\More\Ethernet\WriteEthernetConfig\WriteEthernetConfig.sln
Examples\C#\More\Ethernet\WriteEthernetConfig\Properties\AssemblyInfo.cs
Examples\C#\More\I2C\I2CEeprom\I2CEeprom.cs
Examples\C#\More\I2C\I2CEeprom\I2CEeprom.csproj
Examples\C#\More\I2C\I2CEeprom\I2CEeprom.sln
Examples\C#\More\I2C\I2CEeprom\Properties\AssemblyInfo.cs
Examples\C#\More\ListAll\ListAll.cs
Examples\C#\More\ListAll\ListAll.csproj
Examples\C#\More\ListAll\ListAll.sln
Examples\C#\More\ListAll\Properties\AssemblyInfo.cs
Examples\C#\More\SPI\SPI\SPI.cs
Examples\C#\More\SPI\SPI\SPI.csproj
Examples\C#\More\SPI\SPI\SPI.sln
Examples\C#\More\SPI\SPI\Properties\AssemblyInfo.cs
Examples\C#\More\Stream\StreamBasic\StreamBasic.cs
Examples\C#\More\Stream\StreamBasic\StreamBasic.csproj
Examples\C#\More\Stream\StreamBasic\StreamBasic.sln
Examples\C#\More\Stream\StreamBasic\Properties\AssemblyInfo.cs
Examples\C#\More\Stream\StreamBasicWithStreamOut\StreamBasicWithStreamOut.cs
Examples\C#\More\Stream\StreamBasicWithStreamOut\StreamBasicWithStreamOut.csproj
Examples\C#\More\Stream\StreamBasicWithStreamOut\StreamBasicWithStreamOut.sln
Examples\C#\More\Stream\StreamBasicWithStreamOut\Properties\AssemblyInfo.cs
Examples\C#\More\Stream\StreamBurst\StreamBurst.cs
Examples\C#\More\Stream\StreamBurst\StreamBurst.csproj
Examples\C#\More\Stream\StreamBurst\StreamBurst.sln
Examples\C#\More\Stream\StreamBurst\Properties\AssemblyInfo.cs
Examples\C#\More\Stream\StreamSequentialAIN\StreamSequentialAIN.cs
Examples\C#\More\Stream\StreamSequentialAIN\StreamSequentialAIN.csproj
Examples\C#\More\Stream\StreamSequentialAIN\StreamSequentialAIN.sln
Examples\C#\More\Stream\StreamSequentialAIN\Properties\AssemblyInfo.cs
Examples\C#\More\Testing\CRSpeedTest\CRSpeedTest.cs
Examples\C#\More\Testing\CRSpeedTest\CRSpeedTest.csproj
Examples\C#\More\Testing\CRSpeedTest\CRSpeedTest.sln
Examples\C#\More\Testing\CRSpeedTest\Properties\AssemblyInfo.cs
Examples\C#\More\Watchdog\ReadWatchdogConfig\ReadWatchdogConfig.cs
Examples\C#\More\Watchdog\ReadWatchdogConfig\ReadWatchdogConfig.csproj
Examples\C#\More\Watchdog\ReadWatchdogConfig\ReadWatchdogConfig.sln
Examples\C#\More\Watchdog\ReadWatchdogConfig\Properties\AssemblyInfo.cs
Examples\C#\More\Watchdog\WriteWatchdogConfig\WriteWatchdogConfig.cs
Examples\C#\More\Watchdog\WriteWatchdogConfig\WriteWatchdogConfig.csproj
Examples\C#\More\Watchdog\WriteWatchdogConfig\WriteWatchdogConfig.sln
Examples\C#\More\Watchdog\WriteWatchdogConfig\Properties\AssemblyInfo.cs
Examples\C#\More\WiFi\ReadWifiConfig\ReadWifiConfig.cs
Examples\C#\More\WiFi\ReadWifiConfig\ReadWifiConfig.csproj
Examples\C#\More\WiFi\ReadWifiConfig\ReadWifiConfig.sln
Examples\C#\More\WiFi\ReadWifiConfig\Properties\AssemblyInfo.cs
Examples\C#\More\WiFi\ReadWifiMac\ReadWifiMac.cs
Examples\C#\More\WiFi\ReadWifiMac\ReadWifiMac.csproj
Examples\C#\More\WiFi\ReadWifiMac\ReadWifiMac.sln
Examples\C#\More\WiFi\ReadWifiMac\Properties\AssemblyInfo.cs
Examples\C#\More\WiFi\ReadWifiRssi\ReadWifiRssi.cs
Examples\C#\More\WiFi\ReadWifiRssi\ReadWifiRssi.csproj
Examples\C#\More\WiFi\ReadWifiRssi\ReadWifiRssi.sln
Examples\C#\More\WiFi\ReadWifiRssi\Properties\AssemblyInfo.cs
Examples\C#\More\WiFi\WriteWifiConfig\WriteWifiConfig.cs
Examples\C#\More\WiFi\WriteWifiConfig\WriteWifiConfig.csproj
Examples\C#\More\WiFi\WriteWifiConfig\WriteWifiConfig.sln
Examples\C#\More\WiFi\WriteWifiConfig\Properties\AssemblyInfo.cs
Examples\VB\LJMUtilities.vb
Examples\VB\Basic\EasyFunctions\EasyFunctions.sln
Examples\VB\Basic\EasyFunctions\EasyFunctions.vb
Examples\VB\Basic\EasyFunctions\EasyFunctions.vbproj
Examples\VB\Basic\EasyFunctions\My Project\Application.Designer.vb
Examples\VB\Basic\EasyFunctions\My Project\Application.myapp
Examples\VB\Basic\EasyFunctions\My Project\AssemblyInfo.vb
Examples\VB\Basic\EasyFunctions\My Project\Resources.Designer.vb
Examples\VB\Basic\EasyFunctions\My Project\Resources.resx
Examples\VB\Basic\EasyFunctions\My Project\Settings.Designer.vb
Examples\VB\Basic\EasyFunctions\My Project\Settings.settings
Examples\VB\Basic\WriteReadLoopWithConfig\WriteReadLoopWithConfig.sln
Examples\VB\Basic\WriteReadLoopWithConfig\WriteReadLoopWithConfig.vb
Examples\VB\Basic\WriteReadLoopWithConfig\WriteReadLoopWithConfig.vbproj
Examples\VB\Basic\WriteReadLoopWithConfig\My Project\Application.Designer.vb
Examples\VB\Basic\WriteReadLoopWithConfig\My Project\Application.myapp
Examples\VB\Basic\WriteReadLoopWithConfig\My Project\AssemblyInfo.vb
Examples\VB\Basic\WriteReadLoopWithConfig\My Project\Resources.Designer.vb
Examples\VB\Basic\WriteReadLoopWithConfig\My Project\Resources.resx
Examples\VB\Basic\WriteReadLoopWithConfig\My Project\Settings.Designer.vb
Examples\VB\Basic\WriteReadLoopWithConfig\My Project\Settings.settings
Examples\VB\More\AIN\DualAINLoop\DualAINLoop.sln
Examples\VB\More\AIN\DualAINLoop\DualAINLoop.vb
Examples\VB\More\AIN\DualAINLoop\DualAINLoop.vbproj
Examples\VB\More\AIN\DualAINLoop\My Project\Application.Designer.vb
Examples\VB\More\AIN\DualAINLoop\My Project\Application.myapp
Examples\VB\More\AIN\DualAINLoop\My Project\AssemblyInfo.vb
Examples\VB\More\AIN\DualAINLoop\My Project\Resources.Designer.vb
Examples\VB\More\AIN\DualAINLoop\My Project\Resources.resx
Examples\VB\More\AIN\DualAINLoop\My Project\Settings.Designer.vb
Examples\VB\More\AIN\DualAINLoop\My Project\Settings.settings
Examples\VB\More\AIN\SingleAIN\SingleAIN.sln
Examples\VB\More\AIN\SingleAIN\SingleAIN.vb
Examples\VB\More\AIN\SingleAIN\SingleAIN.vbproj
Examples\VB\More\AIN\SingleAIN\My Project\Application.Designer.vb
Examples\VB\More\AIN\SingleAIN\My Project\Application.myapp
Examples\VB\More\AIN\SingleAIN\My Project\AssemblyInfo.vb
Examples\VB\More\AIN\SingleAIN\My Project\Resources.Designer.vb
Examples\VB\More\AIN\SingleAIN\My Project\Resources.resx
Examples\VB\More\AIN\SingleAIN\My Project\Settings.Designer.vb
Examples\VB\More\AIN\SingleAIN\My Project\Settings.settings
Examples\VB\More\AIN\SingleAINWithConfig\SingleAINWithConfig.sln
Examples\VB\More\AIN\SingleAINWithConfig\SingleAINWithConfig.vb
Examples\VB\More\AIN\SingleAINWithConfig\SingleAINWithConfig.vbproj
Examples\VB\More\AIN\SingleAINWithConfig\My Project\Application.Designer.vb
Examples\VB\More\AIN\SingleAINWithConfig\My Project\Application.myapp
Examples\VB\More\AIN\SingleAINWithConfig\My Project\AssemblyInfo.vb
Examples\VB\More\AIN\SingleAINWithConfig\My Project\Resources.Designer.vb
Examples\VB\More\AIN\SingleAINWithConfig\My Project\Resources.resx
Examples\VB\More\AIN\SingleAINWithConfig\My Project\Settings.Designer.vb
Examples\VB\More\AIN\SingleAINWithConfig\My Project\Settings.settings
Examples\VB\More\Config\ReadConfig\ReadConfig.sln
Examples\VB\More\Config\ReadConfig\ReadConfig.vb
Examples\VB\More\Config\ReadConfig\ReadConfig.vbproj
Examples\VB\More\Config\ReadConfig\My Project\Application.Designer.vb
Examples\VB\More\Config\ReadConfig\My Project\Application.myapp
Examples\VB\More\Config\ReadConfig\My Project\AssemblyInfo.vb
Examples\VB\More\Config\ReadConfig\My Project\Resources.Designer.vb
Examples\VB\More\Config\ReadConfig\My Project\Resources.resx
Examples\VB\More\Config\ReadConfig\My Project\Settings.Designer.vb
Examples\VB\More\Config\ReadConfig\My Project\Settings.settings
Examples\VB\More\Config\ReadDeviceNameString\ReadDeviceNameString.sln
Examples\VB\More\Config\ReadDeviceNameString\ReadDeviceNameString.vb
Examples\VB\More\Config\ReadDeviceNameString\ReadDeviceNameString.vbproj
Examples\VB\More\Config\ReadDeviceNameString\My Project\Application.Designer.vb
Examples\VB\More\Config\ReadDeviceNameString\My Project\Application.myapp
Examples\VB\More\Config\ReadDeviceNameString\My Project\AssemblyInfo.vb
Examples\VB\More\Config\ReadDeviceNameString\My Project\Resources.Designer.vb
Examples\VB\More\Config\ReadDeviceNameString\My Project\Resources.resx
Examples\VB\More\Config\ReadDeviceNameString\My Project\Settings.Designer.vb
Examples\VB\More\Config\ReadDeviceNameString\My Project\Settings.settings
Examples\VB\More\Config\WriteDeviceNameString\WriteDeviceNameString.sln
Examples\VB\More\Config\WriteDeviceNameString\WriteDeviceNameString.vb
Examples\VB\More\Config\WriteDeviceNameString\WriteDeviceNameString.vbproj
Examples\VB\More\Config\WriteDeviceNameString\My Project\Application.Designer.vb
Examples\VB\More\Config\WriteDeviceNameString\My Project\Application.myapp
Examples\VB\More\Config\WriteDeviceNameString\My Project\AssemblyInfo.vb
Examples\VB\More\Config\WriteDeviceNameString\My Project\Resources.Designer.vb
Examples\VB\More\Config\WriteDeviceNameString\My Project\Resources.resx
Examples\VB\More\Config\WriteDeviceNameString\My Project\Settings.Designer.vb
Examples\VB\More\Config\WriteDeviceNameString\My Project\Settings.settings
Examples\VB\More\Config\WritePowerConfig\WritePowerConfig.sln
Examples\VB\More\Config\WritePowerConfig\WritePowerConfig.vb
Examples\VB\More\Config\WritePowerConfig\WritePowerConfig.vbproj
Examples\VB\More\Config\WritePowerConfig\My Project\Application.Designer.vb
Examples\VB\More\Config\WritePowerConfig\My Project\Application.myapp
Examples\VB\More\Config\WritePowerConfig\My Project\AssemblyInfo.vb
Examples\VB\More\Config\WritePowerConfig\My Project\Resources.Designer.vb
Examples\VB\More\Config\WritePowerConfig\My Project\Resources.resx
Examples\VB\More\Config\WritePowerConfig\My Project\Settings.Designer.vb
Examples\VB\More\Config\WritePowerConfig\My Project\Settings.settings
Examples\VB\More\DIO\SingleDIO\SingleDIO.sln
Examples\VB\More\DIO\SingleDIO\SingleDIO.vb
Examples\VB\More\DIO\SingleDIO\SingleDIO.vbproj
Examples\VB\More\DIO\SingleDIO\My Project\Application.Designer.vb
Examples\VB\More\DIO\SingleDIO\My Project\Application.myapp
Examples\VB\More\DIO\SingleDIO\My Project\AssemblyInfo.vb
Examples\VB\More\DIO\SingleDIO\My Project\Resources.Designer.vb
Examples\VB\More\DIO\SingleDIO\My Project\Resources.resx
Examples\VB\More\DIO\SingleDIO\My Project\Settings.Designer.vb
Examples\VB\More\DIO\SingleDIO\My Project\Settings.settings
Examples\VB\More\Ethernet\ReadEthernetConfig\ReadEthernetConfig.sln
Examples\VB\More\Ethernet\ReadEthernetConfig\ReadEthernetConfig.vb
Examples\VB\More\Ethernet\ReadEthernetConfig\ReadEthernetConfig.vbproj
Examples\VB\More\Ethernet\ReadEthernetConfig\My Project\Application.Designer.vb
Examples\VB\More\Ethernet\ReadEthernetConfig\My Project\Application.myapp
Examples\VB\More\Ethernet\ReadEthernetConfig\My Project\AssemblyInfo.vb
Examples\VB\More\Ethernet\ReadEthernetConfig\My Project\Resources.Designer.vb
Examples\VB\More\Ethernet\ReadEthernetConfig\My Project\Resources.resx
Examples\VB\More\Ethernet\ReadEthernetConfig\My Project\Settings.Designer.vb
Examples\VB\More\Ethernet\ReadEthernetConfig\My Project\Settings.settings
Examples\VB\More\Ethernet\ReadEthernetMac\ReadEthernetMac.sln
Examples\VB\More\Ethernet\ReadEthernetMac\ReadEthernetMac.vb
Examples\VB\More\Ethernet\ReadEthernetMac\ReadEthernetMac.vbproj
Examples\VB\More\Ethernet\ReadEthernetMac\My Project\Application.Designer.vb
Examples\VB\More\Ethernet\ReadEthernetMac\My Project\Application.myapp
Examples\VB\More\Ethernet\ReadEthernetMac\My Project\AssemblyInfo.vb
Examples\VB\More\Ethernet\ReadEthernetMac\My Project\Resources.Designer.vb
Examples\VB\More\Ethernet\ReadEthernetMac\My Project\Resources.resx
Examples\VB\More\Ethernet\ReadEthernetMac\My Project\Settings.Designer.vb
Examples\VB\More\Ethernet\ReadEthernetMac\My Project\Settings.settings
Examples\VB\More\Ethernet\WriteEthernetConfig\WriteEthernetConfig.sln
Examples\VB\More\Ethernet\WriteEthernetConfig\WriteEthernetConfig.vb
Examples\VB\More\Ethernet\WriteEthernetConfig\WriteEthernetConfig.vbproj
Examples\VB\More\Ethernet\WriteEthernetConfig\My Project\Application.Designer.vb
Examples\VB\More\Ethernet\WriteEthernetConfig\My Project\Application.myapp
Examples\VB\More\Ethernet\WriteEthernetConfig\My Project\AssemblyInfo.vb
Examples\VB\More\Ethernet\WriteEthernetConfig\My Project\Resources.Designer.vb
Examples\VB\More\Ethernet\WriteEthernetConfig\My Project\Resources.resx
Examples\VB\More\Ethernet\WriteEthernetConfig\My Project\Settings.Designer.vb
Examples\VB\More\Ethernet\WriteEthernetConfig\My Project\Settings.settings
Examples\VB\More\I2C\I2CEeprom\I2CEeprom.sln
Examples\VB\More\I2C\I2CEeprom\I2CEeprom.vb
Examples\VB\More\I2C\I2CEeprom\I2CEeprom.vbproj
Examples\VB\More\I2C\I2CEeprom\My Project\Application.Designer.vb
Examples\VB\More\I2C\I2CEeprom\My Project\Application.myapp
Examples\VB\More\I2C\I2CEeprom\My Project\AssemblyInfo.vb
Examples\VB\More\I2C\I2CEeprom\My Project\Resources.Designer.vb
Examples\VB\More\I2C\I2CEeprom\My Project\Resources.resx
Examples\VB\More\I2C\I2CEeprom\My Project\Settings.Designer.vb
Examples\VB\More\I2C\I2CEeprom\My Project\Settings.settings
Examples\VB\More\ListAll\ListAll.sln
Examples\VB\More\ListAll\ListAll.vb
Examples\VB\More\ListAll\ListAll.vbproj
Examples\VB\More\ListAll\My Project\Application.Designer.vb
Examples\VB\More\ListAll\My Project\Application.myapp
Examples\VB\More\ListAll\My Project\AssemblyInfo.vb
Examples\VB\More\ListAll\My Project\Resources.Designer.vb
Examples\VB\More\ListAll\My Project\Resources.resx
Examples\VB\More\ListAll\My Project\Settings.Designer.vb
Examples\VB\More\ListAll\My Project\Settings.settings
Examples\VB\More\SPI\SPI\SPI.sln
Examples\VB\More\SPI\SPI\SPI.vb
Examples\VB\More\SPI\SPI\SPI.vbproj
Examples\VB\More\SPI\SPI\My Project\Application.Designer.vb
Examples\VB\More\SPI\SPI\My Project\Application.myapp
Examples\VB\More\SPI\SPI\My Project\AssemblyInfo.vb
Examples\VB\More\SPI\SPI\My Project\Resources.Designer.vb
Examples\VB\More\SPI\SPI\My Project\Resources.resx
Examples\VB\More\SPI\SPI\My Project\Settings.Designer.vb
Examples\VB\More\SPI\SPI\My Project\Settings.settings
Examples\VB\More\Stream\StreamBasic\StreamBasic.sln
Examples\VB\More\Stream\StreamBasic\StreamBasic.vb
Examples\VB\More\Stream\StreamBasic\StreamBasic.vbproj
Examples\VB\More\Stream\StreamBasic\My Project\Application.Designer.vb
Examples\VB\More\Stream\StreamBasic\My Project\Application.myapp
Examples\VB\More\Stream\StreamBasic\My Project\AssemblyInfo.vb
Examples\VB\More\Stream\StreamBasic\My Project\Resources.Designer.vb
Examples\VB\More\Stream\StreamBasic\My Project\Resources.resx
Examples\VB\More\Stream\StreamBasic\My Project\Settings.Designer.vb
Examples\VB\More\Stream\StreamBasic\My Project\Settings.settings
Examples\VB\More\Stream\StreamBasicWithStreamOut\StreamBasicWithStreamOut.sln
Examples\VB\More\Stream\StreamBasicWithStreamOut\StreamBasicWithStreamOut.vb
Examples\VB\More\Stream\StreamBasicWithStreamOut\StreamBasicWithStreamOut.vbproj
Examples\VB\More\Stream\StreamBasicWithStreamOut\My Project\Application.Designer.vb
Examples\VB\More\Stream\StreamBasicWithStreamOut\My Project\Application.myapp
Examples\VB\More\Stream\StreamBasicWithStreamOut\My Project\AssemblyInfo.vb
Examples\VB\More\Stream\StreamBasicWithStreamOut\My Project\Resources.Designer.vb
Examples\VB\More\Stream\StreamBasicWithStreamOut\My Project\Resources.resx
Examples\VB\More\Stream\StreamBasicWithStreamOut\My Project\Settings.Designer.vb
Examples\VB\More\Stream\StreamBasicWithStreamOut\My Project\Settings.settings
Examples\VB\More\Stream\StreamBurst\StreamBurst.sln
Examples\VB\More\Stream\StreamBurst\StreamBurst.vb
Examples\VB\More\Stream\StreamBurst\StreamBurst.vbproj
Examples\VB\More\Stream\StreamBurst\My Project\Application.Designer.vb
Examples\VB\More\Stream\StreamBurst\My Project\Application.myapp
Examples\VB\More\Stream\StreamBurst\My Project\AssemblyInfo.vb
Examples\VB\More\Stream\StreamBurst\My Project\Resources.Designer.vb
Examples\VB\More\Stream\StreamBurst\My Project\Resources.resx
Examples\VB\More\Stream\StreamBurst\My Project\Settings.Designer.vb
Examples\VB\More\Stream\StreamBurst\My Project\Settings.settings
Examples\VB\More\Stream\StreamSequentialAIN\StreamSequentialAIN.sln
Examples\VB\More\Stream\StreamSequentialAIN\StreamSequentialAIN.vb
Examples\VB\More\Stream\StreamSequentialAIN\StreamSequentialAIN.vbproj
Examples\VB\More\Stream\StreamSequentialAIN\My Project\Application.Designer.vb
Examples\VB\More\Stream\StreamSequentialAIN\My Project\Application.myapp
Examples\VB\More\Stream\StreamSequentialAIN\My Project\AssemblyInfo.vb
Examples\VB\More\Stream\StreamSequentialAIN\My Project\Resources.Designer.vb
Examples\VB\More\Stream\StreamSequentialAIN\My Project\Resources.resx
Examples\VB\More\Stream\StreamSequentialAIN\My Project\Settings.Designer.vb
Examples\VB\More\Stream\StreamSequentialAIN\My Project\Settings.settings
Examples\VB\More\Stream\TriggeredStreamStart\TriggeredStreamStart.sln
Examples\VB\More\Stream\TriggeredStreamStart\TriggeredStreamStart.vb
Examples\VB\More\Stream\TriggeredStreamStart\TriggeredStreamStart.vbproj
Examples\VB\More\Stream\TriggeredStreamStart\TriggeredStreamStart.vbproj.user
Examples\VB\More\Stream\TriggeredStreamStart\My Project\app.manifest
Examples\VB\More\Stream\TriggeredStreamStart\My Project\Application.Designer.vb
Examples\VB\More\Stream\TriggeredStreamStart\My Project\Application.myapp
Examples\VB\More\Stream\TriggeredStreamStart\My Project\AssemblyInfo.vb
Examples\VB\More\Stream\TriggeredStreamStart\My Project\Resources.Designer.vb
Examples\VB\More\Stream\TriggeredStreamStart\My Project\Resources.resx
Examples\VB\More\Stream\TriggeredStreamStart\My Project\Settings.Designer.vb
Examples\VB\More\Stream\TriggeredStreamStart\My Project\Settings.settings
Examples\VB\More\Testing\CRSpeedTest\CRSpeedTest.sln
Examples\VB\More\Testing\CRSpeedTest\CRSpeedTest.vb
Examples\VB\More\Testing\CRSpeedTest\CRSpeedTest.vbproj
Examples\VB\More\Testing\CRSpeedTest\My Project\Application.Designer.vb
Examples\VB\More\Testing\CRSpeedTest\My Project\Application.myapp
Examples\VB\More\Testing\CRSpeedTest\My Project\AssemblyInfo.vb
Examples\VB\More\Testing\CRSpeedTest\My Project\Resources.Designer.vb
Examples\VB\More\Testing\CRSpeedTest\My Project\Resources.resx
Examples\VB\More\Testing\CRSpeedTest\My Project\Settings.Designer.vb
Examples\VB\More\Testing\CRSpeedTest\My Project\Settings.settings
Examples\VB\More\Watchdog\ReadWatchdogConfig\ReadWatchdogConfig.sln
Examples\VB\More\Watchdog\ReadWatchdogConfig\ReadWatchdogConfig.vb
Examples\VB\More\Watchdog\ReadWatchdogConfig\ReadWatchdogConfig.vbproj
Examples\VB\More\Watchdog\ReadWatchdogConfig\My Project\Application.Designer.vb
Examples\VB\More\Watchdog\ReadWatchdogConfig\My Project\Application.myapp
Examples\VB\More\Watchdog\ReadWatchdogConfig\My Project\AssemblyInfo.vb
Examples\VB\More\Watchdog\ReadWatchdogConfig\My Project\Resources.Designer.vb
Examples\VB\More\Watchdog\ReadWatchdogConfig\My Project\Resources.resx
Examples\VB\More\Watchdog\ReadWatchdogConfig\My Project\Settings.Designer.vb
Examples\VB\More\Watchdog\ReadWatchdogConfig\My Project\Settings.settings
Examples\VB\More\Watchdog\WriteWatchdogConfig\WriteWatchdogConfig.sln
Examples\VB\More\Watchdog\WriteWatchdogConfig\WriteWatchdogConfig.vb
Examples\VB\More\Watchdog\WriteWatchdogConfig\WriteWatchdogConfig.vbproj
Examples\VB\More\Watchdog\WriteWatchdogConfig\My Project\Application.Designer.vb
Examples\VB\More\Watchdog\WriteWatchdogConfig\My Project\Application.myapp
Examples\VB\More\Watchdog\WriteWatchdogConfig\My Project\AssemblyInfo.vb
Examples\VB\More\Watchdog\WriteWatchdogConfig\My Project\Resources.Designer.vb
Examples\VB\More\Watchdog\WriteWatchdogConfig\My Project\Resources.resx
Examples\VB\More\Watchdog\WriteWatchdogConfig\My Project\Settings.Designer.vb
Examples\VB\More\Watchdog\WriteWatchdogConfig\My Project\Settings.settings
Examples\VB\More\WiFi\ReadWifiConfig\ReadWifiConfig.sln
Examples\VB\More\WiFi\ReadWifiConfig\ReadWifiConfig.vb
Examples\VB\More\WiFi\ReadWifiConfig\ReadWifiConfig.vbproj
Examples\VB\More\WiFi\ReadWifiConfig\My Project\Application.Designer.vb
Examples\VB\More\WiFi\ReadWifiConfig\My Project\Application.myapp
Examples\VB\More\WiFi\ReadWifiConfig\My Project\AssemblyInfo.vb
Examples\VB\More\WiFi\ReadWifiConfig\My Project\Resources.Designer.vb
Examples\VB\More\WiFi\ReadWifiConfig\My Project\Resources.resx
Examples\VB\More\WiFi\ReadWifiConfig\My Project\Settings.Designer.vb
Examples\VB\More\WiFi\ReadWifiConfig\My Project\Settings.settings
Examples\VB\More\WiFi\ReadWifiMac\ReadWifiMac.sln
Examples\VB\More\WiFi\ReadWifiMac\ReadWifiMac.vb
Examples\VB\More\WiFi\ReadWifiMac\ReadWifiMac.vbproj
Examples\VB\More\WiFi\ReadWifiMac\My Project\Application.Designer.vb
Examples\VB\More\WiFi\ReadWifiMac\My Project\Application.myapp
Examples\VB\More\WiFi\ReadWifiMac\My Project\AssemblyInfo.vb
Examples\VB\More\WiFi\ReadWifiMac\My Project\Resources.Designer.vb
Examples\VB\More\WiFi\ReadWifiMac\My Project\Resources.resx
Examples\VB\More\WiFi\ReadWifiMac\My Project\Settings.Designer.vb
Examples\VB\More\WiFi\ReadWifiMac\My Project\Settings.settings
Examples\VB\More\WiFi\ReadWifiRssi\ReadWifiRssi.sln
Examples\VB\More\WiFi\ReadWifiRssi\ReadWifiRssi.vb
Examples\VB\More\WiFi\ReadWifiRssi\ReadWifiRssi.vbproj
Examples\VB\More\WiFi\ReadWifiRssi\My Project\Application.Designer.vb
Examples\VB\More\WiFi\ReadWifiRssi\My Project\Application.myapp
Examples\VB\More\WiFi\ReadWifiRssi\My Project\AssemblyInfo.vb
Examples\VB\More\WiFi\ReadWifiRssi\My Project\Resources.Designer.vb
Examples\VB\More\WiFi\ReadWifiRssi\My Project\Resources.resx
Examples\VB\More\WiFi\ReadWifiRssi\My Project\Settings.Designer.vb
Examples\VB\More\WiFi\ReadWifiRssi\My Project\Settings.settings
Examples\VB\More\WiFi\WriteWifiConfig\WriteWifiConfig.sln
Examples\VB\More\WiFi\WriteWifiConfig\WriteWifiConfig.vb
Examples\VB\More\WiFi\WriteWifiConfig\WriteWifiConfig.vbproj
Examples\VB\More\WiFi\WriteWifiConfig\My Project\Application.Designer.vb
Examples\VB\More\WiFi\WriteWifiConfig\My Project\Application.myapp
Examples\VB\More\WiFi\WriteWifiConfig\My Project\AssemblyInfo.vb
Examples\VB\More\WiFi\WriteWifiConfig\My Project\Resources.Designer.vb
Examples\VB\More\WiFi\WriteWifiConfig\My Project\Resources.resx
Examples\VB\More\WiFi\WriteWifiConfig\My Project\Settings.Designer.vb
Examples\VB\More\WiFi\WriteWifiConfig\My Project\Settings.settings

2 comments

pramodkrnitdgp's picture

Hi Team,

Is there any method which can read all analog input at one go and retrun values in array in c#?

Thanks,

Pramod

 

LabJack Support's picture

There are multiple ways to read multiple AIN depending on whether you use command response mode or stream mode. See the comparison between the two communication modes here:

https://labjack.com/support/datasheets/t-series/communication

If you use command response mode you will simply need to do an eReadNames call with all of your desired channel numbers. eReadNames usage is demonstrated in our EasyFunctions example from the install above. We also have some AIN specific examples that only read one channel, but those can be easily modified to read many channels.

 

If you use stream mode then you simply need to add all of your channels into your stream scanlist before you start streaming and eStreamRead calls will return an array of all of your channel data. See our StreamBasic C# example in the download above and our documentation on stream mode:

https://labjack.com/support/datasheets/t-series/communication/stream-mode