Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

  • I am trying to simulate an TCP Modbus slave.

    I extended the class TcpSlave for this and added some Process Images.

    Unfortunately, the TcpSlave provides only the port to set.

    How can I set the IP Address of the slave ?

    I tried to add the following code snippet in TcpSlave but it doesn't help :

    
    
        @Override
        public void start() throws ModbusInitException {
            try {
                serverSocket = new ServerSocket(port);
    
               //Socket socket;
    
    
                
              //this should be the ip address of the slave
               Socket socket = new Socket("192.168.20.100", 502);
    
    
    
    
                while (true) {
                    socket = serverSocket.accept();
                    TcpConnectionHandler handler = new TcpConnectionHandler(socket);
                    executorService.execute(handler);
                }
    
    
    
    

    Can someone help me ?