Communication c# application with Siemens S7-300 PLC (Libnodave library)
-
message
Inscrit lele 28/11/2015 à 09:24 Citer ce message
Hello;
I am looking for any sample program. Communication PLC S7-300 to PC with libnodave and C#.
Can you help me please ? -
message
Inscrit lele 29/11/2015 à 03:33 Citer ce message
Hello,
here a part of code :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AutomationSenseSpace
{
class SiemensPLC
{
public static libnodave.daveOSserialType fds; //declaration connection type
public static libnodave.daveInterface di; //declaration of connection interface
public static libnodave.daveConnection dc; //declaration of connection
public static int res; // déclaration of res value for fonction return
public static byte plcValue; //declaration of plcValue to Read from PLC it's a byte in this case
public static int memoryRes; //declaratiob of memoryRes memoryRes for ReadBytes function return
public static byte[] memoryBuffer = new byte[10]; //declaration of an byte array with 10 bytes value
// Let's code the connect function
public static void connectTo()
{
fds.rfd = libnodave.openSocket(102, "192.168.56.1"); //connect to PLC with IP address
fds.wfd = fds.rfd;
di = new libnodave.daveInterface(fds, "IF1", 0, libnodave.daveProtoISOTCP, libnodave.daveSpeed187k);
res = di.initAdapter();
dc = new libnodave.daveConnection(di, 0, 0, 2);
res = dc.connectPLC();
memoryRes = dc.readBytes(libnodave.daveFlags, 0, 0, 1, memoryBuffer); //read a buffer of 1 byte and put it on memoryBuffer variable
plcValue = memoryBuffer[0]; //put memoryBuffer byte value on plcValue variable
dc.disconnectPLC(); // disconnect PLC
di.disconnectAdapter(); //disconnect Adapter
libnodave.closePort(fds.rfd); // close connection
}
}
} -
le 25/04/2016 à 03:18 Citer ce message
Hello Friend,
congratulations for your site, very good.
you could help me
I'm trying to make communication with plc but I am not getting
when I try to read the PLCSIM the program becomes unresponsive.
Project link http://vilsonarantes.com.br/READ_PLC.rar
thank you so much -
le 25/04/2016 à 11:36 Citer ce message
Hello;
I am looking for any sample program. Communication micro -850 Rockwell to PC with libnodave and C#.
Can you help me please ? -
message
Inscrit le -
message
Inscrit lele 25/04/2016 à 15:37 Citer ce message
Hello Yassine12,
Libnodave library is only for Siemens PLC.You must use DF1 library for Allen Bradley PLC -
Michal
le 29/04/2016 à 17:14 Citer ce message
Hello,
I would like to watch your movie through the Youtube but it isn't possible to watch because into movie is used music which is forbid in my country. Is it possible to download this movie through the another web system? The name of movie is Libnodave library tutorial with C# (Siemens PLC) -> the published 16.7.2015.
Thank you for your answer and have a nice day.
Greeting Michal.
Best Regards
Ing. Michal Hrkeľ, PhD.
HYDAC Electronic s.r.o.
Krásna Hôrka 290
SK-027 44 Tvrdošín
Fon: +421 435831990
Fax: +421 435831915
Web: http://www.hydac-electronic.sk
Geschäftsführer: Dr. Franz Josef Eckle; Dipl. Ing. Jozef Líška
Registergericht: Žilina
Handelsregister: Sro, 13116/L -
Alexander
le 29/04/2016 à 17:16 Citer ce message
Hello,
can you please sent me the vb project /source code for the libnodave
library to communicate with the Siemens PLC.
Thank you for your help.
Best regards
Alexander Sauer -
le 01/06/2016 à 10:05 Citer ce message
Good day,
I did everything right as the video instructed but i get 0 even if i keep on changing the values from the simulator. Please help.
Thanks in advance. -
le 21/10/2016 à 05:56 Citer ce message
I can not add libnodave.dll . Please can you help me ? -
Matt
le 29/12/2016 à 07:54 Citer ce message
Hello, is that code will work on Siemens LOGO 8? -
le 29/12/2016 à 17:11 Citer ce message
Hello,nop this code not work with Logo 8.You must do some changes (e.g : plc slot and rack).You should read Libnodave manual for more informations.
Répondre à ce message