|
|
| Author |
Message |
chrism User

Joined: 25 Jul 2006
Posts: 2
|
Posted: Tue Jul 25, 2006 2:38 pm Post subject: Problem with ADC-10 VB sample file in VB6 |
|
|
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! |
|
| Back to top |
|
 |
Michael Guru

Joined: 07 Jul 2005
Posts: 93
Location: St Neots, Cambridgeshire
|
Posted: Wed Jul 26, 2006 7:57 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
chrism User

Joined: 25 Jul 2006
Posts: 2
|
Posted: Wed Jul 26, 2006 11:04 am Post subject: |
|
|
Michael,
Many thanks for your reply.
That's solved the problem.
Thanks,
Chris... |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|