<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Using existing C code as External Library</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/37c7c44e68/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/37c7c44e68/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/37c7c44e68/</id><updated>2020-02-27T14:24:15.411000Z</updated><subtitle>Recent posts to Using existing C code as External Library</subtitle><entry><title>Using existing C code as External Library</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/37c7c44e68/?limit=25#2c91" rel="alternate"/><published>2020-02-27T14:24:15.411000Z</published><updated>2020-02-27T14:24:15.411000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.coma421cb0184bc3cf6da85f1b17fc9e781efd86795</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; n1849778&lt;/p&gt;
&lt;p&gt;Do I have to pay for the runtime toolkit?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Using existing C code as External Library</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/37c7c44e68/?limit=25#74b1" rel="alternate"/><published>2020-02-27T14:24:14.191000Z</published><updated>2020-02-27T14:24:14.191000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com2c8d66c1f368bd4d4bb0744deee393b21166109a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;To do this with V3 you need to have the runtime toolkit and link your external library to the runtime.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Using existing C code as External Library</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/37c7c44e68/?limit=25#1834" rel="alternate"/><published>2020-02-27T14:24:13.730000Z</published><updated>2020-02-27T14:24:13.730000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comf22ddedfb472a16ed5fc8442257a665bbcf8a24d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; 2fast4u&lt;/p&gt;
&lt;p&gt;My device is a TCP/IP server and I already have the client interface coded in C. I want to connect Codesys systems (e.g. Codesys PLC) as a client and connect with my device over specific port and carry our read write operations. &lt;/p&gt;
&lt;p&gt;One option is to use the NetbaseServices library and connect to the server. But in this case I have to rewrite the entire interface again in IEC (in Codesys).   I want to reuse the implementation already available. (We've already rewritten this interface from C# code.)&lt;/p&gt;
&lt;p&gt;After searching this forum, I found at least 10-15 posts regarding the use of External library (ANSI C / C++). Also checked the documents "C_IN_32Bit_E.pdf" and "C_in_CoDeSys_e.pdf". but could not really comprehend how to work with this.  &lt;/p&gt;
&lt;p&gt;It seems from the documents that I have to first create the interface in Codesys and then write the C functions. But what if the C code is already available? Do I've to modify the .c or .h files? How will this be linked in the Codesys Project?&lt;/p&gt;
&lt;p&gt;Is there any example code available for use of External C functions?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>