How to obtain data (voltage) from a Signal Generator connected through USB port and plot voltage vs. time
古いコメントを表示
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
2012 年 6 月 5 日
0 投票
put some details about the problem. it would be easier to help if you explain your problem
Walter Roberson
2012 年 6 月 5 日
0 投票
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
2012 年 6 月 6 日
Walter Roberson
2012 年 6 月 6 日
See the documentation for serial()
Also you might find that the Instrument Control Toolbox makes it easier to talk to the signal generator.
Adnan Jahangir
2012 年 6 月 7 日
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
2012 年 6 月 9 日
0 投票
Dude, same problem here! :-(
カテゴリ
ヘルプ センター および File Exchange で Oscilloscopes についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!