Coverting from parallel to USB version

 
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
Author Message
Linners
Guest





PostPosted: Sun Feb 29, 2004 6:42 am    Post subject: Coverting from parallel to USB version Reply with quote

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
Site Admin


Joined: 07 May 2003
Posts: 610

PostPosted: Mon Mar 01, 2004 10:00 am    Post subject: Reply with quote

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





PostPosted: Mon Mar 01, 2004 10:44 am    Post subject: Coverting from parallel to USB version Reply with quote

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
Site Admin


Joined: 07 May 2003
Posts: 610

PostPosted: Tue Mar 02, 2004 8:44 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group