Communication c# application with Siemens S7-300 PLC (Libnodave library)



  • message
    Inscrit le

    le 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 le

    le 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


    }

    }
    }
  • VILSON ARANTES
    VILSON ARANTES

    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.

    Image

    Project link http://vilsonarantes.com.br/READ_PLC.rar

    thank you so much
  • yassine12
    yassine12
    Modérateur
    Automaticien amateur

    1 message
    Inscrit le 25/04/2016

    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

    le 25/04/2016 à 15:35 Citer ce message

    Hello Vilson Arantes,

    That's normal your application freeze when you run it because you must put the library named libnodave.dll into the bin folder like this picture

    Image


  • message
    Inscrit le

    le 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
    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
    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
  • Ndzalie
    Ndzalie
    Modérateur
    Automaticien amateur

    1 message
    Inscrit le 01/06/2016

    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.
  • TextSa
    TextSa

    le 21/10/2016 à 05:56 Citer ce message

    I can not add libnodave.dll . Please can you help me ?
  • Matt
    Matt

    le 29/12/2016 à 07:54 Citer ce message

    Hello, is that code will work on Siemens LOGO 8?
  • automationsense
    automationsense
    Modérateur
    Automaticien vétéran

    486 messages
    Inscrit le 28/04/2016

    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.
    Cordialement,
    Image

    " Travailles pour tes propres rêves sinon quelqu'un d'autres t'embauchera pour réaliser les siens "

Répondre à ce message

 

7 choses à savoir si Tu débutes en automatisme...

7 choses que tu dois savoir si tu debutes en automatismeCliquez ici pour télécharger le guide PDF

Superv 3