Series 3700 System Switch/Multimeter Quick Start Guide
Section 4
:
Frequently Asked Questions
Document Number: 3700S-903-01 Rev. A / August 2007
4-23
Below is an example of sending scripts to the Series 3700 at GPIB address in Visual Basic
using the Keithley Instrument GPIB card:
Call Send (16, "loadscript TSPeasyExample", intStatus)
Call Send(16, "channel.close()", intStatus)
Call Send(16, "print(dmm.measure())", intStatus)
Call send(16, "endscript", intStatus)
Prompts
TSP prompts provide useful test script processor status information when loading and running
scripts. Prompts can indicate when the Series 3700 has received a line of code and is awaiting
other code for the script; prompts can also indicate if a script was received or executed
successfully and when the script is complete; finally, a different prompt is returned when an error
is generated, thus enabling much simpler error handling. If the TSP error prompt is received, the
test program can then read the error queue and report back to the user.
It is important to remember, however, that if one desires to use prompts, then these prompts
must be handled as soon as they are enabled. To enable prompts send the command
localnode.prompts = 1. For more information on prompts, refer to the localnode.prompts
command in the Series 3700 reference manual.
Returning data from the Series 3700
Queries for TSP-based instruments do not end in a question mark as do SCPI instruments.
Rather many of the commands can be converted to queries simply by whether or not you're
assigning its result to a variable. The print statement is used to place the result of any ICL
command function in the output queue of the Series 3700. This statement essentially serves as
the query function for the Series 3700. The following example demonstrates how to use the
Keithley Instruments GPIB card in Visual Basic to initiate and return a DMM measurement:
dim intNumBytes as Integer, intStatus as Integer
dim strReading as String
call Send (16, "print(dmm.measure())", intStatus)
call Enter(strReading, 1024, intNumBytes, 16, intStatus)
Similarly, any value can be printed at any time to the output queue using the print statement.
One key advantage of this ability is that the user can set his own flag to indicate completion of a
script or of a group of measurements. For instance, if the user wants to know when a script is
completed, he can have the Series 3700 print "complete" on the last line of the script, and then
the PC test program can poll the instrument until it receives the string "complete." An alternative
way of notifying the end of a sweep is to use prompts. Please see prior section for more
information.
Содержание 3706
Страница 3: ......
Страница 11: ......
Страница 25: ......
Страница 67: ......
Страница 72: ...This page left blank intentionally...