Deleting objects from TMTool after clearing from workspace

In testing new functions which use visa, we noticed out-of-memory errors when creating and clearing visa objects. This appears to be because they are saved in TMTool as well as the Workspace. Now, if the Workspace variable is cleared, the object remains in TMTool with no handle to delete it. Is there a way to generate new object habdles for TMTool Instrument Objects?

 采纳的回答

Daniel
Daniel 2021-5-4
编辑:Daniel 2021-5-4
Turns out I forgot that 'instrfind' returns all the handles. Therefore,
fclose( instrfind( 'Status', 'open' ); delete( instrfind );
works.

更多回答(1 个)

Hi Daniel,
You can try instrreset to disconnect and delete all the instrument objects.
Thanks

1 个评论

Turns out I forgot that 'instrfind' returns all the handles. Therefore,
fclose( instrfind( 'Status', 'open' ); delete( instrfind );
works.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Instrument Connection and Communication 的更多信息

产品

版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by