Menu

OpenSocket not found in libnodave.dll

Help
2010-11-12
2016-02-01
  • Tiago Pereira

    Tiago Pereira - 2010-11-12

    Hi.

    I'm using the libnodave.dll in a Visual Studio 2008 .Net Project and I add the libraries libnodave.dll and libnodave.net.dll to the project references.

    The program compiles without erros or woarnings.

    When I run the program to make a ISO TCP connection an execution error apears saying that the OpenSocket was not found in the DLL.

    This is the code I'm usind and the error that is shown.

    I would apreciate any help on this.

    Thaks.**

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;

    namespace PLC_LIBNODAVE_TEST
    {
        public partial class Form1 : Form
        {
            static libnodave.daveOSserialType fds;
            static libnodave.daveInterface di;
            static libnodave.daveConnection dc;
            static int rack = 0;
            static int slot = 2;

            public Form1()
            {
                InitializeComponent();
            }

            private void bt_Conect_Click(object sender, EventArgs e)
            {
                int a = 0, res, b = 0, c = 0;
                float d = 0;

                fds.rfd = libnodave.openSocket(102,"TCP");
                fds.wfd = fds.rfd;

                if (fds.rfd > 0)
                {
                    di = new libnodave.daveInterface(fds, "IF1", 0, libnodave.daveProtoISOTCP, libnodave.daveSpeed187k);
                    di.setTimeout(1000000);
                   
                    dc = new libnodave.daveConnection(di, 0, rack, slot);

                    if (0 == dc.connectPLC())
                    {
                        res = dc.readBytes(libnodave.daveFlags, 0, 0, 16, null);
                        if (res == 0)
                        {
                            a = dc.getS32();
                            b = dc.getS32();
                            c = dc.getS32();
                            d = dc.getFloat();
                            tb_a.Text = a.ToString();
                            tb_b.Text = b.ToString();
                            tb_c.Text = c.ToString();
                            tb_d.Text = d.ToString();
                        }
                        else
                            MessageBox.Show("error " + res + " " + libnodave.daveStrerror(res));
                    }
                    dc.disconnectPLC();
                    libnodave.closeSocket(fds.rfd);
                }
                else
                {
                    MessageBox.Show("Couldn't open TCP connaction to ");
                    return;
                }
                return;
            }
           
        **}
    }

    ERROR:

    It's not possible to locate an entry point with the name 'openSocket' in the DLL 'libnodave.dll'.

     
    • Anonymous

      Anonymous - 2015-02-06
      Post awaiting moderation.
  • AngrySnail

    AngrySnail - 2010-11-13

    Hi,
    In the program folder libnodave-0.8.4.5\Dot.NET\CS you can find the example: simpleISO_TCP.cs and simpleISO_TCP.exe.
    Maibe are of some user for you.

     
  • Tiago Pereira

    Tiago Pereira - 2010-11-15

    Thank you for the help, angrysnail.
    At the end of the friday afternoon i realise that i was not using the right .dll. For the program run well I need to use the libnodave.dll from the win folder of the libnodave folder and the libnodave.net.dll from the .net folder.
    Now my program runs without any problem.
    Once again thank you for your reply and help.

     
  • Anonymous

    Anonymous - 2011-05-27

    Hi.

    I'm using the libnodave.dll in a Visual Studio 2010.Net Project.

    I too add the libraries libnodave.dll to folder of my project ( i cant add reference to this)

    I and libnodave.net.dll to folder project and i add references too

    The program compiles without erros or woarnings (equal).

    When I run the program to make a ISO TCP connection an execution error apears saying that the Dll not found
    The same code, i bring of correct folder, what i do

    Plz help me

    Thaks.

     
  • Anonymous

    Anonymous - 2011-05-27

    Hi.

    I'm using the libnodave.dll in a Visual Studio 2010.Net Project.

    I too add the libraries libnodave.dll to folder of my project ( i cant add reference to this)

    I and libnodave.net.dll to folder project and i add references too

    The program compiles without erros or woarnings (equal).

    When I run the program to make a ISO TCP connection an execution error apears saying that the Dll not found
    The same code, i bring of correct folder, what i do

    Plz help me

    Thaks.

     
  • Anonymous

    Anonymous - 2011-05-27

    I find a solution, i forgot of put libnodave.dll in the folder bin of project

    Thanks

     
  • Sean

    Sean - 2014-01-09

    Hi, I'm using Libnodave in Visual Studio 2010. where can i get the return code / error code? Everything work fine for me. But sometime, when network connection problem. I not able to reconnect to the PLC.

    the statement res = di.initadapter was return a -1

    I need to auto reconnect to PLC whenever my program disconnected from PLC. Please advise what should i do.

     
  • Anonymous

    Anonymous - 2015-08-19
    Post awaiting moderation.
  • Anonymous

    Anonymous - 2016-02-01
    Post awaiting moderation.
  • Anonymous

    Anonymous - 2018-07-31
    Post awaiting moderation.
  • Anonymous

    Anonymous - 2018-11-25
    Post awaiting moderation.

Anonymous
Anonymous

Add attachments
Cancel