How to control Pic4262 by Borland C++

Post your C and C++ discussions here
Post Reply
xaviery
Newbie
Posts: 0
Joined: Thu Oct 25, 2018 2:11 am

How to control Pic4262 by Borland C++

Post by xaviery » Thu Oct 25, 2018 8:03 am

Dar all.
I use pico USB 4262, I would like to integrate this carde in an existing application programmed in Borland c++. What I want is to record a waveform by software.
Is there any example in C++ Borland?
Thank you in advance
Xavier

Hitesh
Advanced User
Advanced User
Posts: 2856
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: How to control Pic4262 by Borland C++

Post by Hitesh » Mon Oct 29, 2018 7:11 pm

Hello Xavier,

You can obtain a C example for the ps4000 driver API functions from https://github.com/picotech/picosdk-c-examples

You will need to generate your own Borland lib files. The C header files are available via the installation directory of the PicoSDK.

Regards,
Hitesh

Software Dev. Engineer

XavierPico
Newbie
Posts: 0
Joined: Thu Jan 23, 2020 5:16 pm

Re: How to control Pic4262 by Borland C++

Post by XavierPico » Thu Jan 23, 2020 6:06 pm

Many thanks Hitesh,
I will explore the link and seek further to generate Borland *.lib.
With my best regards
Xavier

XavierPico
Newbie
Posts: 0
Joined: Thu Jan 23, 2020 5:16 pm

Re: How to control Pic4262 by Borland C++

Post by XavierPico » Sat Jan 25, 2020 10:03 am

Dear all.
Thanks to Hitesh, I have regenerated *.lib in order to use ps4000.dll in C++ Builder.
What I want to do is to control picoscop4262 for data recording. In sample site https://github.com/picotech/picosdk-c-examples, I don't find C++ Builder application cases (Borland, now Embarcadero).
Would you please help me to start with a simple example in C++ Builder (sorry, I am electro technic engineer, I don't know very much the differences of C++ languages). Is there any example in C++ Borland?
Thank you in advance
Xavier

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

Re: How to control Pic4262 by Borland C++

Post by Martyn » Sun Jan 26, 2020 9:22 am

We don't have specific projects for Borland, so create a new project and just add the relevant files.
Martyn
Technical Support Manager

XavierPico
Newbie
Posts: 0
Joined: Thu Jan 23, 2020 5:16 pm

Re: How to control Pic4262 by Borland C++

Post by XavierPico » Sun Jan 26, 2020 3:55 pm

I have regenerated *.lib in order to use ps4000.dll in C++ Builder 2010.
In a new C++Builder project, I have included:
ps4000.lib
#include "ps4000Api.h"
#include "PicoStatus.h"
#include "PicoConnectProbes.h"
After compilation, the project is OK with executable. Then, according to PicoScope 4000 Series Programmer's Guide, I have simply added two lines:

int16_t handle;
ps4000SetNoOfCaptures(handle, 100);

Here is the error message:
[BCC32 Error] WaveDataPico4262.cpp(82): E2268 Call to undefined function 'ps4000SetNoOfCaptures'

Many thanks for your help.
Xavier

Post Reply