|
|
| Author |
Message |
Plewe, Joerg Active User

Joined: 07 Feb 2006
Posts: 8
Location: Germany
|
Posted: Tue May 30, 2006 6:23 am Post subject: Problems to close multiple ADC20 by VB6 |
|
|
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] |
|
| Back to top |
|
 |
Michael Guru

Joined: 07 Jul 2005
Posts: 93
Location: St Neots, Cambridgeshire
|
Posted: Fri Jun 02, 2006 2:22 pm Post subject: |
|
|
Hello,
This is a tricky one.
is ther anymore code you can post for us?
Best regards,
michael |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|