Main Content

resources

List of available instrument resources for Quick-Control interfaces

Description

example

ResourceList = resources(rf) lists the resources for RF signal generator object rf. It returns a cell array of resources for the Quick-Control RF Signal Generator, Quick-Control Oscilloscope, or Quick-Control Function Generator objects.

Examples

collapse all

The resources function lists resources available for any of the Quick-Control interface objects: RF signal generator (rfsiggen), oscilloscope (oscilloscope), or function generator (fgen). This example uses Quick-Control RF Signal Generator, but the function also works in the same way for the other two object types.

Create an RF signal generator object without assigning the resource or driver.

rf = rfsiggen;

List the resources.

ResourceList = resources(rf)
ResourceList = 

   3x1 cell array

   {'ASRL::COM1'}
   {'ASRL::COM3'}
   'TCPIP0::172.28.22.99::inst0::INSTR'

In this case, it finds two COM ports that could host an instrument, and the VISA resource string of an RF signal generator.

Set the RF signal generator resource using the Resource property, which is the VISA resource string.

rf.Resource = 'TCPIP0::172.28.22.99::inst0::INSTR';

Set the RF Signal Generator driver using the Driver property, which is a string containing the name of your instrument driver.

rf.Driver = 'AgRfSigGen';

You can now connect to the instrument.

connect(rf);

Output Arguments

collapse all

List of instrument resources, returned as a cell array of strings. It represents the VISA resource string for the instrument. The resources function can list resources available for any of the Quick-Control interface objects: RF signal generator, oscilloscope, or function generator.

Version History

Introduced in R2017b