Beckhoff / AdsToJava

This library is intended for use in ADS client applications written in the Java programming language.
MIT License
8 stars 1 forks source link

Add a Release including libTcAdsDll.so for Debian or Ubuntu #5

Closed martinste1n closed 7 months ago

martinste1n commented 7 months ago

Hi, first thank you for the great tool. We are currently trying to get it to run on a Ubuntu Machine / Docker Container. We invested quite some time to build the libTcAdsDll.so ourselves, yet failed to do so.

Would it be possible that you add a release, which contains a build version for Debian or Ubuntu?

Thanks in advance

vossjannik commented 7 months ago

Hi,

unfortunately, this library does not currently have support for Linux systems. I linked a few resources in this comment, that you might be able to build upon to add Linux support: https://github.com/Beckhoff/AdsToJava/issues/2#issuecomment-1856211972

As an alternative, you could use TwinCat/BSD. TwinCAT/BSD is an alternative operating system that combines the TwinCAT runtime with FreeBSD. This library is supported there. Depending on your use case, running TwinCAT/BSD as a VM on your Ubuntu machine might also be an option.

Please note that this library expects that the libTcAdsDll.so already exists on the system, it is not part of the AdsToJava project: https://github.com/Beckhoff/AdsToJava/blob/f7801e1c52d199a014a22ee466a9b64c76af82f0/cpp/CMakeLists.txt#L96C6-L96C6

Best Regards, Jannik Voss

martinste1n commented 7 months ago

Thank you very much for the fast reply! I will have a look at the resources you provided!

Best, Martin

vossjannik commented 7 months ago

Hi @martinste1n ,

the topic didn't let go of me yesterday. I added Linux support using the "adslib.so" from https://github.com/Beckhoff/ADS/tree/master instead of the "TcAdsDll.dll", which as I mentioned, is not available on Linux.

There are some limitations+differences but it should be fine for most use-cases. I would call it a Beta. Details: https://github.com/Beckhoff/AdsToJava/tree/linux?tab=readme-ov-file#status-of-the-linux-support

I would really appreciate feedback/contributions on this.

Best Regards, Jannik Voss

martinste1n commented 7 months ago

Thank you very much 👍 that's really awesome.

Will give it a try next week and provide feedback!

Have a nice weekend!

Martin

vossjannik commented 7 months ago

@martinste1n FYI, I merged it into the main branch and added a CI build action (Ubuntu). The binaries are published as a release artifact called "linux-x64.zip".

nicovitt commented 7 months ago

I checked the released version and integrated it into our software environment (custom java PLC connector deployed to Ubuntu VM). From what I can tell is that your provided solution works very well. 😄

This is really awesome!

As @martinste1n wrote we were quite hard working on a solution for linux-based systems and I integrated your ADS repo but the problem was (at least what I can tell) that you can create a route in ADS on linux but AdsToJava does not know about the route. Was quite complicated to build and run on linux. 😄

Your solution now works and we can communicate with Beckhoff PLCs. If I notice any issues I will contribute these.