I am new to libnodave library and siemens PLC. I have installed the library on a CentOS.
To familiarize with this library I have tried the sample code provided testPPI.c on Netbeans IDE.It compiled without errors. I am using Siemens USB/PPI Multi-Master cable 6ES7 901-3DB30-0XA0 which when connect to USB port on my PC the LEDs blink momentarily twice and turn off.Then I use linux lsusb command to check if the cable has been detected and shows on terminal Siemens AG.
When I debug the code the serial port is found but the function daveConnectPLC returns a value of (-1025) and then a timeout error is displayed. It seems that there is driver issue with the cable but not sure.
Has someone encountered such problem ? How can I solve it ? Thanks. I tried alot without success.
Following is the code I a trying.
define LINUX
include <stdlib.h></stdlib.h>
include <stdio.h></stdio.h>
include "nodave.h"
include "nodave.c"
include "setport.h"
include "setport.c"
int main(int argc, char **argv) {
int a,b,c,
res;
float d;
daveInterface * di;
daveConnection * dc;
_daveOSserialType fds;
//if (-3<2) {
// printf("Usage: testPPI serial port.\n");
// exit(-1);
//}
Hi
I am new to libnodave library and siemens PLC. I have installed the library on a CentOS.
To familiarize with this library I have tried the sample code provided testPPI.c on Netbeans IDE.It compiled without errors. I am using Siemens USB/PPI Multi-Master cable 6ES7 901-3DB30-0XA0 which when connect to USB port on my PC the LEDs blink momentarily twice and turn off.Then I use linux lsusb command to check if the cable has been detected and shows on terminal Siemens AG.
When I debug the code the serial port is found but the function daveConnectPLC returns a value of (-1025) and then a timeout error is displayed. It seems that there is driver issue with the cable but not sure.
Has someone encountered such problem ? How can I solve it ? Thanks. I tried alot without success.
Following is the code I a trying.
define LINUX
include <stdlib.h></stdlib.h>
include <stdio.h></stdio.h>
include "nodave.h"
include "nodave.c"
include "setport.h"
include "setport.c"
int main(int argc, char **argv) {
int a,b,c,
res;
float d;
daveInterface * di;
daveConnection * dc;
_daveOSserialType fds;
// printf("Usage: testPPI serial port.\n");
// exit(-1);
//}
}