Problem with ADC-10 VB sample file in VB6

 
Post new topic   Reply to topic    Pico Technology Forum Index -> VB and VBA (Excel, Access)
Author Message
chrism
User
User


Joined: 25 Jul 2006
Posts: 2

PostPosted: Tue Jul 25, 2006 2:38 pm    Post subject: Problem with ADC-10 VB sample file in VB6 Reply with quote

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
Guru


Joined: 07 Jul 2005
Posts: 93
Location: St Neots, Cambridgeshire

PostPosted: Wed Jul 26, 2006 7:57 am    Post subject: Reply with quote

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
User


Joined: 25 Jul 2006
Posts: 2

PostPosted: Wed Jul 26, 2006 11:04 am    Post subject: Reply with quote

Michael,

Many thanks for your reply.

That's solved the problem.

Thanks,

Chris...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> VB and VBA (Excel, Access)
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group