PDA

View Full Version : Data acquisition app (require graphing and USB)




TurboLag
Feb 26, 2008, 03:15 PM
I will be developing a data acquisition application which will read data from a USB endpoint transmitting data with interrupt transfers. I would like to graph the data on a 2D plot (or preferably, 3D).

I would like to plan what languages/development route to take before I start. From what I read, using Objective-C with Cocoa is the preferred method of developing applications with a GUI.

Are there any free to use plug ins for graphing data? I was hoping there would be an API for Grapher.app, but there isnt. Does anyone have any success with any 3rd party graphing plug ins?

Also, are there any API calls for reading USB data from an endpoint? Any assistance would be appreciated. Thanks.



iSee
Feb 26, 2008, 04:08 PM
The USB APIs are in the IOKit. Link: http://developer.apple.com/documentation/Darwin/Reference/IOKit/index.html#//apple_ref/doc/framework/iokit_fw

Check out the USB sections of the headers and classes.

This is a C API, so it's easy to call from Objective-C/Cocoa code (if you don't know, Objective-C is a superset of C). This isn't a high-level API, though, so you're going to need some understand of USB programming to use these APIs. Look around for some sample code to get you started.

I'm not sure how well integrated your app needs to be, but you might be able to acquire the data to a .csv file (or something else) that Excel or Numbers could read. Then develop a graph in Excel or Numbers.

kainjow
Feb 26, 2008, 04:25 PM
Check out SM2DGraphView for graphing. However at the moment the developer's site seems to be down.

TurboLag
Mar 26, 2008, 03:08 PM
I have designed the device, so I know the Vendor and Product ID. Could I just read/write to the device's file in /dev?

Would this require the application's user to have administrator privileges?

yeroen
Mar 26, 2008, 03:18 PM
For graphing, I'd just use gnuplot:

http://www.gnuplot.info/

TurboLag
Mar 31, 2008, 07:31 PM
What about going the openGL route? Would this be over ambitious for 2D graphing? This would probably facilitate a transition to 3D graphing also.