Zuviel Werbung? - > Hier kostenlos beim SPS-Forum registrieren

Seite 3 von 4 ErsteErste 1234 LetzteLetzte
Ergebnis 21 bis 30 von 32

Thema: Help with the libnodave library

  1. #21
    vanvanero ist offline Neuer Benutzer
    Themenstarter
    Registriert seit
    07.06.2011
    Beiträge
    24
    Danke
    0
    Erhielt 0 Danke für 0 Beiträge

    Standard


    Zuviel Werbung?
    -> Hier kostenlos registrieren
    Sorry I didn't mean to say DOS, what I meant was in the command prompt. When I type the directory where the test program is, I receive the error (not recognized as an internal or external command.....)

  2. #22
    Registriert seit
    27.10.2005
    Ort
    Schwäbisch Gmünd
    Beiträge
    5.224
    Danke
    630
    Erhielt 955 Danke für 769 Beiträge

    Standard

    What does "DIR" say? Is this programm really in this directory including all needed DLLs?
    Rainer Hönle
    DELTA LOGIC GmbH

    Ein Computer kann das menschliche Gehirn nicht ersetzen. Engstirnigkeit kann unmöglich simuliert werden. (Gerd W. Heyse)

  3. #23
    vanvanero ist offline Neuer Benutzer
    Themenstarter
    Registriert seit
    07.06.2011
    Beiträge
    24
    Danke
    0
    Erhielt 0 Danke für 0 Beiträge

    Standard

    Zitat Zitat von Rainer Hönle Beitrag anzeigen
    What does "DIR" say? Is this programm really in this directory including all needed DLLs?

    DIR shows all the test programs including the one I am trying to run. It has all the c++ programs and header files that come with libnodave. I also see the libnodave.dll in there.

  4. #24
    Registriert seit
    29.03.2004
    Beiträge
    5.739
    Danke
    143
    Erhielt 1.686 Danke für 1.225 Beiträge

    Standard

    Zitat Zitat von vanvanero Beitrag anzeigen
    DIR shows all the test programs including the one I am trying to run. It has all the c++ programs and header files that come with libnodave. I also see the libnodave.dll in there.
    I think you are in the wrong directory.
    Change to directory libnodave-0.8.4.6\win where the .exe files are located.
    The testISO_TCP (without ending) file in the libnodave root directory is a compiled object file.

  5. #25
    vanvanero ist offline Neuer Benutzer
    Themenstarter
    Registriert seit
    07.06.2011
    Beiträge
    24
    Danke
    0
    Erhielt 0 Danke für 0 Beiträge

    Standard

    Zitat Zitat von Thomas_v2.1 Beitrag anzeigen
    I think you are in the wrong directory.
    Change to directory libnodave-0.8.4.6\win where the .exe files are located.
    The testISO_TCP (without ending) file in the libnodave root directory is a compiled object file.
    Thanks all. Indeed, I was in the wrong directory. I went into Debug folder and ran the test program from there. Thanks for the help.

  6. #26
    vanvanero ist offline Neuer Benutzer
    Themenstarter
    Registriert seit
    07.06.2011
    Beiträge
    24
    Danke
    0
    Erhielt 0 Danke für 0 Beiträge

    Standard

    To all who helped thank you, however I have another question regarding this test program. Is there any way to run the test programs (I use testISO_TCP) without the connection routine? In other words, can I comment out daveNewconnection and be able to read and write to a PLC? As of now, I was able to comment out the following code:

    // dc =daveNewConnection(di,2,0,useSlot); // insert your rack and slot here

    this compiles and builds but when ran, it crashes.... any suggestions?

  7. #27
    Registriert seit
    29.03.2004
    Beiträge
    5.739
    Danke
    143
    Erhielt 1.686 Danke für 1.225 Beiträge

    Standard

    Zitat Zitat von vanvanero Beitrag anzeigen
    To all who helped thank you, however I have another question regarding this test program. Is there any way to run the test programs (I use testISO_TCP) without the connection routine? In other words, can I comment out daveNewconnection and be able to read and write to a PLC? As of now, I was able to comment out the following code:

    // dc =daveNewConnection(di,2,0,useSlot); // insert your rack and slot here

    this compiles and builds but when ran, it crashes.... any suggestions?
    Why don't you want to call this function? It allocates the memory and sets up the internal data structures.

    Sounds like: I want to drive with my car to hamburg, how can I do it without starting my engine?

  8. #28
    vanvanero ist offline Neuer Benutzer
    Themenstarter
    Registriert seit
    07.06.2011
    Beiträge
    24
    Danke
    0
    Erhielt 0 Danke für 0 Beiträge

    Standard

    Zitat Zitat von Thomas_v2.1 Beitrag anzeigen
    Why don't you want to call this function? It allocates the memory and sets up the internal data structures.

    Sounds like: I want to drive with my car to hamburg, how can I do it without starting my engine?
    I don't know where Hamburg is, but it sounds far. I want to try this, because i'm experiencing some crashing in my program, and I believe it is happening in the connection step. I want to try to read and write without having this connection routine. Is this possible at all?

  9. #29
    Registriert seit
    17.06.2004
    Ort
    Offenau
    Beiträge
    3.746
    Danke
    209
    Erhielt 421 Danke für 338 Beiträge

    Standard

    Zitat Zitat von vanvanero Beitrag anzeigen
    I don't know where Hamburg is, but it sounds far. I want to try this, because i'm experiencing some crashing in my program, and I believe it is happening in the connection step. I want to try to read and write without having this connection routine. Is this possible at all?
    No it isn't! How will you read data without being connected?
    ---------------------------------------------
    Jochen Kühner
    https://github.com/jogibear9988/DotN...ToolBoxLibrary - Bibliothek zur Kommunikation mit PLCs und zum öffnen von Step 5/7 Projekten

  10. #30
    Registriert seit
    19.06.2003
    Beiträge
    2.200
    Danke
    85
    Erhielt 259 Danke für 175 Beiträge

    Standard


    Zuviel Werbung?
    -> Hier kostenlos registrieren
    Zitat Zitat von Jochen Kühner Beitrag anzeigen
    No it isn't! How will you read data without being connected?
    You don't have to connect to a phone book, for example, and yet you can read data...
    But with S7 protocol, you have to. That's a choice Siemens made. It's "human convention", something somebody established at some time. Like driving on the left or right side. But daveNewConnection does not connect. This is done later in daveConnectPLC().

    dc=daveNewConnection reserves memory for the data dc points at. If you don't do, how wil you use functions like daveRead(dc, ...) which expect a pointer to dc as their 1st parameter?
    If you really want to avoid malloc() and heap memory, you can declare a global variable:
    daveConnection myDC;
    I am not sure whether daveNewConnection() initializes some fields. Look into source code. And if so, copy the initializing code into your program.
    After that, you can pass &myDC to any function expecting a pointer to
    a daveConnection.

Ähnliche Themen

  1. .Net Library PLCCom S7
    Von Indi.An-er im Forum Werbung und Produktneuheiten
    Antworten: 5
    Letzter Beitrag: 28.09.2010, 13:41
  2. LibNodave mit Routing und Connection Library...
    Von Jochen Kühner im Forum Hochsprachen - OPC
    Antworten: 0
    Letzter Beitrag: 21.06.2010, 11:49
  3. Symbol Library
    Von K-SYSTEM-D im Forum Hochsprachen - OPC
    Antworten: 7
    Letzter Beitrag: 08.06.2010, 18:03
  4. LibNoDave und Connection Library mit Routing...
    Von Jochen Kühner im Forum Hochsprachen - OPC
    Antworten: 2
    Letzter Beitrag: 27.05.2010, 08:06
  5. FB in library???
    Von rene im Forum Simatic
    Antworten: 1
    Letzter Beitrag: 24.10.2007, 08:22

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •