« Close

Datasheets and User Guides

Software & Driver

 

Delphi for LJM - Windows

LJM Delphi Wrapper/Examples Windows/Mac/Linux (Software Platform)

Windows Delphi wrapper and examples for the LJM library.

Release
12/04/2017

LJM Delphi Wrapper/Examples (Referencable)

Prerequisites

Instructions

  1. Download/extract the .zip file attached at the top of this page.
  2. Navigate to the extracted Delphi_LJM folder.
  3. Open the dpr examples in Delphi to edit and run.

Refer to the download's README.txt file for requirements, usage, documentation and other details.  

Code Snippet

program ReadSerialNumber;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  { The following are available in the Delphi examples download. }
  LJMDelphi in 'Wrapper\LJMDelphi.pas',
  LJMUtilities in 'Examples\LJMUtilities.pas'; { Provides ErrorHandler. }

const
  name: PAnsiChar = 'SERIAL_NUMBER';
var
  handle: Integer;
  error: Integer = 0;
  value: Double = 0.0;
begin
  { Open first found LabJack. }
  error := LJM_OpenS('Any', 'Any', 'Any', handle);
  ErrorHandler('LJM_Open', error);

  { Call LJM_eReadName to read the serial number from the LabJack. }
  error := LJM_eReadName(handle, name, value);
  ErrorHandler('LJM_eReadName', error);

  Writeln('LJM_eReadName result:');
  Writeln('  ' + name + ' = ' + FloatToStr(value));
end.

File list

Delphi_LJM_2017_12_04.zip contains:

Delphi_LJM_2017_12_04\LICENSE.txt
Delphi_LJM_2017_12_04\README.txt
Delphi_LJM_2017_12_04\Examples\LJMUtilities.pas
Delphi_LJM_2017_12_04\Examples\Basic\eAddresses.dpr
Delphi_LJM_2017_12_04\Examples\Basic\eNames.dpr
Delphi_LJM_2017_12_04\Examples\Basic\eReadAddress.dpr
Delphi_LJM_2017_12_04\Examples\Basic\eReadAddresses.dpr
Delphi_LJM_2017_12_04\Examples\Basic\eReadName.dpr
Delphi_LJM_2017_12_04\Examples\Basic\eReadNames.dpr
Delphi_LJM_2017_12_04\Examples\Basic\eWriteAddress.dpr
Delphi_LJM_2017_12_04\Examples\Basic\eWriteAddresses.dpr
Delphi_LJM_2017_12_04\Examples\Basic\eWriteName.dpr
Delphi_LJM_2017_12_04\Examples\Basic\eWriteNames.dpr
Delphi_LJM_2017_12_04\Examples\More\AIN\DualAINLoop.dpr
Delphi_LJM_2017_12_04\Examples\More\AIN\SingleAIN.dpr
Delphi_LJM_2017_12_04\Examples\More\AIN\SingleAINWithConfig.dpr
Delphi_LJM_2017_12_04\Examples\More\Config\ReadConfig.dpr
Delphi_LJM_2017_12_04\Examples\More\Config\ReadDeviceNameString.dpr
Delphi_LJM_2017_12_04\Examples\More\Config\WriteDeviceNameString.dpr
Delphi_LJM_2017_12_04\Examples\More\Config\WritePowerConfig.dpr
Delphi_LJM_2017_12_04\Examples\More\DIO\SingleDIORead.dpr
Delphi_LJM_2017_12_04\Examples\More\DIO\SingleDIOWrite.dpr
Delphi_LJM_2017_12_04\Examples\More\Ethernet\ReadEthernetConfig.dpr
Delphi_LJM_2017_12_04\Examples\More\Ethernet\ReadEthernetMAC.dpr
Delphi_LJM_2017_12_04\Examples\More\Ethernet\WriteEthernetConfig.dpr
Delphi_LJM_2017_12_04\Examples\More\I2C\I2CEeprom.dpr
Delphi_LJM_2017_12_04\Examples\More\ListAll\ListAll.dpr
Delphi_LJM_2017_12_04\Examples\More\SPI\SPI.dpr
Delphi_LJM_2017_12_04\Examples\More\Stream\StreamBasic.dpr
Delphi_LJM_2017_12_04\Examples\More\Stream\StreamBasicWithStreamOut.dpr
Delphi_LJM_2017_12_04\Examples\More\Stream\StreamBurst.dpr
Delphi_LJM_2017_12_04\Examples\More\Stream\StreamSequentialAIN.dpr
Delphi_LJM_2017_12_04\Examples\More\Testing\CRSpeedTest.dpr
Delphi_LJM_2017_12_04\Examples\More\Watchdog\ReadWatchdogConfig.dpr
Delphi_LJM_2017_12_04\Examples\More\Watchdog\WriteWatchdogConfig.dpr
Delphi_LJM_2017_12_04\Examples\More\WiFi\ReadWiFiConfig.dpr
Delphi_LJM_2017_12_04\Examples\More\WiFi\ReadWiFiMAC.dpr
Delphi_LJM_2017_12_04\Examples\More\WiFi\ReadWiFiRSSI.dpr
Delphi_LJM_2017_12_04\Examples\More\WiFi\WriteWiFiConfig.dpr
Delphi_LJM_2017_12_04\Wrapper\LJMDelphi.pas