Friday, December 15, 2006

Rockwell AB PLC via Cellular

So far we have succeeded in getting several Rockwell/Allen-Bradley PLC up on Cellular with the Digi Connect WAN, which is a cellular router for GSM or CDMA with local Ethernet and serial port.

In Summary:
  • Serial DF1: You can access serial MicroLogix PLC such the MicroLogix 1200 on the remote Digi Connect WAN's serial port. You either need to have an OPC server which can directly encapsulate DF1 protocols into TCP/IP or to use Digi RealPort to create redirected COM ports for RSLinx. Ideally, using the newer DF1 Radio Modem protocol can cut your data costs in half, but DF1 Full-Duplex or Half-Duplex can also be used. DH485 won't work via cellular due to the high latency. You must slow the PLC (ACK) timeout setting down to 30 seconds, so you cannot use a MicroLogix 1000 since it doesn't allow this parameter to be adjusted. DF1 Radio Modem has no DF1 (ACK) or (NAK), which is why it costs less to use.
  • CSPv4 or AB/Ethernet: You can access legacy PLC such as SLC5/05 and PLC5E by enabling TCP port forwarding of port 2222 on the Digi Connect WAN. Under RSLinx you enter the IP or DNS name for your Digi Connect WAN in the "Ethernet Driver", then right click the driver to slow down the timeouts from default of 3 seconds to a cellular-friendly 30-seconds. For a bit of fun, open this link in your browser and you will access the web pages of my SLC5/05 through Cingular/GSM cellular - http://digiwan.gotdns.org:8080/. But please don't leave this page open since you'll impact other people trying to look at my cellular PLC.
  • Ethernet/IP: You can access ControlLogix and other newer PLC supporting Ethernet/IP by enabling TCP port forwarding of port 44818 on the Digi Connect WAN. Under RSLinx you enter the IP or DNS name for your Digi Connect WAN in the "Remote Devices via Linx Gateway" Driver, then right click the driver to slow down the timeouts from default of 3 seconds to a cellular-friendly 30-seconds. You cannot use the RSLinx Ethernet/IP driver since it relies on UDP broadcast which cannot move across wide-area-networks.


If you want more detailed instructions, I have an application note online here:

90000772_A_Cell_AB.pdf

12 comments:

Anonymous said...

Is there anyway of sending me the config file for a digi VPN to connect to all Style AB plc`s.I would like to communicate remotely with AB`s via ethernet and send ascii to a cellphone for alarms.Is this possible?

Lynn August Linse said...

I could send a config file - actually, I should just POST some example files; explain the system and put up the reduced XML file that just configures the relevant parameters.

But the Digi Connect WAN/VPN is a fairly high-level IP router and we don't allow "falling back" to SMS or direct access to the non-IP services. The IP and SMS are a bit like oil-and-water since they authenticate differently within the cell system.

The customer I have doing SMS or paging are using a central OPC/HMI-style package to drive this. Long-term this costs more, but could be easier than just having the PLC "text message" someone since these OPC/HMI paging tools include ring-back, alternate phones based on time/day, ack of messages and so on. Since SMS messaging is NOT a reliable service, you may need to simulate these within the PLC.

Unknown said...

Have you done an application with Digi Connect WAN IA to an existing SLC5/04? I have an application where I want to monitor specific datatable status via the internet. The customer will not permit us to connect to their internet. SLC5/04 processor does not speak AB Ethernet but an RS232 port available, so DF1 protocol is a possibility. The more I investigate the less straight forward & more expensive the cellular approach seems to get.

Lynn August Linse said...

DF1 would work fine from an OPC server which can "encapsulate" serial protocols into TCP/IP (or better UDP). If your SLC5/04 is newer it should also support DF1 Radio Modem, which could cut traffic in half without the DF1 ACK packets.

Also, think about using MSG blocks in the PLC to instead PUSH up more on a "report by exception" pattern. So perhaps you poll the PLC once per hour and let the PLC "write" any mid-hour changes over cellular to perhaps another "central" PLC you use as a data concentrator. I have several waste-water users doing this with Modbus slaves that support XMIT or actioning as temp Masters by events.

Unknown said...

is it possible to send an sms to a cellphone from a ControlLogix plc when a field device send an alarms?

Lynn August Linse said...

Can a C*Lgx PLC send SMS messages? I'm sure it is possible, but this is NOT related to the use of modern IP-based cellular infrastructure. For example, since Digi runs PPP over our cell link, we don't even offer access to the lower level cell stuff like SMS. To issue a SMS or even AT command one would need to tear down the IP connection & disconnect from the IP infra-structure.
I am sure most low-cost AT-style serial-to-cellular modems products could enable out-going SMS or traditional paging. Just be aware that SMS is not a reliable service, so if your PLC issues an SMS "alarm" or "event", you'll have no way to confirm anyone sees it.

Unknown said...

Is a router, such as the Digi Cconnect device, necessary if I am simply talking between two devices (ControlLogix processors) and two only?

Lynn August Linse said...

You will need some box because the phone system uses PPP & nothing like Ethernet. So (as example) when AT&T assigns an IP like 166.A.B.C to a "router", that is really just the end of a PPP tunnel. So you could not just assign that same IP 166.A.B.C on the PLC and make it work. You need the PPP end-point.

However, the Digi routers (and I assume some others) allow what we call "pin-holing", which means the Digi router would just forward all the packets out Ethernet with the same IP SRC/DST as the PPP session, so the PLC would have the same IP as the Digi, and the PLC would think the Digi is the PPP peer. The good thing about this is ALL traffic hits the PLC, so there is no notion of forwarding. The bad thing is the "router" is now no longer addressable - it becomes transparent.

Atahualpa said...

Hi Mr. Linse. Is it possible to use the new Connectport X3 with the Micrologix PLC to creat a small scada network based on GPRS?
Cordially Juan

Lynn August Linse said...

RE: MicroLogix and X3: not without some Python programming. The X3 by itself has no 'function'.

You would want to use DF1 Radio-Modem, so one could create a simple parser which handles the DF1 and perhaps even does a similar DST byte to IP/DNS name as a DOIAP or NET-ENI.

You could also find a low-cost serial-to-cellular modem, which generally could be defined to push DF1-RM through TCP/IP or UDP/IP.

Swap-Tronics said...

( Under RSLinx you enter the IP or DNS name for your Digi Connect WAN in the "Remote Devices via Linx Gateway" Driver)
Question New to this but for Router IP settings are you referring to LanIP or the WanIP or the Primary DNS?

Second Question did you have to setup a VPN in windows first?

Lynn August Linse said...

You will need to enter the IP which allows access to the device over cellular, so this will be the 'wan ip' which gets assigned after your cell link goes up.

Unfortunately, if you have not paid extra for a fixed IP, then this IP will change every time the device relinks to cellular, which means 1 IP may be true for weeks, or it might change 20 times each day!

VPN is an option, but you may be mistaking a 'Digi need' for a carrier need.

For example, my own SIMs come from Kore Telematics, so be a private non-routeable IP like 10.x.x.x. this keeps me from having to pay for the perhaps 20-50 rogus 'hackers' access which probe all public IP a day (regardless of fixed or dynamic IP). Therefore if I want to 'call out' to my device, I need to run a VPN into Kore's internal system which gives my PC access via VPN to that private IP. So it's not the Digi device asking for the VPN, but my cellular carrier.