public CalibForm() { InitializeComponent(); currentForm = this; //// plc protocol init //PLCinfo = new DeltaIncomingInformation(); //ClassDeltaProtocol = new classDeltaProtocol(Properties.Settings.Default.plcComPort, 9600, PLCinfo); // multplexing protocol init MultiplexingInfo = new MultiplexingIncomingInformation(); classMultiplexing = new classMultiplexing(Properties.Settings.Default.multiplexingComPort, 115200, MultiplexingInfo); // DP protocol init DPinfo = new DpIncomingInformation(); classDpCommunication = new ClassDpCommunication(Properties.Settings.Default.dpComPort, 115200, DPinfo); //// Temp controller protocol init //tempControllerInstanse = new TempControllerProtocol(Properties.Settings.Default.TempControllerComPort, 9600); // Calibration class init classCalibrationInfo = new ClassCalibrationInfo(tempControllerInstanse, classDpCommunication, classMultiplexing, ClassDeltaProtocol); UpdateTempTime = DateTime.Now; }
public ConfigForm(ClassDpCommunication dpProtocolInstanse, CalibForm calibFormcaller, string ver) { calibForm = calibFormcaller; InitializeComponent(); DpProtocolInstanse = dpProtocolInstanse; Text += " Ver " + ver; tb_batch.Text = Properties.Settings.Default.Batch; tb_fwVersion.Text = Properties.Settings.Default.FwVersion; tb_stationId.Text = Properties.Settings.Default.StationId.ToString(); tb_userName.Text = Properties.Settings.Default.UserId; }
public ClassCalibrationInfo(TempControllerProtocol tempControllerInstanse, ClassDpCommunication ClassDpCommunication, classMultiplexing ClassMultiplexing, classDeltaProtocol classDeltaIncomingInformation) { //// DP TempController //ClassTempControllerInstanse = tempControllerInstanse; // DP comunication classDpCommunicationInstanse = ClassDpCommunication; // Multiplexer comunication classMultiplexingInstanse = ClassMultiplexing; ////delta protocol //classDeltaProtocolInstanse = classDeltaIncomingInformation; }
public ProgForm(ClassCalibrationInfo CalibrationInfo, StartForm SenderForm) { InitializeComponent(); //init calibration data classCalibrationInfo = CalibrationInfo; startForm = SenderForm; // multplexing protocol init MultiplexingInfo = new MultiplexingIncomingInformation(); MultiplexingProtocolInstanse = CalibrationInfo.classMultiplexingInstanse; // DP protocol init //DPinfo = new DpIncomingInformation(); DpProtocolInstanse = CalibrationInfo.classDpCommunicationInstanse; }
public ConfigForm(ClassDpCommunication dpProtocolInstanse, CalibForm calibFormcaller) { calibForm = calibFormcaller; InitializeComponent(); DpProtocolInstanse = dpProtocolInstanse; }
private void bt_next_Click(object sender, EventArgs e) { if (Properties.Settings.Default.StationType == "CalibrationStation") { if (calibForm == null) { //MultiplexingIncomingInformation MultiplexingInfo = new MultiplexingIncomingInformation(); //classMultiplexing classMultiplexing = new classMultiplexing(Properties.Settings.Default.multiplexingComPort, 115200, MultiplexingInfo); //DpIncomingInformation DPinfo = new DpIncomingInformation(); //ClassDpCommunication ClassDpCommunication = new ClassDpCommunication(Properties.Settings.Default.dpComPort, 115200, DPinfo); //tempControllerInstanse = new TempControllerProtocol(Properties.Settings.Default.TempControllerComPort, 9600); //DeltaIncomingInformation PLCinfo = new DeltaIncomingInformation(); //classDeltaProtocol ClassDeltaProtocol = new classDeltaProtocol(Properties.Settings.Default.plcComPort, 9600, PLCinfo); //classCalibrationInfo = new ClassCalibrationInfo(tempControllerInstanse, ClassDpCommunication, classMultiplexing, ClassDeltaProtocol); //calibForm = new CalibForm(classCalibrationInfo); } } else if (Properties.Settings.Default.StationType == "ProgramStation") { if (progForm == null) { DeltaIncomingInformation PLCinfo = new DeltaIncomingInformation(); classDeltaProtocol ClassDeltaProtocol = new classDeltaProtocol(Properties.Settings.Default.plcComPort, 9600, PLCinfo); MultiplexingIncomingInformation MultiplexingInfo = new MultiplexingIncomingInformation(); classMultiplexing classMultiplexing = new classMultiplexing(Properties.Settings.Default.multiplexingComPort, 115200, MultiplexingInfo); DpIncomingInformation DPinfo = new DpIncomingInformation(); ClassDpCommunication ClassDpCommunication = new ClassDpCommunication(Properties.Settings.Default.dpComPort, 115200, DPinfo); tempControllerInstanse = new TempControllerProtocol(Properties.Settings.Default.TempControllerComPort, 9600); classCalibrationInfo = new ClassCalibrationInfo(tempControllerInstanse, ClassDpCommunication, classMultiplexing, ClassDeltaProtocol); progForm = new ProgForm(classCalibrationInfo, this); } } classCalibrationInfo.DpCountAxist = 0; for (int i = 0; i <= MAX_DP_DEVICES; i++) { if (dgv_registerDpPacket.Rows[i].Cells[1].Value == null) { break; } if ((bool)dgv_registerDpPacket.Rows[i].Cells[1].Value == false) { break; } ClassDevice NewExistDevice = new ClassDevice(); classCalibrationInfo.DpCountAxist++; if (dgv_registerDpPacket.Rows[i].Cells[2].Value != null) { NewExistDevice.DeviceSerialNumber = dgv_registerDpPacket.Rows[i].Cells[2].Value.ToString(); } classCalibrationInfo.classDevices[i] = NewExistDevice; } string UpdateMassege = string.Format("{0} DP devices added.", classCalibrationInfo.DpCountAxist.ToString()); MessageBox.Show(UpdateMassege); this.Hide(); if (Properties.Settings.Default.StationType == "CalibrationStation") { calibForm.Show(); } else if (Properties.Settings.Default.StationType == "ProgramStation") { progForm.Show(); } }
public CalibForm() { InitializeComponent(); currentForm = this; // check the names of the comports... /* * classSerialQueryDriver.GetComPortName( * ref MutiplexingComPortName, * Properties.Settings.Default.MultiplexerComPortID, * ref PlcComPortName, * Properties.Settings.Default.PlcComPortID, * ref DpComPortName, * Properties.Settings.Default.DpComPortID, * ref TempControllerComPortName, * Properties.Settings.Default.TempControllerComPortID); */ // plc protocol init PlcComPortName = Properties.Settings.Default.plcComPort; PLCinfo = new DeltaIncomingInformation(); ClassDeltaProtocol = new classDeltaProtocol(PlcComPortName, 9600, PLCinfo, this); // multplexing protocol init MutiplexingComPortName = Properties.Settings.Default.multiplexingComPort; MultiplexingInfo = new MultiplexingIncomingInformation(); classMultiplexing = new classMultiplexing(MutiplexingComPortName, 115200, MultiplexingInfo); // DP protocol init DpComPortName = Properties.Settings.Default.dpComPort; DPinfo = new DpIncomingInformation(); classDpCommunication = new ClassDpCommunication(DpComPortName, 115200, DPinfo, this); // Temp controller protocol init TempControllerComPortName = Properties.Settings.Default.TempControllerComPort; tempControllerInstanse = new TempControllerProtocol(TempControllerComPortName, 9600, true); //tempControllerInstanse = new TempControllerProtocol("COM16", 9600); //update versions swVersions = new SwVersion("1.0.0", "", Application.ProductVersion); // Calibration class init classCalibrationInfo = new ClassCalibrationInfo(tempControllerInstanse, classDpCommunication, classMultiplexing, ClassDeltaProtocol, swVersions, this); bt_startCalibration.Enabled = false; bt_stopCalibration.Enabled = false; bt_pauseStartCalib.Enabled = false; ScanButton.Enabled = false; UpdateTempTime = DateTime.Now; foreach (Device dev in classSerialQueryDriver.devices) { rtb_info.AppendText(dev.ToString()); Console.WriteLine(dev.ToString()); } rtb_info.ScrollToCaret(); update_thread = new Thread(timer_update_thread); update_thread.Start(); }