<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Zigbee - Connectports - All works]]></title><description><![CDATA[<p dir="auto">Hi Guys,</p>
<p dir="auto">I have been experimenting with Connecting Arduino to SCADA systems vis Xbee for the past year and would like to pass on some info.</p>
<p dir="auto">I have just finished installing and setting up MANGO, and have the following up and working:</p>
<p dir="auto">Arduino with 6 Analog inputs, 6 Digital inputs, 4 Digital outputs and 2 Analog outputs.<br />
Connected to a DFRobot IO Expansion shield V5 with a Digi Xbee Series 2 Radio.</p>
<p dir="auto">This communicates AS a slave with Modbus RTU, however, this is where it gets better...<br />
I then use my Digi Connectport X4 Gateway's Industrial Automation(IA) capabilities to convert this to Modbus TCP.<br />
The X4 has a built in Xbee S2 and Ethernet.<br />
Then, the Mango data source simply points to the IP address of the X4 Gateway on port 502, Slave ID 1.<br />
This means that I can can connect to this data from anywhere and not limited to a serial connection.</p>
<p dir="auto">And it gets better even still...<br />
I can set up lots of these Arduino nodes. I just set a new slave ID in the Arduino code, say 2, set a new table entry in the X4<br />
with a new port, say 503, then direct Mango to the X4 address, 503 and Slave 2.</p>
<p dir="auto">Analog sensors I have used include, LM35 temperature, light, voltage divider, Pots, sound, current.<br />
I have a fan hooked up to one of the analog OUTPUTS via a MOSFET that I can set the speed from within Mango.<br />
All this over a Digi Xbee Series 2 Mesh up to 3 kilometres (theory) away!</p>
<p dir="auto">The code Arduino code size is only 6.9K, and I can have as many registers as I want, limited by the speed of the Xbee mesh.<br />
From my understanding, you could also use a Connectport X2, which has just the Xbee radio, and Ethernet, but has firmware<br />
available for flashing that includes Modbus. (Check before purchase, as I do not have one)</p>
<p dir="auto">So lets look at the price:<br />
Arduino/compatible          $25 (DFRobot)<br />
Xbee/expansion shield      $20 (DFRobot)<br />
Xbee Series 2                  $45 (DFRobot)<br />
Connectport X2                $139 (Sparkfun) (X4 $400+)<br />
Mango                             $Free</p>
<p dir="auto">So once you have an X4/2 the node cost is only $90, plus sensors of course.</p>
<p dir="auto">OK so what Arduino libraries you ask???</p>
<p dir="auto"><a href="http://code.google.com/p/arduino-modbus-slave/" rel="nofollow ugc">http://code.google.com/p/arduino-modbus-slave/</a></p>
<p dir="auto">I AM having one problem that hopefully someone can help me with.<br />
I cannot get the Digital outputs to stay on in Mango. After a couple of reads they go off. I have tried just about every setting,<br />
but have come to the conclusion that it is the Arduino code. I also use ADAMView(advantech), and it also turns off the outputs,<br />
but only when you stop the service, not WHILE IT IS RUNNING like Mango.</p>
<p dir="auto">Attached Arduino INO. Get the library from the above link.</p>
<p dir="auto">Enjoy!</p>
<p dir="auto">Attachment: <a href="http://archive.infiniteautomation.com/forum/posts/downloadAttach/184.page" rel="nofollow ugc">download link</a></p>
]]></description><link>https://forum.mango-os.com/topic/1154/zigbee-connectports-all-works</link><generator>RSS for Node</generator><lastBuildDate>Tue, 19 May 2026 22:37:21 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/1154.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 19 Oct 2012 03:46:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zigbee - Connectports - All works on Fri, 22 Mar 2013 05:58:29 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for posting your findings.  Very interesting.  Have you gotten a chance to experiment with Mango Automation yet?  (newer version that has DGLux and modular architecture)  You can have a map overlaid with your zigbee nodes and do some really cool stuff - hover over to bring up a drill down window, etc.</p>
<p dir="auto">I'm interested in talking with you more about this project.  I will message you.</p>
<p dir="auto">Cheers,</p>
]]></description><link>https://forum.mango-os.com/post/7597</link><guid isPermaLink="true">https://forum.mango-os.com/post/7597</guid><dc:creator><![CDATA[stevededrick]]></dc:creator><pubDate>Fri, 22 Mar 2013 05:58:29 GMT</pubDate></item><item><title><![CDATA[Reply to Zigbee - Connectports - All works on Fri, 15 Mar 2013 08:43:16 GMT]]></title><description><![CDATA[<p dir="auto">Just as an update on this post.</p>
<p dir="auto">Although I would recommend setting packetization and character timeouts as above, this was not the underlying problem.</p>
<p dir="auto">zzzz....zzzz....zzzz WAKE UP!!! Can't respond to MODBUS polls when it is asleep!</p>
<p dir="auto">I thought the router or coordinator the bee was attached to would buffer the request and then send it on when it wakes,<br />
but I could not get it to do this. even with short sleep/wake cycles under the poll timeout value.</p>
<p dir="auto">So I made sure all my nodes are running ROUTER firmware, so the do not go to sleep.<br />
You could run end device firmware and set the sleep mode to "Pin Sleep" and then wire<br />
the sleep pin permanently LOW, but using ROUTER firmware allows the radio to participate in the MESH.</p>
]]></description><link>https://forum.mango-os.com/post/7587</link><guid isPermaLink="true">https://forum.mango-os.com/post/7587</guid><dc:creator><![CDATA[aussieMESH]]></dc:creator><pubDate>Fri, 15 Mar 2013 08:43:16 GMT</pubDate></item><item><title><![CDATA[Reply to Zigbee - Connectports - All works on Tue, 23 Oct 2012 17:59:20 GMT]]></title><description><![CDATA[<p dir="auto">The main problem I had initially was timeouts, so I increased to 5 seconds, but probably could go to 10.</p>
<p dir="auto">Also, I have the character timeout in the gateway set at 5 now, but this seems to be a grey area according to my<br />
research. And then there is the Xbee radio paketization timeout, which I have set at 5 also, in the co-ordinator<br />
and the end node radios, another grey area. Have not used a router in between at this stage, but may slow things<br />
down a bit with more hops. The Arduino is sending data via its end node at only 9600! I think by adjusting the arduino<br />
MODBUS slave library to accommodate a higher baud rate would really help.</p>
<p dir="auto">Definitions:</p>
<p dir="auto"><strong>Packetization Timeout</strong><br />
The number of character times of inter-character delay required before transmission. If set to zero, characters are<br />
transmitted as soon as they arrive instead of buffering them into one RF packet.</p>
<p dir="auto"><strong>Character Timeout</strong><br />
Specifies how long to wait for additional message data before discarding a partially received message.</p>
<p dir="auto">I am still learning a lot about Xbee, but it appears now to transport MODBUS very successfully, especially<br />
seeing as it it getting translated from TCP to RTU and vica versa in the gateway. My test node is pulling<br />
4 analog values and sending one digital output every 5 seconds, but is capable of 6AI, 2AO, 6DI and 4DO.<br />
This is all the pins used up on a Arduino UNO. You could also change the combinations if you like.</p>
<p dir="auto">I would be happy to pass on any knowledge I have about this subject.</p>
<p dir="auto">Below is the Mango Data source for the Arduino/Xbee node:</p>
<pre><code> {
         "xid":"DS_101326",
         "type":"MODBUS_IP",
         "alarmLevels":{
            "DATA_SOURCE_EXCEPTION":"INFORMATION",
            "POINT_READ_EXCEPTION":"INFORMATION",
            "POINT_WRITE_EXCEPTION":"INFORMATION"
         },
         "purgeType":"YEARS",
         "updatePeriodType":"SECONDS",
         "transportType":"TCP_KEEP_ALIVE",
         "encapsulated":false,
         "host":"10.1.1.12",
         "port":502,
         "contiguousBatches":false,
         "createSlaveMonitorPoints":false,
         "discardDataDelay":2500,
         "logIO":false,
         "maxReadBitCount":2000,
         "maxReadRegisterCount":125,
         "maxWriteRegisterCount":120,
         "multipleWritesOnly":false,
         "quantize":false,
         "retries":2,
         "timeout":5000,
         "updatePeriods":5,
         "enabled":true,
         "name":"Arduino1",
         "purgeOverride":true,
         "purgePeriod":1
      },
</code></pre>
<p dir="auto">Cabinet Temperature data point:</p>
<pre><code>{
         "loggingType":"INTERVAL",
         "intervalLoggingPeriodType":"MINUTES",
         "intervalLoggingType":"AVERAGE",
         "purgeType":"YEARS",
         "pointLocator":{
            "range":"INPUT_REGISTER",
            "modbusDataType":"TWO_BYTE_INT_UNSIGNED",
            "writeType":"NOT_SETTABLE",
            "additive":0.0,
            "bit":0,
            "charset":"ASCII",
            "multiplier":0.488,
            "offset":3,
            "registerCount":0,
            "slaveId":1,
            "slaveMonitor":false
         },
         "eventDetectors":[
            {
               "xid":"PED_959001",
               "type":"HIGH_LIMIT",
               "alarmLevel":"CRITICAL",
               "limit":45.0,
               "durationType":"MINUTES",
               "duration":1,
               "alias":""
            }
         ],
         "engineeringUnits":"Degrees celsius",
         "plotType":"STEP",
         "chartColour":"",
         "chartRenderer":{
            "type":"IMAGE",
            "timePeriodType":"HOURS",
            "numberOfPeriods":8
         },
         "dataSourceXid":"DS_101326",
         "defaultCacheSize":1,
         "deviceName":"Arduino1",
         "discardExtremeValues":false,
         "discardHighLimit":45.0,
         "discardLowLimit":5.0,
         "enabled":true,
         "intervalLoggingPeriod":15,
         "name":"Cabinet Temperature",
         "purgeOverride":true,
         "purgePeriod":1,
         "textRenderer":{
            "type":"ANALOG",
            "format":"0.00",
            "suffix":"&amp;deg;C in Pole Cabinet"
         },
         "tolerance":0.25,
         "xid":"DP_144357"
      },
</code></pre>
]]></description><link>https://forum.mango-os.com/post/7064</link><guid isPermaLink="true">https://forum.mango-os.com/post/7064</guid><dc:creator><![CDATA[aussieMESH]]></dc:creator><pubDate>Tue, 23 Oct 2012 17:59:20 GMT</pubDate></item><item><title><![CDATA[Reply to Zigbee - Connectports - All works on Mon, 22 Oct 2012 19:19:38 GMT]]></title><description><![CDATA[<p dir="auto">Ok, well, if it's working for you now, there's no need for me to have access. What are the settings that got it working though?</p>
]]></description><link>https://forum.mango-os.com/post/7058</link><guid isPermaLink="true">https://forum.mango-os.com/post/7058</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Mon, 22 Oct 2012 19:19:38 GMT</pubDate></item><item><title><![CDATA[Reply to Zigbee - Connectports - All works on Mon, 22 Oct 2012 07:30:31 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the reply.</p>
<p dir="auto">I have outputs staying on now, after trying just about every setting in Mango and the gateway.<br />
The system is operating without errors now, which I think is pretty good considering the low tech<br />
Arduino hardware and basic Modbus RTU slave code.</p>
<p dir="auto">I can give you access (assuming you are from Infinite Automation), but I am running the free Mango version, and is working on only one client IP<br />
address.</p>
<p dir="auto">I also use Advantech ADAM-6000 Modbus TCP modules with Mango and they are working flawlessly.</p>
<p dir="auto">Mango is such a great package. I am starting a Environmental monitoring/automation business and after the testing I have done<br />
so far with Mango, this is what I will be running with.</p>
<p dir="auto">Hayden</p>
]]></description><link>https://forum.mango-os.com/post/7053</link><guid isPermaLink="true">https://forum.mango-os.com/post/7053</guid><dc:creator><![CDATA[aussieMESH]]></dc:creator><pubDate>Mon, 22 Oct 2012 07:30:31 GMT</pubDate></item><item><title><![CDATA[Reply to Zigbee - Connectports - All works on Mon, 22 Oct 2012 05:42:46 GMT]]></title><description><![CDATA[<p dir="auto">Sounds like a nice setup. Thanks for sharing.</p>
<p dir="auto">Re the problem you have, is there a way that you can make something accessible via the internet so that i can experiment? PM me with deets if so. Perhaps what is needed is some kind of continual reminder to the point to stay on. Without a test bed i'd just be guessing as to what the problem could be.</p>
]]></description><link>https://forum.mango-os.com/post/7051</link><guid isPermaLink="true">https://forum.mango-os.com/post/7051</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Mon, 22 Oct 2012 05:42:46 GMT</pubDate></item></channel></rss>