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?

 Akzeptierte Antwort

Daniel
Daniel am 4 Mai 2021
Bearbeitet: Daniel am 4 Mai 2021

0 Stimmen

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

Weitere Antworten (1)

Pranav Verma
Pranav Verma am 19 Mär. 2021

0 Stimmen

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

1 Kommentar

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

Melden Sie sich an, um zu kommentieren.

Kategorien

Produkte

Version

R2020b

Gefragt:

am 15 Mär. 2021

Bearbeitet:

am 4 Mai 2021

Community Treasure Hunt

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

Start Hunting!

Translated by