Using windows messages to interface with data acquisition
2 ビュー (過去 30 日間)
古いコメントを表示
Hello,
We are trying to build a Matlab GUI that interfaces with a custom instrument. We have a DLL that handles data acquisition for this instrument, and which posts a windows message to a user-defined Window handle when there is data available for retrieval.
Is it possible to catch this Windows message in Matlab and activate a callback that will communicate with the instrument DLL (using calllib) then store the data in one of the global variables in the main GUI code for display/processing/storage (the data display/processing/storage would be handled by timers or clicking other buttons on the main Matlab GUI).
Thank you, Stefan
0 件のコメント
回答 (2 件)
Jing
2012 年 12 月 13 日
I think if the Windows message is a output of DLL, MATLAB sure can accept the output, but how to activate certain callback using this output will be more tricky.
0 件のコメント
Philip Borghesani
2012 年 12 月 14 日
編集済み: Philip Borghesani
2012 年 12 月 14 日
To do this you will need a mex or loadable c function that creates a dummy window that can receive the messages and does the needed setup for the notifications. Doing this correctly is quite a bit of work I suggest using the Data Acquisition toolbox if it supports your hardware.
参考
カテゴリ
Help Center および File Exchange で Data Acquisition Toolbox Supported Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!