3-16 Return to Section Topics 2600AS-900-01 Rev. B / September 2008
Section 3: Test Script Processor Interaction Series 2600A System SourceMeter
®
 Instruments User’s Manual
Figure 3-7
GUI after loading the non-function script (GPIB)
The primary code that runs the script and retrieves the measurement results is listed below. This 
code is executed when you click the Run Script (GPIB) command button. When you run this 
script it will perform ten measurements and send the readings to the PC. The results are displayed 
in the Data text box of the GUI as shown in 
Figure 3-8. TSP prompts are enabled prior to running 
the script.
Call send(Addr%, "MeasCurrScript.run()", intStatus)
 
 
 
Do 
strReturnMessage = udfGetTspResponse()
txtData.Text = txtData.Text & strReturnMessage
Loop Until Left(strReturnMessage, 3) = "TSP"
If strReturnMessage = "TSP?" Then 
txtStatusDesc.Text = "Error Occurred" 
Call send(Addr%, "print(errorqueue.next()",  
intStatus) 
strReturnMessage = udfGetTspResponse() 
txtStatusDesc.Text = txtStatusDesc.Text & strRe-
turnMessage & vbCrLf 
‘The following command runs 
‘the script; you can also 
‘use 
MeasCurrScript() form of 
‘the command.
End If
‘Get output from script.