TCP comunicaciones

Modificado el Mar, 12 Ago a 9:58 A. M.

TABLE OF CONTENTS


TCP/IP based

MQTT



Modbus TCP


The biggest pitfall that we currently encounter is the incorrect implementation of the Modbus protocol by some manufacturers.

Modbus TCP describes the following model:
This means ibaPDA sends a request for data to the Modbus server, and the Modbus server answers with the data.
Wireshark example: Request packet from ibaPDA to the server:
Wireshark example:  Server response with the data sent back to ibaPDA system.

From the upper part of the Wireshark tool, you can see that only those packets are being transferred back-n-forward.

This is following the design/implementation guidelines of Modbus Organisation. (see attachment, chapter 4.3 USE of TCP/IP STACK, page 14 and following)

However, some companies/integrators would expect an 'ACK' back from ibaPDA to the Modbus Server to confirm the good reception of the data (ACK on the Response packet)
To be clear, ibaPDA does not send an 'ACK' back to the Modbus Server.
If the Modbus Server does not receive the 'ACK' on the Response this may cause:
  • normal operation
  • re-transmissions
  • timeouts
  • communication errors
  • ...
This depends on the implementation of the creator.


When the 'ACK' is needed on the Modbus Server side, you can enable the following option in ibaPDA (This requires ibaPDA v6.39.0 or later):





Checking data comm. port


When a customer can ping the PLC but cannot make a connection, e.g. received error 0xFFF5004 S7-XPlorer, it's possible there is a network connection but the required port is not open.


To test if TCP port 9170 (PDA client) is open for IP-address  192.168.140.163 (example):


- Open Microsoft Powershell (preferably admin rights)

- Type in "Test-NetConnection 192.168.140.163 -Port 9170

- Hit Enter

- The testing might take +- 20 seconds, it is slower than a default ping.


Example test succeeded:



Example test failed:





TABLE OF CONTENTS

Basado en TCP/IP

MQTT


Modbus TCP


El mayor escollo con el que nos encontramos actualmente es la implementación incorrecta del protocolo Modbus por parte de algunos fabricantes.

Modbus TCP describe el siguiente modelo:
Esto significa que ibaPDA envía una solicitud de datos al servidor Modbus, y el servidor Modbus responde con los datos.
Ejemplo de Wireshark: Paquete de petición de ibaPDA al servidor:
Ejemplo de Wireshark:  Respuesta del servidor con los datos enviados de vuelta al sistema ibaPDA.

En la parte superior de la herramienta Wireshark, se puede ver que sólo esos paquetes están siendo transferidos de ida y vuelta.

Esto es siguiendo las directrices de diseño/implementación de la Organización Modbus. (véase el anexo, capítulo 4.3 UTILIZACIÓN DE LA PILA TCP/IP, página 14 y siguientes).

Sin embargo, algunas compañías/integradores esperarían un 'ACK' de regreso de ibaPDA al Servidor Modbus para confirmar la buena recepción de los datos (ACK en el paquete de Respuesta).

Para ser claros, ibaPDA no envía un 'ACK' de vuelta al Servidor Modbus.

Si el Servidor Modbus no recibe el 'ACK' en la Respuesta esto puede causar:
  • normal operation
  • re-transmissions
  • timeouts
  • communication errors
  • ...
This depends on the implementation of the creator.


When the 'ACK' is needed on the Modbus Server side, you can enable the following option in ibaPDA (This requires ibaPDA v6.39.0 or later):




Checking data comm. port


Cuando un cliente puede hacer ping al PLC pero no puede establecer una conexión, por ejemplo, recibe el error 0xFFF5004 S7-XPlorer, es posible que exista una conexión de red pero que el puerto necesario no esté abierto.


Para comprobar si el puerto TCP 9170 (cliente PDA) está abierto para la dirección IP 192.168.140.163 (ejemplo):


- Abra Microsoft Powershell (preferiblemente con derechos de administrador)

- Escriba "Test-NetConnection 192.168.140.163 -Port 9170

- Pulsa Intro

- La prueba puede tardar +- 20 segundos, es más lenta que un ping por defecto.


La prueba de ejemplo ha tenido éxito:



Ejemplo de prueba fallida:




Hide master

¿Le ha sido útil este artículo?

¡Qué bien!

Gracias por sus comentarios

¡Sentimos mucho no haber sido de ayuda!

Gracias por sus comentarios

¡Háganos saber cómo podemos mejorar este artículo!

Seleccione al menos una de las razones
Se requiere la verificación del CAPTCHA.

Sus comentarios se han enviado

Agradecemos su esfuerzo e intentaremos corregir el artículo