Creating a delphi API interface for PL1000.dll

Forum for discussing PicoLog
Post Reply
GWL
Newbie
Posts: 0
Joined: Wed Sep 13, 2023 12:59 am

Creating a delphi API interface for PL1000.dll

Post by GWL »

Hi,
I am replacing a winXP ADC11 system written in Delphi.
I have found that PICO no longer support Delphi and am trying to creating a ADC1012.inc file to call the PL1000 dll.

An example of the old ADC11.inc file is:
Function adc11_open_unit (port: word; product: word): boolean : stdcall; external ‘ADC1132.dll’ ;

Looking at the pl1000Api.h file I find the equivalent:
PREFO PREF1 PICO_STATUS PREF2 PREF3 Pl1000OpenUnit (int16_T 8 handle)

My Question are:
1. Has anyone created and equivalent ADC1012.inc file ?

2. Is it possible to translate the pl1000Api.h headers to pascal such as :
Function Pl1000OpenUnit (handle: word): boolean : stdcall; external ‘PL1000.dll’ ;
and the equivalent for rest of the of the DLL calls ?

3. In the above C header there is PREFO PREF1 PICO_STATUS PREF2 PREF3. How does this relate to the
returning a Boolean value?

4. Is there any documentation regarding the API calls to PL1000.dll

Regards

greg

Martyn
Site Admin
Site Admin
Posts: 4501
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Creating a delphi API interface for PL1000.dll

Post by Martyn »

I am not sure if anyone has created a delphi inc file for the PL1000 but it should be possible to produce one. It may even be possible to use the header file with one of the AI engines (ChatGPT or GoogleBard) to do this.

The Programmer's Guide can be found here https://www.picotech.com/download/manua ... -guide.pdf
Martyn
Technical Support Manager

GWL
Newbie
Posts: 0
Joined: Wed Sep 13, 2023 12:59 am

Re: Creating a delphi API interface for PL1000.dll

Post by GWL »

Hi Martyn,
Once I found the documentation it took me about 6 hours to create all the functions for the delphi adc1012.inc file.
I am surprised that an official one is not available. As I only use the single read I have not validated many of the other functions.

Post Reply