Multiple 3205's

Post your C and C++ discussions here
Post Reply
physicsfaith
Active User
Active User
Posts: 10
Joined: Thu Jul 12, 2007 3:26 pm
Location: Manhattan, KS

Multiple 3205's

Post by physicsfaith »

To hook up multiple 3000 series oscopes, the manual says to use multiple handles, as was noted in topic below this one. The problem is the new canned driver design uses a new syntax, unitOpened.handle, instead of handle by itself. There is then a number it is assigned. The problem is running unitOpened.handle = ps3000_open_unit() more than once results in an error.

gruntman
Advanced User
Advanced User
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm

Post by gruntman »

physicsfaith,

In order to open multiple units you will need to have mulitple handles. That being said instead of calling unitOpened.handle = ps3000_open_unit() twice you need to call it with different handles like:
unitOpened.handle = ps3000_open_unit();
unitOpened.handle2 = ps3000_open_unit();

Regards,

Richard Boyd
Crag Technologies, Inc
http://www.pc-oscilloscopes.com

physicsfaith
Active User
Active User
Posts: 10
Joined: Thu Jul 12, 2007 3:26 pm
Location: Manhattan, KS

Post by physicsfaith »

I tried that first and I still got an error. Perhaps I have something else wrong. Thanks for the advice.

gruntman
Advanced User
Advanced User
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm

Post by gruntman »

physicsfaith,

Whats the error that you are getting?

Regards,

Richard Boyd
Crag Technologies, Inc
http://www.pc-oscilloscopes.com

physicsfaith
Active User
Active User
Posts: 10
Joined: Thu Jul 12, 2007 3:26 pm
Location: Manhattan, KS

Post by physicsfaith »

I just rechecked everything. If you try to use unitOpened.handle2 = ps3000_open_unit it returns "structure has no member named 'handle2'. I haven't downloaded the source files since last fall. Perhaps that is the problem.

gruntman
Advanced User
Advanced User
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm

Post by gruntman »

physicsfaith,

My apologizes but it seems as i had a typo in the previous post. The way you need to call it is:
unitOpened.handle = ps3000_open_unit();
unitOpened2.handle = ps3000_open_unit();

You will also have to duplicate the unitOpened structure and name the structure as unitOpened2. You can also get around this by not using the unitOpened structure and simply name your handles handle and handle2 or something similar.

Regards,

Richard Boyd
Crag Technologies, Inc
http://www.pc-oscilloscopes.com

physicsfaith
Active User
Active User
Posts: 10
Joined: Thu Jul 12, 2007 3:26 pm
Location: Manhattan, KS

Post by physicsfaith »

On the version of ps3000.h .dll and .lib I am using unitOpened2.handle gives the error that the var unitOpened2 is not defined.

physicsfaith
Active User
Active User
Posts: 10
Joined: Thu Jul 12, 2007 3:26 pm
Location: Manhattan, KS

Post by physicsfaith »

Oops...I just saw that you said I would have to define the structure...

Post Reply