In SenseTalk , Virtual Instrument Software Architecture (VISA) functions allow you to:
- Open a connection to one of these devices.
- Obtain the VISA addresses for your test and measurement devices.
- Check that the correct software is loaded on your Windows machine.
Calling this function is the essential first step in any SCPI script.
Behavior: Opens a connection to a known test and measurement device and returns a
VisaDevice object that represents the device.
Parameters: The VISA address of a device, such as one returned by the
visaAddresses function. You can use an alias instead of an address. You can assign an alias from within the Keysight Connection Expert program.
visaDevice( deviceAddr )
the visaDevice of deviceAddr
set deviceAddr to “USB0::)x2A8D::0x0F02::MY56004754::0::INSTR” // Stores the VISA address of a device into the variable 'deviceAddr'
set powerAnalyzer to visaDevice (deviceAddr) // Opens a connection to the VISA device and assigns the VISA device object to the variable 'powerAnalyzer'
put the visaDevice of “UsbInstrument1” into myInstrument // Opens a connection to the VISA device with the alias "UsbInstrument1" and assigns the VISA device object to the variable 'myInstrument'
The examples use the variables
myInstrument. Always use a descriptive variable name for your device.
Behavior: Obtains a list of the VISA addresses of known test and measurement devices that are configured in the Keysight Connection Expert program. You can then open a connection to one of these devices using the
put the VisaAddresses into visaDevices // Stores the list of returned VISA addresses in variable 'visaDevices'.
SenseTalk features that support VISA and SCPI are in an external module (Xmodule) called
ST_VISA. To use these features, both the
ST_VISA Xmodule and [Keysight IO Libraries] must be present on your machine.
Behavior: Verifies that the Xmodule and Keysight IO Libraries are installed on the test system, and returns the version number of the Xmodule.
Returns: The current version number of the VISA and SCPI functionality, or an informative message if the module isn’t present or could not be loaded.
put the ST_VISA_Version // Returns the current version number of the VISA and SCPI functionality