Test and Measurement Forum

Problems to close multiple ADC20 by VB6

Post general discussions on using our drivers to write your own software here

Problems to close multiple ADC20 by VB6

Postby Plewe, Joerg » Tue May 30, 2006 6:23 am

I have problems to close my opened ADC20 units.
The operating system will "hang up" after closing the first two units.

I use driver "PicoHRDL.dll" from date 24.01.2006
(it is from download "PicoFull_r5_13_9")

After opening multiple ADC20 units by VB6 code:

Sub Init_StromLog()
Dim n As Integer
Dim i As Integer
Do While 1 = 1
again:
hrdl_handle(n) = HRDLOpenUnit()
If hrdl_handle(n) < 0 Then GoTo Err1
If hrdl_handle(n) = 0 Then Exit Do
For i = 1 To 8
channelOk = HRDLSetAnalogInChannel(hrdl_handle(n), i, 1, 0, 1)
Next i
n = n + 1
StromLogUnits = n
Loop
Exit Sub
Err1:
Interuppt = False
MsgBox ("Fehler beim öffnen von StromLogger " & n)
GoTo again
End Sub

And read out all values

I want to close the units by VB6 code:


Sub Stop_StromLog()
Dim n As Integer
Do While 1 = 1
'On Error GoTo Err1
If hrdl_handle(n) = 0 Then Exit Do
If hrdl_handle(n) > 0 Then
ok = HRDLCloseUnit(hrdl_handle(n))
If ok < 1 Then GoTo Err1
End If
n = n + 1
'On Error GoTo 0
Loop
Exit Sub
Err1:
Interuppt = False
MsgBox ("Fehler beim schliessen der StromLogger! " & n)
End Sub

What make i wrong??
How many units can the driver support?[/code]
Plewe, Joerg
Active User
Active User
 
Posts: 8
Joined: Tue Feb 07, 2006 10:34 am
Location: Germany

Postby Michael » Fri Jun 02, 2006 2:22 pm

Hello,

This is a tricky one.

is ther anymore code you can post for us?

Best regards,
michael
Michael - Tech Support
Pico Technology
Web Support Forum
Michael
Zen Master
Zen Master
 
Posts: 656
Joined: Thu Jul 07, 2005 12:41 pm
Location: St Neots, Cambridgeshire


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 1 guest