Recent

Author Topic: USB - connected Oscilloscope Software in Lazarus/FPC for Linux -- Hantek  (Read 3911 times)

Curt Carpenter

  • Sr. Member
  • ****
  • Posts: 396
I'm using a Hantek DSO-2090 USB-connected oscilloscope with a Linux PC running Oliver Haag's excellent OpenHantek software (open source and available for download on the internet, written in C++).
 
Using the OpenHantek software as a guide, I've written a minimal program in Lazarus/FPC that can serve as a starting point for creating your own software tools based on the Hantek DSO-2090 hardware.  It does the basic job of controlling the hardware via USB and capturing data from the DSO sampled at up to 100Ms/sec. (single channel) or 50Ms/sec. (two channels).

I realize that the potential audience for this software is very small -- but for the one or two people out there that might be interested, I would be happy to share my effort.   My code is 26MB compiled with debugging on -- too much to attach here.
If interested, I can be reached at curtc47@gmail.com.

ccrause

  • Hero Member
  • *****
  • Posts: 845
Re: USB - connected Oscilloscope Software in Lazarus/FPC for Linux -- Hantek
« Reply #1 on: February 05, 2018, 07:43:19 pm »
Sounds interesting, pity I don't have one of these Hanteks. Why don't you share the code using one of the free hosting services such as github or sourceforge?

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: USB - connected Oscilloscope Software in Lazarus/FPC for Linux -- Hantek
« Reply #2 on: February 06, 2018, 08:30:40 am »
It would really be nice if you put sources and executables on github or similar. I already own Usbee DX so I do not need it, but someone in the future might decide to buy that Hantek just because custom Lazarus software can be built around your solution.

It's good to have more options then Sigrok and OpenHantek, especially in Lazarus  8-)
https://sigrok.org/wiki/Hantek_DSO-2090
http://openhantek.org/
« Last Edit: February 06, 2018, 08:34:18 am by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: USB - connected Oscilloscope Software in Lazarus/FPC for Linux -- Hantek
« Reply #3 on: February 06, 2018, 10:43:07 am »
I'd be interested, but I have a 6022bl that I mainly use for the analyser part.

CM630

  • Hero Member
  • *****
  • Posts: 1082
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: USB - connected Oscilloscope Software in Lazarus/FPC for Linux -- Hantek
« Reply #4 on: February 09, 2018, 10:38:58 pm »

You could check this (especially lazmercontrols.lpk).
Last time I tried it (approx 2 years ago) it ocurred that two waves cannot be put on a single graph.
It is practically abandoned, but it might do for something.
Лазар 3,2 32 bit (sometimes 64 bit); FPC3,2,2; rev: Lazarus_3_0 on Win10 64bit.

Curt Carpenter

  • Sr. Member
  • ****
  • Posts: 396
I've uploaded a minimal Lazarus/Linux interface for the Hantek DSO-2090 to GitHub as

Curt46/Hantek-DSO-2090 . 

The code provides a GUI for the hardware.  Each time the "SAMPLE" button on the GUI is clicked, the program acquires data from the 'scope and presents it in a string grid.  Again, it is intended as a much-simplified starting point for creating your own Pascal software for this USB-connected digital 'scope.  It avoids all of the complexity associated with handling a full-up graphic display of the data.

This program does not include the program code that uploads the Hantek-provided DSO firmware from your PC each time you plug the scope into a USB port.  You will need to have installed a Linux program like OpenHantek (available on GitHub also, written in C++) for that.

 

TinyPortal © 2005-2018