[FONT="]I am using a Micrologix 1000 connected to the Ethernet trough a 1761-NET-ENI to a local private network with no firewall. I am able to connect, program an get online from Windows, (even AdvancedHMI works perfect), but from Linux, the error is constant, I am convinced that is something I am doing Wrong either in the code or in the usage.[/FONT]
[FONT="]It says it connects and opens the session, but when reading it goes into the error.[/FONT]
[FONT="]Starting, Pid = 1265[/FONT]
[FONT="]Entering OpenSession[/FONT]
[FONT="]OpenSession Ok[/FONT]
[FONT="]Entering RegisterSession[/FONT]
[FONT="]RegisterSession Ok[/FONT]
[FONT="]Entering ConnectPLCOverCNET[/FONT]
[FONT="]ConnectPLCOverCNET Ok,[/FONT]
[FONT="]Reading N7:00[/FONT]
[FONT="]Error : ReadPLCData Illegal command or format (16:0)[/FONT]
[FONT="]Entering Forward_Close[/FONT]
[FONT="]Forward_Close Success[/FONT]
[FONT="]UnRegister : Success[/FONT]
[FONT="]Entering CloseSession[/FONT]
[FONT="] [/FONT]
[FONT="]This is what I have in code [/FONT]
[FONT="] [/FONT]
[FONT="]printf("entering RegisterSession \n");[/FONT]
[FONT="] res=RegisterSession(session);[/FONT]
[FONT="] if (res!=Error)[/FONT]
[FONT="] { int i,val_int,val_bool;[/FONT]
[FONT="] float val_float;[/FONT]
[FONT="] printf("RegisterSession Ok\n");[/FONT]
[FONT="] printf("entering ConnectPLCOverCNET\n");[/FONT]
[FONT="] Eip_Connection *connection=ConnectPLCOverCNET([/FONT]
[FONT="] session, // session whe have open[/FONT]
[FONT="] LGX, // plc type[/FONT]
[FONT="] 0x12345678, // Target To Originator connection ID[/FONT]
[FONT="] 0x6789, // Connection Serial Number[/FONT]
[FONT="] 5000, // Request Packet Interval[/FONT]
[FONT="] path, // Path to the ControlLogix[/FONT]
[FONT="] sizeof(path) // path size[/FONT]
[FONT="] );[/FONT]
[FONT="] if (connection!=NULL)[/FONT]
[FONT="] {[/FONT]
[FONT="] printf("ConnectPLCOverCNET Ok, \n");[/FONT]
[FONT="] [/FONT]
[FONT="] printf("Reading %s\n",var);[/FONT]
[FONT="] PLC_Read *data=ReadPLCData(session,connection,NULL,NULL,0,LGX,tns++,var,count);[/FONT]
[FONT="] [/FONT]