• V vijay chelliah

    I'm having a BACnet hardware controller device which is having some points created in it.
    I made a code which writes, gets and discovers points on a BACnet controller, but I need to use BACNet4J to create a new point with specific properties.

    posted in BACnet4J general discussion read more
  • V vijay chelliah

    I'm working on a data acquisition system wchich should work on linux laptop and i am using Modbus4J and have implemented my own serial port wrapper which will by default ask for port-name(String) which is usually (/dev/ttyUSB1, /dev/ttyUSB2, etc)

    But to my surprise the dev path to USB aren't constant and keeps changing in the order of connection.

    when I connect two serial port converts to two USD ports the first connected ones take /dev/ttyUSB0 and the later /dev/ttyUSB1. This is an issue.

    How is should have been done actually?

    posted in Modbus4J general discussion read more
  • V vijay chelliah

    I'm building a java modbus data acquisition system (using MODBUS4J), I've successfully communicated with the modbus device using its slave id, address, datatype.

    But is there a way to just detect slaves, by just addressing slaves from 0-255 without specific register or coil addresses? So, that slaves with matching slaveId's respond.

    posted in Modbus4J general discussion read more
  • V vijay chelliah

    wrapper.getInputStream is returning null.

    posted in Modbus4J general discussion read more
  • V vijay chelliah

    I've tested this code to detect a Modbus device ( was discovered by a discovery software) connected to my computer.
    but the code throw a null pointer Exception, can someone help me understand it.

    public class MasterTest {
    public static void main(String[] args) throws Exception {

    	String commPortId = "/dev/ttyUSB0";
    	int baudRate = 9600;
    	int flowControlIn = 0;
    	int flowControlOut = 0;
    	int dataBits = 0;
    	int stopBits = 0;
    	int parity = 1;
    	TestSerialPortWrapper wrapper = new TestSerialPortWrapper(commPortId, baudRate, flowControlIn, flowControlOut, dataBits, stopBits, parity);
        IpParameters ipParameters = new IpParameters();
        ModbusFactory modbusFactory = new ModbusFactory();
         ModbusMaster master = modbusFactory.createRtuMaster(wrapper);
        try {
            int slaveId = 2;
          BaseLocator<Number> locator = BaseLocator.holdingRegister(slaveId, 50, DataType.EIGHT_BYTE_INT_UNSIGNED);
            master.setValue(locator, 10000000);
        finally {

    posted in Modbus4J general discussion read more
  • V vijay chelliah

    I want to develop a JAVA code using MODBUS4J which should discover and read data from modbus controllers present in its network.

    Is there a feature like autodiscovery in modbus like that of bacnet?

    I have a doubt if my code should be a master or slave?

    if master can a network have multiple masters? for network might have a plc or a master modbus controller.

    if a slave can a slave communicate with a master to get all data?

    posted in Modbus4J general discussion read more