Exemplo n.º 1
0
        private MSerialPort()
        {
            string COMA = ParamSetMgr.GetInstance().GetStringParam("A工位关闭曝光COM");
            string COMB = ParamSetMgr.GetInstance().GetStringParam("B工位关闭曝光COM");

            Para_Port[0] = new SerialPortOperation(COMA, 38400, Parity.None, 8, StopBits.One);
            Para_Port[1] = new SerialPortOperation(COMB, 38400, Parity.None, 8, StopBits.One);
        }
 public void CloseExposure()
 {
     byte[] bt = SerialPortOperation.StringToBtyes("#ISPW=808501");
     _serialPort.Write(bt, 0, bt.Length);
     Thread.Sleep(10);
     byte[] bt1 = SerialPortOperation.StringToBtyes("#ISPW=044180");
     _serialPort.Write(bt1, 0, bt1.Length);
     Thread.Sleep(10);
     byte[] bt2 = SerialPortOperation.StringToBtyes("#ISPW=044200");
     _serialPort.Write(bt2, 0, bt2.Length);
     Thread.Sleep(10);
     byte[] bt3 = SerialPortOperation.StringToBtyes("#ISPW=837000");
     _serialPort.Write(bt3, 0, bt3.Length);
     Thread.Sleep(10);
     byte[] bt4 = SerialPortOperation.StringToBtyes("#ISPW=150100");
     _serialPort.Write(bt4, 0, bt4.Length);
     Thread.Sleep(10);
     byte[] bt5 = SerialPortOperation.StringToBtyes("#ISPW=270300");
     _serialPort.Write(bt5, 0, bt5.Length);
 }