Main Content

instrreset

(To be removed) Disconnect and delete all instrument objects

This function that uses serial, Bluetooth, tcpip, udp, visa, gpib, or i2c will be removed in a future release. Use serialport, bluetooth, tcpclient, tcpserver, udpport, visadev, aardvark/device, or ni845x/device instead. For more information on updating your code, see Version History.

Syntax

instrreset

Description

instrreset disconnects and deletes all instrument objects.

Tips

If data is being written or read asynchronously, the asynchronous operation is stopped.

instrreset is equivalent to issuing the stopasync (if needed), fclose, and delete functions for all instrument objects.

When you delete an instrument object, it becomes invalid. Because you cannot connect an invalid object to the instrument, you should remove it from the workspace with the clear command.

Version History

Introduced before R2006a

expand all

R2024b: Warns

Updates to icdevice will result in the future removal of the following functions.

To accommodate the transition, the icdevice function now has a new name-value argument called LegacyMode.

  • LegacyMode=true (default) creates an icdevice object using the legacy mode, consistent with past releases. In this mode, these properties and functions continue to operate.

  • LegacyMode=false creates an icdevice object in the new mode. Use of the mentioned properties and functions might generate warnings or errors. You cannot combine this mode with name-value arguments for any of the properties being removed. This option is required when combining usage with icdevicefind.

FunctionalityUse This InsteadAdditional Information
instrfindicdevicefind

To use replacement, call icdevice with name-value argument LegacyMode=false

instrfindallicdevicefind

To use replacement, call icdevice with name-value argument LegacyMode=false

It is recommended that you update your code to use the new icdevice mode as soon as possible.

Go to top of page