<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-35259639</id><updated>2011-09-29T11:18:34.580-07:00</updated><category term='Cellular'/><category term='Modbus'/><category term='Device Access'/><category term='Ethernet'/><category term='WAN'/><category term='Digi One IAP'/><category term='Serial'/><category term='DNP3'/><category term='Rockwell'/><category term='battery'/><category term='robustness'/><category term='Industrial'/><category term='zigbee'/><category term='DF1'/><category term='WiFi'/><title type='text'>Lynn's Industrial Protocols over IP</title><subtitle type='html'>Discussing my adventures in "IP-Enabling" commercial devices that don't always appreciate being liberated from serial or Ethernet. I have been Ethernet-enabling serial devices for over a decade.  However my current job involves putting Ethernet devices up on cellular (as in cell-phone) machine-to-machine data plans. I currently have a public demo site with with Rockwell, Modbus, GE, Siemens, DNP3 and other industrial PLC/devices up on cellular.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>63</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-35259639.post-6261114901775143174</id><published>2010-06-02T10:03:00.000-07:00</published><updated>2010-06-02T10:39:44.458-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='robustness'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='WAN'/><title type='text'>Increasing cellular robustness for Modbus</title><content type='html'>A customer of ours is creating a custom Python program in one of Digi's cellular gateways.  The gateway uses Modbus/RTU to poll a flow-computer, then based upon a time cycle or abnormal events, the gateway uses HTTPS and XML to  push data up to a central server.&lt;br /&gt;&lt;br /&gt;They have noticed that at times the gateway has trouble connecting to the server for hours at a time, so wondered what the best solutions are to increase success.  Their code buffers the data, so no data is lost.&lt;br /&gt;&lt;br /&gt;The customer had asked about using a Windows PC to PING the remotes, but I don't think that will help.&lt;br /&gt;&lt;br /&gt;Mobile-originated (meaning the gateway calling out to cellular) will be more robust than mobile-terminated (meaning Windows calling remote).  Therefore the best solution will be for the cellular gateway to work a bit harder to connect out.&lt;br /&gt;&lt;br /&gt;First, a few technical details:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Most IP-based cellular devices maintain a full-time IP connection.  However, the cell tower 'parks' the device when it is not talking, which means the device loses any radio channels and can only talk after requesting and WAITING for reallocation of bandwidth.  And no, there is no way to compel your cellular provider to preallocate full-time a scarce radio resource to a device that is not paying $4000 per year for full-time data movement.&lt;/li&gt;&lt;li&gt;This means there is always a delay when a device starts to send data after being idle.  I have witnessed this delay being up to 18 seconds long, but it could be longer.  Not all TCP/IP clients expect to see such long delays in the connect/socket-open phase.&lt;/li&gt;&lt;/ul&gt;So assuming the customer's problem is unexpected long delays causing the gateway to give up too soon, the best suggestion is to prime the pump early.  Lets say your gateway sends data once per hour, so when your Python task wakes up to send data, then do NOT try to open a TCP socket right away.  Instead, first send a garbage UDP/IP packet to your host, then sleep another 15 seconds.  It does not matter if the UDP packet fails.  You do not need to enable UDP on your host, nor watch for a good or error response.  The only goal is to force the cell tower to start allocating radio bandwidth 15 seconds before your task actually tries to create your TCP/IP socket.&lt;br /&gt;&lt;br /&gt;This pre-allocation may solve your problem when the problem is caused by slower allocation of radio bandwidth.  Since most cellular providers now round up data traffic to the 1K charger per hour, sending an extra 30 bytes per transaction should not increase costs.&lt;br /&gt;&lt;br /&gt;However, the problem may NOT be radio bandwidth, but authorization through a chain of roaming service providers.  This is especially true for low-cost GPRS/GSM providers.  Your data is passing through 2, 3 or more companies, and although they may all have agreed to allow the IP session (the PPP session) to open, one of them might drop the ball and block your data access in a way which the PPP session doesn't detect.  The only way to recover is to completely flush and rebuild the PPP session - which in plan English means renegotiate with the base carrier to be assigned your IP address.  It simulates a reboot of the product.&lt;br /&gt;&lt;br /&gt;Fortunately, Digi includes a low-level feature called SureLink, which can use a PING packet to confirm end-to-end connectivity.  You can (as example) configure the Digi to PING an internet IP once per hour (or 'X' hours), then physically reboot the cellular module if access fails.  This nicely forces a complete renegotiation of the PPP session, which costs you nothing.&lt;br /&gt;&lt;br /&gt;Just be aware that use of DNS can be costly and error-prone.  A single DNS lookup can cost over 1K of data plan.  For SureLink, you literally want to use a static IP as the target to minimize the overhead costs and false-negatives where things other than PPP health block success.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-6261114901775143174?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/6261114901775143174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=6261114901775143174' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/6261114901775143174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/6261114901775143174'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2010/06/increasing-cellular-robustness-for.html' title='Increasing cellular robustness for Modbus'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-8438848352753676315</id><published>2010-04-06T08:22:00.000-07:00</published><updated>2010-04-06T08:27:10.664-07:00</updated><title type='text'>Sorry about the move</title><content type='html'>Google/Blogger decided to change the way they interact with externally hosted blogs - probably a reaction to some search-engine abuse since blogger blog 'index' very well under Google.&lt;br /&gt;&lt;br /&gt;(This post is a test, plus to move down the redirect message)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-8438848352753676315?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/8438848352753676315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=8438848352753676315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8438848352753676315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8438848352753676315'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2010/04/sorry-about-move.html' title='Sorry about the move'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-8643549453296253694</id><published>2010-04-06T07:16:00.001-07:00</published><updated>2010-04-06T07:48:32.334-07:00</updated><title type='text'>This blog has moved</title><content type='html'>&lt;br /&gt;       This blog is now located at http://iatip.blogspot.com/.&lt;br /&gt;       You will be automatically redirected in 30 seconds, or you may click &lt;a href='http://iatip.blogspot.com/'&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;       For feed subscribers, please update your feed subscriptions to&lt;br /&gt;       http://iatip.blogspot.com/feeds/posts/default.&lt;br /&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-8643549453296253694?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://iatip.blogspot.com/' title='This blog has moved'/><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/8643549453296253694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=8643549453296253694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8643549453296253694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8643549453296253694'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2010/04/this-blog-has-moved.html' title='This blog has moved'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-1663914190055420403</id><published>2010-04-06T06:39:00.000-07:00</published><updated>2010-04-06T06:58:30.013-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='battery'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><title type='text'>How Long to Obtain Cellular IP?</title><content type='html'>Well, I finally have a SIM, so I can actually do cellular tests again.  It is a GSM 'Capped Plan' with 20/MB of data per month for $30.  The 'capped' means that even if I go over the 20MB by dozens of GB, the maximum charge will be $130.  It is a truly 'unlimited plan' for that $130.  What's the catch?  If I hit the 'Cap' two months in a row, then the carrier either cancels the account or forces me to start paying full-rate for a normal 1GB or 5GB/mo plan.&lt;br /&gt;&lt;br /&gt;The 20MB is fine for me since I am testing methods to keep data small.&lt;br /&gt;&lt;br /&gt;My current tests have a sleep devices waking, then obtaining a cell-link.  For example, I am working on a Digi gateway called an X3 (not on Digi's web site yet).  The X3 can power itself down completely, using a real-time clock chip to wake it at a future time.&lt;br /&gt;&lt;br /&gt;I ran a test for 5 days, waking the X3 device every 10 minutes and clocked how long it too for the GSM carrier to assign an IP to the X3:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The fastest time was 23.7 seconds (half a minute)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The slowest time was 97.0 seconds (1 and a half minutes)&lt;/li&gt;&lt;li&gt;The average time was 28.6 seconds (so most near 30 seconds, with a few long outliers)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Note that there will be several seconds of CPU start-up time in there - I can only know the RTC wake-up time (which I loaded into the RTC last cycle) compared to the RTC time when the IP address is assigned.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Why is this important?  Because the cellular modem consumes a LOT of power for the duration of this variable time.  It is one of the variable which makes estimating battery life difficult.&lt;br /&gt;&lt;br /&gt;My next test will include actually doing work - probably sending a Modbus/TCP transaction to a DSL-based server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-1663914190055420403?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/1663914190055420403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=1663914190055420403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/1663914190055420403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/1663914190055420403'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2010/04/how-long-to-obtain-cellular-ip.html' title='How Long to Obtain Cellular IP?'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-5040129437520082991</id><published>2009-10-13T14:09:00.000-07:00</published><updated>2009-10-13T14:47:16.040-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Device Access'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='WAN'/><category scheme='http://www.blogger.com/atom/ns#' term='Modbus'/><title type='text'>Cellular DNS Lookup Cost</title><content type='html'>I have been working with a customer using two cellular devices with a DDNS provider, so the 'Client/Master' device used a DNS name to connect to the remote 'Server/Slave' device.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Cost #1 - added delay&lt;br /&gt;&lt;/span&gt;The first cost they were seeing was added time lag to open a connection. &lt;br /&gt;&lt;ul&gt;&lt;li&gt;To open a TCP socket between two idle (but connected) cellular devices requires each device to be "unparked" by their cell tower.  So the client device would need to request a resource and be assigned it by the local cell tower - this can require 2 to 5 seconds.  &lt;/li&gt;&lt;li&gt;Next, a DNS query would be sent and a response would be required.  Some cellular carrier DNS servers don't seem very peppy, so this could add a few more seconds.&lt;/li&gt;&lt;li&gt;Then the client device would receive notice from the cell-tower control channel to request a resource and be "unparked"&lt;/li&gt;&lt;li&gt;Finally, after "X" seconds of delay and lag the client device would receive confirmation that the socket is open (or it might have given up to fast already &amp;amp; aborted).&lt;/li&gt;&lt;/ul&gt;So using a DNS name instead of an IP Address might add a few seconds delay - which might be just enough to cause problems.  The customer I am working with has a client tool with a hard-coded MAX timeout of 25 seconds, and it seems to often hit this during original socket open.  So they have no trouble communicating once the TCP socket is open, but it can be difficult to get the first data packets moving.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Cost #2 - added traffic&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;/span&gt;Of course the DNS query also adds raw traffic.  DNS uses UDP, and a query might be 44 bytes and a response 60 bytes.  So 104 bytes extra to open a TCP socket (which can be hundreds of bytes by itself). &lt;br /&gt;&lt;br /&gt;Is this traffic important?  Perhaps.  Perhaps Not.  Most cell plans today round up traffic hourly, so an extra 104 bytes for DNS and 150 bytes for a Modbus poll/response is still "1K of traffic".&lt;br /&gt;&lt;br /&gt;For TCP/IP, the DNS lookup would only occur for a socket open.  So regardless of the DNS name Time-To-Live, you might only see this added 104 bytes once per day or month - or anytime you open/reopen a socket.&lt;br /&gt;&lt;br /&gt;However for UDP/IP you MIGHT see this DNS lookup for every packet.  For example, a DDNS record from dyndns.org might expire in 60 seconds, so sending one 100 byte UDP packet every 5 minutes, could become 204 bytes per 5 minutes, so 2448 bytes per hour rounded up to 3K per hour or 72K per day and NOT the 49K expected.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;So while UDP/IP can save a lot of traffic cost over TCP/IP, if short-lived DNS names are required then some of UDP's savings will be lost. &lt;br /&gt;&lt;br /&gt;One solution is a custom application to do indirect DNS lookup.  In other words, to directly lookup the DNS name within the application, then to ignore the DNS "Time-to-Live" and use only the cached IP address UNTIL COMMUNICATIONS FAILS - then do a new lookup.  This is not how normal operating system DNS caches work - they literally honor the DNS server's time to live and would cause a new look up based on the 60 second time-to-live.  Yet this is general safe for cellular end-devices since normally the dynamic IP only changes when the cell link is lost, so the remote IP is unlikely to change more than a few times per day.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-5040129437520082991?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/5040129437520082991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=5040129437520082991' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/5040129437520082991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/5040129437520082991'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2009/10/cellular-dns-lookup-cost.html' title='Cellular DNS Lookup Cost'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-7969464053593369742</id><published>2009-06-10T06:33:00.000-07:00</published><updated>2009-06-10T06:54:42.218-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><title type='text'>Does Cellular 3G help your Rockwell PLC Access?</title><content type='html'>&lt;span style="font-size:130%;"&gt;In short - No.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Cellular data systems are continuously being sub-optimized for the unidirectional fire-hose paradigm of web page viewing, media streaming, image viewing, email download and so on.  In other words, you only see the 3G "broadband" performance when you have tens of thousands of bytes to shove in one direction.&lt;br /&gt;&lt;br /&gt;Actual field tests of RSLogix 5000 downloading to ControlLogix processors show that using 3G is only a few percent faster than standard technology - plus still probably slower than analog dialup.  The problem is caused by RSLogix and Ethernet/IP moving thousands of small transactions in a half-duplex manner.  So RSLogix downloads the PLC object by object, confirming success after each object is written.  With cellular latency, each of these transactions can take up to a second to complete, so multiple 1 second by 3000 to 8000 transactions and you have your PLC download time.&lt;br /&gt;&lt;br /&gt;3G apologists will claim "&lt;span style="font-style: italic;"&gt;Oh, but latency in 3G is much lower than older, coarser technologies.&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;That may be, but when the rubber meets the road (aka RSLogix5000 downloads), 3G doesn't perform any better.  3G might have other value, but for most people moving data "faster" just means your data usage and the final bill racks up faster as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-7969464053593369742?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/7969464053593369742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=7969464053593369742' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/7969464053593369742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/7969464053593369742'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2009/06/does-cellular-3g-help-your-rockwell-plc.html' title='Does Cellular 3G help your Rockwell PLC Access?'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-949554851077781585</id><published>2009-06-06T06:32:00.000-07:00</published><updated>2009-06-06T07:49:37.388-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Industrial'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='DF1'/><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><title type='text'>Cellular to Redundant Rockwell ControlLogix</title><content type='html'>Can &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;RSLinx&lt;/span&gt; access a redundant pair via cellular?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Background&lt;/span&gt;&lt;br /&gt;A Pair of Rockwell Automation &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;ControlLogix&lt;/span&gt; racks with &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;SRM&lt;/span&gt; Module and dual &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;ENBT's&lt;/span&gt; will share a pair of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;IP&lt;/span&gt; addresses. One &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;IP&lt;/span&gt; address is "the primary", and the other &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;IP&lt;/span&gt; is "the backup" (if/when it is online).  When the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;ENBTs&lt;/span&gt; switch role, they will issue the requisite Gratuitous &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;ARPs&lt;/span&gt; to cause other local Ethernet devices  (like a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;Digi&lt;/span&gt; cellular gateway) to update their &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;ARP&lt;/span&gt; cache, thus comprehending that the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;IP&lt;/span&gt;-to-MAC address mapping has changed.  Thus a NAT/Router forwarding to the primary &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;IP&lt;/span&gt; should handle the fail-over with only modest bumps.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;Config&lt;/span&gt; Details&lt;/span&gt;&lt;br /&gt;A user desiring &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;RSLinx&lt;/span&gt; (and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;RSLogix&lt;/span&gt; or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;RSView&lt;/span&gt; etc) to access a remote Rockwell &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;ControlLogix&lt;/span&gt; (any RA/AB &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;PLC&lt;/span&gt;) will be doing what the industry calls "&lt;span style="font-weight: bold; font-style: italic;"&gt;Mobile-Terminated&lt;/span&gt;" access.  The user needs to arrange a cell plan which offers either a fixed &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;IP&lt;/span&gt; address to target, or at least a Dynamic &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;DNS&lt;/span&gt; name to target (like tk101.iatips.com or panel2.digi.com).  This is NOT what you obtain with an iPhone or personal air-card data plan. Those will have private &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;IPs&lt;/span&gt; which only permit outgoing connections - called "&lt;span style="font-weight: bold; font-style: italic;"&gt;Mobile-Originated&lt;/span&gt;".  &lt;span style="font-style: italic;"&gt;That was a buzzword lesson - expect to be asked about those two terms when you ask about cellular data plans!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So once you can arrange your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;targetable&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;IP&lt;/span&gt; or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;DNS&lt;/span&gt; name, you need a cellular router such as one of the &lt;a href="http://www.digi.com/products/cellulargateways/digiconnectwanfamily.jsp"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;Digi&lt;/span&gt; Connect WAN family products.&lt;/a&gt;  My favorite model today is the &lt;a href="http://www.digi.com/products/wirelessdropinnetworking/connectportxgateways.jsp"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;ConnectPort&lt;/span&gt; X4&lt;/a&gt;, but that has large memory for Python programming, wireless mesh and other goodies you won't need to link up your Rockwell &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;PLC&lt;/span&gt; (Hey, I said it was MY favorite - doesn't mean it has to be yours!)&lt;br /&gt;&lt;br /&gt;Note that contrary to folklore or urban legend, all cellular devices need certification to work on a system - even &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;GSM&lt;/span&gt; devices.  Many small suppliers get around this by including fine-print that say the device buyer is responsible to arrange such legalities, and since you (the buyer) don't read such fine print the salesperson will just say "&lt;span style="font-style: italic;"&gt;Heck, it's &lt;/span&gt;&lt;span style="font-style: italic;" class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;GSM&lt;/span&gt;&lt;span style="font-style: italic;"&gt; - so it is allowed everywhere world wide!&lt;/span&gt;"  Deal with this issue as you see fit, but &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;Digi&lt;/span&gt; has more formal certs in more &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_31"&gt;countries&lt;/span&gt; worldwide than any of the other industrial players.&lt;br /&gt;&lt;br /&gt;But back on subject, when the gateway comes up, it is assigned your known &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32"&gt;IP&lt;/span&gt; or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;DNS&lt;/span&gt; name.  This is exactly how your home or business &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34"&gt;DSL&lt;/span&gt;/T-line line works. Yet when &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_35"&gt;RSLinx&lt;/span&gt; tries to talk to the gateway on Ethernet/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_36"&gt;IP's&lt;/span&gt; well-known &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_37"&gt;TCP&lt;/span&gt; port of 44818, the gateway will reject the connection as a weird attempt at hacking. You need to instruct the gateway:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;to not reject the Ethernet/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_38"&gt;IP&lt;/span&gt; traffic on &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_39"&gt;TCP&lt;/span&gt; port 44818&lt;/li&gt;&lt;/ol&gt;&lt;ol&gt;&lt;li&gt;to instead forward it to a local &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40"&gt;IP&lt;/span&gt; on the Ethernet - which would be the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_41"&gt;IP&lt;/span&gt; of your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_42"&gt;ControlLogix&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_43"&gt;ENBT&lt;/span&gt; (or the primary &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_44"&gt;IP&lt;/span&gt; of the redundant pair)&lt;/li&gt;&lt;/ol&gt;The details of how this man-in-the-middle fake-out works is fascinating (to me), but quite a pile of text.  If you are interested, &lt;a href="http://blog.iatips.com/2007/06/real-world-cellular-controllogix-plc.html"&gt;this older blog entry goes through the NAT/Router details blow by blow.&lt;/a&gt;  But bottom-line, your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_45"&gt;ENBT&lt;/span&gt; receives the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_46"&gt;RSLinx&lt;/span&gt; packet and needs to have its own Gateway &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_47"&gt;IP&lt;/span&gt; set to the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_48"&gt;Digi&lt;/span&gt; gateway's local Ethernet &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_49"&gt;IP&lt;/span&gt; address.  &lt;span style="font-style: italic;"&gt;Free hint: 9 out of 10 guys who call saying "Why can't &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_50"&gt;RSLinx&lt;/span&gt; see my &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_51"&gt;PLC&lt;/span&gt; through your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_52"&gt;Digi&lt;/span&gt; gateway?" have failed to set the correct Gateway &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_53"&gt;IP&lt;/span&gt; in the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_54"&gt;PLC&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_55"&gt;ENBT&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So assuming your gateway and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_56"&gt;PLC&lt;/span&gt; are setup correctly, then targeting the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_57"&gt;RSLinx&lt;/span&gt; "Ethernet Devices" driver (with timeouts slowed down to 30 seconds) will cause your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_58"&gt;PLC's&lt;/span&gt; little icon to show up.  With &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_59"&gt;RSLinx&lt;/span&gt; running, you will create up to 200MB of billable cell traffic per month doing absolutely nothing - so don't leave it active.  &lt;span style="font-style: italic;"&gt;Note that the "Ethernet/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_60"&gt;IP&lt;/span&gt; Driver" won't work as it requires &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_61"&gt;UDP&lt;/span&gt; broadcast, which can't be routed over the Internet.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;At this point you'll say "Cool, now can I see my backup &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_62"&gt;ControlLogix&lt;/span&gt; or a second &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_63"&gt;PLC&lt;/span&gt;?", and the simple answer is "No."  One of the realities of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_64"&gt;RSLinx&lt;/span&gt; and AB &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_65"&gt;PLC&lt;/span&gt; is that the Ethernet/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_66"&gt;IP&lt;/span&gt; protocol is hard fixed to only the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_67"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_68"&gt;IP&lt;/span&gt; port 44818, and the NAT/Router can only forward &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_69"&gt;TCP&lt;/span&gt; port 44818 to a single local &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_70"&gt;PLC&lt;/span&gt;.  The easy fix would be for Rockwell to change &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_71"&gt;RSLinx&lt;/span&gt; to enable adding both an &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_72"&gt;IP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_73"&gt;DNS&lt;/span&gt; name and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_74"&gt;TCP&lt;/span&gt; port number - then the NAT/Router &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_75"&gt;could&lt;/span&gt; forward &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_76"&gt;TCP&lt;/span&gt; port 44818 as 44818 to the primary &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_77"&gt;ENBT&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_78"&gt;TCP&lt;/span&gt; 44819 fixed-up to 44818 to the secondary &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_79"&gt;ENBT&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_80"&gt;TCP&lt;/span&gt; 17256 (a random number :-]) fixed up to 44818 to an &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_81"&gt;RSView&lt;/span&gt; panel and so on.  Because the NAT/Router can restore all traffic to 44818 on the local Ethernet, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_82"&gt;RSLinx&lt;/span&gt; is the only tool needing to change. &lt;br /&gt;&lt;br /&gt;Will Rockwell ever do this?  It would take a programmer half a day to do - then a few weeks to test - then a few months to document and &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_83"&gt;forestall&lt;/span&gt; support headaches.  So who knows.  They might.  They might not.&lt;br /&gt;&lt;br /&gt;But &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_84"&gt;bottomline&lt;/span&gt; is a simple cellular NAT/Router can be used to talk to a pair of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_85"&gt;ControlLogix&lt;/span&gt; running in a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_86"&gt;redundant&lt;/span&gt; configuration - you will just be limited to seeing only the primary &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_87"&gt;ENBT&lt;/span&gt; and the primary &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_88"&gt;IP&lt;/span&gt; address.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-949554851077781585?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/949554851077781585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=949554851077781585' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/949554851077781585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/949554851077781585'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2009/06/cellular-to-redundant-rockwell.html' title='Cellular to Redundant Rockwell ControlLogix'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-8160611394173821694</id><published>2009-04-07T05:56:00.000-07:00</published><updated>2009-04-07T07:16:17.678-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Device Access'/><category scheme='http://www.blogger.com/atom/ns#' term='zigbee'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet'/><title type='text'>Cellular Antenna and your PLC</title><content type='html'>One of my customers is having fun with one of their own customers. My customer uses Digi gateways running a Python application to collect hourly tank levels, which are fetched by cellular once per day. The tanks hold 250-gallons of a chemical additive which is injected at a variable rate into crude oil pipelines.  Small battery-powered ultrasonic level sensors (www.massa.com) push the last 8 hourly samples every few hours using wireless IEEE 802.15.4 (aka Zigbee). The end customer's goal is to forecast when the tanks need to be refilled ... and I don't mean just receive an alarm when it is running low, they literally want to plan truck routes in advance.&lt;br /&gt;&lt;br /&gt;Fun stuff.&lt;br /&gt;&lt;br /&gt;The problem is that one of the pilot sites has bad cell coverage, meaning many days the central system cannot upload the log.  Of course the data eventually it all uploads since it is held for over a month. Now, never mind that this system sits down in a dry wash (a small valley), the end-user says "Hah, that's because carrier A*** stinks; we all love carrier S****." My customer does not want to mix carriers - especially since negotiated pricing between the two in question is so different.&lt;br /&gt;&lt;br /&gt;So remember that "coverage" for fixed RTU must be viewed differently from "coverage" for mobile uses. &lt;br /&gt;&lt;br /&gt;For a mobile device (or user) "coverage" is defined by the probability that a valid carrier connection will be available as the device moves around. Thus the number of towers (etc) is important, and if there is no signal in one spot, then hopefully will be one a mile or two away.&lt;br /&gt;&lt;br /&gt;Unfortunately, our little RTU bolted to a power pole in that gully won't be moving a mile or two ever. So in the end, "coverage" for a fixed device is defined only by the tower(s) which can be seen.  So the carrier with the best cell-phone coverage might not be the best carrier to support a particular fixed RTU.&lt;br /&gt;&lt;br /&gt;The first step will be to move the RTU up out of the gully, which is easy since the data signals are all wireless and power can be tapped from any of the privately owned power poles.  Probably carrier A*** (stinky or not) will work fine once the RTU moves.  As plan B and make the end-customer feel listened to, a S****-based RTU will be placed on the same pole as the relocated A*** one.  &lt;br /&gt;&lt;br /&gt;Could they run out a long external antenna?  Sure, they could.  But why bother?  Put the RTU where it has a nice signal.  Even in 2 or 3 store buildings we suggest customers put the cellular router up in the roof-area and run the Ethernet UTP it's 100 meters instead of trying to deal with the signal loss in long antenna cables.  We even have customers using 900Mhz Ethernet bridges to link a cellular router placed where it must be placed back to the Ethernet devices which want access.&lt;br /&gt;&lt;br /&gt;Worst case, a directional yagi antenna could be used, however you need to understand that cell towers are routinely turned off without warning. The carriers are truly geared towards mobile users who expect bad signals in some places.  Towers (or the active elements) also move. Most of the cell towers you see along the highway work like strip-malls; a company owning the tower and supplying power leases tower space to a mix of carriers. This allows everyone to be flexible.&lt;br /&gt;&lt;br /&gt;So prematurely locking down a cellular device to a single tower with a directional antenna can cause future problems since it will not see other weaker towers should the targeted tower be turned off or even moved.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-8160611394173821694?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/8160611394173821694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=8160611394173821694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8160611394173821694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8160611394173821694'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2009/04/cellular-antenna-and-your-plc.html' title='Cellular Antenna and your PLC'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-7385825160822663829</id><published>2008-11-25T06:29:00.000-08:00</published><updated>2008-11-25T07:13:56.841-08:00</updated><title type='text'>Ethernet/IP PCCC Service Codes</title><content type='html'>&lt;span style="font-size:130%;"&gt;Summary: the Rockwell PCCC Service Codes (or how to get a 1761-NET-ENI or Digi One IAP to send specific DF1 DST/SRC bytes)&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;A customer had a product which acted as an Ethernet/IP originator (client) and needed to talk through a Digi One IAP to feed DF1 into a DH+ gateway.  The catch is the DH+ gateway used the DF1 destination byte as the DH+ node address - and so far they could only make the Digi One IAP spit out a destination = 1.  This made for pretty boring and unprofitable DH+ design!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(Sorry: I cannot explain "How to write an Ethernet/IP stack" in a single blog entry, so this entry assumes you already have a product speaking Ethernet/IP and just want to tweak how you talk to remote DF1 devices.)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The PCCC object (code: hex 0x67) is not part of the ODVA spec - it is a vendor specific object used by Rockwell/Allen-Bradley to talk to SLC5, PLC5E and MicroLogix PLC.   I won't fully explain it here ... not much to explain; do a wireshark trace of a ControlLogix talking to a SLC5/05 or MicroLogix 1100 and you'll see all you need to see about the simple object.&lt;br /&gt;&lt;br /&gt;The default service code of 0x4B has this form:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;table border="2"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Exec PCCC Service&lt;/td&gt;&lt;td&gt;4B&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;IOI to PCCC Object&lt;/td&gt;&lt;td&gt;02 20 67 24 01&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Originator Info&lt;/td&gt;&lt;td&gt;07 03 85 50 4d 41 41&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Example PCCC Message&lt;/td&gt;&lt;td&gt;0f 00 5c 00 a2 14 07 89 00 00&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;br /&gt;The only mystery here should be the "Originator Info".  The 07 means a total of 7 bytes (including the 07).  0385 is a unique sequence number which you should change between messages.  The 504d4141 is a "CIP Serial Number" which must be unique to your vendor id - most vendors just use the last 4 octets of an Ethernet MAC address.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;However, there is NO remote node or slave address info&lt;/span&gt;, so the Digi One IAP or 1761-NET-ENI will create a DF1 message for destination=1 and source=0.  So back to the customer's question ... how to force a DF1 message with say destination=5 and source=2?&lt;br /&gt;&lt;br /&gt;The easiest solution is to switch to service code 0x4C, which has this form:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;table border="2"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;DH+Like Service&lt;/td&gt;&lt;td&gt;4C&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;IOI to PCCC Object&lt;/td&gt;&lt;td&gt;02 20 67 24 01&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DH+ Like Header&lt;/td&gt;&lt;td&gt;00 00 02 00 00 00 05 00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Example PCCC Message&lt;/td&gt;&lt;td&gt;0f 00 5c 00 a2 14 07 89 00 00&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;br /&gt;So the "Originator Info" has been swapped with an 8 byte structure of the form AA AA BB XX CC CC DD XX.  The "XX" are control bytes of some sort - just leave 0x00.  "AA AA" is the Destination Link; "BB" is the Destination node; "CC CC" is the Source Link; "DD" is the Source node.&lt;br /&gt;&lt;br /&gt;Voila - both the Digi One IAP and the Rockwell 1761-NET-ENI will now create a DF1 message with destination=5 and source=2.  Not too painful, was it.&lt;br /&gt;&lt;br /&gt;To my knowledge all Rockwell Ethernet/IP PLC accept either code, and if you'd like to see the service 0x4C in action just set your RSLogix5000 MSG block to use "CIP with Source ID" and the ControlLogix switches from using service 0x4B to using 0x4C.&lt;br /&gt;&lt;br /&gt;For completeness, there is a final service code of 0x4D with this form:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;table border="2"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Local PCCC Service&lt;/td&gt;&lt;td&gt;4D&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;IOI to PCCC Object&lt;/td&gt;&lt;td&gt;02 20 67 24 01&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Example PCCC Message&lt;/td&gt;&lt;td&gt;0f 00 5c 00 a2 14 07 89 00 00&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;br /&gt;It is documented in DeviceNet gateway manuals to reduce total byte count - but it also lacks any destination or source info so is of limited use in Ethernet-based systems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-7385825160822663829?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/7385825160822663829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=7385825160822663829' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/7385825160822663829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/7385825160822663829'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2008/11/ethernetip-pccc-service-codes.html' title='Ethernet/IP PCCC Service Codes'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-5278322795141761709</id><published>2008-08-07T07:05:00.000-07:00</published><updated>2008-08-07T08:23:13.512-07:00</updated><title type='text'>Creeping Firewalls and Change</title><content type='html'>Summary: Network infrastructure changes can create unexpected havoc (surprised?)&lt;br /&gt;&lt;br /&gt;We had a customer come in with a complaint recently about some old products - a 4-port terminal server (a TS4) running &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Modbus&lt;/span&gt; bridging firmware.  Things had gone on smoothly for years, but suddenly they started having problems which power-cycling the units solved ... obviously it's a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Digi&lt;/span&gt; problem, right?&lt;br /&gt;&lt;br /&gt;Well, I'm not going to run through all of the issues, but I'll highlight one which will affect more and more people over time.  Remember the old days - first you had dumb &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;dialup&lt;/span&gt; modems, then you had to pay a lot for various error-detection standards, and now all analog modems have a big chip which does a hundred different standard things and you &lt;span style="font-weight: bold; font-style: italic;"&gt;CANNOT buy any low-cost analog dial-up modem which is any dumber than state-of-the-art.&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;Such creep occurs in Ethernet switches also - once hubs were cheap and switches cost a king's ransom.  Now even the "cheap" $19 home switches purchased in big-box stores are auto-sense, auto-cross, auto-&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;everything&lt;/span&gt;.  The same things happens - once the features are rolled into software or firmware, future revs of the product inherit such features for free ... said another way, it is often cheaper to sell lots of one powerful model than handle the marketing and support costs of a dozen models of various power and feature-set.&lt;br /&gt;&lt;br /&gt;Well, &lt;span style="font-weight: bold; font-style: italic;"&gt;this customer had been upgrading their wide-area-network infrastructure&lt;/span&gt; - a tangle of routed &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;IP&lt;/span&gt;-based leased lines, old analog lines, radio/microwave links and so one, and as part of the improvement the various router/PPP end-points had added &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;stateful&lt;/span&gt; awareness of packets ... part of an increase in US government security demands for utilities.  After all, when you have hundreds of raw Ethernet ports scattered across rural American protected with little more than a padlock and chain-link fence, one has to consider the possibility of someone trying to 'jack' back into the 100% private network from a remote location.&lt;br /&gt;&lt;br /&gt;The issue with such an addition is that routers with firewalls commonly default to a 5-minute &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;TCP&lt;/span&gt; life rule.  Every &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;stateful&lt;/span&gt; firewall creates a table entry for every &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;TCP&lt;/span&gt; or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;UDP&lt;/span&gt; activity going "out" from a safer network and into a wilder, less safe network - your home &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;DSL&lt;/span&gt;/Cable router does the same thing.  NAT (etc) is optional, but bottom line is the firewall needs to understand and agree to the context of every packet trying to pass through.&lt;br /&gt;&lt;br /&gt;For a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;TCP&lt;/span&gt; socket this usually means at least 1 packet (data or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;ACK&lt;/span&gt; or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;Keepalive&lt;/span&gt;) must move every 5 minutes to refresh the context and inform the firewall that the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;TCP&lt;/span&gt; socket is still authorized.  If no packets are seen, the fire wall discards the context and the socket is now ignored and 100% blocked without comment.  Of course both &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;TCP&lt;/span&gt; peers might think the socket is alive and well, but they will never be able to use it again.&lt;br /&gt;&lt;br /&gt;So back to our TS4 off in some remote field - a host computer has 4 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;TCP&lt;/span&gt; sockets open to it through various routed &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;subnets&lt;/span&gt; and for whatever reason the host doesn't send any new packets for 6 minutes.  The TS4 has no reason to talk since it is connected to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;Modbus&lt;/span&gt; slaves.  So 6 minutes later the host issues 4 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;Modbus&lt;/span&gt; requests on 4 sockets, which hit the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;stateful&lt;/span&gt; firewall.  The firewall looks up the context (called forwarding or trigger rules in some systems) and discovers there is no existing context for these &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;TCP&lt;/span&gt; packets.  Well, once upon a time the firewall would just assume since these were safe since they came from the safe side, and thus auto-create a new context, yet modern &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;stateful&lt;/span&gt; firewalls might NOT do this since it was a common hacker exploit to fool firmwalls to move malformed packets.  Thus modern security demands that the first packet of any new &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;TCP&lt;/span&gt; socket be a [SYN] packet.  All four packets are silently discarded as unknown (&lt;span style="font-style: italic;"&gt;note: this is a configurable behavior in most firewalls - to auto-recreate a context for an 'old' &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;TCP&lt;/span&gt; socket continuing or to only allow this for new &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;TCP&lt;/span&gt; sockets.&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;The TS4 never sees the four new request; the host sees neither an [&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;ACK&lt;/span&gt;] nor a [&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;RST&lt;/span&gt;] of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;TCP&lt;/span&gt; socket, so it retries after 3 seconds, then 6 and so on.  Eventually it comprehends the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;TCP&lt;/span&gt; socket has died and opens four new &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;TCP&lt;/span&gt; sockets.  These are allowed through the firewall since they contain the correct TCP state as being new sockets.  The TS4 sees the four new socket requests and now has eight (8) sockets connected.&lt;br /&gt;&lt;br /&gt;Now you might say "What a minute - the four old sockets were closed!".  Well, yes - the HOST knows they are dead and closed them, but the TS4 does not know this.  Six minutes later, the same is repeated and the TS4 now has 12, then 16, then 20 sockets open.  Eventually the TS4 runs out of resources, and the customer's open recovery option is a hard reboot of the TS4.  This is of course worse if the host only &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_31"&gt;occasionally&lt;/span&gt; takes longer than 5 minutes to poll, since the increase in TS4 sockets could take an unpredictable amount of time to build up.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;How to solve this problem?&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The first line of defense in the modern &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32"&gt;IP&lt;/span&gt; age is to always, ALWAYS enable &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33"&gt;TCP&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34"&gt;keepalives&lt;/span&gt; with an aggressive 4 minute 30 second idle time in any product you install.  Even if you don't have &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_35"&gt;stateful&lt;/span&gt; packet inspection within your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_36"&gt;IP&lt;/span&gt; network today, that doesn't mean the next time someone replaces a router or serial &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_37"&gt;PPP&lt;/span&gt; end-point you won't gain one.  Unfortunately the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_38"&gt;Digi&lt;/span&gt; products usually default to a 2 hour &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_39"&gt;TCP&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40"&gt;Keepalive&lt;/span&gt; - which is also disabled (for historical reasons).  Yet having a 4.5 minute keepalive would have saved the TS4 because the first time the host delayed longer than 4.5 minutes to poll, the TS4 would have sent a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_41"&gt;TCP&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_42"&gt;keepalive&lt;/span&gt; packet back through the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_43"&gt;stateful&lt;/span&gt; firewall, which the host returns and the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_44"&gt;firewall's&lt;/span&gt; context for this socket is refreshed.  Thus when the host does finally send the next &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_45"&gt;Modbus&lt;/span&gt; poll after 6 minutes (1.5 minutes after the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_46"&gt;TCP&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_47"&gt;keepalive&lt;/span&gt; exchange) the firewall is &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_48"&gt;satisfied&lt;/span&gt; with the packets and forwards them out to the TS4.  Everyone is happy.  Plus even if the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_49"&gt;TCP&lt;/span&gt; socket has been aborted by the firewall, the TS4's &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_50"&gt;TCP&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_51"&gt;keepalive&lt;/span&gt; will be &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_52"&gt;silently&lt;/span&gt; discarded and the TS4 will retry and &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_53"&gt;eventually&lt;/span&gt; comprehend that the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_54"&gt;TCP&lt;/span&gt; socket is no longer valid.  This is the purpose of TCP Keepalive - to allow a TCP peer with no data to move to test (and refresh) the health of an idle connection.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The second possibility is unique to the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_55"&gt;Digi&lt;/span&gt; IA/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_56"&gt;Modbus&lt;/span&gt; application.  You can enable a setting &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_57"&gt;referred&lt;/span&gt; to as "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_58"&gt;idletimeout&lt;/span&gt;" on incoming client or outgoing server connections.  Unlike the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_59"&gt;TCP&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_60"&gt;Keepalive&lt;/span&gt; which create traffic and keeps an idle socket open, the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_61"&gt;idletimeout&lt;/span&gt; literally just aborts an idle socket without giving it any chance to prove it is healthy.  So setting a 5 minute idle timeout in the TS4 would cause it to just assume any incoming &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_62"&gt;Modbus&lt;/span&gt; client (master) connection which has NOT sent a new request is bad.  This setting would also have saved the TS4, forcing the four old sockets to be aborted before the TS4 had a chance to build up a herd of dead sockets.&lt;/li&gt;&lt;/ol&gt;So understanding TCP Keepalive is a critical skill for all modern industrial Ethernet users, after all more and more facilities are breaking their floors and functional area into distinct subnets with stateful firewall protection to keep the Accountants from changing the color of the widgets being produced - and to keep the production engineers from printing on the accounting departments laser printer which uses red ink :-).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html"&gt;More complete discussion of TCP Keepalive is here&lt;/a&gt; (one of dozens of web site you can find in a web search).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-5278322795141761709?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/5278322795141761709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=5278322795141761709' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/5278322795141761709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/5278322795141761709'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2008/08/creeping-firewalls-and-change.html' title='Creeping Firewalls and Change'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-695717031308817233</id><published>2008-08-01T09:51:00.000-07:00</published><updated>2008-08-01T10:06:21.254-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Device Access'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Serial'/><title type='text'>Tunneling Serial Data over Cellular</title><content type='html'>&lt;span style="font-size:130%;"&gt;Tunneling Serial Data over Cellular&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Question&lt;/span&gt;: you have a Windows-based application which expects to talk over normal serial ports - how can you connect to a remote serial device over a cellular-IP link?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Products&lt;/span&gt;: works with Digi Connect WAN, WANIA or WANVPN, Digi ConnectPort VPN, X4 or X8&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer&lt;/span&gt;: Our Digi RealPort driver for Windows 2000/XP/Vista dated Nov 2008 now supports a nice low-overhead "UDP: Serial Data Only" mode. This will cost a fraction of what normal TCP-mode Realport or competitors TCP redirectors will cost.&lt;br /&gt;&lt;br /&gt;Here is a web page explaining how to install RealPort for UDP mode (DDNS names can be used!)&lt;br /&gt;&lt;a href="http://digitips.wikispaces.com/Digi+Realport+with+UDP"&gt;http://digitips.wikispaces.com/Digi+Realport+with+UDP&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is a web page explaining how to set the WANIA to UDP Sockets.&lt;br /&gt;&lt;a href="http://digitips.wikispaces.com/Digi+UDP+Sockets+WAN"&gt;http://digitips.wikispaces.com/Digi+UDP+Sockets+WAN&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I set this up yesterday and have been polling a Modbus/ASCII serial slave on my CPX4 using RealPort and UDP mode. Responses take from 2 to 3 seconds to return … in part because I am polling so slowly that the modem PARKS in between every poll and I wait 30 seconds for a response timeout. I see perhaps 0.25% error / no response timeout but then my SIM doesn’t have the best signal where my product sits.&lt;br /&gt;&lt;br /&gt;However, I still believe people need to be realistic – even in the situations where the slave response times out I’d suggest NOT retrying immediately since the retries have a higher than normal probability of failing as well. Missing a few polls a day is better than needlessly paying more for data plans.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-695717031308817233?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/695717031308817233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=695717031308817233' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/695717031308817233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/695717031308817233'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2008/08/tunneling-serial-data-over-cellular.html' title='Tunneling Serial Data over Cellular'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-8715486721615699400</id><published>2008-07-23T12:28:00.000-07:00</published><updated>2008-07-23T13:29:46.692-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Device Access'/><category scheme='http://www.blogger.com/atom/ns#' term='Industrial'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><title type='text'>Evolution of Data Plan Billing</title><content type='html'>&lt;span style="font-weight: bold;font-size:130%;" &gt;Summary: the big three have moved away from unlimited data, towards limited data.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It is interesting - I once (as in last year) had a talk with a potential partner who'd been at some European conference and was convinced the world was on the verge of low-cost (sub-$20/month) unlimited cellular data plans.  We were discussing the creation of report-by-exception  tools to reduce SCADA costs, and this partner's strong faith in this belief caused them to eventually bail out of the talks, saying "&lt;span style="font-style: italic;"&gt;In a year or two, no SCADA company will care about how much cellular data they use&lt;/span&gt;."&lt;br /&gt;&lt;br /&gt;Yet as of the summer of 2008 the world of cellular data is moving in the opposite direction.  Last year the big three (AT&amp;amp;T/Sprint/Verizon) offered "Unlimited Data" for personal users with the Service Terms listing a VERY narrow list of permitted activities - mainly email and web browsing, with many common things like file download/upload, media-streaming prohibited.  So when ever one of the big three would &lt;span style="font-weight: bold; font-style: italic;"&gt;cut off a user for moving too much data on an "unlimited plan"&lt;/span&gt;, the service provider would fall back on the "&lt;span style="font-style: italic;"&gt;You are doing prohibitted things, thus impacting our network, thus take your business elsewhere&lt;/span&gt;".  What a way to cause bad feelings, eh?  &lt;span style="font-style: italic;"&gt;Note that this change is CONSUMER plans - machine-to-machine have always been limited, priced by the MB/month without rollover, plus with charges for data overages.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now all three have dropped the price from the $80/month range down to $60/month range ... but added a hard limit of 5GB per month.  Isn't free &amp;amp; vigorous market competition wonderful?&lt;br /&gt;&lt;br /&gt;Sounds reasonable - 5,000 megabytes of data is a lot, yet this doesn't mean 5GB of data transfer.  It means 5GB of metered activity, with many activities I've studied including up to 95% overhead.  Thus someone only moving 20-30MB of real data in small packets per month might hit pretty close to their 5GB limit!  My experience with normal wide-area-network traffic hints that a real PC user doing simple email and web-browsing once a day would probably move 1-2GB of data before hitting the 5GB total activity limit.&lt;br /&gt;&lt;br /&gt;To paraphrase the wireless data service terms for all three:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Data transport is always measured in full kilobytes&lt;/li&gt;&lt;li&gt;Actual transport is always rounded up to next full-kilobyte at "end of session"&lt;/li&gt;&lt;li&gt;Network overhead and resend requests caused by network errors can increase measured kilobytes.&lt;/li&gt;&lt;li&gt;2 of 3 mention always rounding up to nearest kilobyte every hour period.&lt;/li&gt;&lt;li&gt;All warn that you will NOT receive an itemized detail of how your charges are calculated; you will NOT see which services were used or during which time periods the charges were inccurred under.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;So if I send a single 50 byte UDP/IP packet, is that a full session and billed as 1024 bytes?  Could be under this language since UDP is 'sessionless'.&lt;br /&gt;&lt;br /&gt;Hmm, the term &lt;span style="font-weight: bold; font-style: italic;"&gt;session &lt;/span&gt;is pretty ambiguous.  Perhaps it means per "time you enable your PC-based cellular data card."  That seems likely - plus if you left your device on twenty-four hours a day then the once per hour round-up would catch you.&lt;br /&gt;&lt;br /&gt;I'm afraid I haven't offered any new answer here, other than to suggest you understand that &lt;span style="font-weight: bold; font-style: italic;"&gt;low-cost unlimited data plans ARE NOT just around the corner&lt;/span&gt; ... at best we left them behind last year and I don't foresee them ever returning.  I suppose all three now understand that huge new profits are to be made with these 5GB limits, which will cause many "super-salesman" using their cellular data plan daily to spend an extra $50 to $500 in monthly overage charges.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-8715486721615699400?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/8715486721615699400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=8715486721615699400' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8715486721615699400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8715486721615699400'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2008/07/evolution-of-data-plan-billing.html' title='Evolution of Data Plan Billing'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-7241515663779141487</id><published>2008-07-11T09:56:00.000-07:00</published><updated>2008-07-11T10:13:13.801-07:00</updated><title type='text'>Lower Cost Cellular to Rockwell AB PLC</title><content type='html'>&lt;p&gt;I have several customers now working through how to manage cost-effective cellular access to Rockwell PLC such as ControlLogix, CompactLogix, Micrologix 1100 and so on.  Unfortunately the most straight forward way to link using Ethernet/IP is fairly costly.&lt;br /&gt;&lt;/p&gt;First, a personal recommendation from me – a free tool which I find very useful and think you will too.  Today, you can buy 2GB USB flash drives for $15 – if you're old like me, you remember when an entire Windows computer only had 0.020GB of hard drive space!  &lt;span style="font-weight: bold; font-style: italic;"&gt;Did you know you can literally install and run many Windows applications from these portable USB drives?  &lt;/span&gt;This means any Windows computer you plug this USB drive into has your applications, your settings, and your data files.  I've used one of these for over a year and it is invaluable - all free open source code too!   You can run &lt;a href="http://portableapps.com/apps/office/openoffice_portable"&gt;OpenOffice&lt;/a&gt; (which can read/write MSOffice 2003 files and is much faster than the MSOffice 2007 we use at Digi), &lt;a href="http://portableapps.com/apps/internet/firefox_portable"&gt;Firefox web browser&lt;/a&gt;, plus a dozen other tools. &lt;a href="http://portableapps.com/apps/utilities/keepass_portable"&gt; Take a special look at KeePass&lt;/a&gt;, which I use daily from my USB drive to securely hold all of my hundred-plus account names and passwords.&lt;br /&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;a href="http://portableapps.com/about/what_is_a_portable_app"&gt;Portableapps.com - What is a Portable App?&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Okay, back to work.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:180%;"&gt;Periodic PLC Access from RSLogix&lt;/span&gt;&lt;/p&gt;Customers who want to peek into a single PLC at a remote site for an hour or two can use RSLinx to connect to either an IP or DNS name, then see the PLC via cellular.  The catch is RSLinx will create from 12MB to 200MB of background traffic per month.  So you need to create a new Ethernet Driver (not Ethernet/IP!) JUST for this one-time use, configure in your details, connect and do your work.  When you are done you need to turn browsing off, then delete the comm driver.  Why not just delete the IP or DNS name?  Unfortunately once RSLinx has seen a device, it can be like a bad rash to get rid of it.&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;Data polling – at Central Office&lt;/span&gt;&lt;/p&gt;Customers with an OPC server speaking DF1, CSPv4, or even Ethernet/IP can poll PCCC-type data through a &lt;a href="http://www.digi.com/products/serialservers/digioneiaphaz.jsp"&gt;Digi One IAP&lt;/a&gt;, which converts the polls into &lt;a href="http://iatips.com/rockwell.html#common"&gt;DF1 Radio Modem&lt;/a&gt; under UDP.  Tests have show using DF1 Radio Modem every few minutes accomplishes the same data movement as Ethernet/IP with only 5% the data cost (or Ethernet/IP uses 2000% more data bytes).  One unit of Digi One IAP can poll up to 60 remote IP or DNS names.  If your OPC server can encapsulate DF1 Radio Modem directly into UDP/IP, then you won't need the Digi One IAP to act as your host.&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:180%;"&gt;Data Polling – at Remote Site&lt;/span&gt;&lt;/p&gt;If you have an &lt;span style="font-weight: bold; font-style: italic;"&gt;AB PLC which speaks DF1 Radio Modem&lt;/span&gt; directly, then any Digi cellular router can be configured for UDP Sockets, with shuttles UDP data received to the serial port.  Make sure you use the latest Digi firmware so it can just return UDP responses to last sender without explicit address configuration.&lt;br /&gt;&lt;p&gt;If your &lt;span style="font-weight: bold; font-style: italic;"&gt;AB PLC doesn't speak DF1 Radio Modem&lt;/span&gt;, or you want to use an Ethernet link, then using a Digi cellular router with Python support allows a simple script which accepts DF1 requests and uses a local Ethernet/IP session to query responses from the PLC's PCCC Object.  This Python code even runs on a PC under Windows or Linux.  As soon as I have a link or web page explaining how to get and use this code, I'll edit this post to add it here.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-7241515663779141487?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/7241515663779141487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=7241515663779141487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/7241515663779141487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/7241515663779141487'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2008/07/lower-cost-cellular-to-rockwell-ab-plc.html' title='Lower Cost Cellular to Rockwell AB PLC'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-4867409261614114943</id><published>2008-07-10T14:54:00.000-07:00</published><updated>2008-07-10T15:05:06.917-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet'/><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><title type='text'>Quick Data Comms to AB PLC</title><content type='html'>One of my readers was asking for a quick way to talk via Ethernet to a Rockwell AB PLC.&lt;br /&gt;&lt;br /&gt;You can actually talk to a ControlLogix by only understanding TWO (2) different packets, each with a response, so four packets I guess.  The problem is this uses "UCMM" style communications, which the PLC has very limited resources for.  Said another way, the CIP Connected Messaging or I/O production both include an inherent allocation of resources, while the UCMM is designed to be used ONLY to setup such pre-allocated resources.&lt;br /&gt;&lt;br /&gt;So yes, you can use the information below to create a literal quick-n-dirty solution, and if you talk more than a few times a second you might start to interfer with other communications to the PLC (which is not a good thing!)  However you could treat this as a proof of concept, and then work to do the communications more fully per the ODVA specs.&lt;br /&gt;&lt;br /&gt;Here is the PDF of &lt;a href="http://iatips.com/digiwiki/quick_eip_demo.pdf"&gt;how to read/write to the PCCC Object in a Logix Processor&lt;/a&gt; here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-4867409261614114943?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/4867409261614114943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=4867409261614114943' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4867409261614114943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4867409261614114943'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2008/07/quick-data-comms-to-ab-plc.html' title='Quick Data Comms to AB PLC'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-8695516226911618707</id><published>2008-05-30T07:06:00.001-07:00</published><updated>2008-05-30T07:42:33.059-07:00</updated><title type='text'>Public Internet Risk in Common Tools</title><content type='html'>Two months ago a SCADA customer asked me to enable FTP (File-Transfer-Protocol) on a test RTU they'd sent me to put online for them.  It was on a DSL link and although I warned them it was a bad idea they said it would be okay because the RTU had username/password protection and the RTU had nothing important on it.&lt;br /&gt;&lt;br /&gt;The punchline is that a few days later the customer sent me an email saying they couldn't FTP into the RTU anymore, so couldn't check the log files.&lt;br /&gt;&lt;br /&gt;I looked, and the RTU now had 3 TCP sockets open (all the sockets allocated for FTP on this RTU) to some FTP client at an IP address registered in Korea.  All 3 were just slowly walking through a dictionary attack of username/passwords (user &lt;span style="font-weight: bold;"&gt;bill&lt;/span&gt;, pass &lt;span style="font-weight: bold;"&gt;honda14 &lt;/span&gt;... user &lt;span style="font-weight: bold;"&gt;billk&lt;/span&gt;, pass &lt;span style="font-weight: bold;"&gt;12tomes &lt;/span&gt;...)  No doubt the IP and FTP client belonged to some university student running kiddy-scripts obtained on the Internet.  No doubt the kid probably didn't even care if the odd device he or she had never seen before was not a computer (&lt;span style="font-style: italic;"&gt;FTP servers always announce what and who they are when you connect&lt;/span&gt;).  No doubt this attack wasn't costing them anything, as either the university or parents were paying for the Internet connection - or the IP and connection belonged to some patsy whose home computer had been compromised.&lt;br /&gt;&lt;br /&gt;So okay, it was not causing any real harm,  &lt;span style="font-weight: bold; font-style: italic;"&gt;except it defeated the purpose of enabling FTP since the end user no longer had access to FTP.&lt;/span&gt;  I suppose you could call it a denial-of-service attack, yet I'm sure that was NOT the intension of the '&lt;span style="font-style: italic;"&gt;attacker&lt;/span&gt;'.  The student was probably just hoping to be able to post a message on some forum saying '&lt;span style="font-style: italic;"&gt;I hacked a computer at this IP address in the USA, and here is the FTP user name and password I created for you to access.&lt;/span&gt;'  The fact that the RTU only contained a dozen binary log files would be irrelevant.&lt;br /&gt;&lt;br /&gt;Do I have a moral to this story?  Hmm, not really - other than industrial users have to understand that what is NOT interesting to them might be interesting to others for very different reasons.&lt;br /&gt;&lt;br /&gt;If this user had allowed me to change the FTP port to some random value like TCP port 38207, then it is very likely this particular student would NOT have found it.  Since true port-scans are so easy to detect, the student's tool probably had a list of a few dozen TCP ports commonly used by FTP servers, then it would randomly try them over a few weeks at any single target IP.&lt;br /&gt;&lt;br /&gt;The same story could be true for web servers on TCP port 80 (or 8000 or 8080).  Digi ships our cellular products with the web server enabled on port 80 because that is what customers expect.  Sure, they add a username and password, but what will happen to their data plan bill if their 3MB per month plan moves 3-GigaByte because some scripts are trying dictionary attacks on the login of home web page?&lt;br /&gt;&lt;br /&gt;I've had to always mention that 3GB part (meaning a $500+ bill for a month) since every time I mention to such users not to leave port 80 setup as a web browser, the industrial customer's answer is invariably '&lt;span style="font-style: italic;"&gt;... it'll be okay because the unit has username/password protection and it has nothing worth trying to see on it ... &lt;/span&gt;'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-8695516226911618707?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/8695516226911618707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=8695516226911618707' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8695516226911618707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8695516226911618707'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2008/05/public-internet-risk-in-common-tools.html' title='Public Internet Risk in Common Tools'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-4501052569202497675</id><published>2008-05-22T09:34:00.000-07:00</published><updated>2008-05-22T10:05:04.704-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='zigbee'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><title type='text'>Cellular to Wireless Zigbee</title><content type='html'>An interesting new market we are moving into is cellular access to wireless mesh (Zigbee as example).  In some sense it's a supply-chain dream come true.  Imagine you supply a product to customers and EVERYONE (except the customer's IT department) want you to be able to see what the stock level is and auto-schedule deliveries.&lt;br /&gt;&lt;br /&gt;The customer benefits because they can treat the product as a 'utility' - turn the tap and there it is.&lt;br /&gt;&lt;br /&gt;You benefit because you can minimize emergency truck-rolls - no more angry, panicked customers demanding you send a truck over two-thirds empty because someone forgot to schedule a special delivery because the customer needed to use 60% more product for two days.  Of course as a supplier the cost of the truck, fuel, and driver are critical parts of your margin/profit.  You desire to only send out full trucks which return gracefully empty!&lt;br /&gt;&lt;br /&gt;So we are now working with several of the largest chemical suppliers in the world to enable:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;drop in a powered cellular unit at the customer site&lt;/li&gt;&lt;li&gt;drop in powered or battery tank sensors&lt;/li&gt;&lt;li&gt;log levels hourly, for the supplier to upload daily (reduces cellular data charges)  The supplier uses this as their 'secret-sauce', their own proprietary value-add to predict when trucks need to roll to maximize efficiency&lt;br /&gt;&lt;/li&gt;&lt;li&gt;enable alarm call-out if the levels hit unexpected low-low levels&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;How this works varies by suppliers.  The one I'm working with is using Modbus/TCP to pull up the logs daily.  Some other suppliers are having SMTP clients push emails back to the supplier with XML formatted reports.  The next supplier I might work will wants the binary logs to be compressed (ZIP'd) and then pushed upstream once a day by FTP, where their accounting system will convert from binary to XML to import and issue bills on product usage per MINUTE.&lt;br /&gt;&lt;br /&gt;Of course key to all of this is the &lt;a href="http://www.digi.com/products/wirelessdropinnetworking/"&gt;wireless drop-in-network concept&lt;/a&gt;.  The supplier doesn't want to invest thousands of dollars pulling wires through SOMEONE ELSE'S PLANT - especially when the supplier's contract might end in a few months. &lt;br /&gt;&lt;br /&gt;Wireless sensors aren't new; cellular data access isn't new; supply-chain systems which auto-detect product levels aren't new.  What is new here is the merger of many technologies which reduce infra-structure costs, and thus increase ROI.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-4501052569202497675?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/4501052569202497675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=4501052569202497675' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4501052569202497675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4501052569202497675'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2008/05/cellular-to-wireless-zigbee.html' title='Cellular to Wireless Zigbee'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-6149794360626282447</id><published>2008-03-14T07:42:00.000-07:00</published><updated>2008-03-15T09:40:33.293-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DF1'/><title type='text'>PCCC Protected Typed Logical Write with Mask</title><content type='html'>Someone asked about the "&lt;span style="font-style: italic;"&gt;DF1 Supplement for SLC500&lt;/span&gt;" from 1995 which was online at ab.com for a short period, then was pulled - probably because it is a very poor quality optical scan.  However, I had it ... then lost it ... then found it stashed away on one of my ftp sites. &lt;br /&gt;&lt;br /&gt;So here is the original AB PDF (which I downloaded from ab.com last year)  &lt;a href="http://iatips.com/docs/DF1%20Protocol%2017706516%20Suppliment.pdf"&gt;Grab it here while it survives&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The masked write is on page 11 and the first data-word is the mask and all data following has the SAME mask applied.  So [0x0001,0x0000] would clear the LSBit and so on.  It doesn't offer mask-data pairs - just one mask and N words.  Thus this command is mainly for use with 1 word element writes ... unless you have three or four consecutive N-file words you wish having the same mask applied.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-6149794360626282447?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/6149794360626282447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=6149794360626282447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/6149794360626282447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/6149794360626282447'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2008/03/pccc-protected-typed-logical-write-with.html' title='PCCC Protected Typed Logical Write with Mask'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-4779672731597054757</id><published>2008-03-07T09:27:00.000-08:00</published><updated>2008-03-07T09:40:26.233-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Modbus'/><title type='text'>Optimizing Modbus for Cellular</title><content type='html'>&lt;h2 id="toc1"&gt;Goal: lower your data costs&lt;/h2&gt;  How nice it would be if you could take your Ethernet applications and just move them to cellular (or satellite).  Well, of course you can ... but you'll pay through the nose for this.&lt;br /&gt;&lt;br /&gt;At the moment I'm in the process of creating intelligent cellular gateways accessible by Modbus/UDP (aka Modbus/TCP form in UDP) which support data logging, report-by-exception and other cost-saving goodies.&lt;br /&gt;&lt;br /&gt;A few Facts:&lt;br /&gt; &lt;ol&gt;&lt;li&gt;You are charged for all IP, TCP, and UDP overhead - the cellular system moves your TCP/IP packet as raw payload encapsulated in mobile-IP or other transports. So to them the 40-52 bytes TCP/IP header as NOT DISTINGUISHED from your data. ( &lt;a class="wiki_link_ext" href="http://iatips.com/blog/2007/01/cellular-costs-bytes-you-pay-for-each.html" rel="nofollow"&gt;My Blog entry on this&lt;/a&gt; )&lt;/li&gt;&lt;li&gt;Thus Modbus/UDP (aka Modbus/TCP in UDP/IP) will save you from 60 to 90% of your data costs. It is a single one-shot request followed by a single one-shot response. In contrast TCP/IP might require up to 400 bytes of socket open &amp;amp; close overhead, plus TCP acknowledge packets.&lt;/li&gt;&lt;/ol&gt; &lt;br /&gt;So if you are concerned about cost, you should first make sure your DATA POLLING can be done with Modbus/UDP - not TCP. No sweat if you need to use Modbus/TCP to reprogram or monitor your RTU or PLC short-term, just make sure your 24/7 repetitive data polling in via UDP. ( &lt;a class="wiki_link_ext" href="http://blog.iatips.com/2007/08/truth-about-cellular-ip.html" rel="nofollow"&gt;Is UDP reliable enough?&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So I've defined a few extensions (read as 'heresy' to many).  &lt;a href="http://iatips.wikispaces.com/Optimizing+Modbus+TCP+for+Cellular"&gt;Full Details are Here at iatips.com:&lt;/a&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I allow use of the full Modbus/TCP header - so one can read 500 registers in a single request.  This greatly reduces charges for header overhead&lt;/li&gt;&lt;li&gt;I allow returns LESS than data than requested when the context is appropriate.  This saves having to pay for data padding, plus not having to poll a status register to see how much logged data is waiting&lt;/li&gt;&lt;li&gt;I allow use of data compression like ZLIB.  Bottomline, 'ZIP' compression of small data sucks, but since I can return 500 registers (1K bytes) ZLIB starts showing value.&lt;/li&gt;&lt;li&gt;I allow packing multiple Modbus-ADU below a single header, which (unlike pipelining) signals the gateway to return multiple responses in a single packet.&lt;/li&gt;&lt;li&gt;I am looking at support for simple AES encryption, not as true 'security', but as a good-enough means to support Modbus without making development difficult.&lt;/li&gt;&lt;/ol&gt;If you are interested in the details, I have more discussion on &lt;a href="http://iatips.wikispaces.com/Optimizing+Modbus+TCP+for+Cellular"&gt;my wiki site&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-4779672731597054757?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/4779672731597054757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=4779672731597054757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4779672731597054757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4779672731597054757'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2008/03/optimizing-modbus-for-cellular.html' title='Optimizing Modbus for Cellular'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-1284733540117655559</id><published>2008-03-07T09:21:00.000-08:00</published><updated>2008-03-07T09:26:17.491-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><title type='text'>Lost My SIM</title><content type='html'>Well, I've been quiet for awhile - lost my "free development SIM" as part of Cingular's reorg into AT&amp;amp;T.  Thus my collection of PLC with free demo access are off-line.  Is interesting to support cellular without a SIM ... not that my boss is ignoring this, but there are 'plans in the works' which involve several companies ... plans which just keep moving out.&lt;br /&gt;&lt;br /&gt;However, I am working on Cellular gateways with intelligence now.  Goal is to allow a Modbus client/master to come in once per day and upload time-stamped logs; plus if certain events occur use Modbus to call for help.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-1284733540117655559?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/1284733540117655559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=1284733540117655559' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/1284733540117655559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/1284733540117655559'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2008/03/lost-my-sim.html' title='Lost My SIM'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-4483555301326173387</id><published>2007-10-05T10:28:00.000-07:00</published><updated>2007-10-05T10:41:27.007-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Device Access'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><title type='text'>How Exposed in Public Cellular IP</title><content type='html'>One of the concerns about having a &lt;span style="font-weight: bold;"&gt;PUBLIC IP&lt;/span&gt; address for cellular is your exposure to public hackers probing public IPs for services.  In theory, you pay for all of these attempts since the mobile IP system encapsulates and transports them all on your behalf.&lt;br /&gt;&lt;br /&gt;I'm happy to report that after logging such attempts for many months my cellular devices receive less than 4 probes in any one day and &lt;span style="font-weight: bold; font-style: italic;"&gt;likely under 20 total per month&lt;/span&gt;.  So many days pass with no probes at all and it appears to stay under 2-3K per month.  This compares to perhaps &lt;span style="font-weight: bold; font-style: italic;"&gt;200 probes per day on my DSL&lt;/span&gt; router/firewall.&lt;br /&gt;&lt;br /&gt;I am not sure why the difference, although I'd guess it has to do with the high initial latency in contacting a cellular IP.  So any "script-kiddie" tool scanning IP address ranges probably is not willing to wait up to 5 seconds for cellular devices on busy towers which need "unparking" to respond.&lt;br /&gt;&lt;br /&gt;What kinds of probes are they?  Mainly those looking for MS-SQL servers, with a rare access to FTP and the remainder of accesses aimed to seemingly random, unnamed ports - likely associated with trojans or zombie networks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-4483555301326173387?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/4483555301326173387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=4483555301326173387' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4483555301326173387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4483555301326173387'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/10/how-exposed-in-public-cellular-ip.html' title='How Exposed in Public Cellular IP'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-589976063347310106</id><published>2007-08-22T06:19:00.000-07:00</published><updated>2007-08-22T11:22:41.938-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='WAN'/><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet'/><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><title type='text'>The Truth about Cellular IP</title><content type='html'>I have been very busy analyzing real-world telemetry traffic over cellular IP, and unfortunately I am now 100% convinced that &lt;strong&gt;&lt;em&gt;you cannot effectively use most (any?) off-the-shelf "Ethernet" software tool to talk to remote Ethernet devices over cellular IP&lt;/em&gt;&lt;/strong&gt;. Bottom-line is that - unless your host app is custom written to be data cost and time delay sensitive - your data costs will be bloated due to the nature of the tool. Even something as "obvious" as adding compression doesn't solve the problem because telemetry packets tend to be too small for effective compression. For example: an 8-byte Modbus/RTU request becomes 12-bytes after ZIP-style compression. Plus this doesn't reduce the 104-bytes of TCP overhead nor 28-bytes of UDP overhead. None of the cellular providers allow use of RFC-class TCP header compression, since it requires all of the infra-structure to maintain&lt;br /&gt;copies of headers etc.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;So I have been working on "reduction" solutions - how to obtain the effect of moving "X" IP packets but only moving "X-minus-a-bunch" of actual IP packets.&lt;br /&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;span style="font-size:130%;"&gt;Tunneling TCP thru UDP&lt;br /&gt;&lt;/span&gt;The most promising and generic form of &lt;strong&gt;&lt;em&gt;reduction&lt;/em&gt;&lt;/strong&gt; is to tunnel TCP/IP via UDP/IP over cellular. So the host application talks TCP/IP to a local proxy, which acts as the TCP end-point. All of the TCP SYN, ACK and Keepalive traffic is limited to the local Ethernet. The local proxy then initiates a UDP "session" with a remote proxy over cellular &amp; &lt;strong&gt;&lt;em&gt;we instantly see a 60-90% reduction in data costs&lt;/em&gt;&lt;/strong&gt;. The remote proxy initiates a TCP/IP connection to the remote Ethernet device, which again isolated the extra TCP overhead to the remote Ethernet.&lt;br /&gt;&lt;br /&gt;The reaction of non-IA network engineers to this idea is predictable and a bit humorous after a while. They immediately say "You cannot do that!!! UDP/IP is unreliable!!! You'll break something!!! &lt;strong&gt;&lt;em&gt;You are committing a mortal Sin!!!&lt;/em&gt;&lt;/strong&gt;" But in reality none of the IA protocols leverage the reliability of TCP anyway. For example, Rockwell RSLogix doesn't send a program block to a ControlLogix and blindly assume it was successful after the TCP Acknowledge from the peer is processed. Instead, RSLogix sits (blocks literally) and waits for a successful CIP response on a single CIP Connection. So if the local proxy returns a TCP-ACK to the RSLogix host and the CIP request is lost within the UDP/IP tunnel ... eventually RSLogix times out the CIP connection and the application (and/or user) will restart.&lt;br /&gt;&lt;br /&gt;Fortunately, cellular is very reliable - all of my tests sending 10,000 UDP packets rarely even lost 1 packet and I'm not sure if such a rare loss is due to cellular or just my test script hiccupping &amp;amp; dropping a packet. Plus cellular tends to have only &lt;strong&gt;&lt;em&gt;very bursty error problems&lt;/em&gt;&lt;/strong&gt;. In other words, you won't lose 1 packet per 10,000; instead you'll lose all packets for 5 minutes or just 5 random packets out of a group of 10 sent. This shotgun-damage tends to confuse TCP/IP state machines to the point that they abort the connection anyway. In truth, in all of my Wireshark/Ethereal trace reviewing I have never seen a single situation where a TCP retry did anything but add data cost; every TCP retransmission just results in a "Duplicate ACK" showing up a few packets below in the trace &amp; a doubling of the cost of that block of data.&lt;br /&gt;&lt;br /&gt;So overall, anyone planning to use cellular should first investigate if they can use UDP/IP instead of TCP/IP.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;TCP Problem #1 - added cost for pointless ACK&lt;/span&gt;&lt;br /&gt;As mentioned above, real-world analysis of telemetry use of TCP shows the TCP ACK isn't useful; but worse, Embedded TCP devices tend to sub-optimize the ACK timing to "speed up" data transmission and recovery. Almost universally moving an IA protocol via TCP/IP results in 4 TCP packets instead of the idealized 3.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Your app sends a TCP request (request data size + 40-52 bytes of overhead)&lt;/li&gt;&lt;li&gt;800-1100 msec later your app receives a TCP ACK without data (another 40-52 bytes of overhead)&lt;/li&gt;&lt;li&gt;10-40 msec later your app receives the protocol response (response data size + 40-52 bytes of overhead)&lt;/li&gt;&lt;li&gt;Within a few msec, your app sends the TCP ACK without data. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So what would have been a 2-packet transaction with only 56 bytes of overhead under UDP/IP, or what should have been a 3-packet transaction with 120-156 bytes of overhead under ideal TCP/IP usually becomes a 4-packet transaction with 160-208 bytes of overhead. Yes, there exists a TCP socket option and the concept of "Delayed ACK Timer" to prevent the first empty TCP ack from being returned over cellular, but few embedded products use this since it adds code complexity, and it slows down overall data communications. At least in the IA world it seems everyone wants their Ethernet Product costing 2-4 times more than their serial product to appear lightning fast. So they ignore the TCP community's decades of hard-earned experience and "hack" their TCP stack to sub-optimize fast local Ethernet performance. &lt;/p&gt;&lt;p&gt;So this is where the instant 60-90% data cost savings of using UDP over TCP comes from. UDP has smaller headers and results in fewer packets being sent. Since the cellular IP system is "encapsulating" your TCP/IP packets in a manner similar to PPP, the entire IP header, TCP or UDP header, and your data is all considered billable payload. &lt;/p&gt;&lt;p&gt;There is also a myth propagated to this day that the TCP ack causes retry to occur more rapidly out in the wide-area-network infrastructure. The rhetoric goes, "If the 3rd and 4th router link is congested and the TCP data packet is lost, then the 3rd router will retransmit ... which is faster ..." Perhaps this was true back in the 1980's, but today the 3rd and 4th router (and all of the other 20 to 30 routers in a cellular end-to-end path) are just tossing IP packets upstream with no awareness of the packet functions. In reality, it is only the TCP state machines within your host machine and within your remote device that have any ability to retransmit anything. &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;TCP Problem #2 - added cost for premature retry&lt;/span&gt;&lt;br /&gt;The TCP RFC includes many dynamic timers that automatically adjust themselves based on real-world performance. This is actually pretty neat. It means if the TCP ACK and response times tend to be longer than normal, then the TCP state-machine slowly increases the delay before retransmission. But I've seen 3 problems with this. &lt;/p&gt;&lt;ol&gt;&lt;li&gt;The most effective way to leverage auto-adjust is to &lt;strong&gt;include the 12-byte TCP header options that time-stamps all packets&lt;/strong&gt;. Linux system add this by default and installing one of many PLC engineering tools on your Windows computers causes Windows to also start always using this. The setting generally is global - you either have 40-byte TCP headers or 52-byte TCP headers forever. So for small telemetry packets, this adds a disproportionately large increase in data costs. &lt;/li&gt;&lt;li&gt;Many embedded devices (PLC, RTU and I/O devices) have &lt;strong&gt;"hacked" the TCP ACK sub-system to force connection failure to be faster than the standard 3-4 minutes&lt;/strong&gt;. For example, I worked with one large PLC company which expected TCP sockets failure in less than 1 second, so they forced TCP retransmission in hundreds of msec and without any normal exponential backoff between retries. This is totally unusable over cellular; you will end up with 30% to 90% of your data traffic being premature retries and responses to premature retries. I have literally seen Wireshark/Ethereal traces which are mainly black lines with red text - which is the default color used to show TCP "problems" such as lost-frag, retrans, dup-ack, etc. &lt;/li&gt;&lt;li&gt;The &lt;strong&gt;latency in cellular is abnormal by an order of mag&lt;/strong&gt;nitude. Even browsing the internet or doing a telemetry polling test over DSL/cable broadband averages latencies in the 100-150 msec range. This is what a Windows or Linux defines as "slow/bad" - not the 800 to 3500msec of cellular. So even watching a Windows or Linux TCP state machine auto-adjust the retransmission delay over time, you will not see it achieve a 100% effective setting which eliminates wasted TCP retransmissions. The delay seems to top out&lt;br /&gt;at about 1.5 to 1.8 seconds, which is just too close to the actual "normal" latency range.  So again, use of UDP/IP frees the use user from data costs associated with TCP legacy assumptions - both the main-stream MIS/IT market variety of assumptions and the misapplied IA vendors "speed-ups". &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;TCP Problem #3 - uncontrollable SYN/Socket Opens&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Given the way all cellular systems "park" inactive cellular data devices, it is exceedingly rare to ever see a host app open a new TCP socket without prematurely retrying/retransmitting the SYN packet. This is because one is virtually guaranteed that it will take about 2.5 seconds for the data device to be given active airwave resources and return the SYN+ACK response. This has NOTHING to do with the "always connected" feature Digi and others claim. The data device (even when parked) is fully connected by IP and fully authenticated by the system - it is "always connected". However, the local cell tower only has finite airwave resources, so any device (cell phone or data device) which is idle from 3 to 45 seconds is "parked" without having any preallocated airwave resources. Literally when the TCP "SYN" shows up, the cell tower has to use the control channel to inform the data device to request airwave resources, and after these are requested and allocated the data device can receive and response to the TCP socket open request. &lt;/p&gt;&lt;p&gt;But that's not the real problem related to TCP Socket Opens ... the real problem is yet another case of IA vendors sub-optimizing TCP behavior for fast local Ethernet performance. For example, I once had a customer who normally paid about $40 per month receive a $2000 bill one month. It turns out they had powered down the remote site for 3+ days and the off-the-shelf 3rd-party host application they used would try to reopen the TCP socket every 5 seconds!!! So Windows would send the initial TCP SYN to start the open, since the remote was off-line Windows would retransmit this TCP SYN a few seconds later. After a total of 5 seconds, the application would ABORT this TCP socket attempt and start a new one. So this host app was pushing 24 billable TCP packets per minute out to a remote site that was powered down. This was nothing the host app vendor documented, nor was it anything a user could configure or over-ride. The user could configure the host app to ONLY poll once per 5 minutes; but the user had no control over this run-away TCP SYN/Open behavior. &lt;/p&gt;&lt;p&gt;Tunneling TCP through UDP effectively decouples the TCP SYN/Open from cellular data charges. The first TCP Syn/Open request to the local proxy would succeed even if the remote IP site is offline. No retries would be required. Even if the host app attempts to retry the data poll every 5 seconds, this is something the UDP proxy can be configured to "resist". If the user truly wants data packets to only move every few minutes, that is something the UDP proxy can easily enforce. &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;TCP Problem #4 - sub-optimized TCP keepalive&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The final problem I'll discuss (but not by any means the "last" problem with TCP) is that many embedded IA devices have relatively fast TCP Keepalives hard-coded to speed up lost-socket detection. While this is an admirable goal, a Rockwell PLC sending out a TCP Keepalive at a fixed 45 second interval can create up to 6MB of monthly traffic by doing this. Siemens S7 PLC seem to issue TCP keepalive every 60 seconds - a bit better, but not by much. Maybe such a heart-beat is useful to know the remote is accessible, but given the reliability of cell phones (when the last time you had a dropped call or no signal ...) you'll obtain a lot of false-alarms if you treat every missed packets as something requiring maintenance's attention. &lt;/p&gt;&lt;p&gt;Again, tunneling TCP through UDP effectively eliminates the automatic, possibly uncontrollable use of TCP Keepalive. If your process can handle you talking to it once an hour, then the cost of TCP socket open and close, as well as any TCP Keepalive is all wasted investment. &lt;/p&gt;&lt;p&gt;Not only this, but the cellular providers do NOT want users who send a simple, rather empty packet every 30 to 60 seconds - this is literally the worst kind of customer, as this forces the cell tower to "waste" one of its very limited airwave resources with almost no income returned to the carrier. From what I hear, carriers either want customers who talk constantly and pay huge monthly fees (say $90 to $350/month); or they want customers who rare talk and pay a small fee (even just $5/mo) but cost the carrier virtually no direct expenses. &lt;/p&gt;&lt;p&gt;Putting this is "restaurant terms":&lt;/p&gt;&lt;ul&gt;&lt;li&gt;A cellular data device that talks constantly but pays for a large plan is like a restaurant patron who sits at a table, constantly ordering more food and paying a larger bill.&lt;/li&gt;&lt;li&gt;A cellular data device that rarely talks is like the restaurant patron who comes in once a month, sits at a table, orders a meal, pays and then vacates the table.&lt;/li&gt;&lt;li&gt;A cellular data device that keeps an idle channel open full time but rarely talks is like the restuarant patron who sits at a table in the resturant, reading the paper but rarely ordering food or paying a bill.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In fact, in private chats with carrier account people, I have heard several times that they have been directly to prefer either customers who talk constantly on large plans or those who talk at most once an hour (better once a day)  on small plans. Customers planning to talk every few minutes have been defined as bad investments.  It may be fair to say that after years of building up the data-plan customer base, the cellular carriers have come to understand that the REAL cost of data plans is not the bulk data bytes moved; it is instead the percentage of time the device consumes (or squats on) 1-of-N scare airwave resources in proportion to the monthly fee they pay.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-589976063347310106?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/589976063347310106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=589976063347310106' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/589976063347310106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/589976063347310106'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/08/truth-about-cellular-ip.html' title='The Truth about Cellular IP'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-2271500049443900931</id><published>2007-07-06T07:55:00.000-07:00</published><updated>2007-07-06T08:09:01.126-07:00</updated><title type='text'>Report-By-Exception? Maybe not</title><content type='html'>One of the PLC vendors I am just starting to deal with was bragging about the power of their report by expection abilities ... how wonderful for lower cellular data costs they claim. Unfortunately they only support TCP/IP - no UDP/IP. I'll cover this application (&amp; name the PLC) more after I have some time to work at it.&lt;br /&gt;&lt;br /&gt;However, the big problem with their "&lt;strong&gt;report-by-expection&lt;/strong&gt;" is that the PLC holds the TCP/IP socket open 24/7 and sends a TCP Keepalive every 1 minute. Sending a TCP Keepalive (2 x TCP packet headers with no data) every 60 seconds costs about 3.4MB per month! I have a hard time seeing that as "low cost". They would be better to just poll real data every 4 minutes and eliminate the TCP keepalives!&lt;br /&gt;&lt;br /&gt;Hopefully there is a setting in the PLC to change this behavior, which is why I need to look into this more. &lt;em&gt;&lt;strong&gt;I just want to point out that just because a system claims to only move data during exceptions ... that does NOT mean it has very low cellular data costs. &lt;/strong&gt;&lt;/em&gt;Don't forget that data costs include things you don't normally see - TCP socket open/close, TCP keepalive, TCP ack, and TCP retransmissions are all things you pay for.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-2271500049443900931?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/2271500049443900931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=2271500049443900931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/2271500049443900931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/2271500049443900931'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/07/report-by-exception-maybe-not.html' title='Report-By-Exception? Maybe not'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-6124547593969353944</id><published>2007-06-12T11:43:00.000-07:00</published><updated>2007-07-06T07:54:50.484-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><title type='text'>Real World Cellular - ControlLogix PLC</title><content type='html'>Summary: Before I listed some real world numbers for Modbus polling. This time I walk through some of the costs and issues of using ODVA Ethernet/IP to talk to a Rockwell ControlLogix PLC.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;The Convoluted Path of Wide-Area-Networks:&lt;/span&gt;&lt;br /&gt;In general the magic of IP hides reality from us all. We tend to think "now I am browsing Google.com or iatips.com", but we don't really understand how COMPLEX and MIRACULOUS this really is. Your computer is NOT connected to either of these web servers; instead your computer uses the services of a dozen or more other computers/routers to get from "here" to "there". Every single data byte must be forwarded hop-by-hop through all of these cooperative peers.&lt;br /&gt;&lt;br /&gt;As example, here is a Trace Route (&lt;strong&gt;tracert&lt;/strong&gt;) of access from a computer within my test lab to a ControlLogix PLC sitting six (6) feet away. I am using public Internet access via a cellular Digi Connect WAN to the Ethernet (ENB) of the ControlLogix. Some of the public IP have "X" entered replacing the digits; you don't need to really know the exact IP value.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;strong&gt;My computer has private IP = 10.9.92.1&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;01 01 ms 10.9.1.1 (Digi's private Intranet)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;02 01 ms 10.10.11.10 (Digi's private Intranet)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;03 01 ms 10.254.254.2 (Digi's private Intranet)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;04 16 ms 66.77.x.x (Digi Co-Host/Internet Link)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;05 04 ms 69.8.x.x (Digi Co-Host/Internet Link)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;06 64 ms 66.77.x.x (Digi Co-Host/Internet Link)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;07 09 ms min-core-02.inet.qwest.net [205.171.128.110] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;08 11 ms cer-core-02.inet.qwest.net [67.14.8.18] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;09 12 ms cer-brdr-01.inet.qwest.net [205.171.139.62] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;10 39 ms qwest-gw.cgcil.ip.att.net [192.205.32.97] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;11 35 ms tbr2.cgcil.ip.att.net [12.123.4.254] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;12 35 ms tbr2.sl9mo.ip.att.net [12.122.10.46] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;13 75 ms tbr2.attga.ip.att.net [12.122.10.137] &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;14 31 ms 12.122.85.157 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;15 34 ms 12.86.140.146 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;16 * Request timed out. (Part of Cellular Infra-Structure)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;17 * Request timed out. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;18 * Request timed out. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;19 * Request timed out. &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;20 1276 ms mobile-166-XXX-XXX-XXX.mycingular.net [166.XXX.XXX.XXX]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;strong&gt;Digi Connect WAN has private local IP = 192.168.196.80 (is 'gateway')&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;strong&gt;ControlLogix PLC has private local IP = 192.168.196.21 &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Courier New;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;These traces always amaze me - how something so seemingly trivial takes so much effort to really function. Notice how my lab PC has to route through 6 devices to even get out of Digi's company network, then through Qwest (our ISP), through AT&amp;T (my cellular SIM provider), through some unnamed hops of the cell system, and finally be port forwarded to the ControlLogix PLC. The packets may be passing through Minneapolis, Chicago, Detroit, Atlanta, and then finally returning to the PLC sitting right beside me.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Effect of NAT (Network Address Translation)&lt;/span&gt;&lt;br /&gt;Now lets look at what happens when RSLinx on my PC opens an ODVA Ethernet/IP socket to the ControlLogix PLC. Every TCP/IP packet requires 4 unique values which define a connection:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Destination IP (target device)&lt;/li&gt;&lt;li&gt;Destination Port (target application within device) &lt;/li&gt;&lt;li&gt;Source IP (return address to originator)&lt;/li&gt;&lt;li&gt;Source Port (likely random port, originator is waiting for responses here)&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;So we start out with the 4-tuple &lt;strong&gt;DST=166.x.x.x : 44818&lt;/strong&gt; and &lt;strong&gt;SRC=10.9.92.1 : 22256&lt;/strong&gt;. The 166.x.x.x IP is assigned by my cellular carrier. Port 44818 is ODVA's "well-known" port for Ethernet/IP. 10.9.92.1 is an internal Digi selected private IP. TCP port 22256 is the ephemeral (or random) port selected by RSLinx to listen for responses.&lt;/p&gt;&lt;p&gt;The first NAT effect is the Digi corporate firewall changes the request to be &lt;strong&gt;DST=166.x.x.x : 44818&lt;/strong&gt; and &lt;strong&gt;SRC=66.77.x.x : 22256&lt;/strong&gt;. My private IP of 10.9.92.1 is meaningless out in the Qwest or AT&amp;amp;T's networks, so something needs to swap this for a "real" world-unique IP leased by Digi. Our corporate NAT interface creates a record (with a lifetime of 5 minutes) that allows any responses to be correctly restored to 10.9.92.1&lt;/p&gt;&lt;p&gt;The second NAT effect is when the Digi Connect WAN forwards to the ControlLogix with another private IP. So the 4-tuple now becomes &lt;strong&gt;DST=192.168.196.21 : 44818&lt;/strong&gt; and &lt;strong&gt;SRC=66.77.x.x : 22256&lt;/strong&gt;. The ControlLogix thinks IP host 66.77.something is connected to it - not the real host IP of 10.9.92.1. Plus the ControlLogix has NOT CLUE that the RSLinx thinks the ControlLogix as IP of 166.something.&lt;/p&gt;&lt;p&gt;Now, to send a response the ControlLogix issues a TCP/IP packet with the flipped 4-tuple of &lt;strong&gt;DST=66.77.x.x : 22256&lt;/strong&gt; and &lt;strong&gt;SRC=192.168.196.21 : 44818&lt;/strong&gt;. The Digi Connect WAN restores (undoes) the NAT and changes this to &lt;strong&gt;DST=66.77.x.x : 22256&lt;/strong&gt; and &lt;strong&gt;SRC=166.x.x.x : 44818&lt;/strong&gt;. After passing back through AT&amp;T and Qwest, Digi's corporate NAT interface restores its own NAT and changes it back to &lt;strong&gt;DST=10.9.92.1 : 22256&lt;/strong&gt; and &lt;strong&gt;SRC=166.x.x.x : 44818&lt;/strong&gt;. &lt;/p&gt;&lt;p&gt;This understanding of NAT and IP is useful for understanding the capability and limitations of cellular access to certain devices with certain protocols.  A future entry will cover setting up RSLinx Classic and using RSLogix 5000 to download over cellular to a L5555 processor.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-6124547593969353944?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/6124547593969353944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=6124547593969353944' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/6124547593969353944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/6124547593969353944'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/06/real-world-cellular-controllogix-plc.html' title='Real World Cellular - ControlLogix PLC'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-4619390280756043429</id><published>2007-05-31T12:23:00.000-07:00</published><updated>2007-05-31T12:46:52.456-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><title type='text'>Unlimited Cellular Data - Revisted</title><content type='html'>As I go around dealing with large utility customers and hear feedback from Digi salespeople who survive large accounts, I hear some interesting but disturbing trends rising.&lt;br /&gt;&lt;br /&gt;First, there are the people (usually who are new to cellular) who claim any day now the age of cheap, unlimited cellular data plans means all my hard work to understand or offer reduced traffic are wasted effort. I especially hear this coming from European partners.&lt;br /&gt;&lt;br /&gt;Then there are the other people ... people I know work with very large, very powerful end users who fail to get the cellular plans they desire. Things I hear:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I have heard of customers who pilot projects and hear promises of unlimited traffic, but when the time comes to sign the contract for 3000+ sites, the carrier decides that they cannot offer unlimited traffic ... period.  &lt;em&gt;Hmm, I guess this is the difference showing between the carrier's commissioned sales staff and the business managers who need to keep the cellular system profitable.&lt;/em&gt;&lt;/li&gt;&lt;li&gt;I have worked with large customers who do manage to get "unlimited deals" for a modest sized system - say 50 or 100 sites, but the carrier insists on adding the 2 clauses 1) the carrier has the right to artificially slow down the data communications (without detailing what this means) and 2) the carrier has the right to just stop all the customer's data traffic temporarily if the cell system gets busy (again, not details of this defined).  &lt;em&gt;Hmm, I have to kind of wonder what kind of control engineer agrees to such "clauses"? You'd think trying to get one's &lt;strong&gt;data under control&lt;/strong&gt; to avoid the need for unlimited data is a wiser design.&lt;/em&gt;&lt;/li&gt;&lt;li&gt;I have heard that overall the cellular carriers are starting to rethink the value of machine-to-machine data plans. Unlike DSL or cable, this is NOT an issue of bandwidth; it is an issue of the % of the time the device "hogs" 1 of N slots or resources on the tower forever.  Imagine having 10 or 20 such devices squatting there, locking up that tower resource.  So it is not even so much an issue of talking once per few minutes verse flat out unlimited traffic. In either case 1 of N finite tower resources is used, so long-term the only "good" data plan may be for a data system using the cellular resource every few hours or a few times a day.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So overall it looks like my efforts to understand and reduce traffic is useful.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-4619390280756043429?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/4619390280756043429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=4619390280756043429' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4619390280756043429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4619390280756043429'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/05/unlimited-cellular-data-revisted.html' title='Unlimited Cellular Data - Revisted'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-5995110551426716422</id><published>2007-05-29T12:00:00.000-07:00</published><updated>2007-05-29T12:10:16.835-07:00</updated><title type='text'>I will give Webinar 31-May-2007</title><content type='html'>31-May-2007 (Thursday) I'll be giving a webinar related to outdoor use of IP-to-serial devices. While not directly related to my blog theme of "Industrial Protocols over IP", remote devices  frequently are in bad locations, where extended temperature ranges, conformal coating, and Class 1 Div 2 certs are desired.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Title: Connect Local and Remote Devices in Hazardous Environment SCADA Applications &lt;/span&gt;&lt;br /&gt;&lt;a href="https://digi.webex.com/mw0304l/mywebex/default.do?siteurl=digi&amp;service=6&amp;amp;main_url=%2Fec0509l%2Feventcenter%2Fmainframe.do%3Fmainurl%3Dhttps%253A%252F%252Fdigi.webex.com%252Fec0509l%252Feventcenter%252Fevent%252FeventAction.do%253FtheAction%253Ddetail%2526confViewID%253D242769927%2526siteurl%253Ddigi%26siteurl%3Ddigi"&gt;Register here: WebEx Link&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Date: May 31, 2007&lt;br /&gt;Time: 11:00am CDT (central zone)&lt;br /&gt;Duration: 1 hour&lt;br /&gt;Speakers:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Lynn Linse - Engineer, Digi International&lt;/li&gt;&lt;li&gt;Deb Smith - Business Development, Digi                    International&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;What you will learn&lt;/b&gt;&lt;br /&gt;This live webinar will illustrate              the value of using TCP/IP &amp; UDP/IP based communication over              wired and wireless networks to monitor and manage local and remote              devices. Topics include:&lt;/p&gt;             &lt;ul&gt;&lt;li&gt;Overview of requirements for robust, remote, outdoor                communication devices&lt;a href="http://www.elabs3.com/c.html?rtr=on&amp;amp;s=e5x,tmwk,4h24,16go,godj,8oz0,62hf"&gt;&lt;img alt="" src="http://www.digi.com/images/products/portservertshazmei.jpg" align="right" border="0" height="150" hspace="0" width="150" /&gt;&lt;/a&gt;                &lt;/li&gt;&lt;li&gt;Discussion of extended temperature, conformal coating,                hazardous certs                &lt;/li&gt;&lt;li&gt;Comparing features of IT-grade network devices to &lt;a href="http://www.elabs3.com/c.html?rtr=on&amp;s=e5x,tmwk,4h24,16go,godj,8oz0,62hf"&gt;Digi's                Haz product line&lt;/a&gt;                &lt;/li&gt;&lt;li&gt;Extending IP networks to remote serial and Ethernet                devices                &lt;/li&gt;&lt;li&gt;Moving serial communications through TCP/IP and                UDP/IP                &lt;/li&gt;&lt;li&gt;Migrating from analog Telco/POTS lines to IP-based broadband                &lt;/li&gt;&lt;li&gt;Real-world usage examples                &lt;/li&gt;&lt;li&gt;Implementation benefits&lt;br /&gt;- Real-time access to remote sites                and process data without site visits&lt;br /&gt;- Reduce                repair/replacement costs due to less-than ideal environments&lt;br /&gt;-                Options to reduce installation costs with wireless&lt;/li&gt;&lt;/ul&gt;             Please &lt;a href="http://www.elabs3.com/c.html?rtr=on&amp;amp;s=e5x,tmwk,4h24,8v42,5991,8oz0,62hf" target="_blank"&gt;register today&lt;/a&gt; and join us May 31st for this              informative webinar!&lt;br /&gt;Questions? Contact Deb Smith at &lt;a href="mailto:deb_smith@digi.com"&gt;deb_smith@digi.com&lt;/a&gt; or              952-912-3283.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-5995110551426716422?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/5995110551426716422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=5995110551426716422' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/5995110551426716422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/5995110551426716422'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/05/i-will-give-webinar-31-may-2007.html' title='I will give Webinar 31-May-2007'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-3323952332823814587</id><published>2007-05-04T12:53:00.000-07:00</published><updated>2007-05-04T14:13:24.552-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Device Access'/><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet'/><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><category scheme='http://www.blogger.com/atom/ns#' term='Modbus'/><title type='text'>ODVA, Rockwell, and Modbus Get Smart</title><content type='html'>&lt;span style="font-style: italic;"&gt;Summary: next week an amazing joining of technologies will take place at ODVA in Ann Arbor MI as ODVA, Rockwell, and Schneider-Electric discuss how to integrate Modbus servers (slaves) into CIP Producer/Consumer systems&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;One of the fun things about being involved in "multi-vendor" solutions is when you recognize &lt;span style="font-weight: bold;font-size:130%;" &gt;moments of amazing sanity&lt;/span&gt; as they occur.  One such moment of amazing sanity is occurring next week when ODVA (aka Rockwell / Allen-Bradley) and Modbus supporters (aka Schneider-Electric / Modicon / SquareD / Telemecanique) sit down to discuss how to integrate Modbus devices into the ODVA Ethernet/IP and CIP network systems.  Of course there must be some interesting hidden politics behind this move - and I somewhat light-heartedly believe that perhaps French Schneider-Electric sees joining with the Americans (Rockwell/ODVA) as the lesser of two evils when compared to  joining with the Germans (Siemens/PNO).&lt;br /&gt;&lt;br /&gt;Check out: &lt;a href="http://www.odva.org/Home/tabid/53/ctl/Detail/mid/376/ItemId/121/Default.aspx"&gt;ODVA Call For Members: Modbus Integration JSIG&lt;/a&gt;  The kick-off meeting for the Modbus JSIG runs from Thursday, May 10, 11:00 AM to Friday, May 11, 04:00 PM&lt;br /&gt;&lt;br /&gt;Side-stepping the marketing fluff and platitudes of &lt;span style="font-style: italic;"&gt;a brighter future&lt;/span&gt; such meetings evoke, small third-party suppliers and the folks on the plant floor can expect the following benefits.  Regardless of the directly stated goals of ODVA, Rockwell, or Schneider-Electric, small vendors will implement solutions that include these abilities:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Vendors making Ethernet Modbus/TCP products will have a simpler "first step" to adding full ODVA/CIP support without the somewhat overwhelming task of 100% conversion of a word-array device model into hundreds (or thousands) of CIP objects.&lt;/li&gt;&lt;li&gt;ControlLogix PLC will be able to connect through Ethernet-to-Serial devices to multi-drops of Modbus/RTU slaves.  For example a user with a dozen small Modbus/RTU PID loop controllers will be able to add an Ethernet-to-Serial device to read via Modbus and cyclically produce a small block of word data from each loop controller over Ethernet.&lt;/li&gt;&lt;li&gt;HART, Bluetooth, ZigBee and other new technologies which offer Modbus interfaces will find a instant place as sensors and I/O within CIP and Rockwell systems.&lt;/li&gt;&lt;li&gt;Since Siemens, GE-Fanuc, Omron, Mitsubishi and most major PLC brands offer some method to act as Modbus slaves, users with any of these PLC will be able to integrate them within the CIP Producer/Consumer system.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Looking forward a year or two, I also can foresee some other secondary benefits evolving from this JSIG's work:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I started working with ODVA Ethernet/IP almost 8 years ago and still as-of today the legacy &lt;span style="font-weight: bold; font-style: italic;"&gt;PLC5E, SLC5, and serial MicroLogix (the old PCCC-based PLC)&lt;/span&gt; don't have effective inclusion within CIP Producer/Consumer systems.  Since the device model of PCCC PLC shares much in  common with Modbus PLC, it is a very small enhancement to add a similar support for AB PLC - perhaps AB will actually extend this to future firmware updates to Ethernet-based PLC.  In fact, since my Digi One IAP code already allows Modbus masters to query DF1 and CSPv4 slaves as-if Modbus slaves, as soon as Digi adds Ethernet-to-Modbus support per this JSIG's output users of older AB PLC will gain access to CIP Producer/Consumer systems indirectly as honorary Modbus slaves.&lt;/li&gt;&lt;li&gt;Today legacy Modbus and Modbus/TCP systems lack any simple form of multicast producer/consumer exchange.  While the IDA protocol offers this, IDA is so many orders of magnitude more complex (and resource hungry) than simple Modbus as to become really an "unrelated" protocol.  Any specification that defines a "server interface" naturally implies a corresponding "client interface".  So although this ODVA JSIG is not planning to define how &lt;span style="font-weight: bold; font-style: italic;"&gt;Modbus "peers" could use multicast to exchange cyclic data&lt;/span&gt;, the end result will be a fairly natural and multi-vendor method to do this.  So while I doubt many pure Modbus/TCP products would implement ODVA protocols just to gain this multicast exchange, any products which add the CIP support anyway will naturally add the last few bits of code required to enable pure Modbus-to-Modbus multicast via the ODVA mechanism.&lt;/li&gt;&lt;li&gt;Taking the above point to its natural conclusion means Modbus/TCP masters which implement the Modbus JSIG's "server" function will also gain a mechanism to access CIP Producer/Consumer systems.  Even if the ODVA JSIG doesn't cover how to do this, natural methods will be inferred, produced, and copied by vendors to make this a fairly common new product feature.&lt;/li&gt;&lt;/ul&gt;And lastly, it will interesting to see what response PNO considers to likewise include Modbus slaves more formally into PROFINET.  Personally, I have always felt that the simpler PROFINET IO protocol would fit very naturally with multi-drops of Modbus slaves acting like plug in I/O modules ... each slave would be a module within the IO device.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-3323952332823814587?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/3323952332823814587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=3323952332823814587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/3323952332823814587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/3323952332823814587'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/05/odva-rockwell-and-modbus-get-smart.html' title='ODVA, Rockwell, and Modbus Get Smart'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-5001515885220701000</id><published>2007-04-25T10:09:00.000-07:00</published><updated>2007-04-25T11:12:38.806-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='DF1'/><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><category scheme='http://www.blogger.com/atom/ns#' term='Modbus'/><title type='text'>Rockwell and Modbus Data Traffic</title><content type='html'>&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;Summary&lt;/span&gt;: I compare the data costs for four common off-the-shelf PLC protocols to a remote cellular site.  As a rule of thumb, even if you have an Ethernet-based PLC your lowest data costs for SCADA-style periodic polling are obtained using serial protocols via the PLC's serial port.  Their modern "Ethernet protocols" are very wasteful of cellular bandwidth.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;PLC Protocol Example:&lt;br /&gt;&lt;/span&gt;A simple but realistic SCADA scenario is to poll every 15 minutes and read 10 words of data and write 2 words of data.   This commonly requires 1 Read command and 1 Write command (I'll ignore the rarely supported Modbus command that reads &amp; writes within a single command.)&lt;br /&gt;&lt;br /&gt;While there exists special SCADA protocols and special products that optimize remote traffic, I am not looking at those protocols at the moment.  Instead, since cellular and satellite access to remote IP and Ethernet products has enabled people to use off-the-shelf PLC technology, I am looking at the more traditional PLC protocols.  These are things which affect users when they apply an Ethernet design to an IP-based wide-area-network system.&lt;br /&gt;&lt;br /&gt;I compare these 4 PLC protocols:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;AB/DF1 Radio Modem (RM) encapsulated in UDP/IP.  DF1 RM is basically DF1 Full-Duplex with no ACK/NAK and is supported by the SLC5 and MicroLogix line.&lt;/li&gt;&lt;li&gt;Modbus/RTU encapsulated in UDP/IP.  Modbus/TCP within UDP/IP is roughly the same size.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;AB/CSPv4 in TCP/IP as supported by SLC5/05 and PLC5E MSG blocks.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;AB/Ethernet/IP as moved by ControlLogix Explicit MSG blocks to PCCC-based remote PLC. Note that Ethernet/IP "I/O Messaging" does NOT work through NAT'd wide-area-networks since the protocol embeds IP information within the data packets and is thus is "broken" by NAT.&lt;/li&gt;&lt;/ul&gt;The &lt;span style="font-style: italic;"&gt;bytes per 15 minutes&lt;/span&gt; includes the IP headers, any PLC protocol overhead, and the actual data moved for each update (always 20 + 4 bytes).  The &lt;span style="font-style: italic;"&gt;MB per month &lt;/span&gt;is just defined by 30 days of such polling, or 2880 updates at once per 15 minutes.  The 2 serial protocol have been encapsulated into UDP/IP and I assume the remote IP end-point can handle connecting this to the PLC's serial port.&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="font-weight: bold;"&gt;Protocol&lt;/td&gt;&lt;td style="font-weight: bold;"&gt;Transport&lt;/td&gt;&lt;td style="font-weight: bold;"&gt;Per 15 Min&lt;/td&gt;&lt;td style="font-weight: bold;"&gt;MB per month&lt;/td&gt;&lt;td&gt;Relative Cost&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ethernet/IP&lt;/td&gt;&lt;td&gt;TCP/IP&lt;/td&gt;&lt;td&gt;1202 bytes&lt;/td&gt;&lt;td&gt;3.46 MB&lt;/td&gt;&lt;td&gt;100%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;AB/CSPv4&lt;/td&gt;&lt;td&gt;TCP/IP&lt;/td&gt;&lt;td&gt;960 bytes&lt;/td&gt;&lt;td&gt;2.76 MB&lt;/td&gt;&lt;td&gt;80%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Modbus/RTU&lt;/td&gt;&lt;td&gt;UDP/IP&lt;/td&gt;&lt;td&gt;166 bytes&lt;/td&gt;&lt;td&gt;0.48 MB&lt;/td&gt;&lt;td&gt;14%&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DF1 Radio Modem&lt;/td&gt;&lt;td&gt;UDP/IP&lt;/td&gt;&lt;td&gt;194 bytes&lt;/td&gt;&lt;td&gt;0.56 MB&lt;/td&gt;&lt;td&gt;16%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;The two Rockwell "Ethernet" protocols cost a lot more to use in part because they force use of TCP/IP, and therefore suffer the repeated cost of TCP socket opening and closing, plus extra TCP acknowledgment overhead.  They also suffer because they both involve connection registration and service functions that needlessly repeat every time the connection is reestablished. While the actual data packets of these protocols are roughly twice the size of the serial encapsulated protocols, the real burden they suffer is all the extra TCP/IP packets exchanged that do NOT directly involve field data update.&lt;br /&gt;&lt;br /&gt;Both the serial Modbus/RTU and DF1 Radio Modem benefit that they move no IP packets that don't relate to the field data update - no TCP/IP open or close or acknowledgement; no protocol "service function" overhead.  Each moves just 1 read request and 1 read response, plus 1 write request and 1 write response.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Discussion of Other PLC Protocols:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Most other PLC Ethernet protocols will either approach the costs of the AB/CSPv4 - or they won't work at all due to use of direct "Ether-Types" and lack of IP compatibility.  Most serial protocols with roughly either match the 2 show here or be twice the cost if protocol ACKs are used by the protocol.&lt;br /&gt;&lt;br /&gt;Modbus/ASCII will almost double the cost of Modbus/RTU since each data packet is roughly twice the size.  But this wouldn't increase the IP overhead any.&lt;br /&gt;&lt;br /&gt;Using DF1 Full-Duplex instead of Radio Modem would effectively double the cost over DF1 RM since DF1 Full-Duplex moves the protocol ACK/NAK, which doubles the IP header overhead also.  Using DF1 Half-Duplex would triple or even quadruple the costs since HD not only moves protocol DF1 ACK/NAKs, but the ENQ/EOT polling overhead.&lt;br /&gt;&lt;br /&gt;Most other protocols I am aware of - such as Omron Hostlink, GE-Fanuc SNPX, and Siemens PPI - would cost roughly 2 to 3 times more than Modbus/RTU or DF1 RM since they include protocol ACK, while a few even encode many parts of the message as ASCII or BCD form instead of as binary.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-5001515885220701000?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/5001515885220701000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=5001515885220701000' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/5001515885220701000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/5001515885220701000'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/04/rockwell-and-modbus-data-traffic.html' title='Rockwell and Modbus Data Traffic'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-6977995520450048929</id><published>2007-04-19T09:18:00.000-07:00</published><updated>2007-04-19T11:22:12.638-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><title type='text'>Rockwell PLC5E and SLC5 over Cellular</title><content type='html'>Summary: Customers ask me "How much will cellular cost" - this blog post walks through some examples of SCADA-style periodic polling of AB/PLC5E or SLC5/05 using the CSPv4 protocol (aka AB/Ethernet to 3rd parties) over TCP port 2222.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Real-World Numbers&lt;br /&gt;&lt;/span&gt;For a simple SCADA-style example assume we need to read 10 words of data (20 bytes) and write 2 words (4 bytes) every time period.  Obviously there would be simple optimizations to this, such as only writing data which changes or using PLC MSG blocks to push data from PLC to SCADA only when something changes.  However my goal in this blog post isn't to "tweak" a solution to minimize cost, but to examine the protocol impact of using Rockwell CSPv4 over IP.&lt;br /&gt;&lt;br /&gt;The table below shows the megabyte per month when polling once per second, per 5 seconds, per 1 minute, per 5 minutes, per 15 minutes, and per 1 hour.  There are lots of variables considered ... and many more ignored.  The traffic ranges from worst-case of 1005.0 MB for TCP/IP with larger header options polled once per second to best case of  0.2 MB for UDP/IP polled once per hour.  This assumes the use of the CSPv4 submode 7,  with local LSAP addressing and ignores that Rockwell PLC5E and SLC5/05 don't support CSPv4 within UDP/IP.  &lt;span style="font-weight: bold; font-style: italic;"&gt;Raw efficiency at moving the data bytes ranges for about 10% for UDP/IP to barely 1% for TCP/IP; &lt;/span&gt;&lt;span&gt;which means most of what you are paying for is not related to actual, meaningful field data.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;( Click this image to see a larger version )&lt;br /&gt;&lt;a href="http://iatips.com/blogimage/rockwell_cspv4_traffic.png"&gt;&lt;img alt="CSPv4 Poll Record" src="http://iatips.com/blogimage/rockwell_cspv4_traffic_thumb.gif" align="middle" height="258" width="388" /&gt;&lt;/a&gt;&lt;br /&gt;(is at &lt;a href="http://iatips.com/blogimage/rockwell_cspv4_traffic.png"&gt;http://iatips.com/blogimage/rockwell_cspv4_traffic.png)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Notes on the Table&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Since this example reads and writes small amounts of data, it assumes a SLC5-style Protected Typed Read with 3-Address Fields and the corresponding SLC5 write.&lt;br /&gt;&lt;br /&gt;The smaller 40 byte TCP/IP header has no options attached; the larger 52-byte TCP/IP header includes the RFC 1323 Timestamp and Window Scale TCP options.  These appear to be the normal default for Linux and easily becomes enabled under Windows since all applications share a single setting in the Registry.&lt;br /&gt;&lt;br /&gt;The two time columns "15 min (Alive)" and "1 hr (Alive) assume a roughly 4 min 45 sec TCP keepalive to prevent the socket from closing.  This reduces the traffic by the extra open/close overhead in exchange for billable TCP Keepalive packets.  Keep in mind this ALSO requires the PLC to be properly configured to NOT close the idle sockets.  By default, my SLC5/05 seems to close the idle connections in a few minutes.&lt;br /&gt;&lt;br /&gt;The two time columns "15 min (Cls)" and "1 hr (Cls) assume the socket is closed after the a data polls, and the TCP socket and CSPv4 session must be reopened for teh next poll.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Discussion&lt;br /&gt;&lt;/span&gt;Of course the standard costs of using TCP/IP verse UDP/IP apply:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;TCP/IP uses larger headers, ranging from 40 to 52 bytes per packet as compared to UDP/IP's smaller 28 byte of header.&lt;/li&gt;&lt;li&gt;TCP/IP involves the TCP Acknowledgments, which may result in separate, billable 40 to 52 byte packets moving frequently without any meaningful field data.&lt;/li&gt;&lt;li&gt;TCP/IP may require reopening a socket, costing 120 to 250 bytes per open, plus closing  costing from 160 to 400 bytes.  Exact sizes are hard to predict since both opening and closing of sockets tend to be "pushed" and result in excess retransmissions and retries when high network latency is true.&lt;/li&gt;&lt;li&gt;TCP/IP over unknown 3rd party wide-area-network infrastructure requires at least 1 TCP packet to move every 4 minutes 45 seconds to maintain health.  This means either a data packet or a TCP Keepalive with data.&lt;/li&gt;&lt;/ul&gt;It should be clear to see why using UDP/IP over cellular (which is very reliable) is much cheaper than using TCP/IP.  There are no socket open, close, acknowledgment, or keepalive costs.  Plus field experience has shown that rapid IP retries rarely succeed.  For example, a customer polling with UDP every 5 minutes with 3 explicit retries if no answer will likely have the original poll succeed or that poll and all 3 retries fail.  Again, cellular is very reliable in that packets almost always make it through unless there is a network or congestion issues and then only time (a few minutes) solves the problem.  So such customers have abandoned retries and just ignore 1 failed 5 minute poll and "retry" in 5 minutes.&lt;br /&gt;&lt;br /&gt;CSPv4 issues include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Rockwell PLC and software tools do NOT support use of UDP/IP - my tests with UDP/IP have to be conducted with the &lt;a href="http://www.digi.com/products/serialservers/digioneiap.jsp"&gt;Digi One IAP&lt;/a&gt; which happily bridges CSPv4 between TCP and UDP (as well as to or from Ethernet/IP and DF1).&lt;/li&gt;&lt;li&gt;CSPv4 requires the exchange of a pair of 28-byte negotiation TCP packets when a new TCP socket is opened to inform the client (master) of a server (slave) assigned session handle.  This nearly doubles the overhead of an open-poll-close socket paradigm.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The 28 byte CSPv4 header really contains little useful information; such excess bytes cost nothing tangible under Ethernet but cost cash in the form of requiring larger cell plans over cellar.&lt;/li&gt;&lt;/ul&gt;In conclusion, CSPv4 will be a rather poor choice for raw, periodic polling of remote AB PLC.  ODVA Ethernet/IP (as implemented by all vendors) is even worse.&lt;br /&gt;&lt;br /&gt;Your only effective solution at present is to carefully craft a set of MSG blocks to push data from the field in a report-by-exception paradigm.  Of course you also must include safe guards within your PLC to prevent rapid, repeated MSG block triggers during system failure that could cost you thousands of dollar ($$$) in a few days.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-6977995520450048929?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/6977995520450048929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=6977995520450048929' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/6977995520450048929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/6977995520450048929'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/04/rockwell-plc5e-and-slc5-over-cellular.html' title='Rockwell PLC5E and SLC5 over Cellular'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-7770392174981806209</id><published>2007-04-16T09:11:00.000-07:00</published><updated>2007-04-16T09:23:56.504-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DF1'/><title type='text'>DF1 Open Source for Visual Basic 2005</title><content type='html'>Archie has started a SourceForge project for his AB DF1 code running under VB 2005.  He has checked in a full first set of files (unlike many SourceForge projects which get created but NEVER have files :-\ )&lt;br /&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/projects/abdf1/"&gt;http://sourceforge.net/projects/abdf1/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I haven't looked over his code yet, plus all I have is VB 2003 .NET.&lt;br /&gt;&lt;br /&gt;Hopefully Microsoft has STOPPED the old VB issue that each new rev of VB is neither 100% forward nor backward compatible ... one always need to "tweak" a few lines to make the port work. I've used VB 1.0, 3.0, 4.0, 5.0, 6.0 and now VB 2003 and none of these have liked old code being pulled forward.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-7770392174981806209?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/7770392174981806209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=7770392174981806209' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/7770392174981806209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/7770392174981806209'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/04/df1-open-source-for-visual-basic-2005.html' title='DF1 Open Source for Visual Basic 2005'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-8738055365925559928</id><published>2007-04-09T12:05:00.000-07:00</published><updated>2007-04-16T09:37:17.507-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><title type='text'>Cellular to Allen-Bradley SLC5/05 on TCP 2222</title><content type='html'>&lt;span style="font-size:130%;"&gt;The old CSPv4 protocol.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The Rockwell/AB SLC5/05 and PLC5E natively speak an older "unpublished" protocol named CSPv4, although most third party vendors call it either AB/Ethernet or AB/TCP.  It moves only on TCP port 2222 - ODVA Ethernet/IP I/O Messaging is only on UDP port 2222, so they don't conflict.  The protocol consists (normally) of a 3-part packet:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;28-byte header&lt;/li&gt;&lt;li&gt;4 or 15-byte LSAP or end-point addressing packet&lt;/li&gt;&lt;li&gt;PCCC message which is basically what DF1 documents as an Application Packet&lt;/li&gt;&lt;/ul&gt;In general, the packets are fairly sparse and compressible (if you have the tools to do this).  The characteristics of CSPv4 which impact cellular (and wide-area-network) support:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Rockwell tools and PLC only support use of TCP/IP and port 2222; this greatly limits use of CSPv4 in NAT'd networks since the remote NAT router can only forward TCP port 2222 to a single remote PLC.&lt;/li&gt;&lt;li&gt;CSPv4 includes a single TCP packet exchange to "register a session" or connect. If you are polling faster than the PLC will hang-up on you, then this is not important.  However, if you poll slow enough that a new TCP/IP socket must be opened for each poll, then even ignoring the TCP socket open/close overhead this nearly doubles your traffic costs.&lt;/li&gt;&lt;li&gt;In tests, a SLC5/05 seems effective at including the TCP ACK response to the host within the CSPv4 data response packet, so you only have to pay for one empty TCP ACK, which is the host's acknowledgment to the PLC for the response.&lt;/li&gt;&lt;li&gt;TCP Keepalive could be an issue, since most hosts fail to issue it and the SLC5/05 I've tested against either doesn't issue TCP keepalives&lt;br /&gt; or does it very frequently.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-8738055365925559928?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/8738055365925559928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=8738055365925559928' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8738055365925559928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8738055365925559928'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/04/cellular-to-allen-bradley-slc505-on-tcp.html' title='Cellular to Allen-Bradley SLC5/05 on TCP 2222'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-29965385467279281</id><published>2007-04-05T06:30:00.000-07:00</published><updated>2007-04-05T10:48:03.353-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Device Access'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='WAN'/><title type='text'>Interested in Cellular? Setup a DMZ Lab</title><content type='html'>&lt;span style="font-style: italic;"&gt;Summary: Last post I suggested people interested in cellular data start by learning how to use their home cable router.  In this post I suggest the next step, of how to make your life easy at work once you're ready to start testing real cellular or satellite access by IP.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Your Second Step should be to set up a simple, isolated low-speed broadband link at work ... create your own DMZ lab.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Sigh - I waste so much time listening to customers complain about how difficult it is to get the IT department to give them custom firewall permissions.  Since modern "Security" wisdom is to block everything until proven safe, I waste more time asking customers complaining that their Modbus/TCP or Rockwell access not working to first talk to their IT group to make sure they aren't blocking unknown binary traffic by default.   I waste yet more time when customers struggle for days and finally have to formally get someone in IT to help study the corporate firewall logs to see if any traffic is getting through or not.  &lt;span style="font-weight: bold; font-style: italic;"&gt;An interesting epiphany occurs when I suggest they just look into paying roughly $50 per month for a private connection for this.&lt;/span&gt;  It is surprisingly cheap to do this and makes a lot of people's jobs 200% easier.&lt;br /&gt;&lt;br /&gt;So far the feedback from customers has been quite positive, with IT departments over-joyed at the idea (slight exaggeration :-] lessor-of-two-evils may be a better term).  This really makes sense; IT is charged with keeping the corporate system working and secure, so when you ask for yet another odd, unknown firewall hole to be opened, you ask them &lt;span style="font-weight: bold; font-style: italic;"&gt;to risk their jobs&lt;/span&gt;.  Plus trying to keep custom firewall settings updated for 50 different projects is an ongoing headache and ongoing risk for mistakes.  I know that Digi's IT group is very satisfied with their policy of not offering custom firewall rules on the corporate LAN but instead helping teams set up such private connections in a safe, isolated manner.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Simple DMZ Lab Design&lt;/span&gt;&lt;br /&gt;The simplest lab design is little more than a copy of what you have at home: a computer or two, an 8 or 24-port Ethernet switch, and a simple &lt;a href="http://computer.howstuffworks.com/nat.htm"&gt;NAT router&lt;/a&gt; to "share" the internet connection with a dozen devices.  This allows you to freely set up a few OPC servers and Master PLC to test access to remote cellular and other wide-area-network based systems.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Locate an &lt;span style="font-weight: bold;"&gt;empty office or lab room&lt;/span&gt; for your new network.  Perhaps your IT people should pull out or disable the corporate Ethernet in this room.  You are going to create a small "DMZ"; a small isolated network that has limited security consequences if you goof up and let a hacker inside.  You'll want good security tool installed on your Windows and Linux computer used in here.&lt;/li&gt;&lt;li&gt;Arrange for a &lt;span style="font-weight: bold;"&gt;low-speed business broadband link&lt;/span&gt; with one fixed IP address.  256Kbps is more than enough for general PLC/SCADA testing and should cost in the range of $35 to $50 per month.  &lt;span style="font-weight: bold; font-style: italic;"&gt;Yes, just $35-50 per month!&lt;/span&gt;  I had one customer forced to &lt;span style="font-style: italic;"&gt;pay his IT department $100 per month&lt;/span&gt; to open one TCP/IP hole in the corporate firewall!!  Gee, he could install 2 DSL links for that.  Now, be patent when you talk to your carrier, as they are geared to sell the expensive primary access lines used for all corporate traffic including servers.  Keep stressing that you want a low-speed secondary line for use with some network testing and eventually you'll locate the low-cost plans you want.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Set up a DNS name for your DMZ lab.  Online dynamic DNS providers support &lt;span style="font-weight: bold;"&gt;user-selected DNS names&lt;/span&gt; for static IP addresses.  I use &lt;a href="http://dyndns.org/"&gt;dyndns.org&lt;/a&gt; for both my dynamic and static IP but there are many out there.   You won't need any form of DDNS update client since your IP never changes and you must enter the name manually anyway.&lt;/li&gt;&lt;li&gt;Unless you plan to implement large VPN systems, just buy a &lt;span style="font-weight: bold;"&gt;nice consumer-grade DSL/Cable Router&lt;/span&gt; ... the same kind you use at home is fine.  If you plan to set up a serious VPN infra-structure, then you'll just need to bite-the-bullet (&amp; suffer the learning curve) of buying a commercial IT-grade router with VPN server capability built in.  &lt;span style="font-style: italic;"&gt;Be warned that while many consumer-grade routers mention "VPN Support", they are in fact sub-optimized and documented only for home-office users who connect into a corporate Windows or Cisco VPN server.  Normal human beings will find them nearly impossible to set up for anything else!&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Do you &lt;span style="font-weight: bold;"&gt;want more than one public IP address&lt;/span&gt;?  You need to pay a monthly surcharge which varies greatly per carrier, but could be in the range of $25 per month for 8 IP addresses instead of just 1.  Plus you will need a larger IT-grade router since the consumer-grade routers won't support more than 1 public IP address.  Most users won't need more than 1 IP address.  However, having more than one IP address is helpful if more than 1 team shares the lab; this prevents them from trying to setup conflicting router configurations.  Also, a few extra IP are helpful if you want to place a PLC "online" for your customers or sales force to access during customer-site demonstrations in the field.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If you need to access your corporate network from your DMZ lab, then you need to arrange some rules with your IT people.  Perhaps the rule is using a notebook computer with 802.11 wireless to the corporate network is Ok as long as the notebook is NEVER connected to the lab's Ethernet.  Remember, since your lab has it's own public IP address you can even use FTP or a VPN client to connect "legally" out your corporate network and back into your lab via the Internet.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:180%;"&gt;Fancier DMZ Lab Design&lt;br /&gt;&lt;/span&gt;Since Digi is basically a "communication company", the lab I get to use is much fancier.  It has 32 public IP addresses and even limited secure access from the corporate LAN.  Of course I have to share this lab with other teams, so I'm not owner of 32 IP.  As an example, here is how my lab is setup:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Digi's IT group maintains a Cisco PIX router (a mid-range $800 model) that manages the 32 public IP addresses.  Actually, this is NOT a complication since this router does not by default firewall any traffic; it merely distributes raw traffic based on public IP to one of many to internal IP addresses in an organized manner.  I was lucky enough to get in the lab early and to be assigned 2 of the 32 public IP addresses.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;My first IP address receives 100% raw internet traffic at an internal static IP I selected; so an external IP such as 70.x.x.140 forwards to my internal IP of 192.168.20.159.    Since the goal of the lab is to avoid burdening IT with TCP/UDP port forwarding chores, one could place a consumer-grade DSL/Cable router at this IP.   Placing 2 routes in series is NOT a problem - do a net-trace of how you access www.google.com and you'll see a dozen or more routers in series.  Instead of a pure hardware box I have a Ubuntu Linux machine running firewall and router tools at this IP.  This is where I forward Modbus/TCP to one PLC and Rockwell Ethernet/IP to another PLC.   I prefer the Linux box to the $39 hardware box because it gives me a richer view of traffic in and out, plus I can run an Ethernet sniffer such as &lt;a href="http://www.wireshark.org/"&gt;WireShark&lt;/a&gt; to see a complete trace of the 2-way conversation taking place.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;For my second IP address I had Digi IT setup the PIX router to just forward a simple, safe list of Modbus, Rockwell, Digi, and other industrial protocol TCP and UDP ports.  I normally have a &lt;a href="http://www.digi.com/products/serialservers/digioneiap.jsp"&gt;Digi One IAP&lt;/a&gt; (an industrial-protocol aware Ethernet-to-serial device) at this IP address, but I can safely swap in a Windows machine when a test requires use of Windows tools.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Just as your home router does, the main Digi IT-supplied PIX router does out-going NAT to the internet and internal DHCP address assignment.  So our DMZ lab has its own internal subnet of 192.168.20.x addresses.  Any device in the DMZ lab can access the Internet - with or without going through my Linux firewall/router.  Of course the other teams in the lab don't go through my router, but direct to the PIX router.&lt;br /&gt;&lt;br /&gt;Since i study cellular usage, I have have a &lt;a href="http://www.digi.com/products/cellulargateways/digiconnectwanfamily.jsp"&gt;Digi Connect WAN&lt;/a&gt; providing an Ethernet-based cellular router in the DMZ lab.  So I really have 3 potential routers to use - while it takes a bit of IP experience to not get confused, this allows me to have devices configured to selectively treat any 1 of the 3 routers as "the default gateway/router".&lt;br /&gt;&lt;ul&gt;&lt;li&gt;For example, I can have a Master/Client device connect out to a cellular-based Slave/Server using a route such as Master =&gt; out PIX+DSL =&gt; in Cellular =&gt; Slave.&lt;/li&gt;&lt;li&gt;For example, I can have a Master/Client device connect via cellular to a DSL-based Slave/Server using a route such as Master =&gt; out Cellular =&gt; in DSL+PIX =&gt; in Linux-Box =&gt; Slave.&lt;/li&gt;&lt;li&gt;In both of this situations I can see BOTH ends of the conversation, which is a huge help in testing, timing, or troubleshooting new applications.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The bonus for having Digi's IT team involved is the PIX router also allows controlled, secure access into the DMZ lab from our corporate LAN.  Technically, the PIX runs a set of rules similar to those used by the main corporate firewall out to the Internet and it just treats the 192.168.20.x subnet as a miniature internet.  So I can sit at my desk and safely check on equipment running in the DMZ lab.  Of course this is limited to equipment treating the PIX as the default router - if you understand IP routing you'll understand why, but at least it lets me log into my Ubuntu Linux router from desk.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-29965385467279281?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/29965385467279281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=29965385467279281' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/29965385467279281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/29965385467279281'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/04/interested-in-cellular-setup-dmz-lab.html' title='Interested in Cellular? Setup a DMZ Lab'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-9137632789781351314</id><published>2007-03-27T12:01:00.000-07:00</published><updated>2007-03-27T16:37:42.332-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Device Access'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='WAN'/><title type='text'>Interested in Cellular? Do some homework</title><content type='html'>&lt;span style="font-weight: bold; font-style: italic;"&gt;Summary&lt;/span&gt;&lt;span style="font-style: italic;"&gt;: Unless you are a pro at IP routing, you'll save money and time by learning the basics of IP routing over your home Cable/DSL connection instead of a demo cellular account.  Bottom-line ... if you cannot succeed at using your office computer to poll a PLC placed at home via your Cable/DSL connection, then you will NOT succed trying the same trick over satellite or cellular connections.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Homework - Work at Home&lt;br /&gt;&lt;/span&gt;When engineers first launch into a cellular data pilot it can be a bit like Christmas with the excitement of new toys, future trends and being "on top of it".  However, I encourage anyone interested in using cellular or satellite-based IP systems to do some home work first ... literally "work at home".  You'll save lots of cash and avoid many headaches by learning the basics at home first.&lt;br /&gt;&lt;br /&gt;Most of you have cable or DSL router/modem at home, so start there.  Take a PLC or controller home.  If it has an Ethernet port you are all set; however if your device is RS-232 based, then beg, steal, borrow, or purchase a simple Device Server such as the &lt;a href="http://www.digi.com/products/serialservers/digioneiap.jsp"&gt;Digi One IAP&lt;/a&gt; (fancier, Modbus and Rockwell protocol aware) or the &lt;a href="http://www.digi.com/products/serialservers/digionesp.jsp"&gt;Digi One SP&lt;/a&gt; (much cheaper but just a raw Ethernet-to-serial converter).  &lt;span style="font-weight: bold;"&gt;Your goal is to connect from your office computer over the Internet to this device at home ... if you cannot succeed at this, then you won't succeed at cellular access either!  &lt;/span&gt; But unlike with cellular, all of your trial-and-error over your Cable/DSL Route won't be costing you by the byte.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Just remember that your "Home Cable/DSL Terms and Service Agreement" likely forbids running "servers" so don't go and try to setup an e-commerce shop once you see how easy it is to access your home from the Internet.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Get to Know Your Cable/DSL Router Box&lt;br /&gt;&lt;/span&gt;Hopefully you all have an external commercial router box that you either got from your ISP or bought at any big-box store for $39 to $59.  If your computer connects directly into your modem or you were fooled into using Microsoft's "Internet Sharing" tool on one computer, save your sanity and go buy a cheap router box!  For your $39-59 you get a 4-port switch, a professional stateful-firewall and NAT (more about that later), a wireless access point, and it all consumes maybe 8-10 watts of power so costs you a few $ a year to run.  If for no other reason, you just don't want the mindless broadcasts and hacker probes taking a percentage of your home computer's bandwidth.  For my VPN testing I have some Linux boxes up exposed like this and they see up to 50 broadcasts per second and a few dozen probes for open Windows and Unix services per hour.  There is NO REASON to expose your home PC to this rubbish - use an external router box ... period.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Step 1: Learn how to log onto your Cable/DSL Router.&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;Under Windows 2000 or newer, open a command window and type the command "ipconfig".  You should be shown your computer's current IP Address and the &lt;span style="font-weight: bold; font-style: italic;"&gt;Default Gateway&lt;/span&gt;, which is another name for your Cable/DSL router.  Most likely the router has an IP such as 192.168.0.1 or 192.168.1.1.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Confirm you can ping your Cable/DSL router with this IP&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Open your web browser and browse to the address - as example type the URL "&lt;span style="font-weight: bold;"&gt;http://192.168.1.1&lt;/span&gt;".  You should be asked for a user name and password.&lt;/li&gt;&lt;li&gt;Check with your router documentation or go on line to the vendor and read the user guide.  For example, at home I have an ActionTec router/wireless access point supplied by Qwest, and when it first came it has no user name and a password of "admin".  This is actually not so insecure since by default you can ONLY access this web page from inside your firewall/router.  But common sense says changing this name/password is wise.&lt;/li&gt;&lt;li&gt;There is no way I can explain how all Cable/DSL routers work, but once you can log in you should be able to find a &lt;span style="font-weight: bold; font-style: italic;"&gt;status web page which gives your currently assigned external IP address and 2 DNS addresses&lt;/span&gt;.  This is how the world sees your home system - write this info down.  For example, my home Cable/DSL router (as of today) has the temporary (dynamic) IP of 63.228.51.x.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Step 2: Nail Down a fixed DNS name for your Cable/DSL Router.&lt;br /&gt;&lt;/span&gt;So at this point, you know how to access your raw "face" exposed on the Internet.  Now we want to give ourself a nice, memory-friendly DNS name to represent that face.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;As mentioned above, &lt;span style="font-weight: bold; font-style: italic;"&gt;my Qwest IP is dynamic and liable to change at any time.  &lt;/span&gt;So while I could go to the office and try to point my OPC server or PLC software at 63.228.51.x, I can never be sure how long this will work.  In reality it only changes every few months or if I power-cycle my router, but the solution to this problem is very easy so we should solve instead of work-around it.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Sign up with one of the many free online Dynamic DNS providers - I use &lt;a href="http://dyndns.org/"&gt;dyndns.org&lt;/a&gt;.  The Digi Connect WAN (cellular router) family directly supports this, as do many LinkSys and DLink-class home products.  In a nutshell, they allow you to create a domain name such as sillyjoe.gotdns.org or sammy345.dyndns.org and then a client tool on your home system automatically updates this DNS name every time your ISP changes your dynamic IP address.&lt;/li&gt;&lt;li&gt;While the above service is free, you may want to pay the $10 or so per year for a minimum account.  This makes the service more tolerant of errors on your part - for example many services automatically delete your free account if it is untouched for 45 days and so on.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;If you have a Windows computer, the easiest DDNS update client is just to download the Windows tool recommended by your Dynamic DNS provider.  This client automatically monitors the Cable/DSL router's IP as it accesses the internet.  If your IP has changed, it &lt;span style="font-weight: bold; font-style: italic;"&gt;correctly &lt;/span&gt;updates the DDNS (dynamic DNS servers).  I stress the word "correctly" since many external Cable/DSL Router boxes which support DynDns and such services come with bugs which cause your free service to be deleted within hours of setup.  So if you chose to use your Cable/DSL Router to maintain your DDNS name, make sure you have the latest firmware upgrade on it!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Within an hour of setup, anyone in the world should be able to ping your new DDNS name and get a response.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Step 3: Learn how to Port-Forward within your Cable/DSL Router.&lt;br /&gt;&lt;/span&gt;We are almost ready to try access - but if you point your OPC server at your DDNS name ... nothing will happen since your Cable/DSL Router does NOT understand Modbus or other industrial protocols.  Remember, the IP your DDNS name represents is the IP address of your Cable/DSL Router and NOT the IP of your home computer nor is it the IP address of your PLC/controller device.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Log back into your Cable/DSL Router and locate the setup for port forwarding.  Some routers call it setup for applications and games.  We need to configure the router to FORWARD specific TCP and UDP ports to Ethernet-based devices you have at home. If you don't know what that means, you are in for a tough time using wide-area-network technologies - I suggest you go to any bookstore and buy a book on basic networking that covers what TCP, UDP, IP and NAT are.  This is really key to success in this area.  You don't need to be an expert, but you do need to understand the basics!&lt;/li&gt;&lt;li&gt;In summary, if you think of the IP address as being synonymous with the main phone number in a building (aka - how to telephone the building), then the TCP and UDP port numbers are synonymous with phone extensions within that building (aka - how to reach a certain department or service).  So for example, a Modbus/TCP OPC server will connect to your router using the IP (main phone number) attached to your DDNS name, and then request a connect to TCP port 502 (the service).  &lt;span style="font-weight: bold;"&gt;We need to configure the router to accept and forward the Modbus/TCP traffic to your Modbus PLC.&lt;/span&gt;  So take the example of a Modbus/TCP device on my local network with the IP 192.168.1.105.  We need the router (at say IP 63.228.51.x) to accept any incoming connection on TCP port 502 and forward the packets to the local Ethernet device at IP 192.168.1.105 TCP port 502.  Since the PLC has a web server and most ISP block access to home web servers, we'll tell the router to forward TCP port 8080 to local port 80.  Depending on the brand of router you have the configuration can get fancier than that - but basically we'll end up with a line in the table looking something like:&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Incoming port&lt;/td&gt;&lt;td&gt;Service&lt;/td&gt;&lt;td&gt;Local IP&lt;/td&gt;&lt;td&gt;Local Port&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;502&lt;/td&gt;&lt;td&gt;TCP&lt;/td&gt;&lt;td&gt;192.168.1.105&lt;/td&gt;&lt;td&gt;502&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;8080&lt;/td&gt;&lt;td&gt;TCP&lt;/td&gt;&lt;td&gt;192.168.1.105&lt;/td&gt;&lt;td&gt;80&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Step 4: Get to Work Learning&lt;br /&gt;&lt;/span&gt;That's it - at this point you should be able to use a Modbus/TCP OPC server to poll your PLC indirectly by polling your DDNS name on the standard TCP port 502.  Pointing your browser to http://your DDNS name:8080 will pull up your PLC's web pages (the ":8080" tells the web server to use TCP port 8080 instead of default 80). &lt;br /&gt;&lt;br /&gt;Of course there is no security offered here - anyone in the world can access your PLC so this is just for educational purposes.  Here are some common port numbers to use:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Modbus/TCP uses TCP port 502&lt;/li&gt;&lt;li&gt;Digi Ethernet-to-Serial products use ports like 2101, 2102, etc to access a serial device by raw TCP or UDP sockets.&lt;/li&gt;&lt;li&gt;Digi RealPort uses TCP port 771 (TCP 1027 for SSL/TLS secure connection).&lt;/li&gt;&lt;li&gt;Rockwell AB PLC5E and SLC5/05 use TCP 2222 for the older legacy CSPv4.  This is often called AB/Ethernet or AB/TCP by 3rd party vendors&lt;/li&gt;&lt;li&gt;Rockwell ControlLogix and ODVA Ethernet/IP uses TCP port 44818, UDP port 44818, and UDP port 2222.  But be warned Rockwell tools are very poorly designed for wide-area network use.&lt;/li&gt;&lt;li&gt;Siemens S7 protocol uses TCP port 102&lt;/li&gt;&lt;li&gt;GE SRTP uses TCP ports 18245 and 18246&lt;/li&gt;&lt;li&gt;GE QuickPanels use TCP port 57176 for configuration&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Ok, so now you should be able to take any of your Ethernet or serial device and test to see if you can access remotely.  You'll likely need to slow down your tool - increase the response timeouts from a few seconds to 10 seconds for direct Cable/DSL access and 30 to 60 seconds for cellular.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-9137632789781351314?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/9137632789781351314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=9137632789781351314' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/9137632789781351314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/9137632789781351314'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/03/interested-in-cellular-do-some-homework.html' title='Interested in Cellular? Do some homework'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-3157999701033314353</id><published>2007-03-14T06:14:00.000-07:00</published><updated>2007-03-14T07:11:13.711-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Industrial'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><title type='text'>Rockwell PLC and TCP Headers</title><content type='html'>I have started running some tests of standard Rockwell protocols querying off-the-shelf Allen-Bradley PLC, with the goal to create a series of "estimators" for traffic.  A user would enter the data to poll and the tool will estimates the data byte load contributed by this poll pattern.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;The Mystery 17% Cost Increase:&lt;br /&gt;&lt;/span&gt;Last night I ran a test polling ten words once a minute from an Allen-Bradley SLC5/05C's N7 file over GSM.  This is nothing exotic - I ran similar tests a few months ago and had preconceived ideas of what to expect ... beep ... wrong!   In between &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;Then&lt;/span&gt; &lt;/span&gt;and &lt;span style="font-style: italic; font-weight: bold;"&gt;Now&lt;/span&gt;, some unknown application changed my Windows XP system registry, enabling the "RFC 1323 Timestamp and Window Scale TCP options".   &lt;span style="font-weight: bold; font-style: italic;"&gt;The end result was an unexpected 16.51% increase in data byte traffic with no perceived value&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I have no clue which tool did this; and unfortunately Windows (at least 2K and XP) use a single global setting for the entire TCP stack.  I could change it back ... but would that break this other mystery application?  Will this other mystery application just change it back?  Will I launch a mini cold-war race as this mystery application tries to keep RFC 1323 enabled and my test tools try to keep it disabled?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;The Byte Counts with and without RFC1323:&lt;/span&gt;&lt;br /&gt;Here is an exact accounting of the change in byte counts - remember, cellular is basically a mobile-IP tunnel which moves TCP/IP or UDP/IP as pure data payload.  So &lt;span style="font-weight: bold; font-style: italic;"&gt;you pay&lt;/span&gt; for both the IP and TCP headers, plus any data-less TCP Acknowledge or Keepalive packets.&lt;br /&gt;&lt;br /&gt;I'll ignore the opening and closing of the socket, plus TCP Keepalive since I'm polling fairly steady-state once per minute. The PLC includes the TCP ACK in the response, so at least we avoid 1-of-2 data-less TCP Acknowledgments.&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt; &lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;no RFC1323&lt;/td&gt;&lt;td&gt;with RFC1323&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Request: IP header&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Request: TCP header&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Request: CSPv4 Packet&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;td&gt;42&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Response: IP header&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Response: TCP header&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Response: CSPv4 Packet&lt;/td&gt;&lt;td&gt;56&lt;/td&gt;&lt;td&gt;56&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Client ACK: IP header&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Client ACK: TCP header&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;td&gt;32&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Client ACK: (no data)&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;table style="width: 384px; height: 124px;" border="1"&gt; &lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;no RFC1323&lt;/td&gt;&lt;td&gt;with RFC1323&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Total Bytes per Poll&lt;/td&gt;&lt;td&gt;218&lt;/td&gt;&lt;td&gt;254&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Total Bytes per Hour&lt;/td&gt;&lt;td&gt;13,080&lt;/td&gt;&lt;td&gt;15,240&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Total Bytes per Day&lt;/td&gt;&lt;td&gt;313,920&lt;/td&gt;&lt;td&gt;365,760&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Total Bytes per Month&lt;/td&gt;&lt;td&gt;9,417,600&lt;/td&gt;&lt;td&gt;10,972,800&lt;/td&gt;&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;So this means a user doing 1 read of 10 words per minute would magically see a 16.51 % increase in data traffic ... just because they (or the IT department or even Microsoft Windows Update) changes a hidden registry setting.  This is yet another example of both how hard it is to keep tight control on your cellular data costs; plus adds to my belief that using off-the-shelf host applications over cost sensitive IP networks is a losing battle.  At some point you'll need a tool or device which is 100% "under-control" when it come to packet creation.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Windows Registry Details:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:85%;" &gt;&lt;span style="font-family:courier new;"&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Tcp1323Opts&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Tcp1323Opts&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Key&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;: Tcpip\Parameters&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Value Type&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;: REG_DWORD—number (flags)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Valid Range&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;: 0, 1, 2, 3    &lt;/span&gt;&lt;br /&gt;&lt;ul style="font-family: courier new;"&gt;&lt;li&gt;0 (disable RFC 1323 options)    &lt;/li&gt;&lt;li&gt;1 (window scaling enabled   only)    &lt;/li&gt;&lt;li&gt;2 (timestamps enabled only)    &lt;/li&gt;&lt;li&gt;3 (both options enabled)    &lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Default&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;: No value. The default behavior is as follows: do not   use the Timestamp and Window Scale options when initiating TCP connections   but use them if the TCP peer that is initiating communication includes them   in the SYN segment.   &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Description&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;: This parameter controls the use of RFC 1323 Timestamp   and Window Scale TCP options. Explicit settings for timestamps and window   scaling are manipulated with flag bits. Bit 0 controls window scaling, and   bit 1 controls timestamps.   &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-3157999701033314353?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/3157999701033314353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=3157999701033314353' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/3157999701033314353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/3157999701033314353'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/03/rockwell-plc-and-tcp-headers.html' title='Rockwell PLC and TCP Headers'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-3443487502003008200</id><published>2007-02-23T11:11:00.000-08:00</published><updated>2007-02-23T11:51:29.179-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Modbus'/><title type='text'>Modbus Report-By-Exception over Cellular IP</title><content type='html'>&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;Summary:&lt;/span&gt; While traditionally serial Modbus has been considered unable to use Report-by-Exception, when combined with IP networks Modbus Report-by-Exception becomes very natural and effective.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Modbus/TCP is inherently peer-to-peer&lt;/span&gt;&lt;br /&gt;People using Modbus/TCP over Ethernet or IP are familiar with its ability to function as peer-to-peer.  Most PLC with Ethernet ports can function concurrently as a Modbus/TCP slave and Modbus/TCP master.  So 2 PLC can very easily connect - with 2 separate Master-Slave TCP connections - and share information.  One TCP connection is a Master/Slave connection with the first PLC as Master and second PLC as Slave.  The other TCP connection is a Master/Slave connection with the first PLC as Slave and second PLC as Master.&lt;br /&gt;&lt;br /&gt;Technically, this is not Report-By-Exception in the true sense of a protocol.  However, since the PLC-as-Master communication events can be triggered by field inputs, it has the same effect as writing information only upon exception or when change is relevant.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;Modbus/RTU as peer-to-peer&lt;br /&gt;&lt;/span&gt;Serial Modbus/RTU is a bit harder to use this peer-to-peer trick with.  A device with 2 serial ports can of course have 1 port configured as Master to issue remote reads and writes, while the 2nd port is configured as Slave to answer requests.  When connected to a 2 serial port Modbus IP to Serial Bridge (such as the &lt;a href="http://www.digi.com/products/serialservers/digioneiap.jsp"&gt;Digi One IAP&lt;/a&gt;), the 2-port serial RTU becomes a full Modbus/TCP peer, capable of operating fully peer-to-peer with other PLC and SCADA/OPC applications.&lt;br /&gt;&lt;br /&gt;However, vendor's aren't blind to the marketing aspect of "more hardware".  While adding a 2nd serial port to a one-port RTU may only cost a few dollars, most likely the 2-port RTU is a much more powerful unit, so the actual end-user cost may go up hundreds of dollars.  The same is true of Ethernet; while adding an Ethernet port may only cost a few dollars, user's expectations of Web Pages and fancy functions means the Ethernet-enhanced device price may be $500 or more above that of a simple 1 serial port RTU&lt;br /&gt;&lt;br /&gt;Fortunately, the &lt;a href="http://www.digi.com/products/serialservers/digioneiap.jsp"&gt;Digi One IAP&lt;/a&gt; (as well as &lt;a href="http://www.digi.com/products/serialservers/portservertshccmei.jsp"&gt;PortServer family&lt;/a&gt;) allow Modbus/RTU slaves to use Report-By-Exception on the serial port.  As long as only one serial slave is on each port, the Digi uses configured knowledge to "split" the single serial port conversation into two traditional Modbus/TCP connections.  So traditional remote Modbus/TCP masters can query the serial slave RTU, completely unaware that on occasion the serial slave RTU wakes up a acts as a Master to write data during Exceptions.  Somewhere, a traditional remote Modbus/TCP slave will receive Modbus/TCP messages from the serial RTU slave, completely unaware that when not busy reporting exceptions, the remote "Master" is really a passive Modbus/RTU slave.&lt;br /&gt;&lt;br /&gt;This feature is ideal in wide-area-network situations were bandwidth is limited or data traffic is billed on volume of bytes moved.  For example, many SCADA systems only need to check on remote status every few hours ... for example lift pumps in a storm sewer system do absolutely nothing interesting for weeks or even months in the absence of rain.  Even during a normal rain, checking on them every few hours is likely enough ... that is &lt;span style="font-weight: bold; font-style: italic;"&gt;*IF* the remote life pumps can send Report-By-Exception messages during system problems&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;For example, we have one customer piloting use of Modbus Report-By-Exception over cellular data network.  Their eventual target is to poll the remote sites once per day.  They use a simple, single-port Modbus/RTU slave which combines I/O with an LCD and push buttons to make a simple, self contained "RTU" or Remote-Terminal-Unit in the truest sense of the word.  Use of Modbus in UDP/IP and Report-By-Exception allows this customer to plan for $12 per month per site bills.  If forced to poll continuously with Modbus over TCP/IP, they would need to pay $50 or more per site per month.  With hundreds or thousands of sites, that is a huge cost savings and opportunity for better ROI (return on investment).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;More Information&lt;br /&gt;&lt;/span&gt;Here is a general discussion of how to design Modbus/RTU serial slaves and masters to gracefully handle Report-By-Exception:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://iatips.wikispaces.com/ModbusRBX"&gt;http://iatips.wikispaces.com/ModbusRBX&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Here is a more focused discussion of the Digi One IAP and PortServer TS1, TS2, TS4, TS8, and TS16 handle serial Modbus/RTU Report-By-Exception&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://digitips.wikispaces.com/Modbus_Report_By_Exception"&gt;http://digitips.wikispaces.com/Modbus_Report_By_Exception&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-3443487502003008200?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/3443487502003008200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=3443487502003008200' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/3443487502003008200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/3443487502003008200'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/02/modbus-report-by-exception-over.html' title='Modbus Report-By-Exception over Cellular IP'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-959693392843849694</id><published>2007-02-09T09:59:00.000-08:00</published><updated>2007-02-07T08:20:42.139-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><title type='text'>Cellular IP-Friendly Apps - Response Delays</title><content type='html'>Back to my series of entries on creating graceful &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;IP&lt;/span&gt; apps&lt;br /&gt;&lt;br /&gt;Many newly written Ethernet-enabled applications incorrectly equate "Ethernet = Fast". They overlook that Ethernet is often just a path into other slower &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;IP&lt;/span&gt;-based networks. Worse, some well meaning programmers set the response default to 250 milliseconds and limit the user configuration to a maximum of 5 seconds - I'd say so far about 20% of the applications I've had to help customers will limit Ethernet timeouts to 5 seconds or less.&lt;br /&gt;&lt;br /&gt;But cellular networks have a high end-to-end latency - especially if the line has been idle for a few minutes. Normal slave response times will be near 2 seconds with round trip delays up between 10 to 12 seconds common each day (see &lt;a href="http://iatips.com/blog/2007/01/real-numbers-part-2-modbusrtu-over.html"&gt;my entry on real world &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Modbus&lt;/span&gt; numbers&lt;/a&gt;).  Interestingly enough, every cellular "expert" I talk to keeps correcting me that cellular latencies are in the 50 to 100&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;msec&lt;/span&gt; range and getting better every new "gen".  Well, I guess my Saturn ION can do 400 miles-per-hour also ... if you drop it out of an airplane!  Well, regardless of what these "experts" are smoking, my simple tests show otherwise where it really counts ... in actual real world tests run over the Internet to cellular-based &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;IP&lt;/span&gt; devices.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;: &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;IP&lt;/span&gt; applications should default to a 3 second response timeout. Applications must allow users to configure this timeout to be lower (perhaps to 250&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;msec&lt;/span&gt;) and also higher to at least 60 seconds.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Impact&lt;/strong&gt;: On Ethernet this should have no direct consequences since the timeout only has affect if the remote is no longer available - in which case the remote is going 'offline' anyway. The minority of users who really want a 250 millisecond timeout can set it manually, while cellular users who want a more reasonable timeout of 15 seconds can also set it also.&lt;br /&gt;&lt;br /&gt;For cellular networks, the real problem with premature timeout is the customer has &lt;strong&gt;&lt;em&gt;already paid &lt;/em&gt;&lt;/strong&gt;for the request and very likely will also &lt;strong&gt;&lt;em&gt;pay &lt;/em&gt;&lt;/strong&gt;for the response - even if the response comes after the application gave up on the response and did a request retry. Assuming the user is polling the remote at a moderate pace to control costs, there is no harm is waiting longer for the response to maximize the value of the traffic paid for.&lt;br /&gt;&lt;br /&gt;Another simple example is an application that sends a request, then timeouts twice and retries twice. How will the application react when it receives three responses at the same time? Remember, the first two requests probably were not lost; they still likely reached the remote device and created responses. Their responses may have been just delayed longer than expected. Since serial &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;Modbus&lt;/span&gt; doesn't include enough information in a response to match it up to a request, this can cause serious &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;misoperation&lt;/span&gt; of the system. Protocols including a sequence number should handle this more gracefully, but it will still be a waste of money.&lt;br /&gt;&lt;br /&gt;We have also seen protocols which treat unexpected responses as a reason to &lt;strong&gt;&lt;em&gt;abort and reset the communication channel&lt;/em&gt;&lt;/strong&gt;, which further adds to cost.  For example, we had one super headache with a big-name seller of "energy curtailment" systems.  The end user insisted a 5 second timeout was the maximum they could tolerate (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;ie&lt;/span&gt;: wishful thinking - set a 5 second timeout regardless of reality).  So lets just see what happens when we hit one of the rare but expected latencies over 10 seconds. &lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;SCADA&lt;/span&gt; software sends out request sequence 74&lt;/li&gt;&lt;li&gt;5 seconds later, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;SCADA&lt;/span&gt; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_12"&gt;times out&lt;/span&gt; 74 and sends out 75&lt;/li&gt;&lt;li&gt;5 seconds later, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;SCADA&lt;/span&gt; &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_14"&gt;times out&lt;/span&gt; 75 and sends out 76&lt;/li&gt;&lt;li&gt;1 second later - since &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;IP&lt;/span&gt; is reliable - all three responses return&lt;/li&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;SCADA&lt;/span&gt; is expecting response 76, but sees 74 ... Oh, big problem ... need to reset comm subsystem&lt;/li&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;SCADA&lt;/span&gt; sends reset to remote &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;RTU&lt;/span&gt;, expects response 1 but ... &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;da&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;da&lt;/span&gt; ... sees response 75 since they never flushed the old info and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;IP&lt;/span&gt; is reliable.&lt;/li&gt;&lt;li&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;SCADA&lt;/span&gt; sends a 2&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;nd&lt;/span&gt; reset to remote &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;RTU&lt;/span&gt;, expects response 1 but sees response 76 since they never flushed the old info and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;IP&lt;/span&gt; is reliable&lt;/li&gt;&lt;li&gt;At this point, I hope you see that there are still 2 responses to the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29"&gt;comms&lt;/span&gt; reset in the receive queue!&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Anyway, whenever this reset "temper-tantrum" occurred it would take 10 to 15 minutes to get the connection back up.  Of course one problem was the stupid customer unwilling to set the correct timeout, but the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30"&gt;SCADA&lt;/span&gt; software was defective since it wasn't smart enough to just discard old responses with timed out sequence numbers.  In the above example, life would have been fine and dandy had the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31"&gt;SCADA&lt;/span&gt; system just discarded responses 74 and 75 since it expected 76.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-959693392843849694?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/959693392843849694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=959693392843849694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/959693392843849694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/959693392843849694'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/02/cellular-ip-friendly-apps-response.html' title='Cellular IP-Friendly Apps - Response Delays'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-74829885669275947</id><published>2007-02-07T08:14:00.000-08:00</published><updated>2007-02-07T08:20:36.086-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='DNP3'/><title type='text'>Cellular and DNP3</title><content type='html'>I was just at the Distributech show earlier this week - the show for power utilities.  Lots of interest in cellular access.  I know both OSI and Itron have successfully tested their software against our cellular product.&lt;br /&gt;&lt;br /&gt;I have a DNP3 RTU up on my public cellular device, but need to confirm details of how the public can access it.  I also had a discussion with the primary provider of DNP3 source code in the world and we will be looking at putting a DNP3 slave simulator up via cellular.  It would be really userful if this could expose some of the statistical &amp; diagnostic info managed by the simulator.  This would help software vendors fine tune their software to handle the variable latency of cellular.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-74829885669275947?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/74829885669275947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=74829885669275947' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/74829885669275947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/74829885669275947'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/02/cellular-and-dnp3.html' title='Cellular and DNP3'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-4693938363212995203</id><published>2007-02-01T11:35:00.000-08:00</published><updated>2007-02-07T08:12:59.731-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Industrial'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet'/><title type='text'>Do Users Really Want Industrial Ethernet?</title><content type='html'>&lt;strong&gt;&lt;em&gt;(For those impatent to read this to the end - I'm not saying don't use Ethernet ... I am just saying be careful you understand what your customers expect and what functionality they will assume you include *for free* when you add Ethernet)&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;My last post created some interesting feedback. But I want to emphasize a topic from that post more fully. For the last 15 years I've been involved in the "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0" onclick="BLOG_clickHandler(this)"&gt;multi&lt;/span&gt;-vendor interface" business - linking multiple vendors' equipment by data &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1" onclick="BLOG_clickHandler(this)"&gt;comms&lt;/span&gt;. First I worked in RS-232 and 485, then fiber optics, then Ethernet, and now by virtually every technology that moves &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;From time to time I am contacted by &lt;strong&gt;&lt;em&gt;some pretty desperate customers &lt;/em&gt;&lt;/strong&gt;- for example I had one customer who had piloted some Ethernet-based temperature sensors. Things worked fine in the lab with their lab computer, so they bought 50 ... only to find out they couldn't use them. It seems these sensors really were "just Ethernet" - they talked by Ethernet broadcast and direct MAC-layer packets. They didn't support &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; and therefore could NOT be routed by any standard network infrastructure. The user could not talk to any of the sensors they had intended to install in panels around the plant because the "Computer Room" wasn't on the same physical Ethernet segment as the "floor". There was no way to broadcast or unicast MAC-level between the systems. This customer hoped I knew of some magic box to act as gateway between &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; nodes and pure Ethernet nodes; I didn't.&lt;br /&gt;&lt;br /&gt;So this brings me back to the concept of the &lt;strong&gt;&lt;em&gt;true cost to implement "Ethernet".&lt;/em&gt;&lt;/strong&gt; Customers who ask for Ethernet are not really asking for Ethernet hardware or an Ethernet media bus. They have the expectation that they can interface your "Ethernet Devices" with the wide variety of other equipment they have - including &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8" onclick="BLOG_clickHandler(this)"&gt;WiFi&lt;/span&gt;, routed Ethernet, fiber optics, wide-area networks, and so on. They also expect (at least in a future firmware rev) web pages for configuration, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9" onclick="BLOG_clickHandler(this)"&gt;SNMP&lt;/span&gt; for remote management, strong encryption, and so on.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;So the term "Ethernet" has taken on a life of its own&lt;/em&gt;&lt;/strong&gt; - remember when 802.11 was called "Wireless Ethernet". Well, there is absolutely NOTHING Ethernet about 802.11, yet it was a useful PR move to link the two. No doubt it helped spread the acceptance of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10" onclick="BLOG_clickHandler(this)"&gt;WiFi&lt;/span&gt; as we now call it. Interestingly enough, the current &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11" onclick="BLOG_clickHandler(this)"&gt;PCI&lt;/span&gt; verse &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12" onclick="BLOG_clickHandler(this)"&gt;PCI&lt;/span&gt;-Express adapters you buy for a PC are using the same PR trick - linking a new, unknown technology to an old established technology that merely accomplish the same function by very different means. Maybe Sony should have called Beta-Max &lt;strong&gt;&lt;em&gt;VHS-Max&lt;/em&gt;&lt;/strong&gt; instead ... but then I'm showing my age by even knowing that a consumer-oriented video standard other than VHS even existed.&lt;br /&gt;&lt;br /&gt;But back to Ethernet. If you are a small device maker and have yet to start making Ethernet-based products, just be aware that customers who ask for "Ethernet products" aren't really asking for ... err, products with Ethernet. They are asking for products which integrate into (at a minimum) the wide family of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; based technologies out there. I am not even talking about should you support &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15" onclick="BLOG_clickHandler(this)"&gt;Modbus&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17" onclick="BLOG_clickHandler(this)"&gt;ODVA&lt;/span&gt; Ethernet/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19" onclick="BLOG_clickHandler(this)"&gt;ProfiNet&lt;/span&gt; yet. I am just saying customers will expect your "Ethernet products" to be able to hold a raw &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22" onclick="BLOG_clickHandler(this)"&gt;UDP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; conversation with all of the other equipment they are investing in daily.&lt;br /&gt;&lt;br /&gt;So the cost to add an Ethernet port is just a small part of your cost to "add Ethernet". That is why companies like &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24" onclick="BLOG_clickHandler(this)"&gt;Digi&lt;/span&gt; can sell Ethernet-to-Serial converters or sell "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25" onclick="BLOG_clickHandler(this)"&gt;async&lt;/span&gt; Ethernet driver chips" like the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26" onclick="BLOG_clickHandler(this)"&gt;Digi&lt;/span&gt; Connect ME which links to your &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27" onclick="BLOG_clickHandler(this)"&gt;CPU's&lt;/span&gt; serial &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28" onclick="BLOG_clickHandler(this)"&gt;UART&lt;/span&gt;. These devices of course cost more than $9.95 or even the cost of a few new hardware chips, but that higher cost is paying for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt;, web servers, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31" onclick="BLOG_clickHandler(this)"&gt;SNMP&lt;/span&gt; servers, strong &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32" onclick="BLOG_clickHandler(this)"&gt;AES&lt;/span&gt; encryption and all of the other things your customers expect when the buy "Ethernet products".&lt;br /&gt;&lt;br /&gt;So to digress a bit, I suffer this "&lt;strong&gt;&lt;em&gt;Oh, don't worry ... it's Ethernet&lt;/em&gt;&lt;/strong&gt;" on a daily basis. So far I have to say at least 95% of the off-the-shelf software applications I test supporting &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; don't work well with technologies other than direct Ethernet. This includes problems not only when &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_35"&gt;extremely&lt;/span&gt; different media like satellite or cellular, but even when &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_36" onclick="BLOG_clickHandler(this)"&gt;WiFi&lt;/span&gt; is used. So that is part of my mission in this blog - what you want is NOT to Ethernet-enable your products. &lt;span style="font-size:130%;"&gt;&lt;strong&gt;&lt;em&gt;Instead you need to "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_37" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt;-enable" your products by way of an Ethernet interface.&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-4693938363212995203?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/4693938363212995203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=4693938363212995203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4693938363212995203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4693938363212995203'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/02/do-users-really-want-industrial.html' title='Do Users Really Want Industrial Ethernet?'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-8764552184414027156</id><published>2007-01-29T15:21:00.000-08:00</published><updated>2007-01-29T15:58:44.502-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ethernet'/><title type='text'>Do you need a special Industrial Ethernet hardware?</title><content type='html'>This is a bit off topic, but someone &lt;em&gt;&lt;strong&gt;asked me about “Industrial-Grade” Ethernet designs&lt;/strong&gt;&lt;/em&gt;.  Well, I’m not a hardware expert but have better than average exposure to issues of grounding and surge management.  Plus I’ve been involved in many detailed discussions about how things may break Ethernet devices with engineers from Rockwell and other industrial suppliers.  &lt;strong&gt;&lt;em&gt;Bottomline is standard Ethernet designs are quite robust&lt;/em&gt;&lt;/strong&gt; - &lt;em&gt;the main thing I see hurting careless designers is PCB via or tracks violating the 1500v isolation of the Ethernet magnetics.  This means a customer actually testing high-voltage noise or surges could see arcing across the isolation barrier which causes product reboots or even failure.&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;The $9.95 Mindset:&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;Any detailed discussion about “special Ethernet for Industry” first starts with the fact that customers can buy 10/100 computer Ethernet adapters from any big-box store for $9.95.  So users have this perception that the increment for Ethernet is small &amp; cheap.  While they may not expect you to sell Ethernet products for $10 more than serial products, they won’t be happy to hear that your Ethernet product is $300 more.  I will tie this together below, but the bottom line is the closer you can match your Ethernet hardware to the market norm, the lower your over all costs will be.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Who Pays for Extra Software Work?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;Of course, that $9.95 computer Ethernet card doesn’t include:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Microsoft’s ROI on TCP/IP and network stack work&lt;/li&gt;&lt;li&gt;the OPC server cost to add Ethernet drivers in place of serial drivers&lt;/li&gt;&lt;li&gt;tool vendors need (ie: your need) to rewrite serial-based tools to become network-based tools.  &lt;/li&gt;&lt;/ol&gt;Plus don’t forget that the customers are NOT really just asking for “Ethernet” – Customer X will want web pages for configuration, Customer Y will want SNMP for remote management, and Customer Z will want strong 128-bit AES encryption suitable for general US-Government usage.  So unlike the $9.95 PC card, you must hope your customers help pay for a whole lot of added, ongoing engineer work.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is the Market Supply Sweet-Spot?&lt;br /&gt;&lt;/strong&gt;Go online and look at the cost of hard-drives – a 300GB (300,000MB) drive is in the $75 range, while an old 20MB drive (&lt;strong&gt;&lt;em&gt;Meg&lt;/em&gt;&lt;/strong&gt;, not Gig) costs about $140.  We all understand this oddity – there is high demand for 300GB drives and virtually no demand for old legacy 20MB drives needed for repair.  Even trying to buy a 40GB (Gig) drive today is hard.  The market has what people call a “sweet spot” – a range of product features and capacity which is the cheapest and easiest to buy.  Product builders trying to use components that are better than (or even worse-than) the market sweet-spot have disproportionally higher costs than builders using components in sync with the market sweet-spot.&lt;br /&gt;&lt;br /&gt;The same thing happens for Ethernet components – for example buying magnetics rated at 1500v isolation (normal IEEE commercial spec) is very cheap while trying to source magnetics with 2500v isolation can cost an order of magnitude more.  So while your company could define a number of electrical improvements for an “Industrial Ethernet” interface, you have to weigh this against the added cost and supply headaches of buying against the grain – of ignoring the gigantic “sweet-spot” for commercial-grade Ethernet components that enable creation of that $9.95 PC Ethernet adapter.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;What is Your Manufacturing Sweet-Spot?&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;Just as the world market has a sweet-spot, so does your own in-house production; just ask your purchasing department.  Adding Ethernet is NOT just the cost of adding a few new chips - the NIC, MAC/PHY, magnetics, and RJ45 connector.  You may need to upgrade your whole basic hardware design away from a simple 8-bit CPU with 64KByte of memory to a 16 or 32-bit CPU with several MByte of memory.  For example, Digi’s basic Device Server platform has a 32-bit CPU, 4MB flash, and 8MB RAM.  Few of our products really need this much horsepower, but putting for example 8MB of RAM into all products is cheaper given purchasing logistics and reliability of supply than buying a mix of 2, 4, and 8MB chips.  In fact, today we are looking at the cost tradeoff in shifting the basic design from 8MB to 16, 32, or even 64MB.  Yes, 16MB (or 64MB) will cost more than 8MB, but given some products need 16MB (or 64MB) there are both tangible and intangible benefits to moving a larger volume of products up the curve to retain supply-chain advantages.  This is especially true of FLASH and RAM chips which frequently suffer feast-and-famine availability cycles.&lt;br /&gt;&lt;br /&gt;All small companies quickly learn – often the hard way – that during market shortages, it is the small volume purchases that get last delivery.  During a chip famine low-volume purchasers will NOT be able to buy sufficient chips at &lt;em&gt;any price&lt;/em&gt; to maintain their production. The higher your volume of a part, the lower is your price and perhaps more importantly the more reliable is your supply.  So when you start to add Ethernet products and reduce sales of non-Ethernet products, you may find you need to upgrade the CPU design of some your non-Ethernet products to gain or retain reliability of parts supply.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;How Robust is Commercial-Grade Ethernet?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;So far I have been saying that trying to create special Ethernet hardware for industry may be costly and not very cost-effective.  Worse, your average commercial-grade Ethernet is already very robust when compared to RS-232, RS-485 or USB serial.  Ethernet uses a transformer-isolated signal with differential pairs, plus has nice, low-level, hardware-supported error detection.  Given the high signal frequency, low signal voltage and isolation transformer, trying to add extra surge protection greatly complicates product ground design and weakens the signal, shortening the supported cable length below the 100m length customers have etched within their minds.  So trying to boost your Ethernet spec for an industrial design gives questionable gain for the extra cost and lost profits.  Plus your customers won’t likely perceive a market differentiation that they are willing to pay for if you say you have better isolation, etc.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;A Note on Shielded Ethernet Cables:&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;Many industrial users start out assuming STP (Shielded Twisted Pair) is better than UTP (Unshielded Twisted Pair) for Ethernet.  Oddly enough, STP has proven a bit like ABS brakes in private automobiles; despite lots of hoopla about saving lives when the US government forced ABS brakes into cars, insurance industry records continue to show it has had no measurable impact in real world road deaths.  It seems while an expert driver can be helped immensely by ABS, your average idiot or careless driver still reacts to skidding situations in ways ABS brakes cannot fix. &lt;br /&gt;&lt;br /&gt;The same appears true for STP cables and Ethernet.  I have seem many discussions where industrial users tried STP cables and found the system only works reliably when they lay temporary UTP cables across the weld-shop floor!  I suspect the main problem is traditional IT groups have used and measured STP success in terms of preventing Ethernet cable emissions affecting other equipment.  This is not the same as using STP to prevent external interference from affecting the Ethernet signal.  So ignoring the issues old truisms of &lt;em&gt;a floating shield is worse than no shield&lt;/em&gt; and &lt;em&gt;a shield grounded at both ends and creating a ground loop is worse than no shield&lt;/em&gt;, it appears that only experts and a very detailed system design results in STP Ethernet working better than UTP.  My recommendation is to use optical fiber whenever you really worry about noise interfering with UTP Ethernet.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Vibration and RJ45:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Field tests of RJ45 connectors have shown them very bad in areas of high vibration.  This is actually very easy to see for yourself - take any RJ45 connector with pins facing down and wiggle it up and down.  What happens?  That little finger-catch / lock acts as a pivot point and you are actually scrubbing the gold-flash contacts of the connector against the socket contacts.  Metal-against-Metal; quess the result.  Tests on industrial robot arms have shown even high-quality gold plated &lt;strong&gt;&lt;em&gt;RJ45 connectors self-destruct in months or even weeks&lt;/em&gt;&lt;/strong&gt;.  If you expect vibration, better look for alternative connectors - such as any of the many (way too many) IP67 locking designs.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Industry and CAT 5, 5e, and 6:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;Another insteresting twist to the commercial evolution of Ethernet is tests of bulk cable shows that &lt;strong&gt;&lt;em&gt;CAT 5 is the likely the best for industrial use&lt;/em&gt;&lt;/strong&gt; where the noise rejection properties of the twisted pair (differential signal) is desired.  This is because - so I have been told - one of the tradeoffs IEEE allowed for CAT 5e and 6 is to allow less consistancy within the wires of a pair.  After all, few Ethernet systems ever see serious external interference, so things which improved speed outweighed things which reduced noise rejection in abnormally high noise conditions.  Several large automation companies tried to bring up the idea of a CAT 5i with IEEE which emphasised better noise rejection and special jacket plastic, however ... it appears it went no where.  If the big computer, networking, and cable vendors don't see the value, it cannot happen through IEEE.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-8764552184414027156?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/8764552184414027156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=8764552184414027156' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8764552184414027156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/8764552184414027156'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/01/do-you-need-special-industrial-ethernet.html' title='Do you need a special Industrial Ethernet hardware?'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-4003696623577604849</id><published>2007-01-29T08:57:00.000-08:00</published><updated>2007-01-29T09:09:06.914-08:00</updated><title type='text'>Been quiet 2 weeks - had some domain fun</title><content type='html'>Sorry I have not posted in 2 weeks - I was trying to move iatip.com between hosters.  This took 2 weeks longer than it should have and while the DNS info was in limbo I didn't want to risk breaking the site with partial updates.  I am trying a new supplier with better web stats and email SPAM filtering at the SMTP level - I don't want to even see the 300-400 junk email a day I get from "known SPAM servers" on black-lists.&lt;br /&gt;&lt;br /&gt;Hint: if you have a personal or private domain hosted by a 3rd party, &lt;strong&gt;&lt;em&gt;don't have the same firm manage your domain record&lt;/em&gt;&lt;/strong&gt;.  It should have only taken 48-hours to change a DNS record, but my web hoster was trying to save me from myself (ie: my moving my DNS record away from an active 6-year old host account).  I suppose there was also some self-interest in my hoster erroring on the side of caution.&lt;br /&gt;&lt;br /&gt;With the various scams, general lack of IP knowledge in most customers, and the waiting periods to RESTORE incorrectly changed DNS info I don't blame my hoster for being careful, however I wish they'd have sent me email notifications that they wanted confirmation.  I wasted the first 6 days doing 2 online requests to change.  It was only after the 2nd request produced no result in 72 hours that I started calling them by phone to push the issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-4003696623577604849?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/4003696623577604849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=4003696623577604849' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4003696623577604849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/4003696623577604849'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/01/been-quiet-2-weeks-had-some-domain-fun.html' title='Been quiet 2 weeks - had some domain fun'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-7961567679173442843</id><published>2007-01-12T12:44:00.000-08:00</published><updated>2007-01-12T14:06:48.402-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><category scheme='http://www.blogger.com/atom/ns#' term='Modbus'/><title type='text'>Cellular Costs - bytes you pay for each month</title><content type='html'>Sadly, we are about to enter one of the dark-arts of cellular usage ... what are you actually billed for. Given the 50 page voice cell phone bill my family gets each month, one would NOT think the&lt;strong&gt;&lt;em&gt; cell phone companies lacked the ability to explain&lt;/em&gt;&lt;/strong&gt; - let alone document - what they charge data users for! It is not that one cannot get a verbal answer from cellular providers' engineers; one can get too many different answers.&lt;br /&gt;&lt;br /&gt;However, there are some facts we can know.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;An example: &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0" onclick="BLOG_clickHandler(this)"&gt;Modbus&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1" onclick="BLOG_clickHandler(this)"&gt;RTU&lt;/span&gt; via &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt;, one poll per 10 minutes&lt;/span&gt;&lt;br /&gt;Let us build up an example. Start with a customer named Joe who plans to poll 10 words of data every 10 minutes, or 4320 polls per month. Under &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4" onclick="BLOG_clickHandler(this)"&gt;Modbus&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5" onclick="BLOG_clickHandler(this)"&gt;RTU&lt;/span&gt; this would be 8 bytes in the request and 25 bytes in the response. So Joe starts with a the wonderful view that he'll only be moving 143K per month and maybe one of those $3.95/month plans for half-a-meg will fit nicely.&lt;br /&gt;&lt;br /&gt;Sorry to throw some cold water on Joe's euphoria, but Joe still must pay for the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; header overhead. After all, the cell data network is in effect "tunneling" his &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10" onclick="BLOG_clickHandler(this)"&gt;Modbus&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11" onclick="BLOG_clickHandler(this)"&gt;RTU&lt;/span&gt; and so treats even the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; headers a billable payload. So Joe needs to consider that 4320 round-trip polls per month results in 8640 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; data packets and potentially another 8640 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; acknowledge packets. Perhaps half of these &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; acknowledge packets will be merged with the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; data packet returning the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20" onclick="BLOG_clickHandler(this)"&gt;Modbus&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21" onclick="BLOG_clickHandler(this)"&gt;RTU&lt;/span&gt; response ... but then again maybe they won't. So to keep it simple and budget safe, Joe should assume worst case and that all 8640 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; acknowledgements travel alone. Assuming each &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; header is 20 bytes and each &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; header is another 20 bytes (they may be 28 is you use Linux), this amounts to another 17,280 times 40 bytes or 691K bytes (0.7MB) JUST for the theoretical &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; overhead. Joe is up to 834K per month now - clearly a 1MB/mo or larger plan is required.&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27" onclick="BLOG_clickHandler(this)"&gt;Ok&lt;/span&gt;, wait a second ... now why did I say "theoretical &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_29" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; overhead"? Because in reality Joe will end up moving more &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_30" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_31" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; traffic than the 4320 polls strictly require. The first extra overhead will be from premature &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_32" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; retransmissions. The high variable latency of cellular means Joe will see from 2% to 10% retransmissions, and since cellular is very reliable, each transmission will result in duplicate &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_33" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; acknowledgements as well. Sticking to worst case, budget-safe assumptions Joe should budget about 10% or 100K per month for premature &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_34" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; retransmissions. So now Joe is up to 934K per month.&lt;br /&gt;&lt;br /&gt;However, there is yet another overhead Joe should budget for - &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_35" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_36" onclick="BLOG_clickHandler(this)"&gt;Keepalive&lt;/span&gt; probes to detect lose or death of the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_37" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; socket. Without this, one end of the connection could go away and the other end would never know and never recover the socket resource. Since wide-area-networking is involved, Joe also needs to assume at least one intermediate device will abort and discard the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_38" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; context if idle more than 5 minutes. Given Joe polls every 10 minutes, he'll need at least one &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_39" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_40" onclick="BLOG_clickHandler(this)"&gt;keepalive&lt;/span&gt; exchange between each poll. Each &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_41" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_42" onclick="BLOG_clickHandler(this)"&gt;keepalive&lt;/span&gt; exchange consists of another 40 plus 40 bytes, so we are talking 4320 x 80 bytes or another 346K of billable traffic. This puts Joe up to 1.28MB of billable traffic to move 143K of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_43" onclick="BLOG_clickHandler(this)"&gt;Modbus&lt;/span&gt; traffic.&lt;br /&gt;&lt;br /&gt;Now, why not close and reopen the socket? Yes, that is an option but each &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_44" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; close and reopen generates about 320 bytes - not including &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_45" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; retransmissions. So Joe can either pay for 346K worth of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_46" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_47" onclick="BLOG_clickHandler(this)"&gt;Keepalive&lt;/span&gt; or 1.38M of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_48" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; socket thrashing; which would be 1.28MB and 2.32MB per month respectively.&lt;br /&gt;&lt;br /&gt;So Joe is up near 1.5MB per month just to move his 10 registers of data once per 10 minutes, and this doesn't include any time he checks the web interface of his cellular device for status (say another 200-500K per access), nor does it include any on-demand &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_49" onclick="BLOG_clickHandler(this)"&gt;HMI&lt;/span&gt; data access screens which trigger other &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_50" onclick="BLOG_clickHandler(this)"&gt;Modbus&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_51" onclick="BLOG_clickHandler(this)"&gt;RTU&lt;/span&gt; polls. These could easily create many MB of traffic per month and requires carefully, mindful behavior by Joe and his &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_52"&gt;colleges&lt;/span&gt; to control costs. One careless person can easily drive the cellular bill up by hundreds of dollars in a month!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Summary:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Raw &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_53" onclick="BLOG_clickHandler(this)"&gt;Modbus&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_54" onclick="BLOG_clickHandler(this)"&gt;RTU&lt;/span&gt; data = 140K per month&lt;/li&gt;&lt;li&gt;Basic &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_55" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_56" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt; headers to move and acknowledge data = 691K per month&lt;/li&gt;&lt;li&gt;Estimated 10% premature retransmission = 100K per month&lt;/li&gt;&lt;li&gt;One &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_57" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_58" onclick="BLOG_clickHandler(this)"&gt;Keepalive&lt;/span&gt; exchange between 10 minute polls = 346K per month&lt;/li&gt;&lt;li&gt;Overall, Joe should expect at least 1.5MB per month and I'd suggest he budget for 3MB or even 5MB. This puts him up into the $20/month cell plan range.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-7961567679173442843?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/7961567679173442843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=7961567679173442843' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/7961567679173442843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/7961567679173442843'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/01/cellular-costs-bytes-you-pay-for-each.html' title='Cellular Costs - bytes you pay for each month'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-9184890476541500203</id><published>2007-01-11T11:42:00.000-08:00</published><updated>2007-01-11T12:14:22.595-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WiFi'/><category scheme='http://www.blogger.com/atom/ns#' term='Modbus'/><title type='text'>WiFi 802.11b Modbus Bridge - TCP to serial</title><content type='html'>- Want to query a movable Modbus slave on a conveyor? &lt;br /&gt;- Want to roll a Modbus Master HMI around on a cart or AGV?&lt;br /&gt;- Want to query your outdoor oxygen tanks without running a cable through the wall?&lt;br /&gt;&lt;br /&gt;I was a bit surprised, yet pleased, to see our embedded team selected to port the Modbus Bridge function into the full line of low-end Digi Connect products.  The &lt;a href="http://www.digi.com/support/productdetl.jsp?pid=2523&amp;osvid=0&amp;amp;s=63&amp;tp=2"&gt;latest 82001220_H2.bin firmware &lt;/a&gt;for the small, low-cost &lt;a href="http://www.digi.com/products/serialservers/digiconnectwisp.jsp"&gt;Digi Connect Wi-SP&lt;/a&gt; includes Digi's basic Modbus bridge functionality which allows network Modbus masters to share serial Modbus RTU and Modbus ASCII slaves.  It is similar to the function of the Digi One IA and a subset of the Digi One IAP.&lt;br /&gt;&lt;br /&gt;Protocol and transport combinations supported:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Modbus/TCP&lt;/li&gt;&lt;li&gt;Modbus/TCP via UDP/IP&lt;/li&gt;&lt;li&gt;Modbus/RTU via serial, TCP/IP or UDP/IP&lt;/li&gt;&lt;li&gt;Modbus/ASCII via serial, TCP/IP or UDP/IP&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So for example, a Modbus/TCP OPC server could query a portable Modbus/RTU serial slave; such as a machine cell moved around as production mixes require.  Or a serial Modbus/RTU master on a repair cart could wirelessly query network-based Modbus PLC and test devices.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.digi.com/pdf/prd_ds_digiconnectwisp.pdf"&gt;Here is the full datasheet for the Digi Connect Wi-SP&lt;/a&gt;, but feature summary:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Field selectable RS-232, RS-422, RS-485&lt;/li&gt;&lt;li&gt;Flexible 9-30vdc power supply (serial NOT isolated from power ground)&lt;/li&gt;&lt;li&gt;Standard 802.11b with WPA2/802.11i security&lt;/li&gt;&lt;li&gt;SSL/TLS strong security support&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.digi.com/pdf/fs_realport.pdf"&gt;Digi RealPort &lt;/a&gt;support for comm-port redirection&lt;/li&gt;&lt;li&gt;Software development tools available for custom firmware development&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-9184890476541500203?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/9184890476541500203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=9184890476541500203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/9184890476541500203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/9184890476541500203'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/01/wifi-80211b-modbus-bridge-tcp-to-serial.html' title='WiFi 802.11b Modbus Bridge - TCP to serial'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-2853724730767343505</id><published>2007-01-06T14:44:00.000-08:00</published><updated>2007-01-11T11:11:24.887-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Modbus'/><title type='text'>Real Numbers (Part 2) - Modbus/RTU over cellular</title><content type='html'>My previous post covered Modbus/RTU polls once per 30 seconds.  Here is a second set of results for 24 hours with polling once every 60 seconds.&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Of 1440 polls, only 3 failed responses with a 30 sec timeout.&lt;/li&gt;&lt;li&gt;Fastest poll was 451 msec round-trip (1/2 sec)&lt;/li&gt;&lt;li&gt;Slowest poll was 10,407 msec round-trip (10.5 sec)&lt;/li&gt;&lt;li&gt;Statistical average of successful polls was 1748 msec&lt;/li&gt;&lt;li&gt;In chart below, white dots are round-trip times and black line is the moving average over a 15-minute period.&lt;/li&gt;&lt;li&gt;Notice a few interesting trends; such as the very fast response around 11am and again around 3am the next morning.&lt;/li&gt;&lt;/ul&gt; &lt;a href="http://iatips.com/blogimage/2007JAN06.gif"&gt;&lt;img style="width: 400px; height: 183px; margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://iatips.com/blogimage/2007JAN06.gif" alt="24 hours chart" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;(Click the image to see a large version)&lt;br /&gt;&lt;a href="http://iatips.com/blogimage/2007JAN06_ModbusTimes.zip"&gt;(Click here to download ZIP file with Excel and OpenOffice spreadsheet of times)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-2853724730767343505?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/2853724730767343505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=2853724730767343505' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/2853724730767343505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/2853724730767343505'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/01/real-numbers-part-2-modbusrtu-over.html' title='Real Numbers (Part 2) - Modbus/RTU over cellular'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-674678899759628109</id><published>2007-01-05T08:51:00.000-08:00</published><updated>2007-01-06T15:15:12.766-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Modbus'/><title type='text'>Real Numbers - Modbus/RTU over cellular</title><content type='html'>I'm working on a fuller set of numbers, but here is a &lt;span style="font-weight: bold; font-style: italic;"&gt;real-world example of Modbus/RTU poll-response times over cellular&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I am running a Modbus/TCP poller (ModScan32), which polls a Digi PortServer TS4H by Ethernet, and the TS4H in turn is using Modbus/RTU-in-TCP/IP via the Digi corporate backbone to poll a Digi Connect WAN on Cingular GSM with a Twido PLC on the serial port.&lt;br /&gt;&lt;br /&gt;Why use the TS4H here?  Why not go directly from a Windows computer to cellular? Well, &lt;span style="font-weight: bold;"&gt;three reasons&lt;/span&gt;:&lt;br /&gt;1) The &lt;span style="font-weight: bold;"&gt;Digi TCP/IP stack is much more graceful&lt;/span&gt; over cellular than Windows' TCP/IP stack - the Windows stack retries too hard and wastes bandwidth that some patience would save.  With Windows you'll commonly see 2 to 5 percent retransmissions which - given how cellular is VERY reliable - ends up doing nothing but create duplicated TCP acknowledgments you must pay for.  This is actually a weakness in the design of TCP/IP; which proponents claim is SOLVED by TCP/IP as-is.  TCP allows hosts to auto-adjust timing behavior to match real-world performance.  Unfortunately, the standard TCP algorithms keep timing too close to the "average" behavior which wastes &lt;span style="font-weight: bold; font-style: italic;"&gt;CASH &lt;/span&gt;over cellular links with high and variable latency.&lt;br /&gt;2) I am &lt;span style="font-weight: bold;"&gt;testing a slave timeout algorithm&lt;/span&gt; in the Modbus Bridge code for the Digi One IAP and TSx family related to "stale" responses arriving after the slave timeout.  This is a common weakness in Modbus/RTU hosts which assume either a timely response or NO response.&lt;br /&gt;3) The &lt;span style="font-weight: bold;"&gt;Digi Modbus Bridge keeps nice timing statistics&lt;/span&gt; such as min/max/average round-trip delay and most Windows tools do NOT.&lt;br /&gt;&lt;br /&gt;So for example, my Master polls once per 30 seconds.  This means the GSM modem in the Digi Connect WAN maintains a constant data slot allocation with the cell tower.  After 370 polls, 352 have had a round-trip of 2500 msec or less and 18 polls have had a round-trip above 2500 msec (ie: I have seen 18 timed out requests with a "stale response" arriving AFTER the timeout period - behavior I am investigating).&lt;br /&gt;&lt;br /&gt;The Digi PortServer TS4H telnet trace includes this info:&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;font-size:85%;" &gt;01:38:15 IA INFO: mbrtu:s02 complete rsp min:467 avg:1565 max:9142 msec&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This means the fastest poll took only 467 msec, the slowest took 9142 msec (nearly 10 seconds!) and the moving average round-trip time is about 1.5 seconds.  So the minimum round-trip was only one-third of the average, while the maximum round-trip was nearly six-times the average.  Since every poll is exactly the same, one would NEVER see such variance on a direct RS-232 or RS-485 serial line.  I'd be surprised if a PLC would have even a +/- 10% variance in response times.  This is one of the problems with using off-the-shelf tools with cellular - the vendors have just NOT designed the tools for such variation in response performance.&lt;br /&gt;&lt;br /&gt;As a side note, the polls being less than 40-50 seconds is of interest here because the cell tower (with 2.5G GSM/CDMA) will take away the data slots from the modem if it has been idle too long - the time varies but is often in the 40-50 seconds.  When this happens, the modem is still connected to the tower but requires some control traffic to be reassigned bandwidth to move data.  So using a poll rate slower than this idle time would shift the average round-trip time up. Once cellular system make the move to 3G this "idle period" will drop to a few seconds only, meaning telemetry systems may perform much WORSE in the new faster networks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-674678899759628109?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/674678899759628109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=674678899759628109' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/674678899759628109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/674678899759628109'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/01/real-numbers-modbusrtu-over-cellular.html' title='Real Numbers - Modbus/RTU over cellular'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-2005438635768514799</id><published>2007-01-03T10:16:00.000-08:00</published><updated>2007-01-03T10:50:58.662-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DF1'/><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><category scheme='http://www.blogger.com/atom/ns#' term='Modbus'/><category scheme='http://www.blogger.com/atom/ns#' term='Digi One IAP'/><title type='text'>Rockwell Bridging - Ethernet to DF1</title><content type='html'>Question: We have a MicroLogix 1500 with only 1 serial port. What Digi product can we use to enable Ethernet access from RSLinx or a HMI display?&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://www.digi.com/products/serialservers/digioneiap.jsp"&gt;Digi One IAP&lt;/a&gt; allows bridging AB protocols:&lt;br /&gt;- Ethernet/IP Master (such as ControlLogix) can query DF1 PLC&lt;br /&gt;- CSPv4 Master (such as RSLinx, PLC5E or SLC5/05) can query DF1 PLC&lt;br /&gt;- DF1 encapsulated in TCP/Ip (such as OPC server) can query serial DF1 PLC&lt;br /&gt;- Modbus Master (TCP, RTU, or ASCII) can query DF1 PLC as-if a Modbus slave.&lt;br /&gt;&lt;br /&gt;All of these can function concurrently, as the serial port is moving pure DF1.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://www.digi.com/products/serialservers/digioneiap.jsp"&gt;Digi One IAP&lt;/a&gt; cannot support DH485 because (like ProfiBus) the token rotation is too fast to be encapsulated over Ethernet successfully.&lt;br /&gt;&lt;br /&gt;The general Rockwell Bridging is discussed in this PDF file:&lt;br /&gt;&lt;a title="http://ftp1.digi.com/support/documentation/90000636_a_doiap_ra_bridge.pdf" href="http://ftp1.digi.com/support/documentation/90000636_a_doiap_ra_bridge.pdf"&gt;http://ftp1.digi.com/support/documentation/90000636_a_doiap_ra_bridge.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Quick comparison of Digi One IAP to the 1761-NET-ENI:&lt;br /&gt;&lt;table style="WIDTH: 100%; TEXT-ALIGN: left" cellspacing="2" cellpadding="2" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Product&lt;/td&gt;&lt;td&gt;Digi One IAP&lt;/td&gt;&lt;td&gt;1761-NET-ENI&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Ethernet/IP to DF1 FullDuplex&lt;/td&gt;&lt;td&gt;YES&lt;/td&gt;&lt;td&gt;YES&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;CSPv4 (PLC5E protocol) to DF1 FullDuplex&lt;/td&gt;&lt;td&gt;YES&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Modbus to DF1 FullDuplex&lt;/td&gt;&lt;td&gt;YES&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DF1 encapsulated in TCP/IP or UDP/IP&lt;/td&gt;&lt;td&gt;YES&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DF1 by port redirection&lt;/td&gt;&lt;td&gt;YES&lt;/td&gt;&lt;td&gt;YES&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Supports DF1 Radio Modem&lt;/td&gt;&lt;td&gt;YES (next release "H")&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Maximum active Masters/Peers&lt;/td&gt;&lt;td&gt;64&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Configuration by Web&lt;/td&gt;&lt;td&gt;YES&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Configuration by Telnet or SSH&lt;/td&gt;&lt;td&gt;YES&lt;/td&gt;&lt;td&gt;no&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Basically, the Digi One IAP does everything the 1761-NET-ENI does (plus much more) except:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The Digi One IAP does NOT handle CIP encapsulated within DF1, which is required only for RSLinx to CompactLogix RS-232 port&lt;/li&gt;&lt;li&gt;The Digi One IAP does NOT have emails triggered by PLC MSG blocks&lt;/li&gt;&lt;li&gt;RSLinx won't talk Ethernet/IP through the Digi One IAP - it will talk "Ethernet Driver" fine.  This is *NOT* related to existance of an EDS file. RSLinx talks via the 1761-NET-ENI because it is hard-coded to treat the ENI special.  There is no EDS file information which RSLinx examines to function with the ENI.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-2005438635768514799?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/2005438635768514799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=2005438635768514799' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/2005438635768514799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/2005438635768514799'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2007/01/rockwell-bridging-ethernet-to-df1.html' title='Rockwell Bridging - Ethernet to DF1'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-6871906621587746356</id><published>2006-12-28T08:13:00.000-08:00</published><updated>2006-12-29T09:04:56.759-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><title type='text'>Cellular IP-Friendly Apps - Never Block on TCP Sockets</title><content type='html'>Traditionally programmers have assumed that a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0" onclick="BLOG_clickHandler(this)"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;&lt;/span&gt; packet will either make it to the remote peer error-free or the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1" onclick="BLOG_clickHandler(this)"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;&lt;/span&gt; socket will be detected as failed. However, this has proven a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;disastrous&lt;/span&gt; assumption in the world of cellular networks.&lt;br /&gt;&lt;br /&gt;Cellular networks seem to suffer a kind of burst-error mode where whole groups of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3" onclick="BLOG_clickHandler(this)"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;&lt;/span&gt; packets get lost or delayed, while another group makes it through. This seems to confuse the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4" onclick="BLOG_clickHandler(this)"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;&lt;/span&gt; state machines within OS which are optimized for the more rare, single-packet loss of Ethernet. We have Ethereal traces where one can see the application send a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5" onclick="BLOG_clickHandler(this)"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;&lt;/span&gt; packet, the OS retries once, a collect of old stale &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6" onclick="BLOG_clickHandler(this)"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;&lt;/span&gt; acknowledgements return from the remote - then nothing. Eleven hours later there have been no more &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7" onclick="BLOG_clickHandler(this)"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;&lt;/span&gt; retries, no &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8" onclick="BLOG_clickHandler(this)"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9" onclick="BLOG_clickHandler(this)"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8" onclick="BLOG_clickHandler(this)"&gt;keepalive&lt;/span&gt;&lt;/span&gt;, no response from the remote, and no &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10" onclick="BLOG_clickHandler(this)"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt;&lt;/span&gt; stack error from the OS to abort the application block. The host application is still hung, blocking waiting for either a response or socket failure which never come.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;So is this a bug in the OS? Does it matter? It is your application and "our" customer who pays the price.&lt;/em&gt; For example, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10" onclick="BLOG_clickHandler(this)"&gt;Digi&lt;/span&gt; had to go through our &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11" onclick="BLOG_clickHandler(this)"&gt;RealPort&lt;/span&gt; driver and literally add an OS timer to abort every &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12" onclick="BLOG_clickHandler(this)"&gt;TCP&lt;/span&gt; socket call if it did not return in 60 seconds.  Yes, this sounds like a royal pain but it was the only way to avoid this failure every few weeks when running across cellular &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13" onclick="BLOG_clickHandler(this)"&gt;IP&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;&lt;/em&gt;: applications must NEVER block on a socket waiting for a response or socket failure.  Applications must always use an OS or external timer to abort socket functions that take longer than 1 minute.  Sadly, running in non-blocking mode is NOT enough since at times it will be the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14" onclick="BLOG_clickHandler(this)"&gt;API&lt;/span&gt; call which fails to return regardless of the block/non-block setting. So even using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15" onclick="BLOG_clickHandler(this)"&gt;API&lt;/span&gt; calls with explicit timeouts is not safe.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-6871906621587746356?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/6871906621587746356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=6871906621587746356' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/6871906621587746356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/6871906621587746356'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/12/cellular-ip-friendly-apps-never-block.html' title='Cellular IP-Friendly Apps - Never Block on TCP Sockets'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-2610599238562345106</id><published>2006-12-20T09:49:00.000-08:00</published><updated>2006-12-20T11:22:26.096-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Modbus'/><title type='text'>IP-Encapsulation of Modbus/RTU</title><content type='html'>&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;: Modbus/RTU can easily be encapsulated within TCP/IP ... as long as there exists some mechanism to keep full Modbus/RTU messages packed within a single TCP segment or UDP packet.&lt;/p&gt;&lt;p&gt;Most industrial users have learned to be wary of expecting Modbus/RTU to work over error-correcting modems (especially radio) unless you use special modems which are Modbus/RTU aware. So it is wise to be wary of moving Modbus/RTU over IP without some special settings or features in the IP devices involved. Fortunately all Digi devices (and most competitors' devices) have such features or settings.&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Bullet-Proof Solution: Modbus Bridges&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;The safest and most flexible way to move Modbus over IP is to use devices which fully understand the Modbus protocol and dialects of Modbus/TCP, Modbus/RTU, and Modbus/ASCII. This allows multiple Masters to share the slave(s), plus Modbus/TCP masters can query Modbus/RTU slaves and the bridge handles the protocol conversions.&lt;br /&gt;More detailed information of this topic is this application note&lt;br /&gt;&lt;a href="http://ftp1.digi.com/support/documentation/90000638_a.pdf"&gt;Setting up Digi One IAP for Modbus Bridging.&lt;/a&gt; The basic information in this application note applies to the following Digi products with Modbus Bridge ability:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.digi.com/products/serialservers/digioneia.jsp"&gt;Digi One IA&lt;/a&gt;, &lt;a href="http://www.digi.com/products/serialservers/digioneiap.jsp"&gt;Digi One IAP&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.digi.com/products/serialservers/portservertsmei"&gt;PortServer TS1 to 4 MEI&lt;/a&gt; including &lt;a href="http://www.digi.com/products/serialservers/portservertshmei.jsp"&gt;TS H MEI&lt;/a&gt;(adds Ext Temp -35 to +74DegC), &lt;a href="http://www.digi.com/products/serialservers/portservertshccmei.jsp"&gt;TS Hcc MEI&lt;/a&gt;(adds Conformal Coating), and coming soon TS Haz MEI which adds Div 1 Cls II certs&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.digi.com/products/serialservers/portserverts816.jsp"&gt;PortServer TS8 and TS16&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.digi.com/products/cellulargateways/digiconnectwanfamily.jsp"&gt;Digi Connect WAN IA&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;(Coming in next firmware release: &lt;a href="http://www.digi.com/products/serialservers/digiconnectsp.jsp"&gt;Digi Connect SP&lt;/a&gt;, &lt;a href="http://www.digi.com/products/serialservers/digiconnectwisp.jsp"&gt;Wi-SP&lt;/a&gt;, &lt;a href="http://www.digi.com/products/embeddedsolutions/digiconnectme.jsp"&gt;ME&lt;/a&gt;, &lt;a href="http://www.digi.com/products/embeddedsolutions/digiconnectwime.jsp"&gt;Wi-ME&lt;/a&gt;, &lt;a href="http://www.digi.com/products/embeddedsolutions/digiconnectem.jsp"&gt;EM&lt;/a&gt;, &lt;a href="http://www.digi.com/products/embeddedsolutions/digiconnectwiem.jsp"&gt;Wi-EM&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Effective Solution: TCP (or UDP) Sockets Profile&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;If you don't really require the multi-master or protocol bridging features, then any Digi device server can be used. By default the Digi serial "TCP Socket Profile" will break all messages into TCP segments of from 4 to 64 bytes - not what you want for Modbus/RTU. This default behavior creates the lowest latency for normal data without the timing fussiness of Modbus/RTU. However, all you need to do is enable the option checkbox feature "&lt;em&gt;Send data only under any of the following conditions&lt;/em&gt;" and then the sub-option "&lt;em&gt;Send after the following number of idle milleseconds&lt;/em&gt;". Entering a time such as 25 milliseconds causes the Digi device server to continue collecting data and delays creation of the TCP segment packet until no more serial data is seen for 25 milliseconds. This is a very nice fit to the Modbus/RTU "3.5 character idle time" end-of-message condition. Why not use 5 msec? Well, experience has shown me the 25 (or even 100 msec for cellular) is a more robust value.&lt;/p&gt;&lt;p&gt;So an example solution using TCP Socket Profile would be to use an OPC server such as Kepware which can put most of its serial protocols into a TCP/IP socket. These should naturally put a full Modbus/RTU request into a single TCP segment - the host application is "&lt;strong&gt;&lt;em&gt;defective&lt;/em&gt;&lt;/strong&gt;" if it causes more than one TCP segement to be used; it means the host application vendor doesn't know what they are doing. Since the Digi device server receives the entire request as a single TCP segment, the full Modbus/RTU request will move out of the serial port as a single continuous stream of bytes. With the correct settings, when the Modbus/RTU response returns the Digi device server &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-2610599238562345106?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/2610599238562345106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=2610599238562345106' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/2610599238562345106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/2610599238562345106'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/12/ip-encapsulation-of-modbusrtu.html' title='IP-Encapsulation of Modbus/RTU'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-2383476520363415369</id><published>2006-12-15T11:43:00.001-08:00</published><updated>2006-12-15T12:43:17.469-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><category scheme='http://www.blogger.com/atom/ns#' term='Modbus'/><category scheme='http://www.blogger.com/atom/ns#' term='Digi One IAP'/><title type='text'>Mixing Modbus and Rockwell on Ethernet</title><content type='html'>&lt;p&gt;Both Modbus and PCCC-based protocols like DF1 or CSPv4 (AB/Ethernet) have been around for years. Yet if one looks at the similarities between the two, one quickly sees that the act of reading 10 words from an N7 data file is exactly the same as reading 10 words from Modbus 4x00001. The &lt;a href="http://www.digi.com/products/serialservers/digioneiap.jsp"&gt;Digi One IAP&lt;/a&gt; leveraged this to become the world's first off-the-shelf transparent protocol bridge. It freely accepts Modbus or Rockwell requests and bridges them to the appropriate form for the slave to understand.&lt;/p&gt;&lt;p&gt;Here is an example system:&lt;br /&gt;&lt;img height="207" alt=" Example of AB and Modbus talking on Ethernet" src="http://iatips.com/blogimage/2006dec15_ab_modbus.jpg" width="400" align="middle" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The ControlLogix can poll the Modbus/TCP and DF1 PLC&lt;/li&gt;&lt;li&gt;The Modbus/TCP PLC can poll the ControlLogix and DF1 PLC&lt;/li&gt;&lt;li&gt;The DF1 PLC can poll the ControlLogix and Modbus/TCP PLC.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;So how does this work? Take a look at the messages to read the first 48 bits of bit memory: &lt;ul&gt;&lt;li&gt;Modbus/TCP is 001E00000006&lt;b&gt;&lt;u&gt;010100000030&lt;/u&gt;&lt;/b&gt; &lt;/li&gt;&lt;li&gt;Modbus/RTU is &lt;b&gt;&lt;u&gt;010100000030&lt;/u&gt;&lt;/b&gt;3C1E &lt;/li&gt;&lt;li&gt;Modbus/ASCII is :&lt;b&gt;&lt;u&gt;010100000030&lt;/u&gt;&lt;/b&gt;CE(CR)(NL)&lt;/li&gt;&lt;li&gt;DF1 Full-Duplex is 10020100&lt;b&gt;&lt;u&gt;0F000019A20603850000&lt;/u&gt;&lt;/b&gt;1003DE06 &lt;/li&gt;&lt;li&gt;CSPv4 is 0107000E00 … 01050000&lt;b&gt;&lt;u&gt;0F000019A2060385000&lt;/u&gt;&lt;/b&gt; &lt;/li&gt;&lt;li&gt;PCCC-Ethernet/IP is 6F002800 … 000001000000&lt;b&gt;&lt;u&gt;0F000019A2060385000&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;Notice the bold, underlined text patterns? This is the heart of how a normal Modbus Bridge or 1761NetENI function. Modbus/TCP, Modbus/RTU, and Modbus/ASCII may have different bytes, but they all move the exact same Modbus command; a Modbus bridge doesn't need to understand the Modbus command, just be able to unpack and repack each form. Similarly DF1, CSPv4, and PCCC-in-Ethernet/IP have different bytes, but they all move the same PCCC command; a PCCC bridge doesn't need to understand the PCCC command, just be able to unpack and repack each form.&lt;br /&gt;&lt;br /&gt;The Digi One IAP takes this one step further - since each of these bold, underlines commands is accomplishing the same thing - namely reading the first 48-bits of bit memory - the Digi One IAP can take either command and mechanically create the other. So given the Modbus command &lt;b&gt;&lt;u&gt;010100000030&lt;/u&gt;&lt;/b&gt;, it can create the PCCC command &lt;b&gt;&lt;u&gt;0F000019A20603850000&lt;/u&gt;&lt;/b&gt;. Given the core PCCC command &lt;b&gt;&lt;u&gt;0F000019A20603850000&lt;/u&gt;&lt;/b&gt; it can create the Modbus command &lt;b&gt;&lt;u&gt;010100000030&lt;/u&gt;&lt;/b&gt;. So this how a Modbus/TCP master can query a ControlLogix with PCCC-enabled. the Modbus/TCP master thinks it is polling another Modbus device. The ControlLogix thinks it is being polled by another Ethernet/IP device.&lt;br /&gt;&lt;br /&gt;Here are links to other related information:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.digi.com/products/serialservers/digioneiap.jsp"&gt;Digi One IAP product page&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ftp1.digi.com/support/documentation/90000647_B.pdf"&gt;Application Note for Modbus master polling Rockwell devices.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ftp1.digi.com/support/documentation/90000653_B.xls"&gt;Excel spreadsheet for Modbus master polling Rockwell devices.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ftp1.digi.com/support/documentation/90000643_a.pdf"&gt;Application Note for Rockwell master polling Modbus devices.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ftp1.digi.com/support/documentation/90000652_a.xls"&gt;Excel spreadsheet for Rockwell master polling Modbus devices.&lt;/a&gt;&lt;br /&gt;&lt;a href="http://iatips.com/docs/Modbus_AB_World_v01.pdf"&gt;PDF presentation of various ways to mix Modbus and Rockwell devices&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-2383476520363415369?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/2383476520363415369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=2383476520363415369' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/2383476520363415369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/2383476520363415369'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/12/mixing-modbus-and-rockwell-on-ethernet.html' title='Mixing Modbus and Rockwell on Ethernet'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-3886383438226567499</id><published>2006-12-15T08:50:00.000-08:00</published><updated>2006-12-15T09:21:11.076-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Device Access'/><category scheme='http://www.blogger.com/atom/ns#' term='Cellular'/><category scheme='http://www.blogger.com/atom/ns#' term='Rockwell'/><title type='text'>Rockwell AB PLC via Cellular</title><content type='html'>So far we have succeeded in getting several Rockwell/Allen-Bradley PLC up on Cellular with the &lt;a href="http://www.digi.com/products/cellulargateways/digiconnectwanfamily.jsp"&gt;Digi Connect WAN&lt;/a&gt;, which is a cellular router for GSM or CDMA with local Ethernet and serial port.&lt;br /&gt;&lt;br /&gt;In Summary:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;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 &lt;a href="http://www.digi.com/pdf/fs_realport.pdf"&gt;Digi RealPort&lt;/a&gt; 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.&lt;/li&gt;&lt;li&gt;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 &lt;a href="http://www.digi.com/products/cellulargateways/digiconnectwanfamily.jsp"&gt;Digi Connect WAN&lt;/a&gt;. Under RSLinx you enter the IP or DNS name for your Digi Connect WAN in the "&lt;strong&gt;&lt;em&gt;Ethernet Driver"&lt;/em&gt;&lt;/strong&gt;, 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 - &lt;a href="http://digiwan.gotdns.org:8080/"&gt;http://digiwan.gotdns.org:8080/&lt;/a&gt;. But please don't leave this page open since you'll impact other people trying to look at my cellular PLC.&lt;/li&gt;&lt;li&gt;Ethernet/IP: You can access ControlLogix and other newer PLC supporting Ethernet/IP by enabling TCP port forwarding of port 44818 on the &lt;a href="http://www.digi.com/products/cellulargateways/digiconnectwanfamily.jsp"&gt;Digi Connect WAN&lt;/a&gt;. Under RSLinx you enter the IP or DNS name for your Digi Connect WAN in the &lt;strong&gt;&lt;em&gt;"Remote Devices via Linx Gateway" &lt;/em&gt;&lt;/strong&gt;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.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If you want more detailed instructions, I have an application note online here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://iatips.com/blogimage/90000772_A_Cell_AB.pdf"&gt;90000772_A_Cell_AB.pdf&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-3886383438226567499?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/3886383438226567499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=3886383438226567499' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/3886383438226567499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/3886383438226567499'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/12/rockwell-ab-plc-via-cellular.html' title='Rockwell AB PLC via Cellular'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-116586433202694068</id><published>2006-12-11T10:50:00.000-08:00</published><updated>2006-12-11T11:28:27.469-08:00</updated><title type='text'>Simulating Multi-drop Across routed IP</title><content type='html'>&lt;strong&gt;Summary&lt;/strong&gt;: &lt;em&gt;the UDP Sockets profile in Digi device servers can be used to simulate multi-drop behavior in routed IP or wide-area networks. An application note is linked to this entry.&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;Ever wished your Ethernet could mimic an RS-485 network? Or are you trying to replace an old, expensive multi-point analog modem system with newer IP-based technologies such as cellular, satellite, or aDSL links?&lt;br /&gt;&lt;br /&gt;On a local Ethernet subnet a UDP broadcast can be used to simulate multi-drop ... however IT departments and anyone thinking of the future knows IP broadcast is something not to be used lightly. IP broadcast loads every device on the network and examples of high broadcast load killing or crippling important embedded devices are common.&lt;br /&gt;&lt;br /&gt;The preferred method on a local Ethernet is the use of Class D IP (aka IP addresses in the 224.x.x.x to 239.x.x.x range). However, details of IP assignment, IP collision, and the risk of turning switches into hubs make this a risky and confusing technology. Most heavy users of ODVA Ethernet/IP can cite a few cases where enabling high multi-cast traffic killed other third-party products (notably security or video devices) which had treated all multicast traffic as broadcast to be examined by software.&lt;br /&gt;&lt;br /&gt;Plus we are talking about wide-area-networks and use of cellular or satellite technology. Routed IP networks won't move broadcast or multicast traffic unless active proxies exist at each end to encapsulate the broadcast/multicast traffic into TCP/IP.&lt;br /&gt;&lt;br /&gt;Fortunately, the Digi One IAP (and most Digi device servers) include the ability to use a form of repeated UDP/IP unicast to simulate multicast to up to 64 remote peers. I have customers using this to move Modbus/RTU and AB DF1 Half-Duplex through routed private wide-area-network. Here is an application note which explains how to set this up.&lt;br /&gt;&lt;br /&gt;(For now it is a Word 2003 document - but it can be opened by Open Office Writer v2.0 if you don't have Word. I'll shortly turn it into a Acrobat PDF)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://iatips.com/blogimage/90000xxx_A_UDP_Multidrop.doc"&gt;http://iatips.com/blogimage/90000xxx_A_UDP_Multidrop.doc&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-116586433202694068?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/116586433202694068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=116586433202694068' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116586433202694068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116586433202694068'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/12/simulating-multi-drop-across-routed-ip.html' title='Simulating Multi-drop Across routed IP'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-116551262871190759</id><published>2006-12-07T09:00:00.000-08:00</published><updated>2006-12-07T09:45:58.706-08:00</updated><title type='text'>Rockwell Protocol Documents</title><content type='html'>A friend just pointed out this public web page to me: &lt;a href="http://www.rockwellautomation.com/enabled/guides.html"&gt;How to Communicate with Rockwell Automation Products&lt;/a&gt;. While have seen many of this documents before, a few of them were new for me.  It includes information on:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;How to talk to ControlLogix tag data via Ethernet/IP&lt;/li&gt;&lt;li&gt;How to understand ControlLogix data structure packing when read raw&lt;/li&gt;&lt;li&gt;The DF1 serial protocol specification&lt;/li&gt;&lt;li&gt;How to encapsulate CIP over DF1 (ie: talk to serial port of Compact/ControlLogix)&lt;/li&gt;&lt;li&gt;How to use Ethernet/IP explicit messaging to ControlLogix&lt;/li&gt;&lt;li&gt;How to use Ethernet/IP I/O messaging with ControlLogix&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In addition, I see &lt;a href="http://www.ab.com"&gt;www.ab.com&lt;/a&gt; has added a new DF1 supplement to its Knowledge Base. Since you have to login giving you a direct link is pointless, but it is called "&lt;strong&gt;&lt;em&gt;DF1 Protocol supplement 17706516&lt;/em&gt;&lt;/strong&gt;". It compares PLC5 and SLC5 communications, covers some useful commands such as 0x0AB "&lt;em&gt;Protected Typed Logical Write with Mask&lt;/em&gt;" to write individual bits, and new data file types not covered in the latest 1996 version of the DF1 specification.&lt;/p&gt;&lt;p&gt;While we are discussing new Rockwell protocol information, you should also review and be aware of the new "DF1 Radio Modem" protocol. I don't think there is a form specification, but you can find a file in the &lt;a href="http://www.ab.com/"&gt;http://www.ab.com/&lt;/a&gt; Knowledge Base that describes the simple differences between it and DF1 Full-Duplex. In summary, DF1 Radio Modem &lt;strong&gt;&lt;em&gt;*IS*&lt;/em&gt;&lt;/strong&gt; DF1 Full-Duplex without the protocol ACK/NAK. It is designed for use in radio systems where the powering up of slave modems just to ACK something they will respond to anyway just slows down overall polling. I'm also finding it ideal for cellular IP networks since it literally cuts your data usage by 50 to 60% to NOT be moving 2-byte DF1 ACKs within TCP/IP which also includes a TCP acknowledgements. SInce DF1 includes a TNS or transaction number, there is no problem with mishandling lost or delayed messages.&lt;/p&gt;&lt;p&gt;The main catch today is that I think neither RSLinx nor ControlLogix support DF1 Radio Modem - it is mainly a MicroLogix and SLC5 family resource. However the next release of the &lt;a href="http://www.digi.com/products/serialservers/digioneiap.jsp"&gt;Digi One IAP&lt;/a&gt; will include the ability to bridge to DF1 Radio Modem from Ethernet/IP, CSPv4 (AB/Ethernet) and DF1 Full-Duplex.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-116551262871190759?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/116551262871190759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=116551262871190759' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116551262871190759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116551262871190759'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/12/rockwell-protocol-documents.html' title='Rockwell Protocol Documents'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-116541820473804629</id><published>2006-12-06T06:59:00.000-08:00</published><updated>2006-12-07T09:45:16.046-08:00</updated><title type='text'>Cellular IP-Friendly Apps - It Costs to Talk</title><content type='html'>&lt;strong&gt;Summary&lt;/strong&gt;: All communication must be "under control". All data sent into the cellular system costs money; even if the remote cellular device is &lt;strong&gt;&lt;em&gt;powered off&lt;/em&gt;&lt;/strong&gt;, the customer still pays for data set to it.&lt;br /&gt;&lt;br /&gt;As a follow-on to the discussion of &lt;a href="http://iatips.com/blog/2006/11/cellular-ip-friendly-apps-retrying.html"&gt;Retrying TCP Socket Opens&lt;/a&gt;, applications must allow the user to both understand and limit all aspects of protocol usage and retry. Users must be allowed to limit and predict a reasonable worst case traffic cost. For example, some protocols include large blocks of initial connection negotiation, which means talking once per minute over an continuously open socket could result in much less cost than talking once per 10 minutes over a socket opened just for one transaction. I have seen applications that allow users to set a maximum desired retry setting - then not always follow that setting and do retries anyway in certain fault conditions.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;: application-writers must step back and examine every place within the application they create traffic and confirm users have the ability to limit the traffic created.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Example and Numbers&lt;/strong&gt;: now most of you will be saying "Yah, dahh - so obvious why is this even mentioned?". Well, I'll give you an all too typical example of how this affects real customers. A customer (call him Joe) running a pilot on cellular data access calls to complain his costs are higher than expected. He says he's just polling 3 Modbus registers every 5 minutes. Being no dummy, Joe has already calculated that each request should be 12 bytes of data (One Modbus/TCP function 3 read) and each response should be 17 bytes of data (One Modbus/TCP response with 4 registers since he is reading 4x00003, 4x00004 and 4x00006 so one assumes 4x00005 comes along for the ride). One poll each 5 minutes works out to be 8640 poll per 30 days, so he had hoped to see only about a quarter-megabyte of traffic a month. Yet Joe was seeing data bill for 6 to 10 MB of traffic a month. This means his $20 per month 5MB plan was costing him closer to $60 per month with data overages.&lt;br /&gt;&lt;br /&gt;First, Joe overlooked the fact that he has to pay for not only his Modbus data, but also the TCP and IP overhead used to move it. Standard Windows-generated TCP headers are 20 bytes and so are the IP headers. Linux tends to defaults to use TCP time-stamps and thus creates 28-byte TCP headers. So each request is NOT 12 bytes, but 52-60 bytes ... plus the TCP Acknowledge frame will add an additional 40-48 bytes. Yes, &lt;em&gt;&lt;strong&gt;YOU &lt;/strong&gt;pay for the TCP Acknowledgements as well&lt;/em&gt;! With headers and TCP Acknowledgement, his responses will be 97-113 bytes not 17. So right off the bat, I can see that he has been under-estimating his monthly traffic. Since he is using Windows, he should be seeing at least 1.6MB of traffic and never 0.25MB.&lt;br /&gt;&lt;br /&gt;So I vist Joe and do a network trace of his OPC server traffic.  We see that OPC is issuing 3 Modbus polls every 5 minutes - not 1. Hmmm, of course Joe's first reaction is "Heck no - I'm not polling 3 - just 1" but the proof is there as colored pixels on my notebook display. We decode the polls and see the OPC server is polling 3 blocks of 32-registers each. After decoding the Modbus/TCP bytes we learn the exact registers being polled and Joe eventually discovers why these are being polled:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;One block of 32 registers is fetching his 3 desired value of 4x00003, 4x00004 and 4x00006. Reading the fine print in the OPC manual we see that the OPC server decided this was a "scattered poll" of 2 separate memory areas so it bumped the size up to 32 registers. So just for this one poll, his monthly budget is up to 2.8MB instead of 0.25MB&lt;/li&gt;&lt;li&gt;A second block was caused by Joe programming an HMI display to pop-up if a certain alarm condition where true in the field. This was a demo he'd done to impress a customer, but Joe hadn't thought to disable it nor had realized the exact "cost" of such a feature. So the OPC server needs a single register off somewhere else in the PLC memory to satisfy the HMI's alarm/event function. We don't know why this is polled as 32 registers instead of 1 - it is not a "scattered poll" as defined by the OPC vendor's documentation. Perhaps his HMI or OPC server software has a bug in it. Since this is Modbus/TCP (not serial) it is unlikely anyone else has noticed or cared that the application is moving 62 bytes of extra data in every poll. After all, Ethernet is fast and costs nothing to use. It is possible the programmers at the OPC vendor just decided there was no reason to ever poll less than 32 registers when using fast, free "Ethernet".&lt;/li&gt;&lt;li&gt;The final block was being caused by Joe's boss leaving open an HMI display in another room that wasn't supposed to be left open - human error (or is it?). Joe learned instanty how important it was for him to properly configure the HMI display settings which timed out displays - either closing the window or just stopping the supporting data polls. He had done that for the normal "user display", but had been lazy and not put such settings into the various diagnostic displays users weren't expected to use!&lt;/li&gt;&lt;/ul&gt;So now his 6 to 10MB of traffic a month begins to make sense. Each distinct poll is creating nearly 3MB of traffic per month, and his traffic is influenced by which HMI displays users open. Multiple 3MB by 3 polls and you roughly 9MB per month.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What has been learned here?&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;With the overhead of TCP/IP, Joe learned that he had to pay for over 4 times more traffic than his raw Modbus byte calculates had led him to believe.&lt;/li&gt;&lt;li&gt;Joe learned that he should be looking at using UDP/IP instead of TCP/IP for his Modbus/TCP since this would cut 40-60% off his bill instantly. Modbus doesn't really require the TCP Acknowledgement and my own tests of UDP/IP over cellular shows it to be about 99.99% reliable - or put another way, I only see about 1 packet lost per 10,000 sent.&lt;/li&gt;&lt;li&gt;Joe learned how to review his OPC server's data statistics page. His OPC server had been (indirectly) giving him the answer as to why his data usage was so high. While his OPC server never totaled up the data bytes to include TCP/IP overhead, it was able to show him the 36 polls per hour he was moving instead of his expected 12 (one per 5 minutes).&lt;/li&gt;&lt;li&gt;Joe learned that perhaps he needs to look for a new OPC supplier, since his present vendor just doesn't seem to see the big picture of IP-enabled protocols; that Ethernet is not the only media using TCP/IP.  Increasingly people expect TCP/IP to move through diverse media which is not always "fast and free" like Ethernet. Joe's present OPC supplier didn't give him the ability to reduce the poll block size below 32 registers when the OPC system thought "Ethernet" was being used.&lt;/li&gt;&lt;li&gt;Joe learned he had to be more aggressive in his HMI display design. He couldn't assume users would only look at certain displays and not leave open displays unexpectedly. Joe needed to actively set every possible display to automatically close or stop generating new polls. In fact, after review he discovered that most of his displays had no need for "real-time" update and he could just set them to display the data once as read without any refresh. Users always had to the option to manually redisplay the page. &lt;/li&gt;&lt;li&gt;Joe learned that maybe just reading data from the RTU program directly was not such a wise idea. His RTU had the ability to copy and repack data into special polling areas to eliminate "scattered polls". In fact, in the above example we traced at Joe's site, all of the data in those 3 polls could have easily fit within a single 13 register block. So Joe is reviewing his RTU program design to repack ALL data of interest - even data supporting rare HMI displays - into a dedicated memory area. While Joe had previously hoped to avoid this work, he now sees the potential dollar saving or cost penalty his company could face if he avoided this work.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;So really in summary I have to say &lt;strong&gt;&lt;em&gt;Your data polling needs to be UNDER CONTROL&lt;/em&gt;&lt;/strong&gt;, as in being controlled.  You need both the tools and the investment in effort to define as exactly as possible each and every data poll.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-116541820473804629?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/116541820473804629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=116541820473804629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116541820473804629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116541820473804629'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/12/cellular-ip-friendly-apps-it-costs-to.html' title='Cellular IP-Friendly Apps - It Costs to Talk'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-116380545798335422</id><published>2006-11-17T14:29:00.000-08:00</published><updated>2006-11-22T07:15:16.770-08:00</updated><title type='text'>TCP/IP Encapsulation Limited by Distance?</title><content type='html'>&lt;span style="FONT-STYLE: italic"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Summary&lt;/span&gt;: serial tunneling or TCP encapsulation is NOT directly affected by distance. However, it is affected by "hops" or how many routers and segments it goes through.&lt;/span&gt; To reduce the effect "hops" have on your TCP/IP Encapsulation, you need to set the correct options in your Digi Device Server. These are NOT standard defaults since what works best for Wide-Area-Network is &lt;strong&gt;not&lt;/strong&gt; best for local direct Ethernet links.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;What is serial TCP/IP encapsulation?&lt;/em&gt;&lt;/strong&gt; It is also called &lt;span style="FONT-STYLE: italic"&gt;serial bridging&lt;/span&gt; or &lt;span style="FONT-STYLE: italic"&gt;serial tunneling&lt;/span&gt;. Think of it as the modern IP equivalent to old short-haul modems or leased line modems. At each end you have a "modem", you connect a serial cable to each, and you create a virtual serial link running from end to end.&lt;br /&gt;&lt;img alt="Diagram showing serial tunnel" src="http://iatips.com/blogimage/2006nov18_serial_tunnel.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;During a webinar I gave, a traffic-industry user asked if serial TCP encapsulation is limited by distance. If he serial bridges between 2 intersections of a road, things work fine. However, if he tries the same serial bridge between an intersection and the home office, then serial bridging does NOT work. So he was wondering "&lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;what is the distance limit for serial bridging or encapsulation?&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;The simple answer is "There is no distance limitation". However, the longer the distance you move your serial encapsulation, the more routers and network segments (&lt;span style="FONT-STYLE: italic"&gt;hops&lt;/span&gt;) your traffic moves through. The more &lt;span style="FONT-STYLE: italic"&gt;hops &lt;/span&gt;your traffic moves through, the more variable latency (or delay or jitter) is introduced between consecutive network packets. This affects the timing and different protocols and software implementations react differently to it.&lt;br /&gt;&lt;br /&gt;Let me just throw some hypothetical numbers together. Let's say the device sends data as a block of 100 bytes; the receiving device will loop and collect this data. Of course the receiving device cannot just wait for 100 bytes - what if the line breaks? It could sit there forever waiting for the end of the message. So various timers are coded to enable the receiving device to understand failure and abort receiving. Let's say the receiving device waits at most 20 milliseconds for the next byte. On a direct serial link this is very common - once the sending device starts sending data it is very unlikely that even a 2 or 3 millisecond gap will appear between bytes.&lt;br /&gt;&lt;br /&gt;Enter serial encapsulation - either by radio or Ethernet or any IP-based media. All of these technologies are packet-based and most include some form of error-retry. So now the serial bytes collect in a buffer up to some point, then a chunk of them move together as one packet. Ideally, the full message moves as a single packet. However, if the message becomes split between 2 or more packets it is possible a gap will be detected by the receiving device. So for illustration we'll say the 100 bytes is split into 4 x 25-byte packets. On a single-hop network, there is much less opportunity for timing delays to open gaps in the final serial data. This diagram shows a small gap between the 25th and 26th bytes:&lt;br /&gt;&lt;img alt="Diagram shows less variability with single IP hop" src="http://iatips.com/blogimage/2006nov18_single_hop.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;But running the serial encapsulation through many network hops greatly increases the accumulated delays added to each packet. So each hop has the opportunity to increase the latency and lag. This diagram shows a much larger gaps that may occur when the packets create the serial traffic at the remote end:&lt;br /&gt;&lt;img alt="Diagram shows less variability with single IP hop" src="http://iatips.com/blogimage/2006nov18_multi_hop.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;How to solve this problem? On the Digi Connect products, you'll be using one of these serial port profiles: &lt;em&gt;TCP Sockets&lt;/em&gt; or &lt;em&gt;Serial Bridge&lt;/em&gt;. Under the &lt;strong&gt;Advanced Serial Settings&lt;/strong&gt; you need to enable the check box labeled: [ ] &lt;em&gt;Send data only under any of the following conditions.&lt;/em&gt; If you do not check this option, the Digi Device Server purposely fragments the serial data into many TCP segments to provide more realistic end-to-end performance on direct Ethernet links. However, since you want to move data through a wide-area network, you are less concerned with raw throughput than in preventing message fragmentation. You may also be interested in creating fewer TCP/IP packets to send more serial data. Changing this setting accomplishes both of these things.&lt;br /&gt;&lt;br /&gt;You now have 2 options to define when TCP packets are moved:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;em&gt;"Send when data is present on the serial line"&lt;/em&gt; allows you to define an end-of-message pattern such as a carriage-return (\r or \r\n, etc).&lt;/li&gt;&lt;li&gt;&lt;em&gt;"Send after the following number of idle milliseconds"&lt;/em&gt; allows you to define an idle or quiet time to wait before sending data. This second option is generally safest and I find a value of 10 or 25 milliseconds to be ideal with most automated devices.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Note: do NOT change the setting in the "&lt;em&gt;Send after the following number of bytes"&lt;/em&gt; field! This is rarely useful and it does NOT mean (when unchecked) that the Digi Device Server must see 1024 bytes before it sends anything. I have had too many users change this to 1 and then wonder why they have a huge amount of network traffic!&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-116380545798335422?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/116380545798335422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=116380545798335422' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116380545798335422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116380545798335422'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/11/tcpip-encapsulation-limited-by.html' title='TCP/IP Encapsulation Limited by Distance?'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-116317766368549125</id><published>2006-11-10T08:31:00.000-08:00</published><updated>2006-11-10T14:53:52.840-08:00</updated><title type='text'>Application Pitfalls: Serial DF1 over WAN</title><content type='html'>Digi's wireless group was asking me why AB/DF1 didn't always work over radio when per the specification, DF1 has a nice end-of-message pattern.  One would think moving serial DF1 through radio or cellular-IP would be natural and painless.&lt;br /&gt;&lt;br /&gt;However, the problem I see watching Windows applications use the serial API (via the PortMon utility) is that they ASSUME a small delay or gap between the (DLE)(ACK) bytes and the response from the slave.&lt;br /&gt;&lt;br /&gt;So the application uses the &lt;span style="font-weight: bold; font-style: italic;"&gt;incorrect algorithm&lt;/span&gt;:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Read 2 Bytes&lt;/li&gt;&lt;li&gt;Ask Windows to notify application when more data comes&lt;/li&gt;&lt;li&gt;Loop, reading buffered data and waiting until full response seen&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;The problem with this algorithm is it assumes the response will NOT have been received by the time the application sees the 2 byte (DLE)(ACK).   Because we're dealing with radio or IP system that make effort to packetize data there is a high probability that the (DLE)(ACK) and the slave response arrived at the same time within the same packet without any noticable gap.  Therefore, Windows &lt;span style="font-weight: bold; font-style: italic;"&gt;NEVER &lt;/span&gt;notifies the application of that more data has arrived ... because no more ever comes!  The full response has already been received and buffered.  The application makes the false assumption that measurable time will occur between step #1 and the start of loop #3.&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-weight: bold; font-style: italic;"&gt;correct algorithm&lt;/span&gt; would be:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Read 2 Bytes&lt;/li&gt;&lt;li&gt;Loop, reading buffered data and waiting until full response seen   &lt;/li&gt;&lt;/ol&gt; This works because it handles both the situation of no response, a response already received and fully buffered, and a response trickling in over time.&lt;br /&gt;&lt;br /&gt;See Also:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Download the Rockwell Allen-Bradley DF1 specification: this used to be open to download as a PDF ... it is still free but now you need to log into http://www.ab.com/ and find &lt;span style="color: black; background-color: rgb(219, 221, 186); font-style: italic; font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;"DF1 Protocol and Command Set Reference Manual - Publication 1770-6.5.16"&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Download PortMon &lt;a title="http://www.microsoft.com/technet/sysinternals/utilities/PortMon.mspx" href="http://www.microsoft.com/technet/sysinternals/utilities/PortMon.mspx"&gt;http://www.microsoft.com/technet/sysinternals/utilities/PortMon.mspx&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-116317766368549125?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/116317766368549125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=116317766368549125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116317766368549125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116317766368549125'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/11/application-pitfalls-serial-df1-over.html' title='Application Pitfalls: Serial DF1 over WAN'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-116308227867152086</id><published>2006-11-09T06:15:00.000-08:00</published><updated>2006-12-15T08:37:30.751-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WAN'/><category scheme='http://www.blogger.com/atom/ns#' term='WiFi'/><title type='text'>City-wide WiFi - it's not Ethernet</title><content type='html'>One of my customers is struggling to IP-enable a few dozen Ethernet PLC via one of these new fangled &lt;span style="FONT-STYLE: italic"&gt;city-wide WiFi systems&lt;/span&gt; that are all the rage now. Looked good on paper, but they can only keep the PLCs online for about 20 minutes at a time.&lt;br /&gt;&lt;br /&gt;Why? Is the WiFi system defective? Of course not ... it is just behaving more like &lt;span style="FONT-WEIGHT: bold; FONT-STYLE: italic"&gt;Wide-Area-Network&lt;/span&gt; than Local-Area-Network. I am not directly involved in this, but I'd wager the problem is neither the WiFi nor the PLC. The problem is the host software making Ethenet LAN assumptions about the system. I should offer to go out and do some latency tests; I'd wager the system has high and variable latency more like satellite or cellular.&lt;br /&gt;&lt;br /&gt;So industrial control application developers beware, migrating your Ethernet-enabled, LAN-friendly applications to be true IP-enabled, WAN-friendly applications will become more important every time another city annouces the installation of a city-wide wireless infrastructure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-116308227867152086?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/116308227867152086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=116308227867152086' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116308227867152086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116308227867152086'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/11/city-wide-wifi-its-not-ethernet.html' title='City-wide WiFi - it&apos;s not Ethernet'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-116285403496356567</id><published>2006-11-06T14:54:00.000-08:00</published><updated>2006-11-06T15:20:36.120-08:00</updated><title type='text'>Cellular-IP Friendly Apps - Retrying Socket Opens</title><content type='html'>Most industrial applications allow the user to set a slow poll rate – such as one poll per 5 minutes.  This allows a user to budget a cell plan at 5MB per month and be quite assured of not going over.  Unfortunately, &lt;span style="font-weight: bold; font-style: italic;"&gt;this steady-state poll rate is unrelated to initial TCP/IP socket connection opens!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If the remote device is powered down or the TCP socket open fails for any reason, most applications will attempt to reopen the TCP socket continuously.  On Ethernet this may make sense; the more frequently the open is retried, the sooner the failed connection will recover.  Most Ethernet-based applications will retry opening a TCP socket every 5 to 30 seconds forever.  However, for cellular &lt;span style="font-weight: bold; font-style: italic;"&gt;you are paying for all traffic entering the cellular system&lt;/span&gt;.  It is not Cingular or Sprint or Verizon's fault your remote device is off-line.  You will be billed for each and every TCP retry.  I have literally seen applications create up to 1000 MB of traffic each day attempting to reopen a TCP socket to an unreachable remote IP.  On a 5 MB per month plan, this 1GB of overage could &lt;span style="font-weight: bold; font-style: italic;"&gt;easily cost you $1000 or more&lt;/span&gt; for the month!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Recommendation&lt;/span&gt;: all applications must include a user-settable option to delay attempts to reopen TCP sockets.  This value can default to no-delay, but users must be able to set a delay of at least 1 hour between retries.    This enables the user to define and stay within their data usage budget regardless of success or failure of the TCP connection.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Impact&lt;/span&gt;: On Ethernet this should have no direct consequences since the recommended default is no delay.  Cellular users must adjust this retry delay to match their data traffic expectations and their cell plan budget.&lt;br /&gt;&lt;br /&gt;For example, an application polling 10 Modbus registers per 5 minutes via TCP/IP creates about 198 bytes per poll.  This works out to 2376 bytes per hour or a little under 2 MB per month.   This is a very safe poll rate when paying for a 5 MB per month plan.&lt;br /&gt;&lt;br /&gt;Therefore the desired TCP reconnect scenario should also create no more than 2400 bytes per hour.  Consider that a 20-second timeout under Windows creates at least 120 bytes of traffic to an off-line remote.  Windows sends a 40-byte [SYN] packet and retries the same 40-byte [SYN] in roughly 3 and then 8 seconds from the previous [SYN] packet.  Increasing the timeout to 30 or more seconds creates a fourth 40-byte [SYN] packet sent about 18 seconds after the third.  So forcing an application to only attempt one connection per 5 minutes will create from 1440 to 1920 bytes of traffic per hour.  This will not break our budgeted cell plan.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-116285403496356567?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/116285403496356567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=116285403496356567' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116285403496356567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116285403496356567'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/11/cellular-ip-friendly-apps-retrying.html' title='Cellular-IP Friendly Apps - Retrying Socket Opens'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-116230767695390205</id><published>2006-10-31T07:01:00.000-08:00</published><updated>2006-10-31T07:44:17.720-08:00</updated><title type='text'>Modbus Bid Spec Suggestions</title><content type='html'>A large customer asked me for advice on bid-specing the use of Modbus/TCP. They are expecting HVAC and other non-production systems to provide "gateways" with Modbus/TCP to simplify central HMI and data collection. Experienced field people know this is not quite as easy as it sounds.&lt;br /&gt;&lt;br /&gt;So I stepped back and put myself in their shoes - if I were trying to design a new assembly plant and I hoped to monitor HVAC, chemical tank farm, and such by Modbus/TCP, then what issues would hinder this? What details &lt;strong&gt;NOT&lt;/strong&gt; included in the &lt;a href="http://www.modbus-ida.org/"&gt;http://www.modbus-ida.org/&lt;/a&gt; protocol specification would complicate true interoperability? I have many experiences of integration problems with Modbus masters and slaves from 2 different vendors not quite talking as expected. Usually the customer ends up &lt;strong&gt;&lt;em&gt;PAYING&lt;/em&gt;&lt;/strong&gt; one vendor or the other to change; or the customer has to buy a 3rd party box to fix the difference of opinion.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;So how to avoid this up front? Here is the list I created: &lt;/p&gt;&lt;ol&gt;&lt;li&gt;The required interface is Modbus/TCP running on standard Ethernet II frames and following the published specification at &lt;a href="http://www.modbus-ida.org/"&gt;http://www.modbus-ida.org/&lt;/a&gt;. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;All devices must support at least 100M half-duplex Ethernet and if auto-negotiate is supported, they must be manually configurable to force 100M Half-Duplex.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If the supplied product uses serial Modbus/RTU or Modbus/ASCII, then vendor must supply a configured, tested, and powered Modbus Ethernet-to-Serial bridge (such as the Digi One IA, model 70001862) to bridge this to Modbus/TCP on Ethernet. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;All data must be available and/or mirrored within the Modbus 4x or "Holding Register" memory area. The other areas can be optionally supported, but all 0x, 1x, and 3x data must be readable in the 4x memory area. For digital writes, support of single-bit writes (function 5) to the 0x area are acceptable. Products that require access to the 1x and 3x area to operate are not acceptable; access to 1x/3x area must be optional. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Modbus 32-bit longs and floating points must be available in &lt;em&gt;Modicon 984 Compatibility&lt;/em&gt; format, which means as two consecutive 16-bit big-endian registers, with the low word in the first register. Other forms (Daniels/Enron or high-word first) can exist but must be optional.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;All gateways or converters bridging non-Modbus data to Modbus must not provide stale data and must not require special "status registers" be monitored to confirm data validity. If the source device of the non-Modbus data is unavailable or the data is out-of-date, then Modbus/TCP requests must return an exception such as 0x0B until the source data is valid again. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Register 4x00001 must exist and be readable to allow simple, predictable "comm tests". &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Software tools must function properly with slaves only supporting Modbus functions 3 and 16. Requiring diagnostic function 8 support is not acceptable.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Software tools must be configurable to write a single register as either function 6 or 16.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Software tools must be configurable to limit reads and write to user selectable limits; for example, the software must accept being limited to reading 1 register per transaction and writing 1 register per transaction. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Software tools must allow setting to the Modbus/TCP "Unit Id" to a value other than zero. This is required for Ethernet-to-Serial bridging.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Software tools must use the Modbus/TCP sequence number and modify it between polls. The tool must not leave it set as 0 or 1 all the time.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;To support future wide-area-network usage, all "Masters" must permit TCP socket opens to take up to 30 seconds.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;To support future wide-area-network usage, all "Masters" must permit slave timeouts be set to at least 30 seconds.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;To support future wide-area-network usage, all serial slave devices must have a configurable "gap" or intercharecter delay timeout. The Modbus spec's "3.5 character times" is problematic when dealing with radio &amp; other error-correcting media. &lt;/li&gt;&lt;br /&gt;&lt;li&gt;All devices must be capable of transport via wireless bridging by common Ethernet radio systems such as 802.11 bridges and more traditional 900Mhz line-of-sight bridges.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Now, will all vendors be able to meet all of these requirements?  Probably not since many of them are not required per the Modbus-IDA specifications.  However, at least this brings the issues up front to be addressed during the bid award phase.  If custom firmware modifications are required, it can be addressed up front and not during factory acceptance testing.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-116230767695390205?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/116230767695390205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=116230767695390205' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116230767695390205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116230767695390205'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/10/modbus-bid-spec-suggestions.html' title='Modbus Bid Spec Suggestions'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-116161684833205300</id><published>2006-10-23T08:20:00.000-07:00</published><updated>2006-10-23T09:03:22.016-07:00</updated><title type='text'>Cellular-IP Friendly Apps - Socket Open</title><content type='html'>Most applications attempt to open a TCP socket using the OS/Windows default timeout. This results in an unpredictable timeout. I looked through Microsoft's VS.NET documentation looking for the "How long?" answer ... and never found an answer. I suspect it depends on your version and service-pack levels. I did a web search to discover the truth and found people claiming Windows timed out in 2 seconds, 5 seconds, 10 seconds, 20 seconds, 20-30 seconds, and even one claiming 5 minutes. Sadly, most of these people were looking for a way to force Windows to use a connection timeout of 1 second or less - which will prevent their applications from working on normal wide-area networks.&lt;br /&gt;&lt;br /&gt;Such short connection attempts are not suitable for cellular network where the first response packet from an idle remote tends to complete in 3-4 seconds during average conditions. Therefore even a 5 second timeout is too close to the norm to be suitable.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;: all applications must use an explicit, predictable timeout during a TCP socket open request. This value can be user-settable higher or lower, but for cellular should default to 20 seconds and be settable to at least 60 seconds for satellite.&lt;br /&gt;&lt;br /&gt;&lt;a name="OLE_LINK2"&gt;&lt;/a&gt;&lt;a name="OLE_LINK1"&gt;&lt;strong&gt;Impact&lt;/strong&gt;: On Ethernet this should have limited direct consequences since the timeout only has affect if the remote is not available. If having your application wait 20 seconds for an inaccessable remote is a problem, then &lt;/a&gt;enable a user setting to select either "local-area-network" or "wide-area-network" mode and adjust the default connection timeout as appropriate.&lt;br /&gt;&lt;br /&gt;In a best case scenario, failing to wait long enough to open a TCP socket when the network is sluggish could prevent connecting for many minutes as sockets &lt;em&gt;succeed&lt;/em&gt; to open, but the OS aborts the open before the successful response can come back from the remote. Keep in mind that over cellular the end user is paying for at least 120 bytes of data for every open attempt, and that TCP retransmissions likely make this 160 or 200 bytes.&lt;br /&gt;&lt;br /&gt;In a worst case scenario, this aborting of opened sockets on a remote with limited resources risks tying up all resources with past failed opens. Remember, just because your OS timed out the open &lt;em&gt;does not mean&lt;/em&gt; the remote device didn't allocate the connection resource and send a successful response. The lack of resources blocks new attempts by the application to reconnect until TCP keepalive or some other mechanism detects the broken sockets and frees up the resources.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Be warned that under cellular - as if in defiance of traditional faith in the reliability of the TCP state machine - TCP sockets break in rare occasions in ways that common OS will fail to detect!&lt;/em&gt; During cellular network hiccups, I have seen machines "hang" for 11 hours waiting for a TCP Acknowledgement that never comes!  This is with TCP Keepalive enabled for 5 minutes even.&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;Some Visual Studio discussion&lt;/strong&gt;: Just out of curiosity, I did some snooping around inside the Visual Studio .NET documentation. I didn't find a good answer, so cannot explain how to solve this problem.&lt;br /&gt;&lt;br /&gt;Here is example VB.NET code to opean a TCP socket:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Dim tcpClient As New TcpClient &lt;/li&gt;&lt;li&gt;Dim ipAddress As IPAddress = dns.GetHostEntry("www.digi.com").AddressList(0) &lt;/li&gt;&lt;li&gt;TcpClient.Connect(ipAddress, 11003)&lt;/li&gt;&lt;/ul&gt;Notice we cannot ask the OS to wait "longer" or "shorter". The documentation says "&lt;em&gt;The &lt;/em&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.net.sockets.tcpclient.connect.aspx"&gt;&lt;em&gt;Connect&lt;/em&gt;&lt;/a&gt;&lt;em&gt; method will block until it either connects or fails.&lt;/em&gt;" A connection timeout results in a SocketException failure being thrown. The TcpClient class has ReceiveTimeout and SendTimeout properties, but these only relate to reads and writes on the connection and have no impact on the initial connection open.  Suggestions to use the System.Net.Sockets.Socket class instead aren't helpful since this class also doesn't offer a simple connection timeout mechanism.&lt;br /&gt;&lt;br /&gt;The only wait to define a predictable TCP socket connection timeout appears to be use an asynchronous design with BeginConnect and some form of external timer to call EndConnect at the desired timeout.&lt;br /&gt;&lt;br /&gt;To rephrase myself, I am not saying the default Windows connection timeout is incorrect - I am saying evidence is that &lt;strong&gt;&lt;em&gt;you cannot predict what timeout your customer will see if you don't explicitly define one&lt;/em&gt;&lt;/strong&gt;. So while your application running on your computer may default to a nice 20 seconds timeout, what happens if your customer runs the same application on an older computer and sees a 3 second or 5 second timeout? The answer is they won't be able to reliably connect to cellular or satellite remote IPs, and either won't buy your product again or will call Tech Support.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-116161684833205300?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/116161684833205300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=116161684833205300' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116161684833205300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116161684833205300'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/10/cellular-ip-friendly-apps-socket-open.html' title='Cellular-IP Friendly Apps - Socket Open'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-116135329235915179</id><published>2006-10-20T06:58:00.000-07:00</published><updated>2006-10-23T07:36:14.156-07:00</updated><title type='text'>Cellular-IP Friendly Applications - Intro</title><content type='html'>In theory, host applications using TCP/IP on Ethernet should work over wide-area networks which support TCP/IP. Unfortunately, most host applications are written and tested for &lt;strong&gt;Ethernet&lt;/strong&gt;, not generic IP. When you move into cellular IP or satellite, the high and variable latency introduced causes many host applications to either fail or generate an order of magnitute more traffic than than they should.&lt;br /&gt;&lt;br /&gt;For example, here is a chart of 1000 Modbus/RTU polls over cellular TCP/IP. There is a random delay between polls of 30 seconds to 30 minutes. The patterns are rather striking: most polls complete in between 1 to 2 seconds, but there is clearly some systematic "aliasing" causing responses to complete in 2.8, 3.8, and 10.8 seconds.&lt;br /&gt;&lt;a href="http://photos1.blogger.com/blogger/765/3920/1600/temp_mb_times.jpg"&gt;&lt;br /&gt;&lt;img alt="chart showing Modbus times" src="http://photos1.blogger.com/blogger/765/3920/320/temp_mb_times.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After years of troubleshooting customers systems, I have been creating a running document and commentary on &lt;em&gt;Bad things host apps do&lt;/em&gt;. I will be publishing these things over time in this blog. But to summarize:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The default OS timeout on opening TCP Sockets may be too short.&lt;/li&gt;&lt;li&gt;Attempting to open TCP sockets to unresponsive remotes must be a controlled process, since retries cost money.&lt;/li&gt;&lt;li&gt;Since all packets and retries cost money, all aspects of the implemented protocol must be controlled and adjustable.&lt;/li&gt;&lt;li&gt;OS stack calls may not return if the OS fails to detect a response or socket failure.&lt;/li&gt;&lt;li&gt;Responses from the remote could take 15 to 60 seconds.&lt;/li&gt;&lt;li&gt;TCP segment fragmentation and reassembly is exaggerated; can have many seconds of delay between fragments.&lt;/li&gt;&lt;li&gt;TCP sockets idle longer than 5 minutes often go away without error or detection.&lt;/li&gt;&lt;li&gt;Every byte your application sends (or resends) costs your customer money.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-116135329235915179?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/116135329235915179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=116135329235915179' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116135329235915179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116135329235915179'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/10/cellular-ip-friendly-applications.html' title='Cellular-IP Friendly Applications - Intro'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-116066391826591935</id><published>2006-10-12T07:36:00.000-07:00</published><updated>2006-12-07T05:23:02.603-08:00</updated><title type='text'>Siemens PLC via Cellular</title><content type='html'>We succeeded in getting a Siemens S7-226 with CP243 and PPI serial up on the &lt;a href="http://www.digi.com/products/cellulargateways/digiconnectwanfamily.jsp"&gt;Digi Connect WAN&lt;/a&gt;, which is a cellular router for GSM or CDMA with local Ethernet and serial port.&lt;br /&gt;&lt;br /&gt;In Summary:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;To talk to &lt;strong&gt;&lt;em&gt;S7-226 by serial PPI&lt;/em&gt;&lt;/strong&gt;, you need a newer Siemens PC-to-PPI cable - the older one doesn't work. I am not sure why, but that is what we found. Using &lt;a href="http://www.digi.com/pdf/fs_realport.pdf"&gt;Digi RealPort&lt;/a&gt; we enabled a redirected COM port to the remote Digi Connect WAN's serial port, which is connected to the PPI port of the S7-200. We then defined a radio modem port within MicroWin using that COM port. Although a 30 second timeout would be ideal, MicroWin only gives options for 1, 10 or 100 seconds of timeout. You should probably select the 100 seconds to minimize your comm costs. Now MicroWin or Step7 can freely connect to and reprogram the S7-200. The high end-to-end latency of the cellular IP networks makes the performance pretty sluggish when compared to direct serial, but it works.&lt;/li&gt;&lt;li&gt;To talk to &lt;strong&gt;&lt;em&gt;S7-315 by serial MPI&lt;/em&gt;&lt;/strong&gt;, you need the special Siemens PC-to-MPI cable. Just as with the S7-200, we set up a redirected &lt;a href="http://www.digi.com/pdf/fs_realport.pdf"&gt;Digi RealPort&lt;/a&gt;, however we did NOT need to fool Step7 into thinking this was a radio modem.  It just worked fine as is when given longer timeout settings.&lt;/li&gt;&lt;li&gt;To talk to &lt;strong&gt;&lt;em&gt;CP243 by S7 protocol over ISODE on Ethernet&lt;/em&gt;&lt;/strong&gt;, we enabled TCP port forwarding of port 102 on the &lt;a href="http://www.digi.com/products/cellulargateways/digiconnectwanfamily.jsp"&gt;Digi Connect WAN&lt;/a&gt; to the CP243 module.  The CP243 is configured to treat the &lt;a href="http://www.digi.com/products/cellulargateways/digiconnectwanfamily.jsp"&gt;Digi Connect WAN&lt;/a&gt; as its Gateway IP.  This also worked fine as is when given longer timeout settings.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-116066391826591935?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/116066391826591935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=116066391826591935' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116066391826591935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116066391826591935'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/10/siemens-plc-via-cellular.html' title='Siemens PLC via Cellular'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-116040239155027281</id><published>2006-10-09T06:54:00.000-07:00</published><updated>2008-12-09T13:25:30.029-08:00</updated><title type='text'>Using Python to query Modbus slaves</title><content type='html'>I use Python ( &lt;a href="http://www.python.org/"&gt;http://www.python.org/&lt;/a&gt; ) at lot in my testing. It is a language designed to make a programmer's life easy and the computer sweat - in other words, it is an ideal tool for test scripts and maybe a bad tool for "constant use" tools.&lt;br /&gt;&lt;br /&gt;Stock python has no serial support. For serial, you'll need some serial tool like pyserial - this hides details of OS and allows Linux (or Windows) style serial calls on either OS. A web search of pyserial will turn up a download site - such as &lt;a href="http://pyserial.sourceforge.net/"&gt;http://pyserial.sourceforge.net/&lt;/a&gt; . The "Vaults of parnassus" is another nice source for Python tools including pyserial. &lt;a href="http://py.vaults.ca/~x/parnassus/apyllo.py/"&gt;http://py.vaults.ca/~x/parnassus/apyllo.py/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Creating binary messages is not hard in Python, but a bit ugly. You use lots of "chr(x)" function to build up a binary string and to parse a binary response lots of "ord()". Other than that, look at the spec at &lt;a href="http://www.blogger.com/www.modus-ida.org"&gt;http://www.blogger.com/www.modus-ida.org&lt;/a&gt; for details of the actual protocol.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;CRC-16 for Modbus (or DF1):&lt;/span&gt;&lt;br /&gt;Here is my CRC16 routine including a few test cases (written with no regard for CPU speed, since that is not why one uses Python).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.iatips.com/crc16.zip"&gt;crc16.py as a ZIP file&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-116040239155027281?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/116040239155027281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=116040239155027281' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116040239155027281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116040239155027281'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/10/using-python-to-query-modbus-slaves.html' title='Using Python to query Modbus slaves'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-116017180331873162</id><published>2006-10-06T14:00:00.000-07:00</published><updated>2006-10-06T15:45:03.543-07:00</updated><title type='text'>Better not try to use "unlimited data"</title><content type='html'>When a potential customer starts talking to me about cellular data access to their telemetry devices, I start the discussion with the basic monthly costs of cellular data. Business cellular plans make you pay for what you use; every byte you send potentially costs you many. Of course, the natural reaction from potential customers is "&lt;em&gt;Oh, that's no problem ... I'll just sign up for one of those '&lt;strong&gt;unlimited&lt;/strong&gt; &lt;strong&gt;plans&lt;/strong&gt;' I see advertised all the time&lt;/em&gt;". When I point out these plans are available only for consumers, the natural reaction is to say "&lt;em&gt;Oh, I just won't tell them this is for business ...&lt;/em&gt;"&lt;br /&gt;&lt;br /&gt;I'll put on hold a moment the debate of &lt;strong&gt;"do unlimited data plans really exist?" &lt;/strong&gt;and get back to cellular data access to telemetry devices. Today (and perhaps forever) cellular data access only makes sense if you have your data access well defined and under-control. If you poll X words of data every Y minutes, you will be able to select a monthly data plan that fits within a planned budget. If you connect to remote equipment for limited diagnostic maintenance and you understand that the cellular overage charges could cost you X dollars per hour, you will be able to manage your monthly bills. However, if you approach cellular data access to telemetry devices by saying you need to poll as much data as fast as you can, then this is NOT the correct technology for you. You are better to look at the various long-range Ethernet line-of-sight radios.&lt;br /&gt;&lt;br /&gt;So back to the question of "do unlimited data plans really exist?" Hmm, unlimited - sounds nice, doesn't it. Yet an Internet search for "+&lt;strong&gt;unlimited +internet +cancelled&lt;/strong&gt;" shows a growing collection of frustrated people with DSL or cable broadband, wireless PDAs, voice-over-ip (VoIP), and cellular plans who have had their "unlimited services" cancelled because they (ta-da) moved too much data. &lt;strong&gt;It seems unlimited doesn't really mean unlimited.&lt;/strong&gt; I could provide links to such information, but the sites tends to be full of wild ranting language, plus I don't want to single out just a few companies. Do the search above and you'll find examples for any type of service you desire.&lt;br /&gt;&lt;br /&gt;While I can empathize with the ranters who've found out that unlimited just means "without a predefined limit", as a network professional I understand the basis for these service cancellations. It would be nice if the marketing hype-sters could be honest enough to stop using the term "unlimited", but then no user would sign up for an honest broadband service stupid enough to define limits when competitors are shouting about "unlimited plans".&lt;br /&gt;&lt;br /&gt;All IP-based broadband systems consist of a series of hops or links, each with a predefined maximum data throughput. All commercial broadband services try to handle as many customers as they can sign up. Therefore the performance a user sees is merely a function of how many other users are active at that instant, how much data they are trying to push through at that instant, and what is the limiting throughput of the system bottlenecks. As a business person seeking to make money, would you prefer to keep 100 users paying $80 monthly to each move 100MB of data per month (10,000MB/month), or prefer to keep the one user paying $80 monthly to move 10GB (10,000MB) of data per month? While this is an extreme example, as soon as a few of the 100MB/month users complain to the broadband service about their &lt;strong&gt;high-speed internet seeming pretty slow speed&lt;/strong&gt;, the solution is obvious to the business-minded. Canceling the "unlimited service" of the one user moving 10,000MB/month will effectively double the performance of the other 100 users with no added expenses and a mere loss of $80 per month of income. Failing to cancel the "unlimited service" of the one heavy user risks causing 10 or 20 of the other 100 light users to change services with a potential monthly income loss of hundreds or even thousands of dollars. I am not saying this is honest to cancel "unlimited service" based on high usage. I am just saying it is understandable and makes business sense.&lt;br /&gt;&lt;br /&gt;How is this cancellation legal? Easy - just read the huge terms of service contract you agree to when you sign up for unlimited data service. To generalize some typical clauses in an unlimited cellular service plan:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;You agree to only use it for internet web browsing and email checking&lt;/li&gt;&lt;li&gt;You agree to not download or upload files&lt;/li&gt;&lt;li&gt;You agree to not use streaming media or peer-to-peer file sharing&lt;/li&gt;&lt;li&gt;You agree to not run any application servers or data services&lt;/li&gt;&lt;li&gt;You agree to not use the service as a replacement for a wired data circuit&lt;/li&gt;&lt;li&gt;You agree to not use the service as a backup for a wired data circuit&lt;/li&gt;&lt;li&gt;You agree that the service provider can cancel the service without notice if your usage impacts the operation of the service or other users of the service&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In other words, you agree to use the cellular data service as a typical consumer with a notebook PC or PDA who spends at most an hour or two daily accessing the internet. I hope by now you can see how difficult it will be to fool any cellular service provider for long that your telemetry data system was just a normal consumer. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-116017180331873162?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/116017180331873162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=116017180331873162' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116017180331873162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/116017180331873162'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/10/better-not-try-to-use-unlimited-data.html' title='Better not try to use &quot;unlimited data&quot;'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-115956033842734016</id><published>2006-09-29T11:59:00.000-07:00</published><updated>2006-10-06T14:00:25.913-07:00</updated><title type='text'>Cellular data - like a DSL or Cable Modem, but ...</title><content type='html'>Most potential users assume cellular data modems are just a newer form of the old Hayes AT-style analog dial-up modems - you know, your old ATDT {phone-number} interface. While there are a few old, rapidly obsoleting standards which work like this, all modern cellular data systems are IP-based. They operate much like your home Cable or DSL modem. Your cellular data modem links and authenticates to your ISP (or "carrier") and is assigned an IP address - just like your home Cable/DSL modem. There are no phone numbers to dial; your modem is "connected" as long as it is powered up. Your charges relate only to IP packets moved &lt;em&gt;without&lt;/em&gt; any concept of minutes connected.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;But ... &lt;/span&gt;marketing hype-aside, current and near-term cellular systems are NOT broadband as you or I would use that term. Ever used a cell phone and had a call drop? A voice garbled beyond recognition? No signal now even when you had one an instant ago? The same variability applies to cellular data networks. Cell towers do their best to share the air waves with all users; thus the speed and latency in your data movement is deeply impacted by both location and what other cellular users are doing.&lt;br /&gt;&lt;br /&gt;In &lt;em&gt;my world&lt;/em&gt; it is even worse ... this meaning people who use IP networks primarily for telemetry or data collection with small, cyclic polls for data. While you'd think this would be a natural fit for cellular data networks, it turns out to be fairly abnormal when viewed in the context of how the standards have been evolving. Every new advance in cellular data networks is aimed at pumping up throughput for web browsing, email exchange, or image/music downloads. New advances are aimed at your average human user with a PDA, notebook computer, or iPod; users who pay lots of cash per month for a single account with little concern for Return-On-Investment (ROI). Parents of teenagers know this best - what is the ROI of the $50 to $200 monthly the average "wired" teenager seems to spend? My youngest daughter spent an amazing three years during high school working part-time at a noisy place with video games and a big dancing mouse to pay for her cell phone usage.&lt;br /&gt;&lt;br /&gt;In old-fashioned network terms, these are &lt;strong&gt;connection-oriented&lt;/strong&gt; paradigms where larger latency &amp; overhead is invested to initiate the &lt;em&gt;connection&lt;/em&gt; as a tradeoff to having less cost to move each fragment of a large amount of data. Without going into too much detail, understand that traditional digital cellular voice calls can be viewed as small streaming media sessions. Each cell phone negotiates a strict series of repeated tiny time-periods during which it can send the next small digitized and compressed portion of your conversation. You can visualize this as an impossible juggling act where a few dozen assistants arranged in a star around an old juggling pro set up a rhythm and tempo that passes their pins in and out without a hiccup. Each pin must be launched at the exact correct instant to find an empty hand waiting on the other side. (Note that CDMA uses a different paradigm than these GSM "slots", but the need to share a limited resource is the same.)&lt;br /&gt;&lt;br /&gt;The 2G/2.5G cellular data networks (slightly past state-of-the-art) functioned by just mimicking a voice call but substituting small chunks of pure data for the compressed slices of voice. Later advances to these standards allowed the tower and data modems to negotiate more or fewer of the &lt;em&gt;tiny time-periods&lt;/em&gt; per second to better match the actual data throughput. Thus your perceived data network throughput can grow or shrink as the tower as fewer or more voice calls to handle. But breaking data up into a whole series of contiguous tiny time periods separated by overhead is very inefficient. So a key evolution in the latest standards is the ability of the tower to in effect negotiate consolidating a block of contiguous tiny time periods into fewer, longer time period.&lt;br /&gt;&lt;br /&gt;Ok, enough over-simplified details - back to why telemetry data is abnormal in this world of "Cellular Broadband". Lets say every 15 minutes I send a Modbus/RTU poll that consists of 8 bytes of data into my 400kbps to 3mbps "Broadband" connection ... well, I'll get my blazingly fast 100 bytes response back in from 2 to 5 seconds. Hmm, sounds a lot like the performance of an old 600bps (600 baud) radio modem! So cellular data networks have fairly large latency when small infrequent amounts of data are moved. This goes back to the "juggler" paradigm I mentioned before. If your cellular device has no data to send after some number of seconds, the cell tower asks it to "stop juggling" - your device gives back its allocated tiny time-period(s) to be reused by other voice or data devices. After all, there are just so many of these periods to be shared by all users. So the process of the tower and data modem reallocating these tiny time-period(s) is the primary source of this large, variable latency.&lt;br /&gt;&lt;br /&gt;Web browsers won't notice this latency since once the web page request is sent up, the page content just flows rapidly down in multiple TCP/IP streams without the explicit poll/response behavior of a telemetry session. Since the data exchange between the tower and cell modem is active and heavy, the tower does its best to bump up and allocate as much bandwidth to the cell modem as it can spare. This is where the elusive "Broadband" performance is able to peek out.&lt;br /&gt;&lt;br /&gt;Today, your data modem needs to send data at least every 40 seconds to avoid this latency, but with 3G this will drop to every 3 seconds - which would be cost prohibitive. You say &lt;strong&gt;&lt;em&gt;just get an unlimited plan&lt;/em&gt;&lt;/strong&gt;? Sorry, no such thing, but that will be my next blog entry.&lt;br /&gt;&lt;br /&gt;Want more details?  See Also:&lt;br /&gt;&lt;a href="http://www.gsmworld.com/index.shtml"&gt;http://www.gsmworld.com/index.shtml&lt;/a&gt;&lt;br /&gt;&lt;a href="http://electronics.howstuffworks.com/cell-phone.htm/printable"&gt;http://electronics.howstuffworks.com/cell-phone.htm/printable&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-115956033842734016?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/115956033842734016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=115956033842734016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/115956033842734016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/115956033842734016'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/09/cellular-data-like-dsl-or-cable-modem.html' title='Cellular data - like a DSL or Cable Modem, but ...'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-35259639.post-115955598236316980</id><published>2006-09-29T11:46:00.000-07:00</published><updated>2006-09-29T11:58:46.176-07:00</updated><title type='text'>Introduction</title><content type='html'>&lt;span style="font-family:verdana;"&gt;Hello and welcome to my blog. I am scheduled to update this at least weekly, although at times I may be more prolific.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;I have worked in pushing industrial protocols through Ethernet and IP for nearly 2 decades. This means using TCP/IP or UDP/IP to communicate between devices on a local or even world-wide scale. At present my job involves use of cellular networks, so most of the blog will focus on "adventures" in fooling poorly-written Ethernet applications to talk to a remote IP address.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Topics to cover:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:verdana;"&gt;How to write cellular/satellite friendly host applications&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;"&gt;How to work around poorly written host applications&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:verdana;"&gt;Over time I'll slowly discuss various common industrial protocols and how well they do or don't work to remote IP addresses.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/35259639-115955598236316980?l=iatip.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://iatip.blogspot.com/feeds/115955598236316980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=35259639&amp;postID=115955598236316980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/115955598236316980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35259639/posts/default/115955598236316980'/><link rel='alternate' type='text/html' href='http://iatip.blogspot.com/2006/09/introduction.html' title='Introduction'/><author><name>Lynn August Linse</name><uri>http://www.blogger.com/profile/01534730541144544922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://iatips.com/blogimage/Lynn_Linse_30per.jpg'/></author><thr:total>0</thr:total></entry></feed>
