I have a vi that:
-locates the USB port that the RS485 communication device is connected
-sends a command to each sensor
-reads a response from each sensor
-performs a calculation on the response
-records the response in a measurement file
I used a flat sequence to poll each sensor. When the vi is started, it throws Error-1073807343 indicating "Insufficient location information or the device or resource is not present in the system." When I cancel the error, the vi runs fine with no further error. This error started to appear when I upgraded to LabView2015. I am also running LabView Base development version on a Dell D630 laptop, WinXP SP3.
I'm taking a guess here, but I think the error is in the Opening a new Visa reference part of the block code.
Does anyone know why this error is being thrown or how to fix my vi?
Solved! Go to Solution.
To check where the error is beign thrown you can turn on highlight execution. It is the lightbulb on your block diagram just to the right of the pause. You can then execute the vi and observe where the error is thrown. I would assume it is at the visa open as well.
At which function is the error being thrown?
I see a couple odd things in your VI.
1. At the beginning you are doing a Find Resources. Then wiring in the array size and using index array on the i terminal to iterate through them. All unnecessary. Just use auto-indexing on the input tunnel.
2. Have you looked at the list of devices that the Find Resources returns? Is there a particular one that just not look right? I'm guessing that you get a name in that list that is just not valid and the Open (or another function along that path, gives an error.)
3. You open up N resources, but only close the last one.
4. Array Max and Min seems like an odd function to use for working with string data.
I think if the error is a result of the first part of your code that does the resource finding, you need a better mechanism to do that. The reason the rest of the code works if you just hit continue is that out of all of that, you find a good resource and the real part of your code is working fine with it.
Yes. The error is thrown at the VISA open. When the loop sends teh USB port with the name "usb....", it then throw the error at the VISA open. I have severla usb ports and other devices connected and needed a method for the vi to automatically locate the com port with the NI-USB connected. found this snippet on the forum a few years back and it worked okay on older versions of LV. I see that Dennis Knutson posted this on another case and I will try this next:
02-12-2015 08:19 AM
Definitely try to improve the resource discovery.
But if you can't, and the only thing causing a problem is this particular error and dialog box popup, just clear the error.
Deleting the old version of the VISA open did not clear the error. Using Matt's suggestion of tracing the program did help as the error is thrown when the loop calls a particular com port and crashes at the VISA property's Interface Description. A probe on the line shows an empty string for the Interface Description. I think this is why the error is thrown. Not quite sure how to poll each of the com ports looking for the one that has a "NI USB" device attached?
You could check to see if the string is empty. Only run the VI Open and property node in a case structure with non-empty string.
Error still occurs on the open a connection to a COM port using VISA Open. The program does move to the property node on the VISA resource wire to get the resource's Interface Information.Interface Description, but then crashes. If I just clear the error the program runs fine. Almost seems like a chicken and egg scenario as I cannot test if the string is empty because in order to retreive the string, it throws the error. Does this make any sense?