May 7th, 2024, 7:45pm
Welcome, Guest. Please Login or Register.
Pages: 1  Reply Reply  Notify of replies Notify of replies  Print Print
   Author  Topic: unreliable connection  (Read 4493 times)
mike
FabulaTech Forum Newbie
*



View Profile         
Posts: 1
unreliable connection
« on: Feb 20th, 2006, 1:34am »
Quote Quote  Modify Modify

I have implemented a tcp server on our PLC.  
At the moment most of our tools use RS232 for communication.
 
We'll i tried the serial comport redirector using Procomm Plus (VT-100).
I configured the virtual comport using RAW DATA, CTS, DSR and DCD Enabled.  
 
When there is less to display the connection works fine. But if there is a lot to display and/or a lot of user interaction happens, data is lost resulting in display errors.
 
It seems to be a problem with handshaking.
How does the handshaking of the virtual com port works?
What can I do to prevent the data loss?
 
With putty (raw) it works fine.
 
 
 
 
 
IP Logged
Andrew
FabulaTech Forum Moderator
Moderator
FabulaTech Forum Senior Member
*****



View Profile   WWW         
Gender: male Posts: 427
Re: unreliable connection
« Reply #1 on: Feb 24th, 2006, 7:27am »
Quote Quote  Modify Modify

Mike, using your ethereal log file received by email we recreated working session with your PLC.
 
We extracted data from ethereal file which were flowing from the PLC (almost 20 MB per 46 seconds).
 
We sent the data to the network from one of our computers. We created virtual serial port (using Serial Port Redirector) on another computer and forward the
data from the network to it.
 
A terminal application (VT100 emulator) was connected to the virtual port. We used several terminal applications:
- Windows HyperTerminal,
- Vand**e SecureCRT,
- Tera Term Pro 2.3
 
We were really observing problems with displaying. And problems occured in random moments. The only application that worked perfectly was Tera Term Pro.
So we can conclude that the problem was not with Serial Port Redirector, but with terminal application.
 
We analyzed this issue deeper and found out that the problem was in the following: Hyper Terminal and SecureCRT were not able to read such a large volume of data on very high speed. It led to serial port system buffer overflow and system dropped some part of the data.
 
Unlike HyperTerminal and SecureCRT, Tera Term Pro uses another way to read the data from COM port and that's why it does not have this problem.
 
Mike, we also examined your portmon log file and made a conclution that ProComm Plus read data in the way the HyperTerminal and SecureCRT did. And, accordingly, it is exposed to this problem too.
 
Software flow control must solve this problem. It must be used on both PLC and terminal application sides.  
 
If your PLC doesn't support software flow control, we can offer the following ways to resolve this problem. The possible actions during CTS installation (or when the other signs of buffer overflows appear) are the following:  
 
1) Put data received from the network to the buffer and hold the data until the terminal unsets CTS.
 
But there could be some disadvantages. If the terminal read the data slower than they are transferring from the network, the buffer will grow constantly. It may lead to memory exhausting on PC side.
 
2) The other way is not to read the data from the network until the terminal unsets CTS.
 
Disadvantage: theoretically, if the data are not be read from the network for a long time, it may cause the timeout on the PLC side. As a result it can cause broken connection. Such situation depends on the way the program works on PLC.
IP Logged

Andrew Scott

FabulaTech
===================
http://www.fabulatech.com
Pages: 1  Reply Reply  Notify of replies Notify of replies  Print Print

« Previous topic | Next topic »
Online Talk to our
support team or
sales department.