Hello,
I'm using a Virtual Com Port (FTDI chip) to communicate to a product on a test bench. My application run on TestStand 2014 and the code is a C# driver developed internally using Ivi and Visa references. The same VCP hardware is used to communicate at 2 different baudrate to the same product.
So in my test sequence I basically open my port and set the baudrate to 115200 (let's call it protocol1), then send/read some data, then close the port, open it again but this time with a baudrate of 19200 (let's call it protocol2) and send/read another data several times.
For an unknown reason, I receive an exception while communicating with protocol2: "Could not perform read/write operation because of I/O error". This error is generated from the method Ivi.Visa.Interop.ISerial.Flush(), we make a ClearSerialPort() after each port opening. I precise that this error has a random occurence, the test sequence can work 50 times before this error appeare, sometimes more, sometimes less. After getting this error, we are no more able to communicate with this VCP with protocol2, we need to close TestStand, restart it, and then the VCP is working again. When the VCP is no more working on protocol2, we can open the port com with MAX or any another application and establish a communication with the product without any error, so it seems to be a software issue, the hardware is always working.
The most amazing thing is that when we met the error, the protocol1 is still working ! I must precise that we use 2 different software (.dll driver develop internally) to communicate with protocol1 and protocol2 as they do not use the same frames and baudrate and each have different purpose. But both are based on the same software logic and are using Ivi and Visa layer.
I don't know if the version used of Ni-Serial and Ni-Visa matter but I can get it when I'm back on site.
Thanks a lot for your help.