Ejemplo n.º 1
0
 public void InitSerialSocketController(string comName)
 {
     modBus       = new MRW_ModBus();
     serialPort   = new MRW_SerialPort(comName);
     serialRecive = new SerialReciveController();
     //event recive
     serialPort.DataReceived   += serialRecive.Recive;
     serialRecive.DataReceived += dataRecive;
 }
Ejemplo n.º 2
0
 private static void InitSerialPort(string comName)
 {
     serialPort = new MRW_SerialPort(new System.IO.Ports.SerialPort(comName.ToUpper(), 19200));
     serialPort.openPort();
     serialPort.DataReceived += serialPortDataReceived;
 }