Problem with ADC-10 VB sample file in VB6

Post your VB and VBA discussions here
Post Reply
chrism
User
User
Posts: 2
Joined: Tue Jul 25, 2006 1:09 pm

Problem with ADC-10 VB sample file in VB6

Post by chrism »

Hi,

I'm updating a program for the ADC-10 that I originally wrote in VB4 using the Pico sample code. Using VB4 this worked perfectly and the resulting software has given years of service with the ADC-10.

When I recently loaded the program code into VB6 I found that the adc10_open_unit(port, product) worked only once on the very first attempt with a freshly booted VB6. Subsequent attempts to run adc10_open_unit(port, product) did not open the ADC-10.

I then tried loading the Pico VB sample code into VB6. From a text box it appears it was written in an earlier version of VB. Again it ran on the initial attempt with a freshly booted VB6 but could not find the ADC-10 on subsequent run attempts.

I'm somewhat puzzled and would welcome any help or advice!

Michael
Advanced User
Advanced User
Posts: 656
Joined: Thu Jul 07, 2005 12:41 pm
Location: St Neots, Cambridgeshire

Post by Michael »

Hello,

I am not sure of the differences between the versions. It appears that the program or driver thread is lost in the older versions of VB.

In order to access the device, you will need to ensure the driver instance is closed when you have finished with it. Otherwise it will persist and block other calls to the same unit.

Call the adc10_close_unit

Let me know how you get on.

Best regards,
Michael
Michael - Tech Support
Pico Technology
Web Support Forum

chrism
User
User
Posts: 2
Joined: Tue Jul 25, 2006 1:09 pm

Post by chrism »

Michael,

Many thanks for your reply.

That's solved the problem.

Thanks,

Chris...

Post Reply