Agilent Introduction to Application Development with the Agilent PNA Series of Network Analyzers Product Note
Table of Contents 1.0 Introduction ..............................................................................................................................3 NOTE: Procedures apply to models E8356A, E8357A, E8358A of the PNA Series VNA’s 2.0 Basic Administration ........................................................................................................3 2.1 Administrator grants log on access to the PNA for specific users ...................3 2.2 Sharing a drive between PC and PNA ........
1.0 Introduction 2.0 Basic Administration This product note provides a step-by-step guide to system administration, software installation, and COM/DCOM setup on a PNA Series network analyzer (E8356A, E8357A, and E8358A). After reading this product note, you will be able to: To obtain access to the PNA Series network analyzer for COM/DCOM, a user must be registered on the network analyzer.
) In the User name input box, enter the user name which the user logs in to his/her PC with. The Full name and Description boxes are optional and so can remain empty. In the Password input box, enter the password, which the user logs in to his/her PC with, and enter the same password for Confirm password. The User must change password at next log on check box is checked by default. In most cases, it is recommended to check Password never expires. Click the Create button to finish setting up the user. 2.
From the PNA network analyzer: 1) Double click on the My Computer desktop icon to determine if the C drive is “shared”. 2) Single right click the C drive. Select Sharing. 3) Under the Sharing tab, select the Share as… radio button. 4) Type a share name (or use the default C$). Record the share name here_______________. 5) Close the dialog box. From your PC: 1) Map the network analyzer’s drive to the PC. Launch Windows Explorer to begin this procedure. 2) On the main menu bar, click Tools.
From your PNA Series Network Analyzer: 4) Next, map your PC’s CD drive to the network analyzer. Launch Windows® Explorer to begin this procedure. 5) On the main menu bar, click Tools. From the menu, click Map Network Drive. The network analyzer will choose the next available drive letter. It is also possible to assign other available drives. Record this drive letter:_______________. 6) From the Map Network Drive window, click the Folder box. Type (or select if available) the path (\\computername\sharename).
4.0 Configuring COM/DCOM 4.1 Procedure When configuring COM/DCOM, the first issue to consider in this topic is Windows® NT/Windows® 2000 Domains versus Workgroups. 4.1.1 Configure the PNA Series network analyzer to provide COM/DCOM access to the PNA application for the user • A domain is a typically large organizational group of computers that network administrators maintain and control which machines have membership.
5) The Registry Value Permissions dialog box for Registry Value: Access Permission should now be visible. Click the Add... Button. 6) The Add Users and Groups window should now be visible. The list of names visible are the Groups of people given permission by the system administrator to access the network analyzer. 9) In the Agilent PNA Series Properties window click the Identity tab. Ensure The interactive user option button is selected. Click the OK button.
Problems? 4.1.2 Configure the user’s PC for DCOM access to the PNA application From your PC: 1. Using your PC's Windows Explorer, find the analyzer’s mapped local hard drive and click the Program Files/Agilent/Network Analyzer/Automation folder. When the network analyzer application is installed on the instrument, the application and all the objects it serves are registered on that machine. The instrument should be ready to perform as a remote server.
5.0 Introduction to Application Examples 5.1 Application examples The analyzer’s support for DCOM (Distributed Component Object Model) over the LAN provides control of the network analyzer using a variety of platforms. DCOM acts as an interface to the analyzer for external applications. With DCOM, the programmer can develop an application on an external computer. During development, the application will interface to the analyzer over the LAN through the DCOM interface.
5.1.1.2 Application Code The application code is contained below. To run the application, first generate the executable file. Once this is complete, it can be copied and executed on the analyzer or run on the PC. The application can also be run from the development environment. ' Set channel parameters chan.NumberOfPoints = 11 chan.StartFrequency = (1000000000#) chan.StopFrequency = (2000000000#) ' Send a manual trigger to initiate a single sweep chan.
5.1.2 Microsoft Visual Basic Script Example 5.1.2.1 Application Configuration Some operating systems may require that the Visual Basic Scripting engine be installed before running the application on a PC. To download a free copy of a Visual Basic Scripting engine, visit the following web site: http://msdn.microsoft.com/scripting/ 5.1.2.2 Application Code The application code is contained below. The developer must save the file in a text file (i.e. using notepad) and save it with the “.vbs” extension.
5.1.3 Microsoft Word Example 5.1.3.1 Application Configuration Option Explicit Microsoft® Office 2000 was used for this example. This version of Office contains Visual Basic for Applications (VBA) which allows developers to attach Visual Basic Macros to Word documents. The type library for the PNA Series network analyzer should be referenced in the Visual Basic development environment. The following figure illustrates the reference.
5.1.3.3 Application Output 5.1.4.2 Application Code The figure below shows the displayed results when the application is executed. The application code is contained below. The program inserts the data retrieved from the analyzer into cells in the Excel document. The cells are then used to update a graph in the Excel document. To run the application, open the document using Microsoft Excel. Enable macros when prompted by the application.
For i = 0 To num_points - 1 Sheet1.Cells(3 + i, 1) = result(i) Next // interface pointers to retrieve COM interfaces IUnknown* pUnk = 0; IApplication* pNA = 0; IChannel* pChan = 0; IMeasurement* pMeas = 0; IArrayTransfer* pTrans = 0; int i, num_points = 0; float* pScalarData; Set chan = Nothing app.Quit End Sub HRESULT hr; 5.1.4.3 Application Output The figure below shows the displayed results when the application is executed.
// Send a manual trigger to initiate a single sweep pChan->Single(true); // QueryInterface for the IArrayTransfer interface of the NetworkAnalyzer object hr = pMeas->QueryInterface(IID_IArray Transfer, (void**)&pTrans); if (!FAILED(hr)) { 5.1.6 Agilent VEE Example 5.1.6.1 Application Configuration For this example use Agilent VEE version 6.0 or above which contains the Variant data type used to transfer data from the PNA.
5.1.6.2 Application Code Agilent VEE version 6.0 or higher must be installed to run the application in this example. There is a runtime version of Agilent VEE that may be used if the application has been saved as “runtime”. A free version of Agilent VEE can be found on the following web site: http://www.agilent.com/find/vee/. The application may be run on a PC or on the PNA Series analyzer. 5.1.7 National Instruments™ LabVIEW Example 5.1.7.
Appendix A: B) Sharing Drives between a PC and the analyzer. A) A system administrator grants logon access to the PNA Series network analyzer for specific user. This step is also required for COM/DCOM access from your PC: This procedure shows an example of how to share the C drive of the network analyzer with your PC. This is required for COM/DCOM communication between your PC and network analyzer. This procedure is detailed in the expanded portion of this product note.
C) Configure the PNA Series network analyzer to provide COM/DCOM access to the PNA application for a registered user on the network analyzer. If you are not a registered user yet, complete step A) and B) and then return to this step. From your PNA Series Network Analyzer: 1) Click Start/Run, type dcomcnfg into the input box, and click OK. 2) Click on Agilent PNA Series in the Applications list, then click the Properties button. 3) In the Agilent PNA Series Properties window: • Click the Location tab.
Agilent Technologies‘ Test and Measurement Support, Services, and Assistance By internet, phone, or fax, get assistance with all your test and measurement needs Online assistance: Agilent Technologies aims to maximize the value you receive, while minimizing your risk and problems. We strive to ensure that you get the test and measurement capabilities you paid for and obtain the support you need.