I'm trying to connect to a Siemens CPU315-2 DP via Ethernet by a CP 343-1 Lean using Libnodave dll.
I've tried the example program "simpleISO_TCP.cs" contained in the download file. The function openSocket works just fine but the function connectPLC always returns -1 wich means that the connection to the PLC fails.
Anyone knows what could cause this problem?
PS: I'm using Visual Studio 2012 in Windows 7 64 bit.
A few things for you to check:
I would try to use the testISO_TCP.exe located in the win folder. Run it from cmd prompt with IP Address and -w flag which will write to some memory addresses(ensure that it safe to do this if it is a production PLC)
I was just doing some work with this library and it was fine using a CPU 317-2 PN/DP with a CP343-1 (6GK7 343-1EX11-0EX0)