MODBUS /TCP and GPRS firewall/NAT

  • Thread starter Paulo H. Guadagnini
  • Start date
P

Thread Starter

Paulo H. Guadagnini

I am developing a telemetry system (RTU) based on a cellular modem with build-in GPRS TCP/IP capabilities. How to design a SCADA system based on MODBUS/TCP protocol if my system is behind the GSM provider’s NAT/Firewall and receives a private IP (10.x.y.z)?

I am developing a telemetry system (RTU) based on a cellular modem with build-in GPRS TCP/IP capabilities. My customer wants to read analog data and set the RTU configuration remotely using the HMI/SCADA software (iFIX), which has support for MODBUS/TCP.

I’m implementing a MODBUS/TCP slave on my telemetry system (RTU). The problem is that my RTU is behind the GSM provider’s NAT/Firewall and receives an private IP (10.x.y.z) when connected to the internet. Because of this, the customer MODBUS/TCP master can’t pool my MODBUS slave RTU. I think a possible solution is to make my RTU initiate the connection opening a TCP socket allowing a bidirectional communication. However, according the MODBUS standard a communication is always initiated by the master device, which is not possible in my case.
What is the recommend approach for this problem?

Notes: a) My system needs conserve battery live and can’t stay on all the time, (b) my GSM provider don’t offer fixed IP SIM cards.

Thanks.
 
First Solution :
If you instal the GPRS modem computer with SCADA (iFix) and configure the ethernet connection with the modem,
you can be able connect to the other modems. The problem is with the IP address if you don't have static IP address.
So the modems after connection to GPRS network should send their addresses to the scada system and then listen for the connection.

Second Solution :
You can write virtual PLC which act like a bridge between the GPRS network and the SCADA system.
The GPRS modems should write data to the virtual PLC using any protocol you want.
>From the other side you shuld implement Modbus TCP/IP client for connetion withe the SCADA system.

Regards
Andrzej
www.modbus.pl
 
L

Lynn A Linse

Some cell plans do this - your problem is NOT that the IP changes, but that your devices resides on the equivalant of an over-sized "home network". The IP address assigned is 100% unroutable so DNS and all other tricks won't work. The central SCADA can not initiate a connection to your RTU. Don't try creating a "bi-directional Modbus/TCP" conenction - you'll never find compatible SCADA systems.

Your options will be to: 1) Implement a Modbus "slave" driver in the SCADA such that your RTU can act as Master & PUSH up data changes. These drivers are more common than you think - at least on Windows-class SCADA systems.

2) Put a small Modbus PLC with large memory near your SCADA & have all your remote RTU push data up to this PLC. The SCADA reads the PLC to understand the field status. You'll need to define a way for the SCADA to detect lack of update - some form of incrementing counter .

But given that cellular data costs money and Modbus doesn't support report-by-expection (other than a Slave acting as Master), allowing your RTU to selectively PUSH changes up to the SCADA will be a huge cost benefit.

best regards
- LynnL, www.digi.com
 
I would like giving you some suggestions for your application

1: You could select TCP protocol. Your SCADA would act as the TCP Sever; it must have a static IP address. Your RTU act as the TCP Client, your TCP server should open a port (such as 9891) for listening. When your RTU attach GPRS network, these RTU would initial a TCP socket with your SCADA( TCP Server-port number is 9891 e.g.). So it is possible for bi-directional communication between your SCADA( TCP server) with your RTU (TCP Client).

2: It is no problem for dynamic IP address binding SIM card( as you mentioned as 10.x.y.z) , you should develop an app inside your RTU, make sure your RTU could send the ¡°Registry Packet
¡± to your SCADA( TCP Server), this ¡°Registry Packet¡± would report your RTU current IP address; RTU unique ID£»Mobile phone number; Login password e.g. to your SCADA (TCP Server), so your SCADA (TCP Server) could uniquely identify each RTU by its ID code, -It is very important, this would resolve your GSM provider do not offer you fixed IP SIM card. But these app developments inside your RTU would be a hard work.. We spend almost two years for that make sure our devices could work reliable, we embedded a 32bit ARM7 CPU-Philip LPC2138(running RTOS) in our GPRS Data Terminal Unit, it is also Fully transparent, no protocol dialogue or any additional programming demanded, plug&play for serial devices. If you completed these functions, I guess you would have a lot of work to do.

3: It is good for your system have conserve battery in order keep your RTU can stay on all time, under this condition, you could design your RTU work at ¡°constant online status¡±. That¡¯s means your bi-direction communication between your RTU with SCADA trend to real time data transmission status if the GPRS signals quality is good enough. How to keep GPRS constant online? Yes. It is also a problem you must face, our solution is: TCP Client (your RTU or our GPRS DTU e.g.) must send ¡°heart Beat¡± package to TCP Server( your SCADA or our TCP server software), the ¡° Heart Beat¡± package is a set of datagram, make sure keep the TCP socket connection between RTU with SCADA; at same time inform your GSM provider do not detach your RTU from GPRS networking.

Following URL would provide you our some Technical Documentation and Software£¨TCP Server demo software and DTU utility and TCP Client software£©as the reference. If you need the source code of these 2 sets of software coded by visual studio 2005, please write to me, I would like share with you these code.
http://www.pxtech.cn/en/download/download.php

Best Regards,
Li Min
Jinan Puxun Technologies.Co.,Ltd
No.5-1 Yangtouyu Street Jinan Shandong Province.P.R.China
Mr.Li Min
Tel:+86-531-86424518 86652206
Fax:+86-531-86424519
e-mail: [email protected]
MSN:[email protected]
Skype:pxtech2
Web:www.linkports.com
 
I am also trying to do the similar project but in my case the RTU is a controller with GSM/GPRS gateway. I want to know about your experience and finally have you able to make that what you were trying to make? What were the hardware you finally used in the whole system? and which software you use?

Kindly help me to go in right direction.

Looking forward for your guidance.

BR
 
I'm a Student in beginning of thesis having this problem to.

The problem is does not have available a direct connection to send info from the server to the plc.

So i was thinking: not possible to make in server a "instructions file" and the plc with a cronjob check this file to check changes and in this way apply the changes?
 
Hi

The GPRS Modem or Router(embedded with TCP/IP protocol) is offering network to the PLC only, you can treat it as a cable.

Tony

Shenzhen Yinghua Technology Co.,Ltd
Website:www.yinghuatn.com
 
Thread starter Similar threads Forum Replies Date
L Modbus 0
C Modbus 2
C Modbus 3
A Modbus 5
T Modbus 2
Top