Compare commits
No commits in common. "6a80e5358c2026fcf40410734be91d7ab9649770" and "36c8c427b39106de296ccb89e12c6f2a8cc1c745" have entirely different histories.
6a80e5358c
...
36c8c427b3
4802
ProductFunctionTester/Main_Form.Designer.vb
generated
4802
ProductFunctionTester/Main_Form.Designer.vb
generated
File diff suppressed because it is too large
Load Diff
@ -1906,8 +1906,7 @@ Public Class Main_Form
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
For i = 0 To tableName.Length - 1
|
For i = 0 To tableName.Length - 1
|
||||||
DBCmd = "SELECT COUNT(PV_SN) FROM " & tableName(i) & " WHERE PV_SN = '" & TestData.Test_Serial & "'" &
|
DBCmd = "SELECT COUNT(PV_SN) FROM " & tableName(i) & " WHERE PV_SN = '" & TestData.Test_Serial & "'"
|
||||||
" AND DATE(TestDate) = CURDATE()"
|
|
||||||
Dim DupYn As Int16 = DBQueryScalar(DBCmd)
|
Dim DupYn As Int16 = DBQueryScalar(DBCmd)
|
||||||
|
|
||||||
If DupYn > 0 Then
|
If DupYn > 0 Then
|
||||||
@ -2606,82 +2605,14 @@ SettingFail:
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
'Private Sub Jig_End()
|
|
||||||
' If EndTest() Then
|
|
||||||
' txbWindow.AppendText("JIG Serial Test End : FAIL" & vbCrLf)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
' txbWindow.AppendText("JIG Serial Test End : Success" & vbCrLf)
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
Private Sub Jig_End()
|
Private Sub Jig_End()
|
||||||
For retryCount As Integer = 0 To 2
|
|
||||||
txbWindow.AppendText($"JIG 종료 시도 {retryCount + 1}/3" & vbCrLf)
|
|
||||||
|
|
||||||
If EndTest() Then
|
If EndTest() Then
|
||||||
txbWindow.AppendText($"JIG Serial Test End : FAIL (시도 {retryCount + 1})" & vbCrLf)
|
txbWindow.AppendText("JIG Serial Test End : FAIL" & vbCrLf)
|
||||||
|
|
||||||
If retryCount < 2 Then
|
|
||||||
Threading.Thread.Sleep(1000)
|
|
||||||
|
|
||||||
If JigSerial IsNot Nothing AndAlso JigSerial.IsOpen Then
|
|
||||||
JigSerial.DiscardInBuffer()
|
|
||||||
JigSerial.DiscardOutBuffer()
|
|
||||||
Threading.Thread.Sleep(200)
|
|
||||||
End If
|
|
||||||
Continue For
|
|
||||||
Else
|
|
||||||
txbWindow.AppendText("JIG 정상 종료 실패 - 강제 종료 실행" & vbCrLf)
|
|
||||||
ForceJigShutdown()
|
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
txbWindow.AppendText("JIG Serial Test End : Success" & vbCrLf)
|
txbWindow.AppendText("JIG Serial Test End : Success" & vbCrLf)
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ForceJigShutdown()
|
|
||||||
Try
|
|
||||||
txbWindow.AppendText("강제 JIG 종료 시작" & vbCrLf)
|
|
||||||
|
|
||||||
If JigSerial IsNot Nothing AndAlso JigSerial.IsOpen Then
|
|
||||||
Dim shutdownCommands() As String = {"[endmft]"}
|
|
||||||
|
|
||||||
For Each cmd In shutdownCommands
|
|
||||||
Try
|
|
||||||
SendData(cmd)
|
|
||||||
Threading.Thread.Sleep(500)
|
|
||||||
txbWindow.AppendText($"강제 종료 명령 전송: {cmd}" & vbCrLf)
|
|
||||||
Catch
|
|
||||||
|
|
||||||
End Try
|
|
||||||
Next
|
|
||||||
|
|
||||||
Try
|
|
||||||
Dim portName As String = JigSerial.PortName
|
|
||||||
Dim baudRate As Integer = JigSerial.BaudRate
|
|
||||||
|
|
||||||
JigSerial.Close()
|
|
||||||
Threading.Thread.Sleep(1000)
|
|
||||||
|
|
||||||
JigSerial.PortName = portName
|
|
||||||
JigSerial.BaudRate = baudRate
|
|
||||||
JigSerial.Open()
|
|
||||||
|
|
||||||
txbWindow.AppendText("시리얼 포트 재연결 완료" & vbCrLf)
|
|
||||||
Catch serialEx As Exception
|
|
||||||
txbWindow.AppendText($"시리얼 포트 재연결 실패: {serialEx.Message}" & vbCrLf)
|
|
||||||
End Try
|
|
||||||
End If
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
txbWindow.AppendText($"강제 종료 중 오류: {ex.Message}" & vbCrLf)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
Public Function EPTestRun() As Boolean
|
Public Function EPTestRun() As Boolean
|
||||||
Dim ForCnt As Int16 = 0
|
Dim ForCnt As Int16 = 0
|
||||||
Try
|
Try
|
||||||
@ -4557,32 +4488,12 @@ ErrorEnd:
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub InitializeDeviceState()
|
|
||||||
Try
|
|
||||||
txbWindow.AppendText("기기 상태 초기화 시작..." & vbCrLf)
|
|
||||||
|
|
||||||
Try
|
|
||||||
TestMode_On(0) ' MFT 모드를 0으로 초기화
|
|
||||||
Threading.Thread.Sleep(300)
|
|
||||||
Catch
|
|
||||||
|
|
||||||
End Try
|
|
||||||
|
|
||||||
txbWindow.AppendText("기기 상태 초기화 완료" & vbCrLf)
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
txbWindow.AppendText("기기 초기화 중 오류 (무시하고 계속): " & ex.Message & vbCrLf)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub rfFunction()
|
Private Sub rfFunction()
|
||||||
Try
|
Try
|
||||||
StartTime = MeasureTimeAll(MeasStart)
|
StartTime = MeasureTimeAll(MeasStart)
|
||||||
|
|
||||||
TestData.Test_Serial = txbBarcode.Text
|
TestData.Test_Serial = txbBarcode.Text
|
||||||
|
|
||||||
InitializeDeviceState()
|
|
||||||
|
|
||||||
If StartSwitch = True Then
|
If StartSwitch = True Then
|
||||||
If JigSerial.IsOpen = True Then
|
If JigSerial.IsOpen = True Then
|
||||||
|
|
||||||
@ -4714,19 +4625,6 @@ ProcessEnd:
|
|||||||
Jig_End()
|
Jig_End()
|
||||||
NormalEnd:
|
NormalEnd:
|
||||||
myscope.IO.Clear()
|
myscope.IO.Clear()
|
||||||
'txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
|
|
||||||
|
|
||||||
Try
|
|
||||||
If TestError = False Then
|
|
||||||
Jig_End() ' 지그 전원 차단
|
|
||||||
TestMode_On(0) ' MFT 모드 초기화
|
|
||||||
txbWindow.AppendText("비정상 종료로 인한 전원 차단" & vbCrLf)
|
|
||||||
End If
|
|
||||||
Catch normalEx As Exception
|
|
||||||
txbWindow.AppendText("정상 종료 처리 중 오류: " & normalEx.Message & vbCrLf)
|
|
||||||
End Try
|
|
||||||
|
|
||||||
'myscope.IO.Clear()
|
|
||||||
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
|
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@ -5372,12 +5270,12 @@ ProcessEnd:
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If TDDataSet(TD_Data.TestStep) = TestStepList.Rf_NewFail Or TDDataSet(TD_Data.TestStep) = TestStepList.RF_ReFail Then
|
If TDDataSet(TD_Data.TestStep) = TestStepList.Rf_NewFail Or TDDataSet(TD_Data.TestStep) = TestStepList.RF_ReFail Then
|
||||||
If processNum = TestStepList.RF_NewSuc Or processNum = TestStepList.Rf_ReSuc Then
|
If processNum = TestStepList.HF_NewSuc Or processNum = TestStepList.HF_ReSuc Then
|
||||||
txbOkCount.Text = Val(txbOkCount.Text) + 1
|
txbOkCount.Text = Val(txbOkCount.Text) + 1
|
||||||
txbNgCount.Text = Val(txbNgCount.Text) - 1
|
txbNgCount.Text = Val(txbNgCount.Text) - 1
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If processNum = TestStepList.Rf_NewFail Or processNum = TestStepList.RF_ReFail Then
|
If processNum = TestStepList.HF_NEWFail Or processNum = TestStepList.HF_ReFail Then
|
||||||
txbOkCount.Text = Val(txbOkCount.Text) - 1
|
txbOkCount.Text = Val(txbOkCount.Text) - 1
|
||||||
txbNgCount.Text = Val(txbNgCount.Text) + 1
|
txbNgCount.Text = Val(txbNgCount.Text) + 1
|
||||||
End If
|
End If
|
||||||
@ -5385,7 +5283,6 @@ ProcessEnd:
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Function CountUpdate() As Boolean
|
Private Function CountUpdate() As Boolean
|
||||||
If rdbAltoPD.Checked = True Then
|
If rdbAltoPD.Checked = True Then
|
||||||
DBCmd = "UPDATE " & pd1CntTableNow & " SET PD1_AltoCnt = '" & txbDayCount.Text & "', PD1_AltoOkCnt = '" & txbOkCount.Text & "', PD1_AltoNgCnt = '" & txbNgCount.Text & "' WHERE PD1_Date = '" & NowDate & "'"
|
DBCmd = "UPDATE " & pd1CntTableNow & " SET PD1_AltoCnt = '" & txbDayCount.Text & "', PD1_AltoOkCnt = '" & txbOkCount.Text & "', PD1_AltoNgCnt = '" & txbNgCount.Text & "' WHERE PD1_Date = '" & NowDate & "'"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user