Can write data from network analyser but cannot read it (SCPI commands)
조회 수: 9 (최근 30일)
이전 댓글 표시
Hi guys,
I'm trying to read the currently set value from an Agilent E5071C network analyser (ENA), using a TCPI/IP connection method.
As one example of a SCPI command I've tried for setting the start frequency:
The below command works for setting the start frequency:
:SENSe{[1]-160}:FREQuency:STARt <numeric>
The below command should return the currently set frequency:
:SENSe{[1]-160}:FREQuency:STARt?
I've used the Matlab code below to set the start frequency to 1GHz, which works:
fprintf(agilentENA, [':SENS:FREQ:STAR 1e9'])
But when I try to query it with the below code, I just receive an error:
fprintf(agilentENA,':SENS:FREQ:STAR?');
out = str2double(fgets(agilentENA));
The error I receive is:
Warning: Unsuccessful read: A timeout occurred before the Terminator was reached.
I've tried increasing the timeout to 100 too, but it still shows the same error message. It's odd how I can write to the instrument, but cannot read to it.
Thanks in advance for any support.
Best Regards, Charlie
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Instrument Control Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!