# CODESYS external library

**URL:** <https://www.wago.community/t/codesys-external-library/1300>\
**Category:** CODESYS\
**Tags:** linux, codesys\
**Created:** [November 5, 2024, 6:50am UTC](https://www.wago.community/t/codesys-external-library/1300 "2024-11-05T06:50:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![quenorha](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/quenorha/32/429_2.png) [@quenorha](https://www.wago.community/u/quenorha)\
**Post date:** [November 5, 2024, 6:50am UTC](https://www.wago.community/t/codesys-external-library/1300/1 "2024-11-05T06:50:33Z")

</div>

Hello community,

I need to create an external CODESYS library, based on a Linux command.  
I know that some libraries work this way, for example WagoAppHTTP is based on curl.

Any idea how to achieve that ?  
Any example ?

Thanks.

---

<div class="post-metadata">

**Author:** ![edwin](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@edwin](https://www.wago.community/u/edwin)\
**Post date:** [November 5, 2024, 7:54am UTC](https://www.wago.community/t/codesys-external-library/1300/2 "2024-11-05T07:54:17Z")

</div>

The newer CoDeSys versions have the possibility to use “shared memory”.  
This can be used to communicate between processes.

Run the CoDeSys and the Linux app with access to the same memory.

ST:  
writeH := SysSharedMemoryCreate(Name, 0, ADR(Size), ADR(Result));

c#:  
readH = MemoryMappedFile.CreateFromFile($“/dev/shm/{Name}”, FileMode.Open);

---

<div class="post-metadata">

**Author:** ![quenorha](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/quenorha/32/429_2.png) [@quenorha](https://www.wago.community/u/quenorha)\
**Post date:** [November 5, 2024, 10:03am UTC](https://www.wago.community/t/codesys-external-library/1300/3 "2024-11-05T10:03:20Z")

</div>

The linux is a standalone binary, I don’t get the chance to modify it ☹ .  
I wish to call it directly from CODESYS, without using SysProcess or WagoAppConfigtool in order to get a non blocking behavior.

---

<div class="post-metadata">

**Author:** ![WagoGrim](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagogrim/32/60_2.png) [@WagoGrim](https://www.wago.community/u/WagoGrim)\
**Post date:** [November 5, 2024, 7:56pm UTC](https://www.wago.community/t/codesys-external-library/1300/4 "2024-11-05T19:56:45Z")

</div>

If you are thinking about linking a C function/object it seems you need “Codesys Extension SDK”. We also need the target to support this option and I do not know if Wago runtime does. The Codesys SL products will work I believe. Maybe also the virtual image.

We can also download Codesys control extension package, I think there are some examples there of how the API looks like. Either way the C file need to be rebuilded.

---

<div class="post-metadata">

**Author:** ![WagoDamRud](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagodamrud/32/258_2.png) [@WagoDamRud](https://www.wago.community/u/WagoDamRud)\
**Post date:** [November 8, 2024, 1:17pm UTC](https://www.wago.community/t/codesys-external-library/1300/5 "2024-11-08T13:17:38Z")

</div>

there was **a800100** application note for CoDeSys 2.3 external libraries
