This error occurs because your computer gives each SensorDAQ a unique device number when the SensorDAQ is connected (for example, Dev1). When you configure the DAQ Assistant it saves this unique device number. If you connect a different SensorDAQ it will get a new device number (for example, Dev2). If you created a VI using the DAQ Assistant and Dev1, then this VI will not work if you now connect Dev2.
In order for your VI to work again you do one of the follow:
1. Change back to the original SensorDAQ.
2. Start Measurement & Automation Explorer software (also labelled NI Max), which is found in the National Instruments folder. Click Devices and Interfaces to see a list of all the SensorDAQs that have ever been connected to your computer. They will have names such as:
NI SensorDAQ “Dev1”
NI SensorDAQ “Dev2”
The ones that are not currently connected to the computer will be white and the one that is currently connected will be green.
The VIs we have written require that the name be be:
NI SensorDAQ “Dev1”
To rename the one you have connected, follow this procedure:
Right-click on each unused SensorDAQ and choose Delete. Now Right-click on the green connected SensorDAQ and choose Rename. Type in “Dev1” and press Enter. Measurement & Automation will automatically correct the name to the standard format. Now exit Measurement & Automation Explorer. Rerun the VI and it should work.
3. The third option for dealing with this problem is to go to the block diagram of the VI which has the problem, delete the DAQ Assistant block. Now, with the SensorDAQ you want to use connected, add a new DAQ Assistant block to the diagram. Rewire the block diagram.