Data acquisition app (require graphing and USB)

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

  1. macrumors member

    Joined:
    Feb 24, 2004
    #1
    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.
     
  2. macrumors 68040

    iSee

    Joined:
    Oct 25, 2004
    #2
    The USB APIs are in the IOKit. Link: http://developer.apple.com/document...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.
     
  3. Moderator emeritus

    kainjow

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

    Joined:
    Feb 24, 2004
    #4
    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. macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #5
  6. thread starter macrumors member

    Joined:
    Feb 24, 2004
    #6
    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