필터 지우기
필터 지우기

How to obtain data (voltage) from a Signal Generator connected through USB port and plot voltage vs. time

조회 수: 3 (최근 30일)
Hello Everyone, Hope you are all fine. I am facing some problem with my assignment. The assignment is to connect a Signal Generator to pc through* USB* port and read data from it. Then I have to write a program in MATLAB that uses the data to plot a voltage vs. time graph. The program should be real-time. That is if I change the amplitude of signal the plot will change immediately. Your help is much appreciated. Thank You.

답변 (3개)

saima
saima 2012년 6월 5일
put some details about the problem. it would be easier to help if you explain your problem
  댓글 수: 1
Adnan Jahangir
Adnan Jahangir 2012년 6월 5일
In other word, I have to program an oscilloscope with MATLAB. It will obtain data from a signal generator connected to USB port of computer and plot the voltage vs. time curve (As in an oscilloscope).

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2012년 6월 5일
Using USB as your data interface is not compatible with real-time work or changing the plot "immediately". USB inherently works with packets (clumps) of data and MATLAB cannot read from a USB serial interface with less than a 40 millisecond delay after the data is generated, because of the way that USB was designed.
  댓글 수: 4
Adnan Jahangir
Adnan Jahangir 2012년 6월 7일
Well the problem is I am not allowed to use any kind of tool-boxes. I have to write codes to perform the task.
Walter Roberson
Walter Roberson 2012년 6월 9일
http://www.mathworks.com/help/techdoc/ref/serial.html
You will find communicating with the signal generator easier once you have located the referejce documentation for that particular model of signal generator, what-ever it is.

댓글을 달려면 로그인하십시오.


Sabquat Bahar
Sabquat Bahar 2012년 6월 9일
Dude, same problem here! :-(

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by