public override void read() { //if (_port == null) return ; //SerialPort port = new SerialPort(this.InterfaceName, this.parameter); //port.Open(); //var factory = new ModbusFactory(); //IModbusMaster master = factory.CreateRtuMaster(port); // read back ushort[] rb = new ushort[2]; rb[0] = ReadAddress; rb[1] = 2; ReadCommand?.Invoke(this, rb); }