Technical data
If myELOC.ReadState = AgilentN490xEDErrorLocationStateEnum.
AgilentN490xEDErrorLocationStateAborted Then
' Any code for verifying the manual stopping
Else
' Any code for handling other states
End If
End Sub
Before injecting the error you have to reset the status registers:
Private Sub Insert_Error_and_Get_Results()
'Set the status registers to trigger when error is inserted
With myStatus
'First clear the status registers:
.Clear()
'Bit14 = ERR LOC CAPTURE, indicates that there is an
Error Location Capture measurement in progress
.Register(AgilentN490xStatusRegisterEnum.
AgilentN490xStatusRegisterOperation, _
AgilentN490xStatusSubRegisterEnum.
AgilentN490xStatusSubRegisterEnable) = &H4000
'Enable positive transition, which is from measurement
in progress to measurement is off
.Register(AgilentN490xStatusRegisterEnum.
AgilentN490xStatusRegisterOperation, _
AgilentN490xStatusSubRegisterEnum.
AgilentN490xStatusSubRegisterPositiveTransition) = &H0
'Enable negative transition, which is from measurement
is off to measurement in progress
.Register(AgilentN490xStatusRegisterEnum.
AgilentN490xStatusRegisterOperation, _
AgilentN490xStatusSubRegisterEnum.
AgilentN490xStatusSubRegisterNegativeTransition) = &H4000
End With
' Add an error to the bit stream:
myPG.Input.ErrorAddition.InsertManually()
' Now wait until Error Location Capture stops:
Do
myStatusByte = myStatus.SerialPoll
If myStatusByte <> 0 Then
myOperReg = myStatus.Register(AgilentN490xStatusRegisterEnum.
AgilentN490xStatusRegisterOperation, _
AgilentN490xStatusSubRegisterEnum.
AgilentN490xStatusSubRegisterEvent)
If (myOperReg And &H4000) <> 0 Then Exit Do
End If
'DoEvents()
Loop While True
' Verify that Error Location Capture has finished successfully:
Recommended Programming Techniques 3
Agilent J-BERT N4903B High-Performance Serial BERT 49
Manually Inserting an Error