multiple ADC-24 in one program

Post general discussions on using our drivers to write your own software here
Post Reply
yogie
Newbie
Posts: 0
Joined: Wed Aug 01, 2018 5:18 am

multiple ADC-24 in one program

Post by yogie » Wed Aug 01, 2018 5:22 am

Last year I successfully developed an application with the ADC-24.
Now I have the task to extend the application for simultaneous use
of two ADC-24. Can anyone give me a hint for the initialization with two devices?
I use DELPHI, but I'm grateful for a tip in any other language.

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

Re: multiple ADC-24 in one program

Post by Martyn » Fri Aug 03, 2018 10:23 am

You can use the HRDLOpenUnit function multiple times to open the devices and get a handle for each one, and HRDLGetUnitInfo to identify the returned handles against serial numbers.
Martyn
Technical Support Manager

yogie
Newbie
Posts: 0
Joined: Wed Aug 01, 2018 5:18 am

Re: multiple ADC-24 in one program

Post by yogie » Sun Aug 05, 2018 7:13 am

Thank you for information. Now it works fine in my program (DELPHI)
I can read signals from two ADC-24.

But now I have an other problem.
If I try to close the devices with HRDLCloseUnit I see a error message

Microssoft C++
Runtime Error!
Program C:\...
R6025
- pure virtual function code

I am not sure, but sometimes it works for one (the first?) device.

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

Re: multiple ADC-24 in one program

Post by Martyn » Tue Aug 07, 2018 10:53 am

Have you called HRDLStop first ?
Martyn
Technical Support Manager

yogie
Newbie
Posts: 0
Joined: Wed Aug 01, 2018 5:18 am

Re: multiple ADC-24 in one program

Post by yogie » Tue Aug 07, 2018 3:57 pm

thank you for the answer.
I thought HRDLStop only needs to be used with srtreaming and I
don't use stremaning.

Anyway, I called HRDLStop before calling HRDLCloseUnit, no improvement.
In a minimal test program, I only call HRDLOpenUnit for two devices, one ADC-20
and one ADC-24. Then, after a few seconds, I try to call HRDLCloseUnit with the two
handles delivered from HRDLOpenUnit. First call returns after about 1 .. 2 seconds,
second call (second handle) never returns and I had to remove the USB-connection.
The version info from picohrdl.dll shows 1.4.0.205. No idea what works wrong.

Thanks in advance

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

Re: multiple ADC-24 in one program

Post by Martyn » Wed Aug 08, 2018 9:07 am

The picohrdl.dll file you have is an old version.

We are currently building a new release for the PicoSDK, and this includes an updated picohrdl.dll, so would suggest downloading this once it is available on the website (hopefully this week)
Martyn
Technical Support Manager

yogie
Newbie
Posts: 0
Joined: Wed Aug 01, 2018 5:18 am

Re: multiple ADC-24 in one program

Post by yogie » Wed Aug 08, 2018 10:38 am

... again, thank you

Post Reply