Test and Measurement Forum

Logging from multiple ADC11 at the same time?

Post your C and C++ discussions here

Logging from multiple ADC11 at the same time?

Postby aaroe » Wed Feb 27, 2008 9:44 pm

Hi there.

I'm interesting in knowing whether it's possible to have several USB ADC-11 attached to one computer and still being able to log from all the channels?

When saying multiple I'm talking about 3-4 ADC11's connected to the computer at the same time.

If this is possible and supported do you have any code examples on how to handle multiple devices or simply any good advices or possible pitfalls which would be nice to know?

Thanks in advance
Christian Rasmussen, Denmark
aaroe
Active User
Active User
 
Posts: 6
Joined: Wed Dec 27, 2006 10:41 am
Location: Aalborg, Denmark.

Postby gruntman » Wed Feb 27, 2008 11:12 pm

Christian,

This is entirely possible. The easiest way to accomplish this is through the PicoLog software. Simply attach the units to your PC (up to 4 USB ADC-11's can be used) and then startup the PicoLog software. Go to the File menu and then select New Settings. On this menu there will be a option called 'Use mulitple converters', simply check this box and then you will be able to log from all of your units...

If you are needing to do this is a custom program you will need to call the open_unit call for each unit. Below is an example of combining multiple units for the PS3000 series but should give you an idea on how to accomplish this with the USB ADC-11:
handle1 = ps3000_open_unit()
handle2 = ps3000_open_unit()
ps3000_set_channel(handle1)
... set up unit 1
ps3000_run_block(handle1)
ps3000_set_channel(handle2)
... set up unit 2
ps3000_run_block(handle2)
ready = FALSE
while not ready
ready = ps3000_ready(handle1)
ready &= ps3000_ready(handle2)
ps3000_get_values(handle1)
ps3000_get_values(handle2)

If you have any other questions feel free to post them here...

Regards,

Richard Boyd
Crag Technologies, Inc
http://www.pc-oscilloscopes.com
gruntman
Guru
Guru
 
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm

Thanks alot

Postby aaroe » Thu Feb 28, 2008 6:28 pm

Thanks alot.

I'm going to use it for a custom application for a project at my university. Sadly, I'm not that much into C/C++ although I understand the basics from other programming languages which I have worked with. Also, there doesn't seem to be any around who have any experience with making custom programs to our ADC-11 so mypossibilities are quite narrow when it comes to assistance with this. Therefore I'm very happy with your response and will get on it right away.

There will probably be a few questions from me tomorrow :)

Again, thanks for your help

Kind regards
Christian Rasmussen
aaroe
Active User
Active User
 
Posts: 6
Joined: Wed Dec 27, 2006 10:41 am
Location: Aalborg, Denmark.

A quick question handling multiple ADC-11's

Postby aaroe » Fri Feb 29, 2008 11:54 am

I might have stumbled into a small problem during my planning process.

In my specific situation, I would like to have a support for up to 4 devices. The application will consist of 2 parts. A small C application which collects data from all channels on all the connected devices when run and spits them out in a formatted manner through stdout. The data will be captured by a Java application I've whipped together (I'm a bit more skilled in Java which is why I've chosen to do it this way). So the C part is strictly for data-collection.

The proble I've run into is when I collect the data, how do I make sure where the data is from? let's say I send out 4 strings with data from all 4 connected ADC's in a comma-separated format e.g.: 1:2:3:...:11
I would like to make sure that I don't mix up the measurings from device 2 with the one from device 3 and so on. Therefore I thought I could prefix the individual strings with the serialnumber of the device e.g.: QJY3649@1:2:3:...:11 in order to identify which device the data belongs to. Also this would make sure that even though the devices switch usb port on the computer, I'd be sure on the order of the data.

I've seen that the PicoLog application is capable of viewing the serial numbers of the connected devices, but I can't seem to be able to fecth these ID's through any of the functions accessible to me when working with the ADC-11 in C? Can this be true?

Kind regards
Christian Rasmussen
aaroe
Active User
Active User
 
Posts: 6
Joined: Wed Dec 27, 2006 10:41 am
Location: Aalborg, Denmark.

Postby gruntman » Fri Feb 29, 2008 5:08 pm

Christian,

To get the serial numbers from the units simply call UsbAdc11GetUnitInfo. The function is called like this:
short (UsbAdc11GetUnitInfo) (short handle, char * string, short stringLength, short line);

The line number that you would be interested in is 4. The different info you can get from this function is:
USBADC11_DRIVER_VERSION
USBADC11_USB_VERSION
USBADC11_HARDWARE_VERSION
USBADC11_VARIANT_INFO
USBADC11_BATCH_AND_SERIAL
USBADC11_CAL_DATE
USBADC11_KERNEL_DRIVER_VERSION
USBADC11_ERROR
USBADC11_SETTINGS

Regards,

Richard Boyd
Crag Technologies, Inc
http://www.pc-oscilloscopes.com
gruntman
Guru
Guru
 
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm


Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests