USB Port ID for Excel Use

Post general discussions on using our drivers to write your own software here
Post Reply
keaven393207
Newbie
Posts: 1
Joined: Sat Aug 27, 2005 2:58 pm

USB Port ID for Excel Use

Post by keaven393207 »

I'd like to send data into an Excel file through 2 or 3 USB ports, and I need to know which port the data came from when I handle it in Excel. Is there a way?

Michael
Advanced User
Advanced User
Posts: 656
Joined: Thu Jul 07, 2005 12:41 pm
Location: St Neots, Cambridgeshire

Post by Michael »

Hello,

Thank you for your post.

If you are using Pico drivers, you should not need the USB port ID when requesting data.
If you are having difficulty with using our drivers, please don't hesitate to contact us direct at tech@picotech.com


Best regards,
Michael
Michael - Tech Support
Pico Technology
Web Support Forum

Guest

Post by Guest »

Dear all,
I Hope the malfunctionning reported in past September has been fixed,
since I need to run an EXCEL programme using the library driver routines taken from
http://www.picotech.com/download.html.

Thus, what should be the "port" number for a DRDAQ connected to a "USB parallel port" interface in
drdaq_open_unit Lib "drdaq32.dll" (ByVal port As Integer) As Integer ?

Thank you
JYH (official registered member)

p.s. forgive me for acting as "Guest" but I could not log in

Michael
Advanced User
Advanced User
Posts: 656
Joined: Thu Jul 07, 2005 12:41 pm
Location: St Neots, Cambridgeshire

Post by Michael »

Hello,

As a general rule, our Parallel port products occupy port numbers with a single integer as LPT1 = 1, LPT2 = 2 etc.
Parallel port products using the Pico USB parallel port adapter occupy port numbers with 2 integers, simply prefix with a 1: USBPP1 = 11, USBPP2 = 12 etc.

Further explanations can be found in the manual.

Best regards,
Michael
Michael - Tech Support
Pico Technology
Web Support Forum

Guest

Post by Guest »

Hello,
PICOSCOPE detects the presence of the DRDAQ module
when either connected onto the parallel (LPT1) or onto the USB (USBPP1) port

but

'drdaq_open_unit' routine ALWAYS returns 0
when DrDAQ is connected to the USB interface.
In the latter, port-number is set to 11 to specified USBPP1.
The same code works fine when DrDAQ is connected onto LPT1 where port_number is set to 1.

here are the 3 lines to open the DrDAQ module:
Declare Function drdaq_open_unit Lib "drdaq32.dll" (ByVal port As Integer) As Integer
port_number=11
resp = drdaq_open_unit(port_number)

... Is port_number=11 correct when connected to USBpp1... ?

Thank you again
JYH

p.s. the above trouble occurs whatever the downloaded driver routine version
from http://www.picotech.com/download.html.

Guest

Post by Guest »

Michael wrote:Hello,

As a general rule, our Parallel port products occupy port numbers with a single integer as LPT1 = 1, LPT2 = 2 etc.
Parallel port products using the Pico USB parallel port adapter occupy port numbers with 2 integers, simply prefix with a 1: USBPP1 = 11, USBPP2 = 12 etc.

Further explanations can be found in the manual.

Best regards,
Michael
Amazingly, DrDAQ seems to be found onto 101 rather than 11 as above quoted.
The led on the DrDAQ module gets lit when VB opens port 101.
But VB aborts on the first call to "drdaq_get_times_and_values" routine.
The fault report is better described in 3 steps on
http://hemery.sytes.net/usb_VB_abortion.jpg

Thanks for any advice to get the USB interface working
JYH

Guest

Post by Guest »

Since DrDAQ on USBpp was found on port 101 rather than 11
I run an Excel VB piece of code which does work fine on LPT1(port=1)
but it aborts when DrDAQ is plugged onto USBpp(port=101)
see : http://hemery.sytes.net/usb_Vb_abortion.jpg

What test would you would suggest me next?
Thank you
JYH

Post Reply