• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. libu7alex

    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 Mango 5 Documentation Website
    L
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    libu7alex

    @libu7alex

    0
    Reputation
    572
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    libu7alex Unfollow Follow

    Latest posts made by libu7alex

    • RTU RS232 communication problem

      While using ReadSerialTest inside the package com.serotonin.modbus4j.test, I am getting the error mentioned below for Modbus RTU over RS232.
      at com.serotonin.modbus4j.sero.messaging.InputStreamListener.run

      Actually the software doesn't transmit any data over RS232. Hence its receiving a null pointer exception on the receive side.
      Output stream this.out is null, not assigned.
      public StreamTransport(InputStream in, OutputStream out) {
      this.out = out;
      this.in = in;
      }

      What could be the reason. Please help me to resolve the problem.

      posted in Modbus4J general discussion
      L
      libu7alex
    • RE: How to cast BatchResults getValue(n) property to int in ModBus TCP/IP

      Thank you so much it works.

      posted in Modbus4J general discussion
      L
      libu7alex
    • How to cast BatchResults getValue(n) property to int in ModBus TCP/IP
          BatchRead<Integer> batch = new BatchRead<Integer>();
          int add;
          int reg;
          int typ;
          add = FEOHdb.intDB[1][3];
         for (int m = 1 ; m < FEOHdb.tDev; m++){
      	   add = FEOHdb.intDB[m][3];
         
          for (int n = 1; n < FEOHdb.mapQty; n++ ){
          reg =FEOHdb.mapInt[n][1];
          typ =FEOHdb.mapInt[n][2];
         	batch.addLocator(n-1, BaseLocator.holdingRegister(add, reg, typ));
          }
      }
          
      
          try {
              master.init();
      
              while (pool) {
                  batch.setContiguousRequests(false);
                  BatchResults<Integer> results = master.send(batch);
                              
                  for (int n = 0; n < FEOHdb.mapQty; n++){ 
                  	System.out.println("Value =  " + (int) results.getValue(n));
                  }
                  Thread.sleep(500);
             
              }
      
      posted in Modbus4J general discussion
      L
      libu7alex