Data acquisition app (require graphing and USB)

Discussion in 'Mac Programming' started by TurboLag, Feb 26, 2008.

  1. TurboLag macrumors member

    Feb 24, 2004
    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, 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.
  2. iSee macrumors 68040


    Oct 25, 2004
    The USB APIs are in the IOKit. Link:

    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.
  3. kainjow Moderator emeritus


    Jun 15, 2000
    Check out SM2DGraphView for graphing. However at the moment the developer's site seems to be down.
  4. TurboLag thread starter macrumors member

    Feb 24, 2004
    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?
  5. yeroen macrumors 6502a


    Mar 8, 2007
    Cambridge, MA
  6. TurboLag thread starter macrumors member

    Feb 24, 2004
    What about going the openGL route? Would this be over ambitious for 2D graphing? This would probably facilitate a transition to 3D graphing also.

Share This Page