Picolog ADC24 Digital Ouputs slow to switch on Windows 7

Forum for discussing PicoLog
Post Reply
RelChron
Newbie
Posts: 0
Joined: Mon Jan 14, 2013 11:50 pm

Picolog ADC24 Digital Ouputs slow to switch on Windows 7

Post by RelChron »

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

Hitesh

Re: Picolog ADC24 Digital Ouputs slow to switch on Windows 7

Post by Hitesh »

Hi Richard,

Try running PicoLog and setup a channel with an alarm condition to output on Channel D1 when the voltage goes above/below certain threshold values.

I've tested that here with my PC (Windows 7 Pro SP1, 32-bit ) with the output to one of our scopes and that's fine. That is with the dll v1.4.0.79

I'll run some further tests using our C console application and Excel VBA example.

Regards,

Hitesh

Re: Picolog ADC24 Digital Ouputs slow to switch on Windows 7

Post by Hitesh »

Hi Richard,

Just an update, I've run both our C console application and Excel VBA application succesfully - the output is set pretty much instantaneous.

I'm afraid I don't have VB6 but I've posted my code calls below:

Code: Select all

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?

Thanks,

Post Reply