Script Proxy Document

A script proxy window allows you to receive script fragments from a script running on a remote PC and send the results as well as variable values to it. Communication is via TCP, UDP or RS-232. This therefore allows you to control multiple PCs from a single script. Script Proxy documents can be saved and loaded and have a file extension TSP for Test Script Proxy.

This is useful if the test equipment you use need to run on their own control PC. Simply link the main test script runner PC to the other control PCs via a serial link and open a script proxy on those PCs specifying the serial link. In your script create a Proxy Tester to connect to each of the test equipment PCs and use the execute action to pass script commands to them. You can read variables from the remote script proxy via the variableValue action.

An example script (proxy.tsr) to communicate via TCP to the proxy tester (proxy_tcp6500.tsp) is shown below. This script uses "localhost" port 65000 but this can be substituted for the name or IP address on a remote PC by setting the system variable proxy.

   default proxy = "tcp",["localhost",65000]
   p = new ScriptProxy(proxy[0])
   p.open(proxy[1])
   p.execute("t = \"hello\"")
   t = p.variableValue("t")
   p.execute("s = new serial(\"tcp\") s.open(65001)")
   c = new serial("tcp")
   c.open("localhost",65001)
   c.send("hello")
   p.execute("s.waitfor(\"hello\") s.send(\"hello\")")
   c.waitfor("hello")
   p.execute("s.close() delete s")
   c.close()
   delete c
   p.close()
   delete p
  

When creating a new script proxy you will be presented with the dialog below.

Dialog

Select the serial type from the combo box and add the parameters in the edit box.

To open create a TCP server on port 65000 the settings would be as below.

COM2

Select the serial type from the combo box and add the parameters in the edit box.

To open COM1 with a baud rate of 115200 and CTS flow control the settings would be as below.

Script Proxy RS232