是德科技
直播中

刘玉英

7年用户 180经验值
私信 关注
[问答]

MMEM:TRAN是否适用于s2p文件?

您好,我正在寻找将PNA(例如:N5222A)中的s2p文件传输到连接的PC中。
我的问题是“MMEM:TRAN?使用s2p文件?如果确实如此,那么使用签证命令和GPIB传输文件的正确语法是什么。谢谢。

以上来自于谷歌翻译


     以下为原文

  Hello,  
I am looking to transfer the s2p files from a PNA (eg: N5222A) into the connected PC.  
My question is does  "MMEM:TRAN? work with s2p files?  
If it does then what is the right syntax to transfer the files using visa commands and through a GPIB.  
Thank You.  

回帖(6)

柴扉

2018-12-28 16:01:05
从在线帮助(在线交互式手册):http://na.tm.agilent.com/pna/help/latest/help.htm导航至:programming-> scpi-> commands-> memory-> TRANsfer(或者
链接:http://na.tm.agilent.com/pna/help/latest/Programming/GP-IB_Command_Finder/Memory.htm#Transfer)在该部分中,有一个示例程序的链接,该程序将文件传入和传出文件。
PC和PNA(s2p文件)。
以下是该示例的直接链接:http://na.tm.agilent.com/pna/help/latest/Programming/GPIB_Example_Programs/Transfer_Data_using_GPIB.htm

以上来自于谷歌翻译


     以下为原文

  From the online help (interactive manual online): http://na.tm.agilent.com/pna/help/latest/help.htm

Navigate to: programming->scpi->commands->memory->TRANsfer  (or this link: http://na.tm.agilent.com/pna/help/latest/Programming/GP-IB_Command_Finder/Memory.htm#Transfer)

In that section there's a link to an example program that transfers a file to and from a PC and a PNA (a s2p file). 
Here's the direct link for the example: http://na.tm.agilent.com/pna/help/latest/Programming/GPIB_Example_Programs/Transfer_Data_using_GPIB.htm
举报

刘玉英

2018-12-28 16:14:12
引用: btywyrww 发表于 2018-12-28 06:17
从在线帮助(在线交互式手册):http://na.tm.agilent.com/pna/help/latest/help.htm导航至:programming-> scpi-> commands-> memory-> TRANsfer(或者
链接:http://na.tm.agilent.com/pna/help/latest/Programming/GP-IB_Command_Finder/Memory.htm#Transfer)在该部分中,有一个示例程序的链接,该程序将文件传入和传 ...

谢谢回复!!
根据(http://na.tm.agilent.com/pna/help/latest/Programming/GPIB_Example_Programs/Transfer_Data_using_GPIB.htm)链接,我需要一些帮助来理解步骤1到4。

现在通过四个步骤138读取分析仪返回的字节!
(1)读取并转储第一个字符 - '#'输入@Na使用“#,A”; A $ 141!
142!
(2)读取下一个字符,即文件大小中的位数150 ENTER @Na USING“#,A”;数字$ 160!
161!
(3)使用位数的值来回读文件字节大小170!
使用此数字位数创建查询字符串180 Img $ =“#”,& Digit $&“A”190!
200!
字节$保存字符串格式的字节数210 ENTER @Na USING Img $; Byte $ 220!
225!
(4)将文件内容读入缓冲区并将缓冲区内容存储到本地文件230中!
分配用于保存数据的缓冲区240 ALLOCATE Dat $ [VAL(Byte $)] 250!
260!
设置不同的图像以填充缓冲区270 Img $ = Byte $&“A”280!
290!
检索实际文件数据300 ENTER @Na USING Img $; Dat $ 305!
我不确定这是什么编程语言。
我只尝试过MEMM:TRAN?
命令与文件名,它不起作用。
我很困惑,即使转移,然后它将保存在PC上。
期待任何帮助。
谢谢!

以上来自于谷歌翻译


     以下为原文

  Thank you replying!!
I would need some help in understanding steps 1 through 4 as per (http://na.tm.agilent.com/pna/help/latest/Programming/GPIB_Example_Programs/Transfer_Data_using_GPIB.htm) link.

! Now read the bytes coming back from the analyzer in four steps
138   ! (1) Read and dump the first character - '#'
140   ENTER @Na USING "#,A";A$
141   !
142   ! (2) Read the next character which is the number of digits in the file size
150   ENTER @Na USING "#,A";Digit$
160   !
161   ! (3) Use the value of the number of digits to read back the file byte size
170   ! Create query string using this number of digits
180   Img$="#,"&Digit$&"A"
190   !
200   ! Byte$ holds the number of bytes in string format
210   ENTER @Na USING Img$;Byte$
220   !
225   ! (4) Read the file contents into a buffer and store the buffer contents to a local file
230   ! Allocate a buffer for holding the data
240   ALLOCATE Dat$[VAL(Byte$)]
250   !
260   ! Set up a different image for filling the buffer
270   Img$=Byte$&"A"
280   !
290   ! Retrieve the actual file data
300   ENTER @Na USING Img$;Dat$
305   !

I am not sure of what programming language this is. I did try only the MEMM:TRAN? command with the filename and it does not work. 
I am confused as to even if transferred then where would it save on the PC. 

Looking forward any help. 
Thanks!
举报

李青

2018-12-28 16:20:14
引用: ***z 发表于 2018-12-28 06:30
谢谢回复!!
根据(http://na.tm.agilent.com/pna/help/latest/Programming/GPIB_Example_Programs/Transfer_Data_using_GPIB.htm)链接,我需要一些帮助来理解步骤1到4。

> {quote:title = nmedelec写道:} {quote}>谢谢你的回复!!
>根据(http://na.tm.agilent.com/pna/help/latest/Programming/GPIB_Example_Programs/Transfer_Data_using_GPIB.htm)链接,我需要一些帮助来理解步骤1到4。
>我不确定这是什么编程语言。
我没有PNA,但点击链接查看我自己。
我也没有重新编写语言,但它确实在顶部说“下面的人民币例子......”谷歌出现了各种各样的东西,但最有希望的看起来似乎是“落基山BASIC”http:// en。
wikipedia.org/wiki/Rocky_Mountain_BASIC任何一天给我C!
我并不是说它是Rocky Mountain BASIC,而且无用的维基百科页面没有任何示例代码,但我怀疑它是什么。
希望有一天我将需要编程PNA-X。
现在我必须使用我的8720D,我在C. Dave编程

以上来自于谷歌翻译


     以下为原文

  > {quote:title=nmedelec wrote:}{quote}
> Thank you replying!!
> I would need some help in understanding steps 1 through 4 as per (http://na.tm.agilent.com/pna/help/latest/Programming/GPIB_Example_Programs/Transfer_Data_using_GPIB.htm) link.
 

> I am not sure of what programming language this is. 

I don't have a PNA, but clicked the link to see for myself. I did not reconsise the language either, but it does say at the top

"The following RMB examples ..."

A Google shows up various things, but the most promising looking seems to be "Rocky Mountain BASIC"

http://en.wikipedia.org/wiki/Rocky_Mountain_BASIC

Give me C any day!!! I am not saying it is Rocky Mountain BASIC, and rather unhelpfully the Wikipedia page does not have any example code, but I suspect that is what it is. 

Hopefully one day I will have to program a PNA-X. For now I have to make do with my 8720D, which I program in C. 

Dave
举报

柴扉

2018-12-28 16:38:10
您需要查看手册中的解释和示例。
关于GPIB:http://na.tm.agilent.com/pna/help/latest/Programming/Learning_about_GPIB/Learning_about_GPIB.htm示例程序:http://na.tm.agilent.com/pna/help/latest/Programming
/GPIB_Example_Programs/SCPI_Example_Programs.htm

以上来自于谷歌翻译


     以下为原文

  You'll need to look into explanations and examples in the manual.

About GPIB:
http://na.tm.agilent.com/pna/help/latest/Programming/Learning_about_GPIB/Learning_about_GPIB.htm

Example programs:
http://na.tm.agilent.com/pna/help/latest/Programming/GPIB_Example_Programs/SCPI_Example_Programs.htm
举报

更多回帖

发帖
×
20
完善资料,
赚取积分