1.기능검사 spectrum, scope clear 예외처리

2.버전 2.2.3
This commit is contained in:
hyelinjung 2026-03-04 17:03:09 +09:00
parent 03943cf576
commit 1cedc93a66
3 changed files with 60 additions and 41 deletions

View File

@ -10,7 +10,7 @@ Imports uPLibrary.Networking.M2Mqtt
Public Class Main_Form
Public Program_Name As String = "DUALSONIC_Multi_Function_Tester Ver."
Public Program_Version As String = "2.2.2"
Public Program_Version As String = "2.2.3"
''데이터 베이스 테이블 목록
@ -4834,7 +4834,8 @@ NormalEnd:
End If
startFail:
myscope.IO.Clear()
ScopeClear()
SpecClear()
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
End Sub
@ -4966,7 +4967,8 @@ processEnd:
Jig_End()
startFail:
myscope.IO.Clear()
ScopeClear()
SpecClear()
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
End Sub
@ -5126,7 +5128,8 @@ ProcessEnd:
Jig_End()
NormalEnd:
myscope.IO.Clear()
ScopeClear()
SpecClear()
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
End Sub
@ -5351,7 +5354,8 @@ processEnd:
Jig_End()
ErrorEnd:
myscope.IO.Clear()
ScopeClear()
SpecClear()
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
End Sub
@ -5556,7 +5560,8 @@ processEnd:
End If
Jig_End()
ErrorEnd:
myscope.IO.Clear()
ScopeClear()
SpecClear()
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
End Sub
@ -5692,7 +5697,8 @@ processEnd:
Jig_End()
ErrorEnd:
myscope.IO.Clear()
ScopeClear()
SpecClear()
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
End Sub
@ -5837,7 +5843,8 @@ ProcessEnd:
End If
Jig_End()
NormalEnd:
myscope.IO.Clear()
ScopeClear()
SpecClear()
Try
If TestError = False Then
Jig_End() ' 지그 전원 차단
@ -5987,7 +5994,8 @@ processEnd:
Jig_End()
ErrorEnd:
myscope.IO.Clear()
ScopeClear()
SpecClear()
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
End Sub
@ -6181,8 +6189,8 @@ ProcessEnd:
End If
Jig_End()
NormalEnd:
myscope.IO.Clear()
'txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
ScopeClear()
SpecClear()
Try
If TestError = False Then
@ -6194,7 +6202,6 @@ NormalEnd:
txbWindow.AppendText("정상 종료 처리 중 오류: " & normalEx.Message & vbCrLf)
End Try
'myscope.IO.Clear()
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
End Sub
Private Sub ldmVrmsFunction()
@ -6322,7 +6329,8 @@ RunSuccess:
ProcessEnd:
Jig_End()
NormalEnd:
myscope.IO.Clear()
ScopeClear()
SpecClear()
Try
If TestError = False Then
@ -6334,7 +6342,7 @@ NormalEnd:
txbWindow.AppendText("정상 종료 처리 중 오류: " & normalEx.Message & vbCrLf)
End Try
'myscope.IO.Clear()
'ScopeClear()
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
End Sub
@ -6592,6 +6600,8 @@ ProcessEnd:
Jig_End()
NormalEnd:
ScopeClear()
SpecClear()
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
End Sub
@ -6766,7 +6776,8 @@ ProcessEnd:
NormalEnd:
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
myscope.IO.Clear()
ScopeClear()
SpecClear()
End Sub
@ -7033,7 +7044,8 @@ ProcessEnd:
End If
Jig_End()
NormalEnd:
myscope.IO.Clear()
ScopeClear()
SpecClear()
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
End Sub
@ -7172,7 +7184,8 @@ ProcessEnd:
End If
Jig_End()
startFail:
myscope.IO.Clear()
ScopeClear()
SpecClear()
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
End Sub
@ -7308,7 +7321,8 @@ ProcessEnd:
Jig_End()
NormalEnd:
myscope.IO.Clear()
ScopeClear()
SpecClear()
txbWindow.AppendText("[" & MeasureTimeAll(MeasEnd) & "ms] Test Play" & vbCrLf)
End Sub
@ -7639,7 +7653,8 @@ NormalEnd:
NormalEnd:
FailMain()
If formType = formTypeList.prdRFMCEP Then
myscope.IO.Clear()
ScopeClear()
SpecClear()
End If
Exit Sub
@ -7647,7 +7662,8 @@ NormalEnd:
ProcessEnd:
FailMain()
Jig_End()
myscope.IO.Clear()
ScopeClear()
SpecClear()
End Sub
Private Function CountChanage() As Boolean
@ -10112,7 +10128,7 @@ WR_File_Error:
End If
If McUseYn = True And HifuUseYn = False Then
comboBoxVerificationStep.Items.Add(New DictionaryEntry("수입검사(RF/EP/MC)", "iqcRFEPMC")) ''맥시멈 생산 화면
comboBoxVerificationStep.Items.Add(New DictionaryEntry("생산1-2(RF/MC)", "prdRFMC")) ''맥시멈 생산 화면
comboBoxVerificationStep.Items.Add(New DictionaryEntry("생산1(RF/MC)", "prdRFMC")) ''맥시멈 생산 화면
End If
If EpUseYn = True And (HifuUseYn = False And LdmUseYn = False) Then
comboBoxVerificationStep.Items.Add(New DictionaryEntry("생산1-1(EP)", "prdEP")) ''맥시멈 hf 생산 화면

View File

@ -1,4 +1,4 @@
Module ScopeMoudule
Module ScopeMoudule
Public myMgr As Ivi.Visa.Interop.ResourceManager
Public myscope As Ivi.Visa.Interop.FormattedIO488
@ -115,23 +115,15 @@
Return ""
End Function
'Private Sub CheckInstrumentErrors()
' Dim strerrval As String
' Dim strout As String = ""
' myscope.WriteString(":SYSTem:ERRor?")
' strerrval = myscope.ReadString
' While Val(strerrval) <> 0
' strout = "INST Error: " + strerrval
' myscope.WriteString(":SYSTem:ERRor?")
' strerrval = myscope.ReadString
' End While
' If Not strout = "" Then
' MsgBox(strout, vbExclamation, "INST Error Messages")
' myscope.FlushWrite(False)
' myscope.FlushRead()
' End If
'End Sub
''' <summary>스코프 버퍼 초기화. 연결된 경우에만 동작.</summary>
Public Sub ScopeClear()
Try
If myscope IsNot Nothing AndAlso myscope.IO IsNot Nothing Then
myscope.IO.Clear()
End If
Catch
' 연결 해제 등으로 접근 불가 무시
End Try
End Sub
End Module

View File

@ -1,4 +1,4 @@
Module SpectrumModule
Module SpectrumModule
Private myMgr As Ivi.Visa.Interop.ResourceManager
Private mySpec As Ivi.Visa.Interop.FormattedIO488
@ -77,4 +77,15 @@
Return ""
End Function
''' <summary>스펙트럼 분석기 버퍼 초기화. 연결된 경우에만 동작.</summary>
Public Sub SpecClear()
Try
If mySpec IsNot Nothing AndAlso mySpec.IO IsNot Nothing Then
mySpec.IO.Clear()
End If
Catch
' 연결 해제 등으로 접근 불가 무시
End Try
End Sub
End Module