Jump to content

Recommended Posts

Posted

Hello,

is it possible to connect two PLCs (M91 or Jazz) over GPRS to exchange data between them?

We have to read one digital input and one analog input on first PLC and transfer them to another PLC and put that values to its digital output and analog output.

Thanks!

  • MVP 2014
Posted

There are two aspects to this that must both be solved.

1. Comms from the PLC into the modem and control of the connection.

This should be possible of you use a modem that is capable of scripting, since the Jazz/M91 cannot control the GPRS functions themselves. So the modem must handle all aspects of the connection, and when finished the sign-on process it is just a serial "pipe" onto the GPRS network. I have worked with a customer who uses an M91 connected to a GPRS/3G serial modem this way. In his case, however, the end-point is a computer server connected to the internet, not another PLC connected to a modem.

2. Linking of the IP address of one modem to the other

This is more difficult. Most cellular providers give out private, dynamic IP addresses. These are almost useless for the type of application you are proposing. They can be made to work if you have an external server and set up a VPN. If you can get a public, dynamic IP address then you can use an external service like dyn.com to link them by resolving domain names. The easiest setup is to use public, static IP addresses, but they are hard or impossible to get for a cellular service. Based on the method used to link the IP addresses, then the serial data can be streamed between the two modems.

In practical terms, I think it would be almost impossible if you just wanted two modems to talk over GPRS without the involvement of an external server.

However I am keen to learn more if there is a way.

How fast does the update rate need to be? Can you achieve your result using text messages?

How far apart are the devices? Could you use a dedicated serial data radio instead?

Posted

Hi,

refresh rate is not critical, let say that customer will be satisfied with 15 minutes refresh or when values goes over some value.

Your question about SMS is become interesting. Is possible to send two integer values (I believe it is, according to examples) via SMS and read that values from SMS in another PLC to its MIs? That will be nice enought for that purpose...

  • MVP 2014
Posted

Yes, it is possible to send integers in a text message. Just note that when sending you need to put a '#' either side of each variables. Eg to send 123 and 456 it should be #123# and #456#. This is in the help file.

Also use leading zeros on the variables to make them always the same length.

Finally, the specification for SMS is for delivery within 24hours. Usually it is much faster than that, but sometimes they have a long delay. You should allow for this, for example your recieving PLC could have a watchog timer that sets the outputs to a safe value if the time between messages was too long.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.