J2Mod basic Master and Slave Questions
I am trying to make an Modbus Slave and Master using j2mod(it's version 1.0.6 tho, so that is compatible with another program), and i do have some general questions about the code i found online. I have found almost no useful documentation what so ever, so I'm kind of clueless. TcpMaster this.addr = InetAddress.getByName("127.0.0.1"); conn = new TCPMasterConnection(addr); conn.setPort(port); conn.connect(); req = new ReadInputDiscretesRequest(ref, count); trans = new ModbusTCPTransaction(conn); trans.setRequest(req); trans.execute(); res = (ReadInputDiscretesResponse) trans.getResponse();