How Can I Programmatically Delete Disconnected Devices From NI-MAX?

Updated Apr 7, 2020

Reported In

Hardware

  • CompactRIO Controller
  • CompactDAQ Controller

Software

  • LabVIEW
  • Measurement & Automation Explorer (MAX)

Issue Details

I have several disconnected and unused CompactRIOs showing in NI-MAX, and I want to delete them programmatically through a LabVIEW project. How can I do this?

Solution

The recommendation is to use the Reset MAX Database option to remove any disconnected hardware from NI-MAX, this option is an executable accessible on the paths shown here.

Once you've located the paths, you could use the Terminal/Consolve.vi in your LabVIEW program to run the executable from there and reset NI-MAX. Once the reset process has completed, the disconnected/unused devices will be deleted from the database.

Take into consideration that this process will also delete other information such as DAQmx Tasks, Custom Scales, and DAQmx Global Virtual Channels, but there's always the possibility of create a backup for all that information.