<< Click to Display Table of Contents >> How to deal with communication errors |
overview
When communicating with PLC, a communication error may occur.
Communication errors occur due to various factors such as the network environment and PLC settings.
If a communication error occurs, check the following:
Error type |
|
If the error message "[plc error code]" (for Modbus communication, "Modbus exception code") is returned
example)
Exclamation,Driver,yyyy/mm/dd HH:MM:SS,[U01.F01] Communication error. [Read for update] Msg : [plc error code] xxx |
The error in the above example is a case where an error code is returned from the connected PLC. The error code displayed depends on the PLC. If you want to know the meaning of the error code, please check the manual of each PLC manufacturer based on the error code described after [plc error code].
In this case, the communication settings such as IP address and port number have been correctly configured, and communication with PLC has been established.
In most cases, make sure the following settings are correct:
•The target PLC is attempting to communicate with an address outside the range of its address range (e.g., the device has not been created on PLC).
•In the folder network settings, a network number that cannot communicate with PLC is set.
If you get the error message "Winsock:xxx" when connecting to Ethernet
example)
Exclamation,Tag,yyyy/mm/dd HH:MM:SS,[U01] Connection failed. Retry in 30 seconds. Msg : [connect] Winsock:xxx |
The above error occurs when there is a mismatch in the communication settings for the Ethernet connection. Take action according to the error number written in "Winsock:xxx".
The main errors include the following:
Error number |
Contents |
correspondence |
10048 |
The IP address and port number are already in use. |
Please check that the PC IP address and PC port number are not already being used by another unit or application. |
10049 |
The requested address cannot be assigned. |
Please check that an invalid IP address has not been set for the unit's PC IP address or unit IP address. |
10050 |
Network is down. |
A network outage has been detected. Please check your entire network. |
10051 |
ICMP Network unreachable. |
The unit IP address is set to an IP address that packets cannot reach. First, try a ping test of the unit IP address on the unit settings tab. |
10054 |
Connection reset by peer. |
This occurs when an existing connection is forcibly disconnected by the connected PLC. Please check whether PLC has been stopped or restarted. |
10060 |
The connection timed out. |
Connection has failed. Please review the settings by referring to the "Device Connection Guide." |
10061 |
Connection refused. |
Connection has failed. Please review the settings by referring to the "Device Connection Guide." |
For errors with other numbers, search for keywords such as "Winsock error number" using any search engine on the Web site and investigate Winsock errors.
Furthermore, if you set a fixed value for the computer-side port number for TCP/IP communication, the same port number cannot be used immediately upon reconnection, so even if communication itself is restored, Winsock:10048 will occur and the connection will fail. For this reason, when communicating with TCP/IP, set the computer-side port number to "Automatic" and issue a new port number for each reconnection.
If you get the error message “[timeout]” or “irregular length”
example)
Exclamation,Driver,yyyy/mm/dd HH:MM:SS,[U01.F01] Communication error. [Read for update] Msg : [timeout] Timeout:3000 Actual:3000 |
Exclamation,Driver,yyyy/mm/dd HH:MM:SS,[U01.F01] Communication error. [Read for update] Msg : irregular length |
The error in the above example is an expected error that can occur even under normal circumstances if it occurs several times a day.
On the other hand, if the above error occurs frequently, there may be some problem with the communication environment (high communication load, noise, communication equipment malfunction, etc.). Unless you improve the communication environment, it will not be a fundamental solution, but you may be able to improve the situation to some extent by making the following settings.
•If you are using UDP to communicate with PLC and the PLC supports TCP communication, try changing the communication method to TCP.
•Increase the "Wait Time" setting on the "Communication Details" tab.
This is effective when delays in communication packets occur in a
Ethernet network environment. In particular, if timeout errors occur together with irregular length errors, there is a possibility that communication packet delays are occurring.
•You can reduce the error rate by setting the "Retry count" to 1 (default is 0).
This is particularly effective when RS232C is experiencing problems due to temporary noise. On the other hand, retry processing is meaningless when the network is completely cut off, and increasing the number of retries increases the waiting time for each process.
For example, if the "wait time" is 3000 ms and the number of retries is 1, if a communication error occurs when executing the WriteVal method, the wait time will be 6000 ms (6 seconds) in total until an error is returned.
*However, if device-down processing is enabled, if an error occurs a certain number of times in succession (the default is three times), and after it is recognized as a device-down, an error will be returned immediately without waiting.