07-30-2018 04:53 AM
hi:
I use E5052B and use a network cable link.(TCPIP0::192.168.1.231::inst0::INSTR)
This program is often stuck. And no error.
Private Sub E5_btnJTE_Click(sender As Object, e As EventArgs) Handles E5_btnJTE.Click
status = viVPrintf(vi, ":CALCulate:PN1:TRACe1:FUNCtion:INTegral:DATA?" + vbCrLf, 0)
status = viVScanf(vi, "%t", strRes)
Dim outtext() As String = Split(strRes, ",")
Dim show_str As String = “”
show_str += outtext(4) + vbCrLf
VI_txtfinal.Text = VI_txtfinal.Text & show_str
End Sub
Solved! Go to Solution.
07-31-2018 01:01 AM
The program has stopped working
07-31-2018 10:05 AM
Hi xiao,
In order to better troubleshoot this question, I'd like to know what version of Visual Studio and Measurement studio you are using, as well as a screenshot of the error you are getting. Also, when during execution does the program stop? I'd like you to debug the code and step through it to see where the failure occurs. Also it will be much easier to troubleshoot if you could attach a copy of your code to your next response, since it will give us better insight than a small code snippet
07-31-2018 08:58 PM
thanks
I have found a solution.Add an if statement
If status = VI_SUCCESS Then
Dim outtext() As String = Split(strRes, ",")
Dim show_str As String = “”
show_str += outtext(4) + vbCrLf
VI_txtfinal.Text = VI_txtfinal.Text & show_str
End If
08-01-2018 03:18 AM
in debug mode show:
error occurred in document statechange handler
08-01-2018 03:30 AM
The value returned is -1073740940 (0xc0000374).