<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Deploy an external library to CODESYS Control RTE v3</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d2a997c31f/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d2a997c31f/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/d2a997c31f/</id><updated>2020-02-27T14:15:00.203000Z</updated><subtitle>Recent posts to Deploy an external library to CODESYS Control RTE v3</subtitle><entry><title>Deploy an external library to CODESYS Control RTE v3</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d2a997c31f/?limit=25#71f2" rel="alternate"/><published>2020-02-27T14:15:00.203000Z</published><updated>2020-02-27T14:15:00.203000Z</updated><author><name>bacha.damin</name><uri>https://forge.codesys.com/u/bacha-damin/</uri></author><id>https://forge.codesys.com0d07f6f6261d09e92dfe39a69ae60224f5b8d426</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;hi&lt;/p&gt;
&lt;p&gt;I like to add  an external library to CODESYS Control RTE v3 but I always find this problem&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Sans titre.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2519"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Deploy an external library to CODESYS Control RTE v3</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d2a997c31f/?limit=25#8e35" rel="alternate"/><published>2020-02-27T14:14:59.058000Z</published><updated>2020-02-27T14:14:59.058000Z</updated><author><name>SimonPeckmore</name><uri>https://forge.codesys.com/u/simonpeckmore/</uri></author><id>https://forge.codesys.com8efb9a7e553a6e3f5fb3dd8e66d2cb9a2823f590</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;TimvH, many thanks for your response.&lt;/p&gt;
&lt;p&gt;I wanted to post an update with information I found regarding this in case it was of use to anyone else attempting to do the same. After contact with 3S it turns out that external libraries (DLLs containing C functions) can only be used with CODESYS Control WIN, and &lt;strong&gt;not&lt;/strong&gt; with CODESYS Control RTE.&lt;/p&gt;
&lt;p&gt;In order to make use of C functions with RTE you have to compile your code into a Windows kernel-mode driver which is then loaded by the RTE run-time - the resulting file for RTE would be a .SYS file when compiled, not a .DLL file. You can then implement functions in CODESYS and mark them as "External" and the corresponding functions within the loaded kernel-mode drivers will be called. &lt;/p&gt;
&lt;p&gt;I've attached the only official documentation I could find on this topic but it doesn't cover the entire process and there are aspects missing. If anyone wants it, if it's OK with 3S, and if I can clear it with my employer, I may also be able to post a sample project that builds and can be used by RTE. I would have to remove certain files which are supplied by 3S as part of their runtime toolkit, but I can leave the directory structure in place so, once these files are obtained from 3S, they can be added to the project as required.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=448" rel="nofollow"&gt;Creating own Runtime System Components and IO Drivers (v2.0).pdf &lt;span&gt;&lt;span&gt;[194.06 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=447" rel="nofollow"&gt;Creating and Linking External C Library Functions (v1.0).pdf &lt;span&gt;&lt;span&gt;[176.38 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Deploy an external library to CODESYS Control RTE v3</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d2a997c31f/?limit=25#c5c6" rel="alternate"/><published>2020-02-27T14:14:58.581000Z</published><updated>2020-02-27T14:14:58.581000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.comd64c4f4cf74e93e033bbc1701a862ee341327d9b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You need the runtime toolkit to be able to extend the RTE with additional external libraries.&lt;br/&gt;
Please contact 3S-Smart Software Solutions or your local distributor for this toolkit.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Deploy an external library to CODESYS Control RTE v3</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/d2a997c31f/?limit=25#004b" rel="alternate"/><published>2020-02-27T14:14:58.056000Z</published><updated>2020-02-27T14:14:58.056000Z</updated><author><name>SimonPeckmore</name><uri>https://forge.codesys.com/u/simonpeckmore/</uri></author><id>https://forge.codesys.com06566ddd1c67532781b967e3cfc9c05f228ba2cc</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;I'm brand new to CODESYS (and IEC 61131 in general) and have been given a research assignment to bring me up to speed with a project currently in progress at work. I'm trying to investigate deploying an application to a &lt;strong&gt;CODESYS Control RTE v3&lt;/strong&gt; runtime that contains a function defined in a C library.&lt;/p&gt;
&lt;p&gt;So far I have:&lt;/p&gt;
&lt;p&gt;Following the documentation, my two CODESYS projects appear to be working correctly - the base project successfully calls the library project and, when attempting to download the project to my RTE target, I receive the "1 unresolved reference" error as expected. I'm now not sure how to proceed in deploying the C library to the target device so that the reference can be resolved.&lt;/p&gt;
&lt;p&gt;If I remove the reference to the library project from my base project (and update the code accordingly) I can successfully download and run the project on the RTE target, so I am at least confident that aspect is working.&lt;/p&gt;
&lt;p&gt;If anyone would anyone be able to offer any assistance with this or point me in the right direction it would be greatly appreciated.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>