At the moment I have a problem I cannot pin down. Seemingly at random my communication with my RS232 Alicat Device will get held up. It will get held up somewhere in the read or write process and be unable to complete it. Upon closing the VI I will get a "Resetting VI" error in Labview 2020. I am using 7 of the 9 RS232 ports. My question is:
- How do I fix this problem so that I do not get a communication drop OR (more likely)
- How do I code the system such that I can catch and move through this problem or reset the connection. Something of a VISA read/write timeout? Open to ideas on how to move past the block
Here is what I have gathered about the problem:
1. Windows 10, I’ve tested everything on multiple computers. It happens no matter what.
2. It happens at random. It might happen twice within 20 minutes or not for a couple of hours.
3. I have never experienced the error when probing the line. I don’t’ know if that is a clue, or if that speaks to the randomness of the problem
3. Baud Rate = 9600, Prior to this I was running at 19,200 and experienced equivalent issues. The manufacturer recommended lowering the baud rate to reduce noise. I have also isolated the cable from other parts of the hardware. At this point noise on the connection is not an issue, but I am still experiencing the error.
4. My buffer size is 1000 bytes.
5. By termination character is \r. I cannot imagine a scenario where it fails to read a termination character due to the size of my buffer
6. I'm querying it every 50ms. Far below the threshold of a standard timeout. Too much?
What I am currently testing.
Due to how my code block is setup I cannot yet confirm if it is getting locked up on the read or write block or both. I'm attempting to isolate the problem with only minor modifications to see if I can isolate it.
Attached is slimmed down version of my code that I isolated the error to.