Solution
This error can result from not closing VISA references before exiting the VI. Even if you do not explicitly open a VISA reference, one is created whenever a read or write is performed. To avoid this error perform the following steps:
- Explicitly open all VISA references in your VI.
- Explicitly close all VISA references in your VI.
- Avoid halting execution with the abort button, because this will leave all the references open.
If the steps above didn't solve the issue, you can also reset the NI MAX database following the article
How to Fix or Reset the NI Measurement and Automation Explorer Database File