|
|
| Author |
Message |
Linners Guest
|
Posted: Sun Feb 29, 2004 6:42 am Post subject: Coverting from parallel to USB version |
|
|
Hi,
I have used some software for the past year or so that uses the DrDaq unit as a light gate timer. However, the latest laptop adopted by the school doen't have a parallel port so I have got hold of a USB-parallel device from Pico. In my original software I put in the following code
port = 1
Do 'While opened = False
opened = drdaq_open_unit(port) <> 0 'Open drdaq driver
port = port + 1
If port > 110 Then
MsgBox ("Sorry I can't detect a DrDaq unit on the computer. Check connections and try again.")
cmdClose_Click
End
Exit Do
End If
Loop While opened = False
port = port - 1
to check what port the unit was connected to but it now reports that there is no DrDaq unit connected. I thought that the only difference I would have to do was this port number. Am I missing something? The Picoscope finds the unit OK. I have copied the updated DrDaq32DLL from the picoscope directory to my progs (it reports as 86432 bytes).
I would appreciate some pointers.
Regards
Linners |
|
| Back to top |
|
 |
markspencer Site Admin

Joined: 07 May 2003
Posts: 610
|
Posted: Mon Mar 01, 2004 10:00 am Post subject: |
|
|
Hi,
I am sorry to hear that you are experiencing this problem.
The simpliest method would be to see what the USB-PP number is registered in you Device manager, if you only have one usb to parallel port device connected it will usually be registered as USB-PP1, when trying to open it through the driver it is opened via 101 for this port number. In your software I would advise trying this port three times and then bailing out, it can take a few seconds for the USB to Parallel port device to enumerate.
| Code: |
count =0
port = 101
Do 'While opened = False
opened = drdaq_open_unit(port) <> 0 'Open drdaq driver
count = count + 1
If count > 3 and port = False Then
MsgBox ("Sorry I can't detect a DrDaq unit on the computer. Check connections and try again.")
cmdClose_Click
|
I hope this is of some use.
Best regards, |
|
| Back to top |
|
 |
Linners Guest
|
Posted: Mon Mar 01, 2004 10:44 am Post subject: Coverting from parallel to USB version |
|
|
Mark,
What would I do without your wisdom. Kicking the unit twice has done it for me.
Incidentally I have written this code to use some 'home made' light gates using IR transmitter and IR transistor with some microbore copper piping to house the leads. I can send you some photos and the software if you want.
regards
Mike |
|
| Back to top |
|
 |
markspencer Site Admin

Joined: 07 May 2003
Posts: 610
|
Posted: Tue Mar 02, 2004 8:44 am Post subject: |
|
|
Hi,
Thanks for the offer, but at this time we are not looking for new experiements.
Glad to hear that solution worked for you.
Best regards, |
|
| Back to top |
|
 |
|