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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
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
Hm, the offset was incorrect in writeCoil(). For pulse output the offset is different (for the same channel) on the Moxa device.