Test and Measurement Forum

Addressing a specific PicoScope 5xxx without opening

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

Addressing a specific PicoScope 5xxx without opening

Postby Siebje » Tue Mar 13, 2012 1:54 pm

Hi!
I'm currently working on writing a wrapper for the PicoScope 5xxx native driver, but I can't seem to find a way to target a specific PicoScope for the openUnit() call. As far as I can tell openUnit() picks the scope that's connected to the lowest USB port/hub number, which means that connecting the scopes to different ports does not result in the same scope being addressed first.
Is there any way to use an argumented openUnit() call, so I KNOW which PicoScope it will open regardless of the port it's plugged in to?
Thanks in advance!
Siebje
Newbie
 
Posts: 0
Joined: Tue Mar 13, 2012 1:33 pm

Re: Addressing a specific PicoScope 5xxx without opening

Postby Martyn » Tue Mar 13, 2012 3:24 pm

You can use the ps5000GetUnitInfo call to get the serial number of the device.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2344
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Addressing a specific PicoScope 5xxx without opening

Postby Siebje » Wed Mar 14, 2012 7:54 am

Correct me if I'm wrong, but calling getUnitInfo() requires me to have opened the unit. What I'm asking is how to know which unit will be opened if I have multiple PicoScopes attached and I call openUnit().
Siebje
Newbie
 
Posts: 0
Joined: Tue Mar 13, 2012 1:33 pm

Re: Addressing a specific PicoScope 5xxx without opening

Postby Martyn » Wed Mar 14, 2012 11:36 am

There isn't a function to open unit by serial number with the 5000 series.

The best you can do is to open all the units, read the serial numbers of each unit, and then compare these to the one you are looking for. You then keep and use the handle associated with this device whilst closing the other units.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2344
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests