Author Topic: Plotting data from USB  (Read 12602 times)

Palito

  • Member
  • ***
  • Posts: 3
Plotting data from USB
« on: September 28, 2012, 03:18:37 pm »
Hello there. I'm a newbie in the forum, and I have a simple question (but with a hard solution, I think).

I have a little project, and in this project I'm sending data via USB to the PC (with bulk transfer). Data is digital signals like a sine, triangle, etc., with 16 bits. I want to plot these signals in the PC like in an oscilloscope.

So, my question is: Is there an fast way for this?? I suposse I can make a program, but it could be very long (I have never program a GUI, just with Matlab), I need something faster. I thought about Matlab, it could be very interesting, but I have been reading about this and I think it's not possible to read data directly from an USB.

Thanks for the help  :)  :)

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Plotting data from USB
« Reply #1 on: September 28, 2012, 10:47:38 pm »
I'm not familiar with Matlab programming, but it's likely there is some way to import data to an application. 

You might also take a look at:

http://www.programminghelp.com/web-development/asp-net/install-and-use-microsoft-chart-controls-to-render-a-graph-from-data-table-in-c/

If you need to transfer data from one application (that gets the data from the USB device) to another (that plots the data), see:

http://msdn.microsoft.com/en-us/library/aa365574%28VS.85%29.aspx

Palito

  • Member
  • ***
  • Posts: 3
Re: Plotting data from USB
« Reply #2 on: September 29, 2012, 05:07:15 am »
Hello Jan, thanks for the suggestion. Your idea could be good, but in that case I need two separate applications: the first to get the data via USB, and the second to plot the data. It could mean a big delay, and I think the main problem it's to get the data via USB.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Plotting data from USB
« Reply #3 on: September 29, 2012, 11:30:33 am »
How an application reads data from a USB device depends on the driver the host PC assigns to the device. What driver does your device use (WinUSB, FTDI, etc.)? Do you have an application  now that reads the data?

Palito

  • Member
  • ***
  • Posts: 3
Re: Plotting data from USB
« Reply #4 on: October 21, 2012, 02:49:58 pm »
I was reading about this, and finally I found a good & easy solution: to make the USB work as a COM port. Matlab have simple communication with COM ports.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Plotting data from USB
« Reply #5 on: October 22, 2012, 02:09:43 pm »
Glad to hear you found a solution. Thanks for reporting what you found.