Example #1
0
 private void StopButton_Click(object sender, EventArgs e)
 {
     byte[] cmdByte = new byte[10] {
         0xAA, 1, 0, 0, 0, 0, 0, 0, 0, 0xBB
     };
     CGloabal.WriteToCom(CGloabal.g_serialPorForUUT, cmdByte, 10);
 }
Example #2
0
        private void chipReset_Click(object sender, EventArgs e)
        {
            var chip = (byte)chipSelect.SelectedIndex;
            var path = (byte)pathSelect.SelectedIndex;

            Byte[] cmdByte = new Byte[10] {
                0XAA, 0X02, 0X00, 0X00, 0X00, 0X00, 0X00, 0X00, 0X00, 0XBB
            };
            cmdByte[2] = chip;
            cmdByte[3] = path;

            int error = CGloabal.WriteToCom(CGloabal.g_serialPorForUUT, cmdByte, 10);

            if (error < 0)
            {
                MessageBox.Show("芯片复位失败");
                return;
            }
        }
Example #3
0
        /// <summary>
        /// 稳定性测试——执行测试
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnTest_Click(object sender, EventArgs e)
        {
            CGloabal.g_serialPorForUUT.ReceivedBytesThreshold = CGloabal.nCOM_RECV_NUMS;
            CGloabal.g_serialPorForUUT.DataReceived          += new SerialDataReceivedEventHandler(g_serialPort_DataReceived); //打开串口后开始接收数据

            //变化电压3
            Timer tVolChange = new Timer();

            tVolChange.Interval = 300000;
            tVolChange.Tick    += Fn_CircleVol;
            tVolChange.Enabled  = true;

            //变化电压4
            Timer tEleChange = new Timer();

            tEleChange.Interval = 1200000;
            tEleChange.Tick    += Fn_CircleEle;
            tEleChange.Enabled  = true;

            byte[] cmdByte = new byte[10] {
                0xAA, 1, 0, 0, 1, 0, 0, 0, 0, 0xBB
            };
            CGloabal.WriteToCom(CGloabal.g_serialPorForUUT, cmdByte, 10);
        }