<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Inject C Code into ST</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/093c15e11f/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/093c15e11f/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/093c15e11f/</id><updated>2020-02-27T16:06:11.892000Z</updated><subtitle>Recent posts to Inject C Code into ST</subtitle><entry><title>Inject C Code into ST</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/093c15e11f/?limit=25#2887" rel="alternate"/><published>2020-02-27T16:06:11.892000Z</published><updated>2020-02-27T16:06:11.892000Z</updated><author><name>ogzhnozdgn</name><uri>https://forge.codesys.com/u/ogzhnozdgn/</uri></author><id>https://forge.codesys.com901b8714c45ff45bfcd2335d03e411929a048503</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi &lt;a class="user-mention" href="/u/fixstuff555/"&gt;@fixstuff555&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I have a smart home project. I did for this project that connecting between arduino/ethernet shield and raspberry with modbus tcp in codesys. But I need to do this project with wireless. So I had a ESP8266. But I didn't know arduino code. Can you help me ?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Inject C Code into ST</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/093c15e11f/?limit=25#e345" rel="alternate"/><published>2020-02-27T16:06:11.104000Z</published><updated>2020-02-27T16:06:11.104000Z</updated><author><name>fixstuff555</name><uri>https://forge.codesys.com/u/fixstuff555/</uri></author><id>https://forge.codesys.com28ac067b18e82ee59e5c545b1d43db3e5af17c1c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Modbus is your friend.  Its the best way that I have found to get external data into and out of Codesys.&lt;/p&gt;
&lt;p&gt;Just add the relevant library into your application (C, Python, etc), and just send data from a client (your code usually), into a Modbus slave running in Codesys.  I've done this with C, Python, and Node-Red and they worked just fine.&lt;/p&gt;
&lt;p&gt;For example, I had an Adafruit Ultimate GPS board plugged into the Pi.  I used Adafruit's sample code, and just added the Python Modbus library, and sent position data over 4 registers into Codesys.&lt;/p&gt;
&lt;p&gt;For the Node-Red, I simply added the Node-Red-Contrib_Modbus library, and was sending data to and from Codesys from Grove Sensors (also added via Node-Red library)&lt;/p&gt;
&lt;p&gt;I've also used Modbus from Codesys into ESP8266 modules.  This was using the Modbus libraries available for Arduino.  I could pass all the IO of the ESP8266 (an Adafruit Huzzah actually), and use it as a generic remote wireless IO node.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Inject C Code into ST</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/093c15e11f/?limit=25#4060" rel="alternate"/><published>2020-02-27T16:06:10.266000Z</published><updated>2020-02-27T16:06:10.266000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com156aad6047d82f9c4bed381c1a26d81117f22c51</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; scott_cunningham&lt;/p&gt;
&lt;p&gt;The module was at one time available for everyone but now only to their OEMs (implies not easily implemented/issues/etc). Many people have asked - nothing has been offered up. You may be better off setting a GPO (general purpose output) that your other code is watching for.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Inject C Code into ST</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/093c15e11f/?limit=25#c8df" rel="alternate"/><published>2020-02-27T16:06:07.866000Z</published><updated>2020-02-27T16:06:07.866000Z</updated><author><name>jreitzig</name><uri>https://forge.codesys.com/u/jreitzig/</uri></author><id>https://forge.codesys.coma6d527a89ff7d70b3d46759200f5fa5b3a7a581f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
I have found mostly dead links or hopelessly outdated information in regards to my problem. Hopefully anyone in this forum can advise me. I want to inject native code into my structured text. I do not care whether it is C, Python or whatsoever, I just need to find a way to embed  "external" functionality into my CodeSys Program running on the Raspberry.&lt;br/&gt;
And yes, I have found this module provided by CodeSys that matches this very purpose, but it is geared towards device manufacturers. It is not geared towards the average joe end user. &lt;/p&gt;
&lt;p&gt;Thank you in advance for your time to respond to this thread.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>