Test and Measurement Forum

Coverting from parallel to USB version

Post general discussions on using our drivers to write your own software here

Coverting from parallel to USB version

Postby Linners » Sun Feb 29, 2004 6:42 am

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
Linners
 

Postby markspencer » Mon Mar 01, 2004 10:00 am

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: Select all
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,
Regards,

Mark Spencer
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Coverting from parallel to USB version

Postby Linners » Mon Mar 01, 2004 10:44 am

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
Linners
 

Postby markspencer » Tue Mar 02, 2004 8:44 am

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,
Regards,

Mark Spencer
User avatar
markspencer
Site Admin
Site Admin
 
Posts: 598
Joined: Wed May 07, 2003 9:45 am


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests