<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to making library using external c code</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/df6b2d9228/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/df6b2d9228/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/df6b2d9228/</id><updated>2020-03-20T05:01:02.279000Z</updated><subtitle>Recent posts to making library using external c code</subtitle><entry><title>making library using external c code</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/df6b2d9228/?limit=25#8091/2cda" rel="alternate"/><published>2020-03-20T05:01:02.279000Z</published><updated>2020-03-20T05:01:02.279000Z</updated><author><name>audi0615</name><uri>https://forge.codesys.com/u/audi0615/</uri></author><id>https://forge.codesys.com91df075defb2c498eba074886633a8174cdc7f94</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you for your reply.&lt;br/&gt;
the shared memory solution would be possible.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>making library using external c code</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/df6b2d9228/?limit=25#8091" rel="alternate"/><published>2020-03-19T15:11:31.584000Z</published><updated>2020-03-19T15:11:31.584000Z</updated><author><name>hence.persson</name><uri>https://forge.codesys.com/u/hence-persson/</uri></author><id>https://forge.codesys.com5b58b2bd0636d098dcc6eb6fb75e98630a827661</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Possible solution..&lt;/p&gt;
&lt;p&gt;Write a C-program using the shared memory functions with codesys.. Start the conversion of a string to a result with a bit and let the C program write it to the shared memory..&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>making library using external c code</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/df6b2d9228/?limit=25#a54f" rel="alternate"/><published>2020-03-19T08:42:44.807000Z</published><updated>2020-03-19T08:42:44.807000Z</updated><author><name>audi0615</name><uri>https://forge.codesys.com/u/audi0615/</uri></author><id>https://forge.codesys.com012036e6a45d5bf032fadd41d529711c37a7f8ed</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;My hardware is just a general industrial type PC, not from any PLC vendor.&lt;/p&gt;
&lt;p&gt;One of the use cases would be evaluating user input string math expression. (i.e. 3+(SIN(2+3)+5))&lt;/p&gt;
&lt;p&gt;It is very complicate to parse and evaluate this kind of string only with codesys. &lt;/p&gt;
&lt;p&gt;there are many C source codes can be used for this purpose.&lt;/p&gt;
&lt;p&gt;How can i purchase the runtime toolkit? &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>making library using external c code</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/df6b2d9228/?limit=25#4fb2" rel="alternate"/><published>2020-03-19T05:31:25.018000Z</published><updated>2020-03-19T05:31:25.018000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.come6cc5b17c4cc03a3f5896c922fa9e3fde0a57c15</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
one of these document is CODESYS V2.3 related.&lt;br/&gt;
In all cases this is only possible if you have a runtime toolkit.&lt;br/&gt;
This is not free of charge - this is the toolkit which the plc manufaturer purchase to create their CODESYS plc's.&lt;/p&gt;
&lt;p&gt;For which plc do you need this an what is the use case / function you want to archive with it?&lt;br/&gt;
BR&lt;br/&gt;
Edwin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>making library using external c code</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/df6b2d9228/?limit=25#36f5" rel="alternate"/><published>2020-03-19T00:17:50.995000Z</published><updated>2020-03-19T00:17:50.995000Z</updated><author><name>audi0615</name><uri>https://forge.codesys.com/u/audi0615/</uri></author><id>https://forge.codesys.comff095ec2d9b424c36a13ed8e1776633a41d58bd8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I'm trying to make an external library using my own c code.&lt;br/&gt;
i've found some documents about this.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://forge.codesys.com/forum/en/448/genmed-Creating%20own%20Runtime%20System%20Components%20and%20IO%20Drivers%20"&gt;https://forge.codesys.com/forum/en/448/genmed-Creating%20own%20Runtime%20System%20Components%20and%20IO%20Drivers%20&lt;/a&gt;(v2.0).pdf&lt;/p&gt;
&lt;p&gt;&lt;a href="https://support.crosscontrol.com/sites/default/files/documentation/Discontinued%20Products/Computers/CCpilot%20XS%2012/Documents/Creating%20and%20linking%20C%20library%20functions_IN_32Bit_E.pdf" rel="nofollow"&gt;https://support.crosscontrol.com/sites/default/files/documentation/Discontinued%20Products/Computers/CCpilot%20XS%2012/Documents/Creating%20and%20linking%20C%20library%20functions_IN_32Bit_E.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;it seems that the external .c file is not included in codesys code but executed in the runtime system via generated m4 file.&lt;br/&gt;
i found no issue in making the external library, however everytime i download a new project with the library to PLC, I get "unresolved reference" error.&lt;/p&gt;
&lt;p&gt;the first document above says, i would get "unresolved reference" error. but i don't understand what should i do to solve this error.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;"Now you can create a new project, add the new library to your application and call the internal and&lt;br/&gt;
external functions and function blocks form the IEC code. If you download the application to a runtime&lt;br/&gt;
system, &lt;strong&gt;you will receive errors because of unresolved external references&lt;/strong&gt;. Unresolved external&lt;br/&gt;
references appear, when there are calls to external POUs (must be implemented in the runtime),&lt;br/&gt;
which are not implemented in the runtime. &lt;strong&gt;To solve these errors, you have to implement the POUs in&lt;br/&gt;
the runtime system in your own component.&lt;/strong&gt; "&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Do you have any idea what "To solve these errors, you have to implement the POUs in&lt;br/&gt;
the runtime system in your own component" actually means?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>