Hi There
We have about 40 ADC24s at customer sites, all running on windows XP. We are using a VB6 Application to switch one of the Digital Ouputs on and off.
When we run the application on XP, all works great, our application takes samples from 1 analog channel every 1- 30 seconds and the digital output can be switched on or off instantaneoulsy.
However, when we run the application in windows 7, 32 bit Pro edition, each time the digital ouput is told to switch on or off, the program hangs for about 8 seconds. At the end of the 8 seconds the ouput switches.
The problem seems to be where we are calling HRDLSetDigitalIOChannel, it takes about 8 seconds to return a value.
Here is the code we have that is calling it:
Private Sub TestLight()
Dim ret As Integer
If g_hADC = 0 Then Exit Sub
If g_TChannelReadings(0).ReadingDisplay >= g_oApp.LightONPressure And (Not g_oApp.fLightLit) Then
ret = HRDLSetDigitalIOChannel(g_hADC, 1, 1, 0)
g_oApp.fLightLit = True
End If
If g_TChannelReadings(0).ReadingDisplay <= g_oApp.LightOFFPressure And (g_oApp.fLightLit) Then
ret = HRDLSetDigitalIOChannel(g_hADC, 1, 0, 0)
g_oApp.fLightLit = False
End If
End Sub
The function is declared thus:
Public Declare Function HRDLSetDigitalIOChannel Lib "PicoHRDL.dll" (ByVal handle As Integer, ByVal directionOut As Integer, ByVal digitalOutPinState As Integer, ByVal enabledDigitalIn As Integer) As Integer
We are currently using PICOHRDL.dll version 1.2.1.0 at the customer site on XP and it works fine.
On windows 7, we have tried this version upto the latest version (1.4.0.79) but none cause the DO to switch as it should.
We have also tried running in compatibility mode with no change.
Is this a known problem with windows 7?
Our client is currently in the process of moving up to windows 7 , so we could do with a hand to fix our problem before then.
Best Regards
Richard
status = HRDLSetDigitalIOChannel(handle, 1, 0, 0)
Cells(23, "E").value = "Setting D0 to 1" 'This is for Excel
status = HRDLSetDigitalIOChannel(handle, 1, 1, 0)
status = HRDLSetDigitalIOChannel(handle, 1, 0, 0)
This sets the output, Low, High then Low.
Have you tried setting a breakpoint on the line then executing the function call?
How many ADC-24 units are connected to a single PC?