-> 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.....)
Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
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.
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.
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?
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?
You don't have to connect to a phone book, for example, and yet you can read data...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.
Wir verwenden essentielle Cookies, damit diese Website funktioniert, und optionale Cookies, um den Komfort bei der Nutzung zu verbessern.
Siehe weitere Informationen und konfiguriere deine Einstellungen