Hello all,
I have implemented a Visual C ++ software that reads pressures from a data acquisition hardware and transfers every second (1s) data to Matlab.
To do this i used the Matlab Engine and sent through the engEvalString () function.
The data is correctly acquired by Matlab and the workspace arrays that contain these data are updated in real time. However, if i perform some operations such as plotting, calculation... , during the execution of these operations matlab's acquisition of data is interrupted.
How can allow multitasking of background data that does not interrupt when performing operations directly in the workspace?
PS: i would like to create matlabs GUI and wishes to run them during data capture, without these executions interfering temporarily blocking the acquisition.
Can anybody help me? Thank you!!!

回答 (1 件)

Walter Roberson
Walter Roberson 2017 年 5 月 31 日
編集済み: Walter Roberson 2017 年 5 月 31 日

0 投票

You cannot do that using engEvalString to transfer the data.
You should consider using tcp to transfer the data. You can use callbacks so that the data is transferred in the background.
Or possibly write the data into a shared memory segment that is read by MATLAB. The File Exchange Contribution sharedmatrix is not coded for MS Windows, but the changes to get it to work with MS Windows should not be much.
You could also consider writing into a file and using memmapfile()

カテゴリ

ヘルプ センター および File ExchangeData Acquisition Toolbox についてさらに検索

質問済み:

2017 年 5 月 31 日

編集済み:

2017 年 5 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by