libnodave icon indicating copy to clipboard operation
libnodave copied to clipboard

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

Open usmanmehmoodSSP opened this issue 2 years ago • 3 comments

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?

usmanmehmoodSSP avatar Feb 16 '23 10:02 usmanmehmoodSSP

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.

MountainKing91 avatar Feb 16 '23 12:02 MountainKing91

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

usmanmehmoodSSP avatar Feb 17 '23 07:02 usmanmehmoodSSP

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

MountainKing91 avatar Feb 17 '23 07:02 MountainKing91