Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrating a managed version of S7Server in Sharp7 #39

Open
Thieum opened this issue Aug 15, 2023 · 2 comments
Open

Integrating a managed version of S7Server in Sharp7 #39

Thieum opened this issue Aug 15, 2023 · 2 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@Thieum
Copy link

Thieum commented Aug 15, 2023

At the moment, it's not possible to emulate an S7 server without the native dll, as shown in the unit tests.

It would be nice to replace the native version of the S7 server with a completely managed one, and integrate it in the Sharp7 library, as a way to replace the native dll completely, even in an S7 Server emulation scenario.

@fbarresi
Copy link
Owner

fbarresi commented Aug 16, 2023

Hi!

Thank you for opening this issue.
This is actually a very good idea, but (don't take it personally) I have to mark it as a 'won't do' .

The reasons

I have to admit, I alto gave a try time ago, then abandoned the project due to lack of a real use case in the business. The problem is: such a server is really good simulation engine, but you or your customer will later use a real plc, so do we really need to make it managed or can we live with the native implementation? My reply was: better less effort as possible, so I leaved the server native.

A secondary minor reason: a server might be strictly diveded from the client, in particular if you are going to deliver your client embedded somewhere. It will probably require a own repository.

Last but not least, I already created an alternative to the direct usage of the native server: Softplc.
This application can run standalone or in a container and it has an api you can configure so you don't have to restart or manual configure your setup every time you want to test. It also persist after restart. For me is this solution a good alternative with some addons to the original native server: check it out!

I hope you can understand the reason why I will not follow this idea, but I will be happy to star/support/spread such a project initiated by you or somebody else.

Best regards,
FB

@fbarresi fbarresi added the wontfix This will not be worked on label Aug 16, 2023
@fbarresi fbarresi self-assigned this Aug 16, 2023
@Thieum
Copy link
Author

Thieum commented Aug 17, 2023

@fbarresi Thanks a lot for your answer! I understand your reasons, no problem! The main reason I wanted a managed server was to ease the deployment on linux - shipping the so file precompiled seems to be tricky, considering there's a dependency to glibc, at least when I compiled it.

We found it easier to ship and build the native code on those platforms, and I've been working on a vcpkg for snap7, to ease the process even more: microsoft/vcpkg#33221

Softplc is an interesting alternative for emulation, thanks for pointing it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants