Menu

Pulse Output mode on Moxa E1214 causes exception when calling writeCoil()

Help
Bjoern
2014-02-25
2014-02-26
  • Bjoern

    Bjoern - 2014-02-25

    Hi

    I'm using Jamod for controlling outputs on a Moxa E1214-T. I'm able to change the outputs just fine when the output mode is configured as a digital output (DO) on the Moxa device, but when I change the output to "Pulse Output" I get an exception when I call writeCoil():

    Exception in thread "main" net.wimpi.modbus.ModbusSlaveException: Error Code = 3
    at net.wimpi.modbus.io.ModbusTCPTransaction.execute(ModbusTCPTransaction.java:207)
    at net.wimpi.modbus.facade.ModbusTCPMaster.writeCoil(ModbusTCPMaster.java:195)
    at Main.main(Main.java:18)

    My program is quite simple:

    public static void main(String[] args) throws Exception {
    
        ModbusTCPMaster master = new ModbusTCPMaster("10.10.10.13");
        master.connect();
        master.writeCoil(1, 3, true);
    }
    

    So basically when output mode is "Digital Output" it works fine and when the output mode is "Pulse Output" I get an exception.

    Do I have to write something else when it's "Pulse Output"?

    Kind regards
    Bjoern

     
  • Bjoern

    Bjoern - 2014-02-26

    Hm, the offset was incorrect in writeCoil(). For pulse output the offset is different (for the same channel) on the Moxa device.

     

Log in to post a comment.