FAQs from Rohde & Schwarz

PCからメモリ・トレースへのSパラメータ・ファイルのロード

質問

PC上にあるSパラメータ・ファイルを、ネットワーク・アナライザのメモリ・トレースにロードしようとしています。

これをリモート制御で行うにはどうすればよいですか?

回答

EXCELの下にあるVisualBasicApplicationで作成された付属プログラムが必要です。

NI-VISAドライバがインストールされていて、ネットワーク・アナライザとのGPIBまたはTCP/IP接続がある場合は、プログラムを自分で実行できます。

プログラムは 'C:\Work\' にあるTEST.S1Pファイルを探します。

重要な部分を以下に示します。

Rem Open the S-parameter file Test.S1P and read the content

Set fs = CreateObject("Scripting.FileSystemObject")

Set f = fs.GetFile("C:\work\Test.S1P")

Rem s is the number of bytes with data Test.S1P file

s = f.Size

Open "C:\work\Test.S1P" For Input As #1

Do While Not EOF(1)

Text1 = Input(s, #1)

Loop

Close #1

Rem Create the data to send to the ZVL

Rem l is the number of bytes needed for the length information of the data

l = Len(s)

Text2 = "#" + CStr(l) + CStr(s) + Text1

Rem Send the data in a file to the ZVL

commandStr = "MMEMory:DATA 'C:\Temp\Test.S1P', " + Text2

countsend = Len(commandStr)

status = viWrite(vinstr, commandStr, countsend, count)

Rem Open the file in a memory trace

commandStr = "MMEM:LOAD:TRAC 'TRC1','c:\temp\test.s1p'"

countsend = Len(commandStr)

status = viWrite(vinstr, commandStr, countsend, count)

Name
Type
Version
Date
Size
XLS_VISA_LAN_GPIB_ZVL_Transmit_S1P_From_PC-MEM.xls
Type
FAQ
Version
Date
Dec 05, 2012
Size
242 kB
Test.s1p
Type
FAQ
Version
Date
Dec 05, 2012
Size
15 kB