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

libnodave.net.cs not working with libnodave.net.dll #3

Open
usmanmehmoodSSP opened this issue Feb 16, 2023 · 3 comments
Open

libnodave.net.cs not working with libnodave.net.dll #3

usmanmehmoodSSP opened this issue Feb 16, 2023 · 3 comments

Comments

@usmanmehmoodSSP
Copy link

Hi,

I am trying to use libnodave for communicating with a PLC over PPI.

I added the libnodave.net.cs and libnodave.net.dll files to my project. The first thing that goes wrong is that throughout libnodave.net.cs, the dll file referenced is libnodave.dll and not libnodave.net.dll. After changing it to libnodave.net.dll, it gives me an an error saying that the entrypoint for libnodave.setPort() does not exist in libnodave.net.dll.

How are these supposed to work together?

@MountainKing91
Copy link

Hi @usmanmehmoodSSP,

since you are using C# you will need to add (copy) into your project these 3 files:

  • libnodave.dll
  • libnodave.net.dll
  • libnodave.net.css
    image

Remember to set the "Copy to output folder" property to "Preserve newest" for each dll. You also have to compile your project to x86.

This should be enough, let me know how it goes.

@usmanmehmoodSSP
Copy link
Author

Still gave the same error. I have shifted to another library, Snap7, which works very well with C#.

@MountainKing91
Copy link

Snap7 can communicate only via Ethernet cable, so no PPI protocol unless you have a Ethernet communication module (not sure what plc you're using though). Can you share the part of your code which is not working? Maybe I can help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants