问题
我的 pc 上有一个 s 参数文件,我想将此文件加载到网络分析仪的存储迹线。
我如何通过远程控制加载?
我的 pc 上有一个 s 参数文件,我想将此文件加载到网络分析仪的存储迹线。
我如何通过远程控制加载?
您需要在 visualbasicapplication 的 excel 中编写的附加程序。
如果您已经安装 ni-visa 驱动程序并且将 gpib 或 tcp/ip 连接到网络分析仪,则您可以自行运行程序。
程序将在此路径下搜索 test.s1p 文件:c:\work\
重要方面如下:
记住打开 s 参数文件 test.s1p 并阅读内容
设置 fs = createobject("scripting.filesystemobject")
设置 f = fs.getfile("c:\work\test.s1p")
记住 s 指 test.s1p 文件的数据字节数
s = f.size
打开 "c:\work\test.s1p" 搜索 #1 输入
在非 eof(1) 时操作
text1 = input(s, #1)
循环
关闭 #1
记住创建数据以发送到 zvl
记住 l 指数据长度信息所需的字节数
l = len(s)
text2 = "#" cstr(l) cstr(s) text1
记住将文件中的数据发送到 zvl
commandstr = "mmemory:data 'c:\temp\test.s1p', " text2
countsend = len(commandstr)
status = viwrite(vinstr, commandstr, countsend, count)
记住打开存储轨迹中的文件
commandstr = "mmem:load:trac 'trc1','c:\temp\test.s1p'"
countsend = len(commandstr)
status = viwrite(vinstr, commandstr, countsend, count)