How to Transfer Trace Data File from Agilent ESA to PC Using Matlab Instrument Control Toolbox

14 ビュー (過去 30 日間)
Jacob Sims
Jacob Sims 2020 年 11 月 2 日
コメント済み: Zheng 2024 年 4 月 22 日
Hello,
I have a trace data file on my Agilent ESA E4405B spectrum analyzer, and I want to transfer it to my PC using MATLAB. I Have a GPIB connection established, and I am able to control the instrument using SCPI commands through Matlab's Instrument Control Toolbox. However, I cannot seem to find the SCPI command to actually transfer the file (.csv or .trc). There is no driver available in Windows 10 for the model that I have, so I need to use the SCPI commands. I would appreciate anyone's help!
  2 件のコメント
Jacob Sims
Jacob Sims 2020 年 11 月 3 日
Update: I figured out how to extract the file, I used the command :MMEMory:DATA? 'C:\file_name.CSV'
However, now what I have in Matlab is a character array, listing the attributes of the file (data#, date, serial #, etc), which I can extract to a .mat file, but what I need is the actual CSV file. Any ideas on how I can do this?
Thanks!
-Jacob
Zheng
Zheng 2024 年 4 月 22 日
I am using the same equipment with you. May I ask how long the timeout you set? My code(below) always returns an error: Timeout expired before the operation completed. I am not sure this is because the command is wrong or the timeout is too short.
data = writeread(visagpib,"MEMory:DATA? 'C:\TRACE001.CSV'")
Thank you in advance!

サインインしてコメントする。

回答 (1 件)

Maadhav Akula
Maadhav Akula 2020 年 11 月 6 日
Hi Jacob,
I assume you are having a char array and now want to convert it into a csv file, then I think you can try the following:
a = 'data, date, serial, etc';%Sample Char Array
C = textscan(a, '%s','Delimiter',',');
writecell(C{1,1},'C.csv');
Hope this helps!

カテゴリ

Help Center および File ExchangeInstrument Control Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by