LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

RS-232C Error Message

I've wrote a program that reads data from external RS-485 board and displays it in my application.
It works fine, but after running about 1 month, following error message was displayed;
"No port is not open. Check configuration"
This message is from following statement;
    :
ComWrt(port, data, len);
RS232Error = ReturnRS232Err();
if (RS232Error)
     DisplayRS232Error();
 
The return value of the RS232Error was -3, so above message was displayed.
I can not understand this situation, because, generally, this sort of message is displayed for the first time for mis-configure or something like that situation.
But there was no error message and worked fine, but after a month of running, this message was displayed.
Is it possible? Or is there any possiblilty to display THE Error message?
0 Kudos
Message 1 of 6
(4,153 Views)
Hi Gripper,
 
Well that is very strange, i dont know what seems to be the problem, but have u checked whether the settings are all right..check the comport on the computer you using...hope there are no conflicts with the comport device. if you have another comport try using that just to confirm and accordingly change the comport on the UIR.
 
Thats all i got for now, i will get back to you if figure anything out.
 
Good luck
 
k1_ke
0 Kudos
Message 2 of 6
(4,130 Views)

There may be no connection but a couple of threads here: http://forums.ni.com/ni/board/message?board.id=180&message.id=21118 identified a related set of symptoms, including an integer millisecond timer wrap-around at about 25 days.

JR

0 Kudos
Message 3 of 6
(4,125 Views)
Unfortunately, my applications are installed in 6 PCs, and all PCs have same problem, and error was occured at the same time.
That's very strange... Comport works fine, and when I re-executed same application without rebooting, threre was no problem to execute, and all configuration was saved in registry.
Is there any possiblity to get THE ERROR (-3, No port is open error) when the RS-232C output queue was fulled ?
0 Kudos
Message 4 of 6
(4,124 Views)
According to  jr_2005's links,  application that needs to run  for the long time(>1000hrs,  a month longer)  must  NOT use  timer function (especially  eventData2).
Is  it right? If so,  I must change  my development tool to  Microsoft Visual  Studio...My  application  uses about  4 timers,  6 threads, and  must  run  full  year without stopping.
It is used to control broadcasting equipment. That's to problem!
0 Kudos
Message 5 of 6
(4,122 Views)
I've had the same problem using RS232. The port connection fails after a specific number of transactions. if you count the number of reads, you will see the failure re-occur repeatedly. What I did was simply opening and closing the port every time and the problem disappeared.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 6 of 6
(4,082 Views)