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.
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.
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);
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.
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.
there was a800100 application note for CoDeSys 2.3 external libraries