public async Task <bool> WriteCoilsAsync(int address, bool[] values)
 {
     if (this.CheckConnection())
     {
         try {
             using TcpClient client = new TcpClient(this.IpAddress, this.Port);
             ModbusIpMaster master = ModbusIpMaster.CreateIp(client);
             if (this.SlaveAddress != 0)
             {
                 await master.WriteMultipleCoilsAsync(this.SlaveAddress, (ushort)address, values);
             }
             else
             {
                 await master.WriteMultipleCoilsAsync((ushort)address, values);
             }
             client.Close();
             master.Dispose();
             return(true);
         } catch {
             return(false);
         }
     }
     return(false);
 }