Modbus TCP write error

Beware: jython's Exception class is not related to java.lang.Exception, so if you specify one of them, you won't catch the other. You often need two except clauses. Start here: