Programming Guide
60
' First we will need to open the default resource manager.
status = viOpenDefaultRM(defaultRM)
If (status < VI_SUCCESS) Then
resultTxt.Text = "Could not open a session to the VISA Resource Manager!"
TCP_IP_Test = status
Exit Function
End If
' Now we will open a session via TCP/IP device
status = viOpen(defaultRM, "TCPIP0::" + ip + "::INSTR", VI_LOAD_CONFIG, VI_NULL, instrsesn)
If (status < VI_SUCCESS) Then
resultTxt.Text = "An error occurred opening the session"
viClose (defaultRM)
TCP_IP_Test = status
Exit Function
End If
status = viWrite(instrsesn, "*IDN?", 5, count)
If (status < VI_SUCCESS) Then
resultTxt.Text = "Error writing to the device."
End If
status = viRead(instrsesn, outputBuffer, VI_FIND_BUFLEN, count)
If (status < VI_SUCCESS) Then
resultTxt.Text = "Error reading a response from the device." + CStr(i + 1)
Else
resultTxt.Text = "read from device:" + outputBuffer
End If
status = viClose(instrsesn)
Summary of Contents for SDG5000 series
Page 38: ...SDG5000 User Manual 27 Figure 2 5 Setting the Offset ...
Page 109: ...SDG5000 User Manual 98 Figure 3 1 Sine Waveform ...
Page 111: ...SDG5000 User Manual 100 Figure 3 2 Square Waveform ...
Page 129: ...SDG5000 User Manual 118 3 12 Figure 3 12 FSK Waveform ...
Page 135: ...SDG5000 User Manual 124 Figure 3 15 DSB AM Waveform ...