完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在使用VB来使用SCPI命令从我的PNA收集数据。
我希望能够在VB中将跟踪数据检索到一个数组中,以便将其格式化并保存到文件中。 以下是我正在使用的命令,按使用顺序:* RST DISP:WIND1:TRAC1:DEL CALC1:PAR:DEF:EXT's21_1',S21 CALC1:PAR:SEL's21_1'DISP:WIND1:TRAC1:FEED 's21_1'SENS1:FREQ:STAR 1ghz SENS1:FREQ:STOP 4ghz SENS1:SWE:POIN 801 SENS1:SWE:MODE SING CALC1:DATA:SNP? 1第一个问题是即使我为S21设置了当前窗口,我仍然得到S11数据。 然后我尝试使用CAL:DATA:SWP:PORT:SAVE'1,2','filename.s2p'来查看我是否可以使用正确的数据保存文件。 这就是我得到的:!Agilent Technologies,N5242A,SG48420105,A.09.50.13!Agilent N5242A:A.09.50.13!日期:2012年9月24日星期一11:56:01!更正:S11(关闭)! S21(关闭)!S12(关闭)!S22(关闭)!S2P文件:测量:S11,S21,S12,S22:#Hz S dB R 50 8250000000 -24.731014 -73.900871 -200 45 -200 45 -200 45 8650000000 - 23.449444 177.01767 -200 45 -200 45 -200 45 9050000000 -20.864315 33.254925 -200 45 -200 45 -200 45 9450000000 -27.105957 -137.45641 -200 45 -200 45 -200 45 9850000000 -21.587301 -43.66655 -200 45 -200 45 - 200 45 10250000000 -16.823956 153.81203 -200 45 -200 45 -200 45 10650000000 -14.65541 -9.3751211 -200 45 -200 45 -200 45 11050000000 -15.921999 -160.85413 -200 45 -200 45 -200 45 11450000000 -20.617804 48.296314 -200 45 -200 45 -200 45 11850000000 -28.508892 -105.61721 -200 45 -200 45 -200 45 12250000000 -23.955696 -65.993332 -200 45 -200 45 -200 45我正确获得S11数据但没有S21数据,所有其他通道 不活跃。 S21跟踪在屏幕上看起来正确,但数据无法正确保存。 不确定我做错了什么。 谢谢杰拉米 以上来自于谷歌翻译 以下为原文 I am using VB to to collect data from my PNA using SCPI commands. I want to be able to retrieve the trace data into an array in VB so that it can be formatted and saved to a file. Here are the commands that I am using, in order of use: *RST DISP:WIND1:TRAC1:DEL CALC1:PAR:DEF:EXT ‘s21_1’, S21 CALC1:PAR:SEL ‘s21_1’ DISP:WIND1:TRAC1:FEED ‘s21_1’ SENS1:FREQ:STAR 1ghz SENS1:FREQ:STOP 4ghz SENS1:SWE:POIN 801 SENS1:SWE:MODE SING CALC1:DATA:SNP? 1 The first problem is that even though I have the current window set up for S21 I still get S11 data. I then tried using the CAL:DATA:SWP:PORT:SAVE '1,2', 'filename.s2p' to see if I could even save a file with the correct data. This is what I get: !Agilent Technologies,N5242A,SG48420105,A.09.50.13 !Agilent N5242A: A.09.50.13 !Date: Monday, September 24, 2012 11:56:01 !Correction: S11(Off) !S21(Off) !S12(Off) !S22(Off) !S2P File: Measurements: S11, S21, S12, S22: # Hz S dB R 50 8250000000 -24.731014 -73.900871 -200 45 -200 45 -200 45 8650000000 -23.449444 177.01767 -200 45 -200 45 -200 45 9050000000 -20.864315 33.254925 -200 45 -200 45 -200 45 9450000000 -27.105957 -137.45641 -200 45 -200 45 -200 45 9850000000 -21.587301 -43.66655 -200 45 -200 45 -200 45 10250000000 -16.823956 153.81203 -200 45 -200 45 -200 45 10650000000 -14.65541 -9.3751211 -200 45 -200 45 -200 45 11050000000 -15.921999 -160.85413 -200 45 -200 45 -200 45 11450000000 -20.617804 48.296314 -200 45 -200 45 -200 45 11850000000 -28.508892 -105.61721 -200 45 -200 45 -200 45 12250000000 -23.955696 -65.993332 -200 45 -200 45 -200 45 I get the S11 data correctly but not the S21 data, all the other channels are not active. The S21 trace looks correct on the screen but the data does not save properly. Not sure what I am doing wrong. Thanks Jeramy |
|
相关推荐
1个回答
|
|
这里实际上有两个问题。
首先是使用命令“CALC1:DATA:SNP?1”。 当你传递“1”时,你所说的是你想要一个S1P文件。 S1P文件(或在这种情况下的数据)仅针对反射参数(即S11,S22,S33,......)定义。 但是,我们不能因为滥用此命令而责怪您,因为在这种情况下我们的文档不正确。 帮助文件说:> 1(S1P)返回活动测量的数据。 应该说的是:* 1(S1P)如果有效测量是反射参数,如S11或S22,则返回有效测量的1端口数据。 如果活动测量是传输参数(例如S21),则行为是UNDEFINED。因此,如果您希望使用此命令获取S21数据,则必须使用*“CALC1:DATA:SNP?2”*。 但是,推荐的命令实际上是“CALCulate:DATA:SNP:PORTs?” 你必须使用* CALCulate:DATA:SNP:PORTs? “1,2”*如果您想获取S21测量数据。 第二个问题解释了为什么你的“CAL:DATA:SNP:PORT:SAVE'1,2'”没有按预期工作,你有一个大扫描(801)点,但是你没有执行* OPC? 在“SENS:SWE:MODE SING”命令之后,当您在“CAL:DATA:SNP:PORT:SAVE'1,2'”命令中,您写入S2P文件的数据缓冲区尚未完全填满 被执行。 如果你使用以下序列,那么你应该得到正确的数据:* RST:DISP:WIND1:TRAC1:DEL:CALC:PAR:DEF:EXT“s21_1”,“S21”:CALC:PAR:SEL“s21_1”: DISP:WIND:TRAC1:FEED“s21_1”:SENS:FREQ:STAR 1 GHZ:SENS:FREQ:STOP 4 GHZ:SENS:SWE:POIN 3:SENS:SWE:MODE SING * OPC? :MMEM:STOR:TRAC:FORM:SNP DB:CALC:DATA:SNP:PORT:SAVE“1,2”,“mysnpfile2.s2p”:SENS:SWE:MODE SING * OPC?编辑:daras于9月24日, 2012年5:02 PM 以上来自于谷歌翻译 以下为原文 there is actually two problem here. first is the use of the command "CALC1:DATA:SNP? 1". when you pass a "1", what you are saying is that you want an S1P file. An S1P file (or data in this case) is only defined for reflection parameters (i.e. S11, S22, S33, ....). However, we can't hardly blame you for misusing this command, because our documentation is incorrect in this case. The help file says: >1 (S1P) returns data for the active measurement. what it should say is this: *1 (S1P) returns 1-Port data for the active measurement if the active measurement is a reflection parameter such as S11 or S22. The behavior is UNDEFINED if the active measurement is a transmission parameter such as an S21* So if you want your S21 data using this command, then you would have to use *"CALC1:DATA:SNP? 2"*. However, the recommended command is actually "CALCulate:DATA:SNP:PORTs?" and you would have to use *CALCulate:DATA:SNP:PORTs? "1,2"* if you want to get data for an S21 measurement. the 2nd problem that explains why your "CAL:DATA:SNP:PORT:SAVE '1,2'" didn't work as expected is that you have a large sweep (801) points, but you do not perform an *OPC? after the "SENS:SWE:MODE SING" command, so the data buffers that you are writing to your S2P file have not been fully filled up yet when the "CAL:DATA:SNP:PORT:SAVE '1,2'" command is executed. if you use the following sequence, then you should get the correct data: *RST :DISP:WIND1:TRAC1:DEL :CALC:PAR:DEF:EXT "s21_1","S21" :CALC:PAR:SEL "s21_1" :DISP:WIND:TRAC1:FEED "s21_1" :SENS:FREQ:STAR 1 GHZ :SENS:FREQ:STOP 4 GHZ :SENS:SWE:POIN 3 :SENS:SWE:MODE SING *OPC? :MMEM:STOR:TRAC:FORM:SNP DB :CALC:DATA:SNP:PORT:SAVE "1,2","mysnpfile2.s2p" :SENS:SWE:MODE SING *OPC? Edited by: daras on Sep 24, 2012 5:02 PM |
|
|
|
只有小组成员才能发言,加入小组>>
1327 浏览 0 评论
2394 浏览 1 评论
2213 浏览 1 评论
2084 浏览 5 评论
2971 浏览 3 评论
1224浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
781浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
1024浏览 0评论
1329浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-1-12 04:16 , Processed in 1.591025 second(s), Total 44, Slave 39 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号