private void btnDebugResistanceCapacitanceGetResults_Click(object sender, EventArgs e) { bool CorrectionEnable = false; if (chkDebugResistanceCapacitanceCorrectionEnable.Checked) { CorrectionEnable = true; } disableAllAPIButtons(); //TestProbe14SetGetAllResultsByHGA TestProbe14SetGetAllResultsByHGA.HGAIndex = Convert.ToByte(int.Parse(cboDebugResistanceCapacitanceHGA.Text)); TestProbe14SetGetAllResultsByHGA.Correction = Convert.ToByte(CorrectionEnable); byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe14SetGetAllResultsByHGA); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_results_by_hga_Message_ID, TestProbeAPICommand.HST_get_results_by_hga_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_cap_secondary_results_Message_ID, TestProbeAPICommand.HST_get_cap_secondary_results_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); enableAllAPIButtons(); }
private void frmMain_Shown(object sender, EventArgs e) { disableAllAPIButtons(); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_product_id_Message_ID, TestProbeAPICommand.HST_get_product_id_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_operation_mode_Message_ID, TestProbeAPICommand.HST_get_operation_mode_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_firmware_version_Message_ID, TestProbeAPICommand.HST_get_firmware_version_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); lblCommonSoftwareVersion.Text = "v" + Assembly.GetExecutingAssembly().GetName().Version.ToString(); Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR"); DateTime today = DateTime.Now; lblCommonTestDate.Text = today.ToShortDateString(); enableAllAPIButtons(); btnConfigurationLoadConfiguration_Click(sender, e); IsConfigurationSetupTempered = false; tabPageConfigurationSetup.Refresh(); }
private void btnDebugMUXSetMUXSwitch_Click(object sender, EventArgs e) { int FunctionalBlock = 0; if (rdxDebugMUXDAC.Checked) { FunctionalBlock = 1; } else if (rdxDebugMUXADC.Checked) { FunctionalBlock = 2; } else if (rdxDebugMUXCAP.Checked) { FunctionalBlock = 3; } //TestProbe30SetMUX TestProbe30SetMUX.FunctionalBlock = Convert.ToByte(FunctionalBlock); TestProbe30SetMUX.ChannelNumber = Convert.ToByte(int.Parse(cboDebugMUXCh.Text)); byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe30SetMUX); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_set_mux_Message_ID, TestProbeAPICommand.HST_set_mux_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }
private void btnDebugADCRead_Click(object sender, EventArgs e) { byte ADCNumber = 1; if (rdxDebugRegisterADC1.Checked) { ADCNumber = 1; } else { ADCNumber = 2; } //TestProbe28SetADCRead byte[] ByteArray = BitConverter.GetBytes(string.IsNullOrEmpty(txtDebugADCReadReg.Text) ? 0 : Convert.ToUInt32(txtDebugADCReadReg.Text, 16)); TestProbe28SetADCRead.RegisterAddress = ByteArray[0]; TestProbe28SetADCRead.ADCNumber = ADCNumber; byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe28SetADCRead); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_adc_read_Message_ID, TestProbeAPICommand.HST_adc_read_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }
private void CheckPCBACommunication() { if (boolPass) { Log.Info("Prompt", "1.) Checking PCBA Communication\n\n"); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_firmware_version_Message_ID, TestProbeAPICommand.HST_get_firmware_version_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); Delay(1000); UIUtility.BeginInvoke(this, () => { if (PCBACommunicationStatusFlag) { this.picTestStatus1.Image = (System.Drawing.Image)(new System.Drawing.Bitmap(ManufacturingTestTool.Properties.Resources.PASS, new System.Drawing.Size(36, 36))); } else { this.picTestStatus1.Image = (System.Drawing.Image)(new System.Drawing.Bitmap(ManufacturingTestTool.Properties.Resources.FAIL, new System.Drawing.Size(36, 36))); boolPass = false; } this.picTestStatus1.Visible = true; }); } }
private void btnDebugTemperatureGetTemperatures_Click(object sender, EventArgs e) { if (chkDebugTemperatureContinuous.Checked) { CommonFunctions.Instance.GetTemperatureContinuous = true; } else { CommonFunctions.Instance.GetTemperatureContinuous = false; } Task t = Task.Factory.StartNew(() => { do { //TestProbe33SetTemperatureRead TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_temperature_Message_ID, TestProbeAPICommand.HST_get_temperature_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); Thread.Sleep(CommonFunctions.Instance.DelayInBetweenCommandBatch); } while (CommonFunctions.Instance.GetTemperatureContinuous); }); }
private void btnPrecisorCompensationGetPrecisorCapacitanceCompensation_Click(object sender, EventArgs e) { disableAllAPIButtons(); if (String.Compare(cboPrecisorCompensationUpDownTabSelection.Text, "UP", true) == 0) { TestProbe53SetGetPrecisorCapacitanceCompensation.PrecisorIndex = 1; } else { TestProbe53SetGetPrecisorCapacitanceCompensation.PrecisorIndex = 2; } byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe53SetGetPrecisorCapacitanceCompensation); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_precisor_cap_compensation_Message_ID, TestProbeAPICommand.HST_get_precisor_cap_compensation_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); enableAllAPIButtons(); if (commandSentToMicroprocessor) { IsPrecisorCompensationTempered = false; tabPagePrecisorCompensation.Refresh(); } }
private void btnDebugADCWrite_Click(object sender, EventArgs e) { //TestProbe27ADCWrite if (rdxDebugRegisterADC1.Checked) { TestProbe27ADCWrite.ADCNumber = 1; } if (rdxDebugRegisterADC2.Checked) { TestProbe27ADCWrite.ADCNumber = 2; } byte[] ByteArray = BitConverter.GetBytes(string.IsNullOrEmpty(txtDebugADCWriteReg.Text) ? 0 : Convert.ToUInt32(txtDebugADCWriteReg.Text, 16)); TestProbe27ADCWrite.RegisterAddress = ByteArray[0]; ByteArray = BitConverter.GetBytes(string.IsNullOrEmpty(txtDebugADCWriteData.Text) ? 0 : Convert.ToUInt32(txtDebugADCWriteData.Text, 16)); TestProbe27ADCWrite.DataLSB = ByteArray[0]; TestProbe27ADCWrite.DataMid = ByteArray[1]; TestProbe27ADCWrite.DataMSB = ByteArray[2]; byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe27ADCWrite); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_adc_write_Message_ID, TestProbeAPICommand.HST_adc_write_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }
private void btnCableCalibrationGetCableCalibrationData_Click(object sender, EventArgs e) { if (String.Compare(cboCableCalibrationUpDownTabSelection.Text, "UP", true) == 0) { TestProbe44SetGetCableCalibrationResistanceResults.FlexCableIndex = 1; TestProbe51SetGetCableCalibrationCapacitanceResults.FlexCableIndex = 1; } else { TestProbe44SetGetCableCalibrationResistanceResults.FlexCableIndex = 2; TestProbe51SetGetCableCalibrationCapacitanceResults.FlexCableIndex = 2; } byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe44SetGetCableCalibrationResistanceResults); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_cable_calibration_res_results_Message_ID, TestProbeAPICommand.HST_get_cable_calibration_res_results_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe51SetGetCableCalibrationCapacitanceResults); APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_cable_calibration_cap_results_Message_ID, TestProbeAPICommand.HST_get_cable_calibration_cap_results_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); if (commandSentToMicroprocessor) { IsCableCalibrationTempered = false; tabPageCableCalibration.Refresh(); } }
private void btnCableCalibrationSetShortDetectionThreshold_Click(object sender, EventArgs e) { // TestProbe47SetShortDetectionThreshold byte[] ByteArray = BitConverter.GetBytes(string.IsNullOrEmpty(txtCableCalibrationShortDetectionThreshold.Text) ? 0 : int.Parse(txtCableCalibrationShortDetectionThreshold.Text)); TestProbe47SetShortDetectionThreshold.ThresholdVoltageLSBLow = ByteArray[0]; TestProbe47SetShortDetectionThreshold.ThresholdVoltageLSBMid = ByteArray[1]; TestProbe47SetShortDetectionThreshold.ThresholdVoltageMSBLow = ByteArray[2]; TestProbe47SetShortDetectionThreshold.ThresholdVoltageMSBHigh = ByteArray[3]; byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe47SetShortDetectionThreshold); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_set_short_detection_threshold_Message_ID, TestProbeAPICommand.HST_set_short_detection_threshold_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); enableAllAPIButtons(); if (commandSentToMicroprocessor) { IsCableCalibrationTempered = true; tabPageCableCalibration.Refresh(); } }
private void btnDesktopTestsSingleMeasure_Click(object sender, EventArgs e) { if (String.Compare(cboDesktopTestsUpDownTabSelection.Text, "UP", true) == 0) { TestProbe9SetStartMeasurement.FlexCableIndex = 1; } else { TestProbe9SetStartMeasurement.FlexCableIndex = 2; } byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe9SetStartMeasurement); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_start_meas_Message_ID, TestProbeAPICommand.HST_start_meas_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_short_detection_Message_ID, TestProbeAPICommand.HST_get_short_detection_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_res_results_Message_ID, TestProbeAPICommand.HST_get_res_results_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_cap_results_Message_ID, TestProbeAPICommand.HST_get_cap_results_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_cap_secondary_results_Message_ID, TestProbeAPICommand.HST_get_cap_secondary_results_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }
private void btnPCBACalibrationGetCh1TempOffset_CheckedChanged(object sender, EventArgs e) { TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_temp1_offset_Message_ID, TestProbeAPICommand.HST_get_temp1_offset_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }
private void btnCableCalibrationGetShortDetectionThreshold_Click(object sender, EventArgs e) { TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_short_detection_threshold_Message_ID, TestProbeAPICommand.HST_get_short_detection_threshold_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }
private void btnDebugMUXGetProcessorStatus_Click(object sender, EventArgs e) { TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_status_Message_ID, TestProbeAPICommand.HST_get_status_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }
private void btnDesktopTestsDisconnectDesktopTester_Click(object sender, EventArgs e) { TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_desktop_tester_disconnect_Message_ID, TestProbeAPICommand.HST_desktop_tester_disconnect_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }
public void btnGetConversionBoardD_Click(object sender, EventArgs e) { CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Clear(); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_conversion_board_id_Message_ID, TestProbeAPICommand.HST_get_conversion_board_id_Message_Name, TestProbeAPICommand.HST_get_conversion_board_id_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); HSTMachine.Instance.MainForm.constructAndSendWriteDataBuffer(false); }
private void PCBADisablePricisorCompensation() { Delay(1000); if (boolPass) { Log.Info("Prompt", "5.) Disable Precisor Compensation\n"); for (int index = 1; index < 3; index++) { // Read the Precisor Capaciatnce Compensation Value //TestProbe53SetGetPrecisorCapacitanceCompensation.PrecisorIndex = (byte)index; //byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe53SetGetPrecisorCapacitanceCompensation); //TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_precisor_cap_compensation_Message_ID, TestProbeAPICommand.HST_get_precisor_cap_compensation_Message_Size, ByteArrayFromStructure); //CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); //bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); //Delay(3000); //------------------------------- // Write the Precisor Capaciatnce Compensation Value if (index == 1) { TestProbe52SetPrecisorCapacitanceCompensation.PrecisorIndex = 1; } else { TestProbe52SetPrecisorCapacitanceCompensation.PrecisorIndex = 2; } TestProbe52SetPrecisorCapacitanceCompensation.EnableFlag = 0; //Disable the compensation byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe52SetPrecisorCapacitanceCompensation); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_set_precisor_cap_compensation_Message_ID, TestProbeAPICommand.HST_set_precisor_cap_compensation_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); Delay(1000); } //Delay(1000); UIUtility.BeginInvoke(this, () => { if (PCBADisablePrecisorCompensationStatusFlag) { this.picTestStatus5.Image = (System.Drawing.Image)(new System.Drawing.Bitmap(ManufacturingTestTool.Properties.Resources.PASS, new System.Drawing.Size(36, 36))); } else { this.picTestStatus5.Image = (System.Drawing.Image)(new System.Drawing.Bitmap(ManufacturingTestTool.Properties.Resources.FAIL, new System.Drawing.Size(36, 36))); boolPass = false; } this.picTestStatus5.Visible = true; }); } }
public void checkFirmwareVersion_Click(object sender, EventArgs e) { HSTMachine.Instance.MainForm.TestFirmwareVersionEvent += new EventHandler(DisplayFirmwareStatus); textBoxFirmwareVersion.Text = ""; CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Clear(); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_firmware_version_Message_ID, TestProbeAPICommand.HST_get_firmware_version_Message_Name, TestProbeAPICommand.HST_get_firmware_version_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); HSTMachine.Instance.MainForm.constructAndSendWriteDataBuffer(true); }
private void btnDesktopTestsHomeAll_Click(object sender, EventArgs e) { TestProbe81SetDesktopTesterHomingAxis.ServoAxis = 255; byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe81SetDesktopTesterHomingAxis); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_desktop_tester_set_homing_axis_Message_ID, TestProbeAPICommand.HST_desktop_tester_set_homing_axis_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }
private void btnDesktopTestsAllMoveToStandbyPosition_Click(object sender, EventArgs e) { TestProbe87SetDesktopTesterMoveToTaughtServoPosition.TaughtPositionIndex = 10; byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe87SetDesktopTesterMoveToTaughtServoPosition); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_desktop_tester_move_to_taught_servo_position_Message_ID, TestProbeAPICommand.HST_desktop_tester_move_to_taught_servo_position_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }
private void btnDesktopTestsConnectDesktopTester_Click(object sender, EventArgs e) { TestProbe80SetDesktopTesterConnect.PasswordLSB = 0xA5; TestProbe80SetDesktopTesterConnect.PasswordMSB = 0xA5; byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe80SetDesktopTesterConnect); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_desktop_tester_connect_Message_ID, TestProbeAPICommand.HST_desktop_tester_connect_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }
private void btnDebugBiasSensingGetSensingVoltages_Click(object sender, EventArgs e) { //TestProbe16SetGetSensingByHGA TestProbe16SetGetSensingByHGA.HGAIndex = Convert.ToByte(int.Parse(cboDebugBiasSensingGetBiasVoltagesHGA.Text)); byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe16SetGetSensingByHGA); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_sensing_by_hga_Message_ID, TestProbeAPICommand.HST_get_sensing_by_hga_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }
private void btnFunctionalTestsStartSelfTests_Click(object sender, EventArgs e) { TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_start_self_test_Message_ID, TestProbeAPICommand.HST_start_self_test_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); //TestProbe33SetTemperatureRead APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_temperature_Message_ID, TestProbeAPICommand.HST_get_temperature_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }
private void btnDebugMUXGetCapacitanceReading_Click(object sender, EventArgs e) { disableAllAPIButtons(); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_cap_reading_Message_ID, TestProbeAPICommand.HST_get_cap_reading_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); enableAllAPIButtons(); }
public ProductTypeSelectionForm() { InitializeComponent(); if (HSTMachine.Workcell.HSTSettings.Install.OperationMode != OperationMode.Simulation) { CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Clear(); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_conversion_board_id_Message_ID, TestProbeAPICommand.HST_get_conversion_board_id_Message_Name, TestProbeAPICommand.HST_get_conversion_board_id_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); HSTMachine.Instance.MainForm.constructAndSendWriteDataBuffer(false); } }
private void btnPCBACalibrationGetCalibrationData_Click(object sender, EventArgs e) { TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_calibration_data_Message_ID, TestProbeAPICommand.HST_get_calibration_data_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); if (commandSentToMicroprocessor) { IsPCBACalibrationTempered = false; tabPagePCBACalibration.Refresh(); } }
private void btnClearCableCalibrationResults_Click(object sender, EventArgs e) { TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_clear_all_cable_compensation_Message_ID, TestProbeAPICommand.HST_clear_all_cable_compensation_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); if (commandSentToMicroprocessor) { IsCableCalibrationTempered = false; tabPageCableCalibration.Refresh(); } }
public void btnFunctionalTestsStartSelfTests_Click(object sender, EventArgs e) { //clear all current result btnFunctionalTestsClearDisplay_Click(this, new EventArgs()); _testProcessDone = false; btnFunctionalTestsStartSelfTests.Enabled = false; btnFunctionalTestsStartSelfTests.Refresh(); byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(HSTMachine.Instance.MainForm.TestProbe9SetStartMeasurement); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Clear(); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_start_self_test_Message_ID, TestProbeAPICommand.HST_start_self_test_Message_Name, TestProbeAPICommand.HST_start_self_test_Message_Size); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); HSTMachine.Instance.MainForm.constructAndSendWriteDataBuffer(true); }
private void PCBAFunctionalTest() { Delay(1000); if (boolPass) { Log.Info("Prompt", "7.) PCBA Functional Test\n"); Delay(1000); ClearDisplay(); TestProbe9SetStartMeasurement.FlexCableIndex = 1; byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe9SetStartMeasurement); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_start_meas_Message_ID, TestProbeAPICommand.HST_start_meas_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_short_detection_Message_ID, TestProbeAPICommand.HST_get_short_detection_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_res_results_Message_ID, TestProbeAPICommand.HST_get_res_results_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_cap_results_Message_ID, TestProbeAPICommand.HST_get_cap_results_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_get_cap_secondary_results_Message_ID, TestProbeAPICommand.HST_get_cap_secondary_results_Message_Size, null); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); Delay(12000); UIUtility.BeginInvoke(this, () => { if (PCBAFunctionalTestStatusFlag) { this.picTestStatus7.Image = (System.Drawing.Image)(new System.Drawing.Bitmap(ManufacturingTestTool.Properties.Resources.PASS, new System.Drawing.Size(36, 36))); } else { this.picTestStatus7.Image = (System.Drawing.Image)(new System.Drawing.Bitmap(ManufacturingTestTool.Properties.Resources.FAIL, new System.Drawing.Size(36, 36))); boolPass = false; } this.picTestStatus7.Visible = true; }); } }
private void btnPCBACalibrationSetCh1TempOffset_CheckedChanged(object sender, EventArgs e) { if (int.Parse(txtPCBACalibrationCh1TemperatureOffset.Text) < -128 || int.Parse(txtPCBACalibrationCh1TemperatureOffset.Text) > 127) { Notify.PopUpError("Command Execution Aborted", "The value of CH1 Temperature Offset is out of range."); return; } TestProbe49SetTemp1Offset.TemperatureOffsetValue = Convert.ToByte(int.Parse(txtPCBACalibrationCh1TemperatureOffset.Text)); byte[] ByteArrayFromStructure = CommonFunctions.Instance.StructureToByteArray(TestProbe49SetTemp1Offset); TestProbeAPICommand APICommand = new TestProbeAPICommand(TestProbeAPICommand.HST_set_temp1_offset_Message_ID, TestProbeAPICommand.HST_set_temp1_offset_Message_Size, ByteArrayFromStructure); CommonFunctions.Instance.OutgoingTestProbeDataAPIs.Enqueue(APICommand); bool commandSentToMicroprocessor = constructAndSendWriteDataBuffer(); }