Package net.wimpi.modbusme.io

Examples of net.wimpi.modbusme.io.ModbusTransaction.execute()


      trans.setRequest(req);

      //5. Execute the transaction repeat times
      int k = 0;
      do {
        trans.execute();
    
        ReadInputRegistersResponse res = (ReadInputRegistersResponse) trans.getResponse();
        if (Modbus.debug)
          System.out.println("Response: " +
              res.getHexMessage()
View Full Code Here


      trans.setRequest(req);

      //5. Execute the transaction repeat times
      int k = 0;
      do {
        trans.execute();

        if (Modbus.debug) System.out.println("Response: " +
            trans.getResponse().getHexMessage()
        );
        k++;
View Full Code Here

            ((ReadInputRegistersResponse) ai_trans.getResponse()).getRegister(0).getValue();

        //write only if differ
        if (new_in != last_out) {
          new_out.setValue(new_in); //update register
          ao_trans.execute();
          last_out = new_in;
          if(Modbus.debug) System.out.println("Updated Register with value from Input Register.");
        }
      } while (true);
View Full Code Here

      trans.setRequest(req);

      //4. Execute the transaction repeat times
      int k = 0;
      do {
        trans.execute();

        if (Modbus.debug) System.out.println("Response: " +
            trans.getResponse().getHexMessage()
        );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.