02-14-2024 04:39 PM
Greetings everyone. I've been chasing a problem for the past week that has me totally frustrated. For several months I was using a lab view program to communicate and test the board that integrates Windows command prompt with a serial port communication window. This worked with no issue as I said for several months. We recently moved to a new area so the computer was off for two or three weeks and I just finished hooking it back up. This test requires two different cables. A straight USB cable that connects to the board, and a five or six pin TTL r 232 3v3 cable. This test can also be run manually using putty which still works with absolutely no issues.
My issue now is that when it attempts to verify communication it's simply stops due to an error. I reconnected everything to the computer that the software was originally developed on and the executable was created. The test stops in the same way. I placed some probes and break points in the code and found the following error at the point where it is attempting to get a read back from the board.
The error I receive is 1073807253 which from what I could find is a framing error that basically states that the data coming back is in an unexpected format or something like that. Here is what is killing me. As I said it works fine using putty which is a terminal program. I have now tried this on three different computers with the same software and the same thing happens. I have replaced both communication cables, tried multiple boards, have reinstalled NI Visa, and checked and rechecked com port settings. The probe I placed in the code verifies that the port settings are correct for the board and match the port settings on the computer. Three different computers doing the same thing that all used to work flawlessly. I am totally stumped and don't know where to turn at this point. One of these computers is due to ship to a contract manufacturer for testing this board so it is very time critical. I have no idea what to check next or how to proceed. I don't understand what could possibly have changed with three different computers all do the same thing, cables and all hardware have been replaced with brand new ones, and nothing appears to have changed.
I did use NI MAX to try to establish communication but did not have any luck.
Any thoughts, guidance, suggestions are all welcome. This is driving me crazy!
02-14-2024 07:41 PM
From your description, it is probably not "hardware". It seems more likely to be "software". Unfortunately, you have told us almost nothing about your software. You haven't posted any of it, not shown us the code "in the vicinity of the error", not told us if you are rigorously tracking changes in your software using a Version Control System so you can be certain that the code that worked last month is identical to the code that failed yesterday, not to mention an Error code that doesn't seem to arise from LabVIEW, but from some (unknown) external software.
Do you have any colleagues who are reasonably skilled in LabVIEW and with whom you could have a code review? Someone needs to look at your code ...
Bob Schor
02-14-2024 08:24 PM
First of all, this is not my code. This code was written by a certified LabView architect well over a year ago who has since left the company. The executable was installed on the laptop that I am using and have been using for the last four to five months with absolutely no issues. The code has not been changed in the slightest because there is nobody there to change it. I gained access to his original laptop that has the project on it and was able to open up the program to try to see where the arrow is happening.
I ran the program in highlight trace execution mode and the error I posted is what was displayed on the screen. Running it from the development code produces the same result. I can post a picture of the code section tomorrow but I assure you I know exactly what I am doing and have been using labview for 20 years.
I have found several posts for this exact same error many of which are on this community board. This is not a made up error. This is an error displayed during the highlight execution that occurs on the output of the Visa read. The key factor here is that the code is running as in executable in lab view version 17 and it is an impossibility for it to have changed in any way, shape, or form.
I will go ahead and post a snippet of the code while it is displaying the error so that you can see for yourself. The code is under revision control and as I said has not been changed in at least two to three years since it was first placed into production. I simply started using it 4-5 months ago and have never had an issue using the same executable, on the same exact laptop, until now.
02-14-2024 09:50 PM
Thank you for the explanation. I have noticed that my PC's are more "aggressive" about pushing updates (it seems like at least one/month) -- Windows 10, which was supposed to be "stable" and "the last Version of Windows you'll ever need" (or so it seemed with the hoopla when Windows 10 was first released) seems to be in a constant state of "update". Could this be the source of your mysterious misbehavior?
It could be tricky to demonstrate this, and even more difficult to figure out how to mitigate it. One thing I would be tempted to try would be to write little routines to simulate the "data-generation" parts of the code (which would include the VISA communication stuff), getting as much of the Operating System out from underneath the LabVIEW code.
Good luck with sleuthing this out. Please let us know what you find, particularly if you can identify the culprit.
Bob Schor
02-15-2024 09:54 AM
Error -1073807253 is VISA error code 0xBFFF0072 The resource is valid, but VISA cannot currently access it.
That means another program or Windows process has the Com port open so LabVIEW or NI-MAX can not access it.
02-15-2024 10:13 AM
Thank you for that information. I looked at the ports and device manager and it is showing a whole bunch of ports being used even though I only have the one device plugged in. What is doubly strange is that when I do plug my device in it does not show that port being used. I will admit that while I am good with computers I am not that great when it comes to what's happening under the hood.
The fact that something else is using it but it is not showing being used even when I plug my device in is troubling. Not sure how to proceed from here. I would like to find a way to force closed all of those ports was somehow reset the port allocation. Any ideas? Any ideas?
02-15-2024 10:34 AM
@Dragonrider wrote:
Thank you for that information. I looked at the ports and device manager and it is showing a whole bunch of ports being used even though I only have the one device plugged in. What is doubly strange is that when I do plug my device in it does not show that port being used. I will admit that while I am good with computers I am not that great when it comes to what's happening under the hood.
The fact that something else is using it but it is not showing being used even when I plug my device in is troubling. Not sure how to proceed from here. I would like to find a way to force closed all of those ports was somehow reset the port allocation. Any ideas? Any ideas?
COM ports are not plug and play. The ports shown in device manager are all of those that exist on your computer, and there won't be any indication when you plug something into one.
If this works in PuTTY what are the serial connection settings it is set to use? (In the configuration screen look at Connection>Serial.)
Compare that to the parameters used with the VISA Configure Serial Port function in LabVIEW. You can also try testing the connection in MAX.
There really isn't much more I can suggest without some code sample.
02-15-2024 11:32 AM
I did play some probe on the serial port configuration in the code and I compared it to the settings in putty and they were the same. Truly strange! The same computer, the same cables, the same device. Putty works, but the labview executable that has been working for months no longer works. As I stated earlier, I even uninstalled NI visa and reinstalled it and there was no change.
I finally managed to clear all the " in use " ports by reassigning the port that the device was plugged into to each of those. Presently all ports are showing no use and I am currently downloading Dell updates to the computer just in case. Will report back with any new info as I get it. I sincerely appreciate the help and advice from everyone. Thanks!
02-15-2024 01:31 PM
Attached are a couple of screenshots I made utilizing the computer that the code was actually developed on and the test had always worked. It is no longer working on this computer either. All of this makes absolutely no sense and is either something stupid simple that I am just not seeing or someone has placed the curse on me lol. Three different computers that all used to run this test with absolutely no issue no longer work. The development computer has the executable and build files and also the raw code.
I ran the program in highlight mode and placed multiple probes. The pictures show you a section of the code, the probe that shows the data returned which looks like garbage, and the Visa port settings. What that section of code is supposed to do is check the response for u-boot which is an indication that the device has successfully booted. It compares the response to a string with the same word for comparison. Am I wrong or should the data from the read actually show real text? What I am seeing is garbage. Any thoughts? I will have to upload the three images separately so I will be posting two more pictures immediately after this.
02-15-2024 01:32 PM
Another picture