private void Form1_Load(object sender, EventArgs e) { board.AnalogPortConfigurationOut(); board.DigitalConfigurationOut(); timer1.Interval = 100; timer2.Interval = 100; board.DigitOutput(0, MccDaq.DigitalLogicState.Low); CoreSerialize cs = new CoreSerialize(); TParameters dataT = new TParameters(); try { dataT = cs.TParamDeSerializeNow(); tbLastTime_1.Text = dataT.lastTime_1.ToString(); tbIntervalTime_1.Text = dataT.intervalTime_1.ToString(); tbCircle_1.Text = dataT.circle_1.ToString(); tbVoltage_1.Text = dataT.voltage_1.ToString(); tbLastTime_2.Text = dataT.lastTime_2.ToString(); tbIntervalTime_2.Text = dataT.intervalTime_2.ToString(); tbCircle_2.Text = dataT.circle_2.ToString(); tbVoltage_2.Text = dataT.voltage_2.ToString(); tbLastTime_3.Text = dataT.lastTime_3.ToString(); tbIntervalTime_3.Text = dataT.intervalTime_3.ToString(); tbCircle_3.Text = dataT.circle_3.ToString(); tbVoltage_3.Text = dataT.voltage_3.ToString(); tbLastTime_4.Text = dataT.lastTime_4.ToString(); tbIntervalTime_4.Text = dataT.intervalTime_4.ToString(); tbCircle_4.Text = dataT.circle_4.ToString(); tbVoltage_4.Text = dataT.voltage_4.ToString(); } catch { TParameters tp = new TParameters() { lastTime_1 = 3, intervalTime_1 = 3, circle_1 = 3, voltage_1 = 3.5, lastTime_2 = 3, intervalTime_2 = 3, circle_2 = 3, voltage_2 = 3.5, lastTime_3 = 3, intervalTime_3 = 3, circle_3 = 3, voltage_3 = 3.5, lastTime_4 = 3, intervalTime_4 = 3, circle_4 = 3, voltage_4 = 3.5, }; cs.TParammSerializeNow(tp); dataT = cs.TParamDeSerializeNow(); tbLastTime_1.Text = dataT.lastTime_1.ToString(); tbIntervalTime_1.Text = dataT.intervalTime_1.ToString(); tbCircle_1.Text = dataT.circle_1.ToString(); tbVoltage_1.Text = dataT.voltage_1.ToString(); tbLastTime_2.Text = dataT.lastTime_2.ToString(); tbIntervalTime_2.Text = dataT.intervalTime_2.ToString(); tbCircle_2.Text = dataT.circle_2.ToString(); tbVoltage_2.Text = dataT.voltage_2.ToString(); tbLastTime_3.Text = dataT.lastTime_3.ToString(); tbIntervalTime_3.Text = dataT.intervalTime_3.ToString(); tbCircle_3.Text = dataT.circle_3.ToString(); tbVoltage_3.Text = dataT.voltage_3.ToString(); tbLastTime_4.Text = dataT.lastTime_4.ToString(); tbIntervalTime_4.Text = dataT.intervalTime_4.ToString(); tbCircle_4.Text = dataT.circle_4.ToString(); tbVoltage_4.Text = dataT.voltage_4.ToString(); } }
private void OpenLoop() { pc.DigitOutput(3, MccDaq.DigitalLogicState.Low); pc.DigitOutput(4, MccDaq.DigitalLogicState.High); pc.DigitOutput(2, MccDaq.DigitalLogicState.High); }