引用: 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!
引用: 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!
举报