07-26-2014 06:40 AM
I have made one applcation in which I need to send and read data from two different COM port one after other in random manner during testing.
My development PC has WIN7 in which it is working fine. but other PC in which I am installing my application has XP SP3(Successful installation) in which when after sending to one com port in other when reading from different com port I am getting timeout error.. It was working before but now it is failing mostly.
Sequence is like this.
1. COM1- read + write - success
2. COM1- read + write - success
3. COM1- read + write - success
4. COM2- read + write - failed
I dont know what could be the reason. Previoiusly it was working fine but now its failing. Everything is same with no change.
Any suggestion is great
07-26-2014 07:09 AM
What error are you getting?
07-26-2014 07:13 AM
What error are you getting? How are you switch ports? Do you open both com ports and direct the data to the port or are you opening and closing the port as required?
07-26-2014 07:28 AM
Like I told in my question that I am getting timeout error. Also I am initializing both COM port one after other and at a time writing and reading from any one of them COM port
07-26-2014 07:53 AM
Can you show us the code that you have made?
07-26-2014 08:39 AM - edited 07-26-2014 08:43 AM
PFA... First VISA I am initializing in the startting only.. Second I am doing inside FOR loop. Sending data to char depends on intital character. I am facing problem in the COM port which is initialized in the starting only. After few iteration I am getting timeout error for the arduino VISA
Let me know if any clarification is needed.
07-26-2014 08:41 AM
What is your timeout value set too? The default is 10 seconds. If are leaving the port open and not using it for greater than the time out value you will get this error. ALso check to ensure the byte count is correct for the read function
This function might return less than the number of bytes requested if the function reaches the end of the buffer, reaches a termination character, or if a timeout occurs. The output error cluster indicates if a timeout has occurred.
07-26-2014 08:45 AM
Please check the code properly.I am not leaving the VISA open..Like I said at a time only one VISA is active i.e. at a time I will be writing and reading from one COM port only
07-26-2014 08:54 AM
In the "find list" are you getting the detected devices and are you sure its not empty?
07-26-2014 08:56 AM
are you using usb to serial convertor?
Try to check both com ports from MAX.
are you sure you did not change the usb to serial cable which was working eariler?
the code you have shown is horrible , it is very difficult to check what is happening.
now if this code is developed by you , you should start thinking about design architectures.