<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code Exchange</title><link>https://community.element14.com/technologies/code_exchange/</link><description>As embedded electronics continues to transform our lives, engineers around the globe are looking for ways to increase their coding chops. To help engineers meet this need, element14 has unveiled Code Exchange-- a place where engineers can help each other.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Blog Post: Encoders work! i2c bus operational</title><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/encoders-work-i2c-bus-operational</link><pubDate>Fri, 15 May 2026 00:45:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:5eadb5fe-4e07-4e2c-a3c1-2657ff2116e8</guid><dc:creator>SensoredHacker0</dc:creator><description>Yesterday I learned that j1939 is Canbus, and that our FC6A Plus PLCs support this. Today I learned that when I plug in the PLC to the network the arduino looses control over the HMI, and the PLC doesnt have it. .. so theres some unknown networking fault there. Then I thought I would add a second IP for the arduino to send PLC commands, but my weak wiz 100 seems like it might struggle with that. I tried my HRs04 ultrasonic transducers, but those wouldnt function no matter what I did including using the arduino with an example sketch. well dang. Then I tried to make an Etch-a-sketch from the HMI which also didnt work. my script to draw lines, doesnt execute Im not sure why. well thats enough for one evening. But the Encoders work! https://github.com/Makerspace-Bangor/OnTheLine/blob/main/src/Arduino/test_encoders/test_encoders.ino www.youtube.com/watch</description><category domain="https://community.element14.com/technologies/code_exchange/tags/plc">plc</category><category domain="https://community.element14.com/technologies/code_exchange/tags/hmi">hmi</category><category domain="https://community.element14.com/technologies/code_exchange/tags/encoder">encoder</category><category domain="https://community.element14.com/technologies/code_exchange/tags/On%2bThe%2bLine">On The Line</category><category domain="https://community.element14.com/technologies/code_exchange/tags/pro">pro</category><category domain="https://community.element14.com/technologies/code_exchange/tags/arduino">arduino</category></item><item><title>File: i2c Encoders to IDEC HMI Via Arduino</title><link>https://community.element14.com/technologies/code_exchange/m/managed-videos/151320</link><pubDate>Fri, 15 May 2026 00:45:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:e6848f2a-a4c4-4abf-b9c8-781d5e756a5c</guid><dc:creator>SensoredHacker0</dc:creator><description>The Encoders (4) https://www.adafruit.com/product/4991?srsltid=AfmBOor7CW7yLgeR02hNwUp5yAPv25AxAlCHOLZVVSuKQrKltfjurbhg The HMI: https://mktg.idec.com/en-us/series/hg2j Here: reading 4 i2c rotatory encoders with the Arduino Mega via I2C</description><category domain="https://community.element14.com/technologies/code_exchange/tags/On%2bthe%2bline%2bdesign%2bchallenge">On the line design challenge</category><category domain="https://community.element14.com/technologies/code_exchange/tags/Hermon%2bMaine">Hermon Maine</category><category domain="https://community.element14.com/technologies/code_exchange/tags/element%2b14">element 14</category><category domain="https://community.element14.com/technologies/code_exchange/tags/idec">idec</category><category domain="https://community.element14.com/technologies/code_exchange/tags/Qualcom">Qualcom</category><category domain="https://community.element14.com/technologies/code_exchange/tags/Bangor%2bMakerspace">Bangor Makerspace</category><category domain="https://community.element14.com/technologies/code_exchange/tags/adafruit">adafruit</category></item><item><title /><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/omega-5srtc-hack-and-basic-io-on-arduino-to-hmi-is-operational?CommentId=e8f62c3a-1c2c-45b6-b273-3dbeac1ebb9a</link><pubDate>Thu, 14 May 2026 19:10:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:e8f62c3a-1c2c-45b6-b273-3dbeac1ebb9a</guid><dc:creator>DAB</dc:creator><description>Very cool.</description></item><item><title /><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/omega-5srtc-hack-and-basic-io-on-arduino-to-hmi-is-operational?CommentId=f570a52d-be3a-44bd-b2f8-252fe56103c5</link><pubDate>Wed, 13 May 2026 19:04:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:f570a52d-be3a-44bd-b2f8-252fe56103c5</guid><dc:creator>kmikemoo</dc:creator><description>Wagos!!! Got to love that out of the box thinking. After being introduced to the Wago Lever Nuts in a Design Challenge, I bought a box of two&amp;#39;s and a box of fives. They are SO handy. I also love that you&amp;#39;re using an Arduino to drive that HMI.</description></item><item><title>File: Arduino acts as an IDEC PLC sending native coms</title><link>https://community.element14.com/technologies/code_exchange/m/managed-videos/151317</link><pubDate>Wed, 13 May 2026 03:07:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:93ac395b-a2a6-4e4d-ae7f-a51edf42dfde</guid><dc:creator>SensoredHacker0</dc:creator><description>basic IO is working https://github.com/Makerspace-Bangor/OnTheLine/blob/main/src/Arduino/test0/test0.ino got to clean up the IO handlers, and write my own version of a memory map... preferably before writing multi IO functions, and bus handlers. p...</description><category domain="https://community.element14.com/technologies/code_exchange/tags/plc">plc</category><category domain="https://community.element14.com/technologies/code_exchange/tags/element14">element14</category><category domain="https://community.element14.com/technologies/code_exchange/tags/Hermon%2bMaine">Hermon Maine</category><category domain="https://community.element14.com/technologies/code_exchange/tags/idec">idec</category><category domain="https://community.element14.com/technologies/code_exchange/tags/Bangor%2bMakerspace">Bangor Makerspace</category><category domain="https://community.element14.com/technologies/code_exchange/tags/industrial%2bautomation">industrial automation</category><category domain="https://community.element14.com/technologies/code_exchange/tags/arduino">arduino</category></item><item><title>Blog Post: Omega 5SRTC hack, and basic IO on arduino to HMI is operational.</title><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/omega-5srtc-hack-and-basic-io-on-arduino-to-hmi-is-operational</link><pubDate>Wed, 13 May 2026 03:07:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:0a902b45-befe-45f8-9bfb-e903de4a4742</guid><dc:creator>SensoredHacker0</dc:creator><description>Im doing my on the Line challenge figured out the issues with the HMI Coms, geting readdy to write the helper functions to make the arduino PLC Server respond with the IO of the arduino. 6% memory use on a Mega! well anyway all I have for pots are these 100 turn 10 trimmers. and the Omega 5SRTC RTC Thermal Probes. I dont want to hack off the end, but they don&amp;#39;t fit the 2.54mm teminal blocks omg what do? wago lever nuts fit nicely. So today I figured out some more of the nuances nuisances, of the HMI. . Im sure I knew that, but its not the type of thing you might ordinarily think about. I was messigng with File IO and boom its 10 pm. here I can leverage the arduino to give a marginally better experience. www.youtube.com/watch basic IO is operational, returns words and floats. will mess with more complex sensors such as ultrasonic, i2c encoders, and capacitance. as simple IO operations to control. For my next trick, Ill control a blank PLC remotely.</description></item><item><title /><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/modern-c-initialise-a-static-array-inside-a-class?CommentId=30f8c90e-d25c-4213-b266-c213f637490b</link><pubDate>Tue, 14 Apr 2026 07:09:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:30f8c90e-d25c-4213-b266-c213f637490b</guid><dc:creator>Jan Cumps</dc:creator><description>giving it a same name as a built-in type wasn&amp;#39;t my brightest moment</description></item><item><title /><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/modern-c-initialise-a-static-array-inside-a-class?CommentId=91d6b321-ac4c-4603-a9ce-2a056e5bcdba</link><pubDate>Mon, 13 Apr 2026 17:14:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:91d6b321-ac4c-4603-a9ce-2a056e5bcdba</guid><dc:creator>vmate</dc:creator><description>Ah, sorry then, all the times I&amp;#39;ve encountered time_t, it has been just a typedef to a 32/64bit int.</description></item><item><title /><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/modern-c-initialise-a-static-array-inside-a-class?CommentId=d4038b6f-c0fd-40f6-8aea-9fdd5d82a751</link><pubDate>Mon, 13 Apr 2026 12:10:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d4038b6f-c0fd-40f6-8aea-9fdd5d82a751</guid><dc:creator>Jan Cumps</dc:creator><description>... that sits in the nmea namespace: namespace nmea { using time_t = std::chrono::hh_mm_ss &amp;gt;&amp;gt;;</description></item><item><title /><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/modern-c-initialise-a-static-array-inside-a-class?CommentId=22e338e8-c441-42ac-9d32-9f588c5199e5</link><pubDate>Mon, 13 Apr 2026 11:20:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:22e338e8-c441-42ac-9d32-9f588c5199e5</guid><dc:creator>Jan Cumps</dc:creator><description>the time_t example doesn&amp;#39;t apply here at all, since it&amp;#39;s a fundamental type, so there is no ctor/dtor or any performance penalty. Not obvious from the snippet I posted, but it&amp;#39;s a class (with a constructor) in this case: using time_t = std::chrono::hh_mm_ss &amp;gt;&amp;gt;;</description></item><item><title /><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/modern-c-initialise-a-static-array-inside-a-class?CommentId=1aed308a-320e-4ce4-8b68-0549127a3c3b</link><pubDate>Mon, 13 Apr 2026 08:52:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:1aed308a-320e-4ce4-8b68-0549127a3c3b</guid><dc:creator>Jan Cumps</dc:creator><description>&amp;gt; Also, Return Value Optimization has been part of the spec (although optional) for like 30 years at this point if I recall correctly, &amp;gt; so C++17&amp;#39;s guaranteed copy elision is not even needed for small and relatively simple types. Yes, it exists since c++11. Enforced by compiler (regardless of what command line switches are passed during build) since c++17.</description></item><item><title /><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/modern-c-initialise-a-static-array-inside-a-class?CommentId=f9d12367-ee31-4210-9c03-e64aa7634d3a</link><pubDate>Sun, 12 Apr 2026 16:30:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:f9d12367-ee31-4210-9c03-e64aa7634d3a</guid><dc:creator>vmate</dc:creator><description>It&amp;#39;s almost always better to do it the new way, and actually the time_t example doesn&amp;#39;t apply here at all, since it&amp;#39;s a fundamental type, so there is no ctor/dtor or any performance penalty. For small objects, even a full constructor call is probably just as fast if not faster than passing in by reference and having the code mess with pointers and stuff. Also, Return Value Optimization has been part of the spec (although optional) for like 30 years at this point if I recall correctly, so C++17&amp;#39;s guaranteed copy elision is not even needed for small and relatively simple types.</description></item><item><title /><link>https://community.element14.com/technologies/code_exchange/b/blog/posts/modern-c-initialise-a-static-array-inside-a-class?CommentId=a371a781-eb91-48b3-9afe-226f0a275856</link><pubDate>Sun, 12 Apr 2026 15:36:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a371a781-eb91-48b3-9afe-226f0a275856</guid><dc:creator>Jan Cumps</dc:creator><description>I&amp;#39;m making a few changes to the nmea lib API and code: let the library return objects, instead of passing them via output parameters Since C++17, the compiler can directly use the object that receives the return value. So no constructors or copies are called in this mechanism. Old version: void nmea::time(const std::string_view&amp;amp; sv, time_t&amp;amp; t) { std::string s(sv); t = time_t{ std::chrono::hours(std::stoi(s.substr(0, 2))) + std::chrono::minutes(std::stoi(s.substr(2, 2))) + std::chrono::seconds(std::stoi(s.substr(4, 2))) + std::chrono::milliseconds(std::stoi(s.substr(7))) }; } New version (uses exactly same amount of resources): time_t nmea::time(const std::string_view&amp;amp; sv) { std::string s(sv); return time_t{ std::chrono::hours(std::stoi(s.substr(0, 2))) + std::chrono::minutes(std::stoi(s.substr(2, 2))) + std::chrono::seconds(std::stoi(s.substr(4, 2))) + std::chrono::milliseconds(std::stoi(s.substr(7))) }; } All API functions that use an output parameter have been adapted. I&amp;#39;m running tests to see if any regression happened...</description></item><item><title>Forum Post: RE: "Its all the same"</title><link>https://community.element14.com/technologies/code_exchange/f/forum/56776/its-all-the-same/234546</link><pubDate>Fri, 20 Mar 2026 18:37:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:72cbb11a-e022-4fb4-9344-038a52f34b1e</guid><dc:creator>kmikemoo</dc:creator><description>There is so much old equipment control equipment in the world, it&amp;#39;s crazy. I&amp;#39;ve run into manufacturers that run the gamut. Some simply disavow that they ever made the item. Some admit that they have no one that knows anything about the product anymore. A few will give you what little they have and wish you luck. None of them are able to provide any real support - unless you run into the unicorn (the old technician that still remembers a bit OR... the person that sees the pattern). I&amp;#39;ve worked on systems without manuals or prints but that used a similar wire numbering convention dating back to a small regional company in the 1960&amp;#39;s. There are still elements of this numbering system in equipment produced today. ANYWAY... I think a sure-fire way to get the equipment upgraded is to figure out how to fix it. It&amp;#39;s one of the Murphy&amp;#39;s Laws kind of things. Once you know how to get past that road block, you&amp;#39;ll never need to do it again - because you can make it past the road block. Instant obsolescence - since you know what to do. This is especially true if you document what you did and leave a copy in the machine. On a particular brand of controllers, I figured out how to determine the user selected unlock code from the reset code. A disgruntled, now former employee had changed the passcode and left the company. Now, no one could operate the equipment. The controller manufacturer was very unhelpful. I cracked the code. Made a spreadsheet to do the conversion. Put it all in a shared folder on a shared drive. How many times after that did we need to use that decode? ... None that I know of. Still... it kept Murphy from using that particular road block for the rest of my time at that company. What is impressive in all this is seeing the pattern or seeing the evolution. THAT is cool. As to some of the &amp;quot;intellectual property&amp;quot;, many of the machines do the same thing that they did decades ago - they just do it with more modern variants of the same stuff they had when the machine was first created. Or they have additional &amp;quot;features&amp;quot; that may help in manufacturing but are ancillary to the core function of the machine. If you can make an old system work... that is engineering.</description></item><item><title>Forum Post: RE: "Its all the same"</title><link>https://community.element14.com/technologies/code_exchange/f/forum/56776/its-all-the-same/234525</link><pubDate>Thu, 19 Mar 2026 21:36:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:a15c6e13-2e92-407a-a688-e42ac8488e26</guid><dc:creator>dang74</dc:creator><description>Nice post. I haven&amp;#39;t used a PLC before but I&amp;#39;ve looked into them here and there... anyway I guess I have enough familiarity to get excited about what you are trying to accomplish... and I am not exaggerating when I say it&amp;#39;s like reading the tech version of the DaVinci code. Good luck with this endeavor.</description></item><item><title>Forum Post: commanding my PLC from my phone.</title><link>https://community.element14.com/technologies/code_exchange/f/forum/56782/commanding-my-plc-from-my-phone</link><pubDate>Thu, 19 Mar 2026 16:10:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:440915fe-f2ee-4551-8e40-3a404c86d87b</guid><dc:creator>SensoredHacker0</dc:creator><description>ITs a proof of concept, that instructions may be sent from a phone to control a PLC. The larger goal is to write debugging apps which make process control and analysis easier and more available, to technicians. Android app dev wanted? www.youtube.com/watch</description><category domain="https://community.element14.com/technologies/code_exchange/tags/android">android</category><category domain="https://community.element14.com/technologies/code_exchange/tags/plc">plc</category><category domain="https://community.element14.com/technologies/code_exchange/tags/industrial">industrial</category><category domain="https://community.element14.com/technologies/code_exchange/tags/programming">programming</category><category domain="https://community.element14.com/technologies/code_exchange/tags/idec">idec</category><category domain="https://community.element14.com/technologies/code_exchange/tags/development">development</category><category domain="https://community.element14.com/technologies/code_exchange/tags/automation">automation</category><category domain="https://community.element14.com/technologies/code_exchange/tags/kotlin">kotlin</category></item><item><title>Forum Post: RE: "Its all the same"</title><link>https://community.element14.com/technologies/code_exchange/f/forum/56776/its-all-the-same/234521</link><pubDate>Thu, 19 Mar 2026 14:13:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:4d2e60d6-7a80-436f-8c14-180d3135551c</guid><dc:creator>geralds</dc:creator><description>Hi, What is your intention? A lot of intellectual knowledge leads to a lot of headaches. Who are you doing all this for? A hobbyist has no chance of achieving anything. Especially in areas where everything is very sensitive, -&amp;gt; &amp;quot;protocols&amp;quot; for data transmission. Well, back in the day, people played around with this in their garages; today, you&amp;#39;d be charged with intellectual property theft. Licenses are very expensive, and some decisions are made with a hammer. Especially in these areas, contracts need to be watertight. Another problem: time. Technological progress will surely overtake you. By the time you&amp;#39;ve finished solving one problem, the major global players will have already solved many more. And you&amp;#39;ll have to chase after them again, researching these new developments so you can incorporate them into your tinkering. Ugh... nobody can keep that up. Almost 50 years of experience, both employed and privately as a hobby, and with my own companies in technology, electronics, electrical engineering, and physics have taught me a lot. I wish you all the best! Gerald ---</description></item><item><title>Forum Post: RE: "Its all the same"</title><link>https://community.element14.com/technologies/code_exchange/f/forum/56776/its-all-the-same/234520</link><pubDate>Thu, 19 Mar 2026 13:22:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:dcd679b6-6330-47ec-a078-459385b5a929</guid><dc:creator>robogary</dc:creator><description>Ah-ha. You&amp;#39;ve discovered big business ! .......OEM owning multiple brands, brand label agreements, business and technology acquisition, joint ventures, buying and selling of intellectual properties.......and creative marketing.</description></item><item><title>File: Controlling an IDEC PLC From an Android Phone</title><link>https://community.element14.com/technologies/code_exchange/m/managed-videos/151053</link><pubDate>Thu, 19 Mar 2026 12:11:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:f3314537-3759-4cce-9574-5af209dfd15d</guid><dc:creator>SensoredHacker0</dc:creator><description>I am stupid excited to get this working, if only for the reprieve to my sanity. The app: https://play.google.com/store/apps/details?id=de.kai_morich.serial_usb_terminal&amp;amp;hl=en_US What I really want to make is debugging tools for PLC systems, where ...</description><category domain="https://community.element14.com/technologies/code_exchange/tags/maker">maker</category><category domain="https://community.element14.com/technologies/code_exchange/tags/plc">plc</category><category domain="https://community.element14.com/technologies/code_exchange/tags/Hey%2bBangor">Hey Bangor</category><category domain="https://community.element14.com/technologies/code_exchange/tags/element%2b14">element 14</category><category domain="https://community.element14.com/technologies/code_exchange/tags/idec">idec</category><category domain="https://community.element14.com/technologies/code_exchange/tags/Bangor%2bMakerspace">Bangor Makerspace</category></item><item><title>Forum Post: RE: "Its all the same"</title><link>https://community.element14.com/technologies/code_exchange/f/forum/56776/its-all-the-same/234517</link><pubDate>Thu, 19 Mar 2026 11:01:00 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cd1eba07-94b2-4633-8a53-8e22ed25c7b8</guid><dc:creator>shabaz</dc:creator><description>At least in Europe, it&amp;#39;s generally considered to be valid to reverse-engineer a protocol at a device interface, for the purposes of interworking their own products. That was also part of EU legislation in the early 2000&amp;#39;s, although now I believe it&amp;#39;s changed to an extent, presumably at the pressure of manufacturers unfortunately, but I&amp;#39;m not sure. Some manufacturers didn&amp;#39;t like the legislation because it exposed their proprietary stuff (not just the protocol, but anything else that got revealed through the process of reverse-engineering). The ones who thought about it more, simply offered the protocol for free or for a fee, since that eliminated the justification to reverse-engineer and the proprietary stuff exposure risk. Telecoms firms were interesting, every country wanted to protect their manufacturing base, so they all slightly tweaked the international standards. I had a job once re-tweaking things back, in a system that would attach to their equipment. Say if a telecom customer came along from any random small country or large, I&amp;#39;d have to look through their documentation to try to find the closest matching variant that I already had, and then tweak that one to create the new one. I wish I&amp;#39;d thought of drawing a tree diagram of them at the time.. would have been interesting from a history perspective, to see how they evolved.</description></item></channel></rss>