Data acquisition from a Measurement Computing USB device

I would like to use Mathematica 9 for to acquire data from a Measurement Computing (MC) USB-201 analog to digital (and other) device for classroom demonstration. I do not have a budget to buy LabView and link Mathematica with it to accomplish what I would like to.

Within Mathematica I have tried using Manipulate to see if I can detect a signal (anything) from this board (excited artificially with a variable 0-5V source). So far, I do not see any changes indicating I am communicating with this equipment.

Has anyone done something like this? Do I need a driver, and if so, where do I get it?

Clearly, I am not a DAQ expert. I need someone to speak slowly and distinctly so I can understand them.

Thank you.

-
Use the C++ library Measurement Computing is distributing ? – Sektor Jan 18 '14 at 22:03
@Sektor Why the question mark... Anyway, the obvious follow-up is how? This is what the OP wants to know. – Pickett Jan 18 '14 at 23:00
Can you elaborate on what you used inside your Manipulate? – bobthechemist Jan 18 '14 at 23:10
Have you seen the device interface? And this guide? – carlosayam Jan 19 '14 at 0:13
@Pickett A suggestion. Well, he did not specify ... – Sektor Jan 19 '14 at 0:26

If this device support NI-VISA (as I understood from your reference to LabVIEW), then you can use following way:

1. Install the VISA engine (available at National Instruments' web-site)
2. Use the following code.

Needs["NETLink"]

"C:\\Program Files (x86)\\IVI \Foundation\\VISA\\VisaCom\\GlobMgr.dll"]
mgr = NETNew["Ivi.Visa.Interop.ResourceManagerClass"];
OSA = NETNew["Ivi.Visa.Interop.FormattedIO488Class"];

devs = mgr@FindRsrc["?*instr"];
devdescr = {};
Do[
OSA@IO = mgr@Open[devs[[i]]];
OSA@WriteString ["*IDN?"];
AppendTo[devdescr, id[[2]]],
{i, 1, Length[devs]}];

If[devs == \$Failed, devs = {"empty"}; devdescr = {"NoDeviceDetected"}];


The first string enables NETLink and the next three strings load the VISA global manager and create an object named OSA.

The next block asks the VISA global manager for connected devices and gives you a list, devs, with their inner descriptions, devdescr.

You can connect to the needed device using the command:

OSA@IO = mgr@Open[devs[[x]]]


Where x is number in the list... After this, you can send any commands to a device using

OSA@WriteString ["<command>"]


OSA@ReadList[]


Or

OSA@ReadString[]


The list of supported commands should be in the user manual for your device.

-
Shouldn't "\\IVI \Foundation\\" be "\\IVI\\Foundation\\"? – Peter Mortensen Jun 3 at 22:54
In "Needs["NETLink"]", what does the  do (after the "k")? – Peter Mortensen Jun 3 at 22:55
@Peter, the backtick denotes the context of the functions about to be loaded by Needs[]; in this case, NETLink . – J. M. Jun 3 at 23:20