Remote Control/Multi-site Measurement

The back-end application consisting of the TAP and AMX plug-in is remote controllable from your external control program through the TAP’s API. You can build a fully automated test system in combination with a handler or a prober. By running multiple TAP instances from the external control program, you can perform multi-site parallel measurements.

Typically, the remote control program runs in an external PC and the TAP instances in the embedded PXIe controller are remote-controlled via LAN. 

 

Or if you use an external PC that has been verified to enumerate a sufficient number of PCIe slots, you can use that PC as a PXIe controller and run the control program in the same location as the TAP instances with a localhost connection. 

In the remote controlled measurements, the TAP instances must be launched in the remote mode which does not provide a TAP GUI. So the VNA calibration using the AMX’s cal wizard must be manually performed for each of the VNA measurement sites before starting the remote controlled measurements, and the calibration data should be saved into csa state files. 

In the remote controlled measurement, the TAP plan files for the measurement must be put in the external PC (typically at C:\Users\...\Documents\AMX in the case of 64-bit OS). The remote control program sends these TAP plan files to the TAP instances being launched in the embedded PXIe controller.

The following sections describe how to perform the remote controlled measurements. A sample program CmdBasedDemo is available under C:\Program Files (x86)\Keysight\AMX\Samples\Amx.CmdBasedDemo in the case of 64-bit OS.

Example of remote control program

The VB.NET sample program (CmdBaseDemo) shown here is a simple Console based program which executes a typical procedure for remote-controlling the AMX backend software.

You can leverage this sample program and make your own remote control program by configuring your control sequence based on the commands defined in this program and adding your codes for operator GUI and handler/prober control.

The remote control sample program executes the following tasks;

Configuration of Remote Control

Setup for PXI controller

Install the Back End application

Back End Application is required in the PXI controller. See the installation for back end.

Create Short Cut of Keysight.Tap.Plugins.Remoting.Server.exe (TAP instance)
  1. In the file explorer, open the TAP folder (C:\Program Files (x86)\KeysightTAP in the case of 64-bit OS), and create a shortcut file of Keysight.Tap.Plugins.Remoting.Server.exe.

  2. Rename it appropriately, for example, to “Keysight.Tap.Plugins.Remoting.Server Site1”.

  3.  Right-click on the shortcut’s icon, select Properties, and add the port number -port 50001 at the end of Target as follows:

    “C:\Program Files (x86)\ …. \Keysight.Tap.Plugins.Remoting.Server.exe” –port 50001

  4. Create the files for site2 in the same manner. Port number should be -port 50002.

  5. When your case is 4-site measurements, create the shortcut files for the Site3 and 4 with the port numbers -port 50003 and -port 50004, respectively.

Setup the Bench Setting in TAP

Make Bench Settings such as the VISA address of each VNA measurement site. These settings are stored to TAP application in the PXIe controller (not to TAP plan files).

  1. Name the TAP plan file as Test_site1.TapPlan.

  2. Launch the TAP and click Settings > Bench > Instrument > VNA to open Bench Settings dialog box

  3. Specify the Site 1 (A space is required between "Site" and "1") as Profile and set the VISA Address and VISA I/O Timeout as below.

  4. Click on [+] to open the Add New Instrument dialog, add “DUT Mode Monitor”, “Test set Monitor”, and “VNA”, and close the dialog.

  5. Copy the TAP plan file and rename it as Test_site2.TapPlan.

  6. Open the TAP plan file and click Settings > Bench > Instrument > VNA to open Bench Settings dialog box

  7. Specify the Site 2 (A space is required between "Site" and "2") as Profile and set the VISA Address at TCPIP0::localhost::hislip1::INSTR.

  8. If you are going to do 4-site measurements, add Site 3 and Site 4 with the VISA address TCPIP::localhost::hislip2::INSTR and TCPIP::localhost::hislip3::INSTR, respectively.

Setup Hisplip setup of VNA applications
  1. Launch VNA applicaiton with the required modules and confirm if the Hislip address at 0 by clicking System > System Setup > Remote Inteface.

  2. Launch one more VNA application with the required modules and confirm if the Hislip address set at 1.

  3. If you are going to do 4-site measurements, add VNA application with the VISA address TCPIP::localhost::hislip2::INSTR and TCPIP::localhost::hislip3::INSTR, respectively.

 Prepare TAP plan files

Prepare the TAP plan files for the VNA measurement sites you are going to use beforehand. The filenames of the TAP plan files for this remote control sample program must be “{filename in Module1.vb}_siteN.TapPlan". In this example, “test_site1.TapPlan”, “test_site2.TapPlan”. If you are going to do 4-site measurements, create “Test_site3.TapPlan”, and “Test_site4.TapPlan”, too.

These TAP plan files are required to move into the external PC. See Place TapPlan file into AMX directory.

 
Link TAP plan files to csa files
If the above TAP plan files are not yet linked to the csa files which include the user calibration data, link the csa files by specifying their folder locations. Or perform the calibration by using the cal wizard as follows:
  1. Launch the VNA instance for the site 1.

  2. Launch the TAP GUI.

  3. Open “Test_site1.TapPlan”.

  4. Click on Settings -> Bench -> Instruments, and select Site 1 as Profile. Highlight “VNA” and make sure the VISA address is TCPIP::localhost::hislip0::INSTR.

  5. Connect the 4-port ECal module to the USB port of the PXIe controller.

  6. Click on “AMX / AMX”, launch Cal Wizard, and perform the full N-port calibration for the site 1.

  7. After the calibration is completed, click on [Save] to sate the calibration data to the csa file for the site 1. Now the calibration data is saved to the csa file at C:\Users\...\Documents\AMX\State and is linked to the TAP plan file for the site 1.

  8. Launch the VNA instance for the site-2.

  9. In the TAP GUI, open “Test_site2.TapPlan”.

  10. If the external trigger mode is turned on in this TAP plan file, temporarily turn it off only during the calibration.

  11. Click on Settings -> Bench -> Instruments, and select Site 1 as Profile. Highlight “VNA” and make sure the VISA address is TCPIP::localhost::hislip1::INSTR.

  12. Click on “AMX / AMX”, launch Cal Wizard, and perform the full N-port calibration for the site 2.

  13. After the calibration is completed, click on [Save] to save the calibration data to the csa file for the site 2. Now the calibration data is saved to the csa file at C:\Users\...\Documents\AMX\State and is linked to the TAP plan file for the site 2.

  14. If you are going to perform 4-site measurements, perform the calibration for the site 3 and 4 in the same manner.

Launch VNA instances and TAP instances
  1. In the PXIe controller, launch the VNA instances for site 1 and site2.

  2. Launch the TAP instances for the site 1 and 2 by double-clicking on the TAP shortcuts you created beforehand. The TAP instances in the remote mode will be launched as the console windows without a GUI.

Setup for External PC

Install the AMX and TAP software to the external PC

The AMX and TAP software must be installed on the external PC to install software components required for remote controlling the TAP.  But no licenses are required for AMX and TAP on the external PC.

See the installation for back end for installation of AMX and TAP.

The software such as Visual Studio is also required to install in order to execute the sample program.

Modification of Sample Program
  1. Modify the program "Module1.vb" in CmdBasedDemo for your case.

       Const NUM_SITES As Integer = 2 ! Number of Site
       Const TEST_FINISHED_STATE = (1 << NUM_SITES) - 1
       Const NUM_MEAS As Integer = 5   ! Number of Measurement time
       Const PORT_BASE As Integer = 50000
       Const TEST_PLAN_FILE_NAME As String = "test" ' + "_siteN.TapPlan"
       Const IP_ADDRESS_LOCAL As String = "localhost"
       Const IP_ADDRESS_REMOTE As String = "192.168.0.10" '
       Const REMOTE_SERVER As Boolean = True ' When local host is used, set this at False

 

        For i = 1 To NUM_MEAS

            myState.ClearState()

            For j = 1 To NUM_SITES
               apiInstrs(j - 1).DoCmd("Start")
           Next

            ' Wait for End of Measurements

            While True
               SyncLock myState
                   If myState.TestFinished = TEST_FINISHED_STATE Then Exit While
               End SyncLock
               System.Threading.Thread.Sleep(100)
           End While

            SyncLock myState
               For j = 1 To NUM_SITES
                   Dim worstRank As String = apiInstrs(j - 1).DoCmd("GetWorstRank")
                   Dim worstValue As String = apiInstrs(j - 1).DoCmd("GetWorstValue")
                   Dim worstLabel As String = apiInstrs(j - 1).DoCmd("GetWorstLabel")
                   Dim passed As Boolean = apiInstrs(j - 1).DoCmd("GetPassed")
                   Dim strPassFail As String

                    If passed = True Then strPassFail = "PASS" Else strPassFail = "FAIL"
                   Console.WriteLine(i.ToString() + ": Site " + j.ToString() + ": " + strPassFail _
                                     + " (Path = " + worstLabel _
                                     + ", Worst Value = " + worstValue _
                                     + ", Worst Rank = " + worstRank + ")")
               Next

               "

     '  Add command to control your handler according to the test result.

               '  

                Console.WriteLine(i.ToString() + ": TestFailed = " + myState.TestFailed.ToString())
               Console.WriteLine(i.ToString() + ": TestFinished = " + myState.TestFinished.ToString())

            End SyncLock

        Next

Place TapPlan file into AMX directory

Place the TAP plan files “test_site1.TapPlan” and  “test_site2.TapPlan” under {My document}/AMX in the external PC. These TAP plan files will be transferred from the external PC to the PXI controller

 
Execute the sample program
  1. Execute CmdBasedDemo to execute the test. Cmd (DOS) window is displayed on the external PC. The test sequence is executed and test summary is displayed.

  2. Cmd (DOS) window is also displayed on the PXI controller and the test sequence is executed. (TAP GUI is not used.)

  3. The result is stored into defined directory (default: My document\AMX\output) in the PXI controller.  

Sample Program Instruction

In the sample program Module1.vb, you can use the Function DoCmd in order to do the specified following tasks.

Start

Run the test plan

Stop

Abort the test plan

Open

Open the test plan

Close

Close the test plan

ReadTestPlan

Read the test plan

SetParam

Set the parameter

GetParam

Read the parameter

GetWorstRank

Read the worst rank in the result

GetWorstValue

Read the worst value in the result

GetWorstLabel

Read the label of the worst result.

GetPasssed

Read the passed

DoCmd("SetParam") allows you to specify the parameter of TAP setting by a remote program.

Example:

DoCmd("SetParam", New List(Of Object) From {"LotName", lotName})

Parameter Name

Description

Example for parameter

Setup Required

LotName

 Lot name. This name is used for output file name.

"FEM01_1"

 

MinFailRank

Specify the minimum fail rank for test.

100

 

OutputFolder

Specify the folder to output the result files.

"D:\Test Results"

 

SnpOutMode

Snp output mode (This is set as value of Keysight.Amx.TestStep.VnaSParam.EnSnpOutMode)

Keysight.Amx.TestStep.VnaSParam.EnSnpOutMode.ALL

 

SnpFormat

Format

Keysight.Amx.TestStep.VnaSparam.EnSnpFormat.RI

 

SnpAddDateTime

Add Date Time

True

 

SnpTrimBothEnds

Trim Both Ends

False

 

Setup Mode

  • Ture: Only settings sequence is executed and the measurement is not executed. After the setup sequence, this parameter becomes False.

  • False: Only measurement sequence is executed and the settings sequence is not executed

True

Yes

VnaStateFile

Specify the VNA state file. The path of state file should be defined the path from VNA application, not AMX nor TAP file location. The supported state file is .csa (State & Cal) or *.sta (State only).

"State01.csa"

Yes

SkipSetup

When skip setup is true, no setting is changed after loading the state file.

True

Yes

ExtTrig

External trigger On/Off

True

Yes

ExtTrigDelay

External trigger delay

0.001

Yes

UpdateDisp

Display update

True

Yes

MultisiteMode

Multiple site mode

True

Yes

NumSites

Number of Site

4

Yes

Site

Site Number

1

Yes

Parameter {1 to 10}

The user defined parameter can be used in plug-in

"Free Data"

 

Reuse Channel

Reuse Channel

True

Yes

To set the parameters which require the setup sweep, send “SetupMode” “True” and “Start” commands after sending the parameters you want to set. 

Example:

apiInstrs(i - 1).DoCmd("SetParam", New List(Of Object) From {"VnaStateFile", "C:/Users/Administrator/Documents/AMX/State/20170221.csa"})

apiInstrs(i - 1).DoCmd("SetParam", New List(Of Object) From {"UpdateDisp", False})

apiInstrs(i - 1).DoCmd("SetParam", New List(Of Object) From {"ExtTrigDelay",0.005})

apiInstrs(i - 1).DoCmd("SetParam", New List(Of Object) From {"SetupMode",True})

apiInstrs(i - 1).DoCmd("Start")

 

Function DoCmd is provided and defined in Amx.vb as folllows.

Function DoCmd(cmd As String, Optional params As List(Of Object) = Nothing) As Object Implements IApiInstr.DoCmd

Module1.vb

The comment shows the description for each routine.

Module Module1

Sub Main()

' Define parameters such as number of measurement sites, TAP plan files to be used, and PXIe controller’s IP address.

        Const NUM_SITES As Integer = 3

        Const TEST_FINISHED_STATE = (1 << NUM_SITES) - 1

        Const NUM_MEAS As Integer = 5

        Const PORT_BASE As Integer = 50000

        Const TEST_PLAN_FILE_NAME As String = "vna2port" ' + "_siteN.TapPlan"

        Const IP_ADDRESS_LOCAL As String = "localhost"

        Const IP_ADDRESS_REMOTE As String = "192.168.0.19"

        Const REMOTE_SERVER As Boolean = False

 

        Dim TAP_PATH As String = System.Environment.GetEnvironmentVariable("TAP_PATH") ' TAP_PATH is defined by TAP application.

        If TAP_PATH.Last() = "\"c Then

            TAP_PATH = TAP_PATH.Remove(TAP_PATH.Length - 1)

        End If

        Dim searchPaths As New List(Of String)

        searchPaths.Add(TAP_PATH)

        Dim remotingServerProviders As New List(Of Keysight.Tap.Plugins.Remoting.ServerProvider.RemotingServerProvider)

        Dim serverProcessIds As New List(Of Integer)

        Dim remotingClients As New List(Of Keysight.Tap.Plugins.Remoting.Client.RemoteEngine)

        Dim apiInstrs As New List(Of IApiInstr)

        Dim resultListeners As New List(Of MyResultListener)

        Dim myState As New MyState

        For i = 1 To NUM_SITES

            ' Start Local Server

            If Not REMOTE_SERVER Then

                remotingServerProviders.Add(New Keysight.Tap.Plugins.Remoting.ServerProvider.RemotingServerProvider With {.PluginSearchPaths = searchPaths, .ShowDebugConsole = True})

                remotingServerProviders.Last().Port = PORT_BASE + i

                serverProcessIds.Add(remotingServerProviders.Last().StartLocalServerProcess())

               System.Threading.Thread.Sleep(2000)

            End If

            resultListeners.Add(New MyResultListener(i - 1, myState))

            ' Start WCF Client

            remotingClients.Add(New Keysight.Tap.Plugins.Remoting.Client.RemoteEngine)

            Dim settingsDir As String = System.IO.Path.Combine(TAP_PATH, System.IO.Path.GetFileName(Keysight.Tap.ComponentSettings.SettingsDirectoryRoot), "Bench", "Site " + i.ToString())

            If REMOTE_SERVER Then

                remotingClients.Last().Address = IP_ADDRESS_REMOTE

            Else

                remotingClients.Last().Address = IP_ADDRESS_LOCAL

            End If

            remotingClients.Last().Port = PORT_BASE + i

            remotingClients.Last().Open()

            remotingClients.Last().AddResultListener(resultListeners.Last())

            remotingClients.Last().SetSettingsDirectory(settingsDir)

            apiInstrs.Add(New Amx(remotingClients.Last(), resultListeners.Last()))

        Next

        ' Command Based Operations

        For i = 1 To NUM_SITES

            Dim testPlanFileName As String = TEST_PLAN_FILE_NAME + "_site" + i.ToString() + ".TapPlan"

            Dim testPlanPath As String = System.IO.Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.Personal), "AMX", testPlanFileName)

            Dim vnaStateFileName As String = TEST_PLAN_FILE_NAME + "_site" + i.ToString() + ".csa"

            Dim vnaStatePath As String = System.IO.Path.Combine(System.Environment.GetFolderPath(Environment.SpecialFolder.Personal), "AMX\State", vnaStateFileName)

            apiInstrs(i - 1).DoCmd("ReadTestPlan", New List(Of Object) From {testPlanPath})

            'apiInstrs(i - 1).DoCmd("SetParam", New List(Of Object) From {"VnaStateFile", vnaStatePath}) ' set before running setup process

            apiInstrs(i - 1).DoCmd("Start") ' run once to setup VNA

            Dim lotName As String = String.Format("DUT_{0:00}01", i)

            apiInstrs(i - 1).DoCmd("SetParam", New List(Of Object) From {"LotName", lotName})

            lotName = apiInstrs(i - 1).DoCmd("GetParam", New List(Of Object) From {"LotName"})

            Console.WriteLine("LotName = " + lotName)

            resultListeners(i - 1).LotName = lotName

            apiInstrs(i - 1).DoCmd("SetParam",New List(Of Object) From {"SnpOutMode", Keysight.Amx.TestStep.VnaSParam.EnSnpOutMode.OFF})

            Dim snpOutMode As Keysight.Amx.TestStep.VnaSParam.EnSnpOutMode = apiInstrs(i - 1).DoCmd("GetParam", New List(Of Object) From {"SnpOutMode"})

            apiInstrs(i - 1).DoCmd("SetParam", New List(Of Object) From {"MultisiteMode", True})

            apiInstrs(i - 1).DoCmd("SetParam", New List(Of Object) From {"NumSites", NUM_SITES})

            apiInstrs(i - 1).DoCmd("SetParam", New List(Of Object) From {"Site",i})

            apiInstrs(i - 1).DoCmd("SetParam", New List(Of Object) From {"SetupMode", True})

            myState.ClearState()

            apiInstrs(i - 1).DoCmd("Start") ' run once to setup VNA

            ' Wait for End of Setup

            While True

                SyncLock myState

                    If myState.TestFinished = (1 << (i - 1)) Then Exit While

                End SyncLock

                System.Threading.Thread.Sleep(10)

            End While

 

        Next

        For i = 1 To NUM_MEAS

            myState.ClearState()

           ' Run TAP test sequences of site 1 to N.

            For j = 1 To NUM_SITES

                apiInstrs(j - 1).DoCmd("Start")

            Next

            ' Wait for End of Measurements

            While True

                SyncLock myState

                    If myState.TestFinished = TEST_FINISHED_STATE Then Exit While

                End SyncLock

                System.Threading.Thread.Sleep(10)

            End While

            SyncLock myState

            ' Get the Test Result

                For j = 1 To NUM_SITES

                    Dim worstRank As String = apiInstrs(j - 1).DoCmd("GetWorstRank")

                    Dim worstValue As String = apiInstrs(j - 1).DoCmd("GetWorstValue")

                    Dim worstLabel As String = apiInstrs(j - 1).DoCmd("GetWorstLabel")

                    Dim passed As Boolean = apiInstrs(j - 1).DoCmd("GetPassed")

                    Dim strPassFail As String

                    If passed = True Then strPassFail = "PASS" Else strPassFail = "FAIL"

                    Console.WriteLine(i.ToString() + ": Site " + j.ToString() + ": " + strPassFail _

                                      + " (Path = " + worstLabel _

                                      + ", Worst Value = " + worstValue _

                                      + ", Worst Rank = " + worstRank + ")")

                Next

                Console.WriteLine(i.ToString() + ": TestFailed = " + myState.TestFailed.ToString())

                Console.WriteLine(i.ToString() + ": TestFinished = " + myState.TestFinished.ToString())

            End SyncLock

        Next

        ' Close Client/Server

        For i = 1 To NUM_SITES

            apiInstrs(i - 1).DoCmd("Close")

            Try

                remotingClients(i - 1).Close()

            Catch ex As Exception

            End Try

            If Not REMOTE_SERVER Then

                Try

                    Dim server As System.Diagnostics.Process = System.Diagnostics.Process.GetProcessById(serverProcessIds(i - 1))

                    server.Kill()

                Catch ex As Exception

                End Try

            End If

        Next

    End Sub

End Module