micrologix 1400 plc communication with java suing ethernet Tcp ip

mehulpopat12

Member
Join Date
Aug 2014
Location
Vadodara
Posts
5
I want to read micrologix 1400 plc data with register address with the help of java program on ethernet using tcp ip.

Please anybody help me.

Thanks in advance.

-Mehul Popat
 
Hi am trying to communicate 1400 with java,, My connection s getting success & while reading N7:0 ,getting the exception follows Exception in thread "main"

Exception in thread "main" java.lang.NullPointerException
at com.emergys.plc.Rockwell.ReadWrite.ControlLogixConnector.receiveData(ControlLogixConnector.java:176)
at com.emergys.plc.Rockwell.ReadWrite.JavaMainController.main(JavaMainController.java:35)

My Code :

System.out.println("Coming inside the main Class....");
EthernetIpBufferUtil messageBuffer = null;
String host = "192.168.1.5";
int portNo = 80;
ControlLogixConnector c = new ControlLogixConnector(host,portNo);
c.connect();
System.out.println("Connection is OK..Reading started..");
String[] tagnames = {"N7:0"};
SimpleLogixCommunicator sComm = new SimpleLogixCommunicator(host, portNo);
ByteBuffer buffer = null;

/*CipMessageRouterRequest.fillBuffer(80, "TEST_INT_READ",(Object)0 , 1, messageBuffer);*/
//CipMessageRouterRequest.getRequestTagName(buffer, "N7:0");

Object[] taglistValue = sComm.read(tagnames);
for ( int i = 0 ; i < taglistValue.length ; i++)
{
System.out.println("Tag value List is : /n " + taglistValue);
}


How to get rid of this error

Thanks & Regards,
Nelliyan.G
 
Last edited:

Similar Topics

:huh: i don't know master password and i tried "1234" too but it didn't worked i want to upload new program but i think its password protected and...
Replies
7
Views
981
Hi guys, Could i connect simatic WinCC runtime with Micrologix 1400 PLC via Modbus?
Replies
0
Views
1,243
Hi guys, I'm chasing a strange one here and am trying to eliminate a far fetch theory I have. Background. I have a machine with 5 Micrologix...
Replies
3
Views
2,344
Thought I'd post this to help other's out :) Any further questions, don't hesitate to ask. Credit to Keithkyll for his advice!, Using 24v power...
Replies
0
Views
2,026
Hello everyone I have a problem of losing the ip address of the micrologix 1100 and 1400 PLC each time I lose power. the problem is that I...
Replies
0
Views
1,756
Back
Top Bottom