//3. Create the master facade
msm = new ModbusSerialMaster(params);
msm.connect();
do {
if (msm.writeCoil(slaveId, 4, true) == true) {
System.out.println("Set output 5 to true");
} else {
System.err.println("Error setting slave " + slaveId + " output 5");
}
BitVector coils = msm.readCoils(slaveId, 0, 8);