Please enable JavaScript to view this site.

 Network Analyzers using TRVNA software

To establish connection with the COM server application, create an object reference in the client program. In COM programming, the object reference needs to be acquired preliminarily, to be used later to access the object functionality. To define an object, perform the following:

Declare a variable as an object.

Create a COM Object and assign it to this variable.

To declare a variable, use the Dim operator or another declaration statement (Public, Private or Static). The variables used for references should be Variant, Object, or a type of specific object. For example, the following three operators declare an app variable:

Dim app

Dim app as Object

Dim app as TRVNA.Application

Use the Set operator and CreateObject (ObjectName, HostName) function to assign a specific object to a variable.

ObjectName

Object name is always equal to "TRVNA.Application"

HostName

Network name of the PC hosting the COM server. This parameter is not specified in the case of a local server.

For example, the following operators create an Application object and assign it to app variable:

Set app = CreateObject("TRVNA.Application")

Set app = CreateObject("TRVNA.Application", "Analyzer_Name")

Set app = CreateObject("TRVNA.Application", "192.168.1.149")


note

The first form of the operator is used to create the reference to the local COM server, the second and third forms are used to create the reference to the remote DCOM server.


To allow access to the objects of a lower level on the hierarchy, these objects are specified after the reference to the higher-level object and separated from it by a dot. For example:

Dim SystObj

Set SystObj = app.SCPI.SYSTem

COM objects can have indices. For example, CALCulate, INITiate, SENSe, SOURce objects represent various aspects of the 16 measurement channels of the Analyzer. Therefore, it is necessary to write the channel index from 1 to 16 to acquire the data of these objects. For example:

Set SensObj1 = app.SCPI.SENSe(1)

Set SensObj2 = app.SCPI.SENSe(2)

Visual Basic allows omitting of such indices; in this case, the indices are considered as equal to 1. For example, the following VB operators are equivalent:

Set SensObj = app.SCPI.SENSe(1)

Set SensObj = app.SCPI.SENSe


note

The models of vector network analyzers working with the TRVNA executable module share the same COM object. The name of COM object is TRVNA.Application.

For example, the command for creating a COM server for an Analyzer is:

Set app = CreateObject("TRVNA.Application")

For backwards compatibility, the old name is preserved for creating COM object for each model. The user can use the old and new name of the COM object interchangeably, since they all create the same COM object. For example:

Set app = CreateObject("TRVNA.Application")

Set app = CreateObject("TR5048.Applcation")

Set app = CreateObject("TR7530.Applcation")

Set app = CreateObject("TR1300.Applcation")


 

Rev.:  24.1