AnsweredAssumed Answered

Data acquisition

Question asked by vivaystn on Feb 22, 2010
Hi
I m trying to acquire data from an Agilent analyser 1670 G by using Matlab m file and I have a problem.
I connect my PC to the analyser by TCP/IP protocole and I can send command (for example I send *IDN? and I receive analyser identification).
But after sending start command i didn't get any data (I supposed to acquire the signal generated by my DSP card).
So how I can get the data which is displayed in the analyser? and can I get a file enregistred in the analyser using matlab command?

I use the following code:
IPAddress = '172.16.48.102';%the analyser address
scopePort = 5025;
format long
tcpipObj = instrfind('Type', 'tcpip', 'RemoteHost', IPAddress, 'RemotePort', scopePort, 'Tag', '');
if isempty(tcpipObj)
    tcpipObj = tcpip(IPAddress, scopePort);
else
    fclose(tcpipObj);
    tcpipObj = tcpipObj(1);
end
tcpipObj.InputBufferSize = 350000;
tcpipObj.Timeout = 1200;
tcpipObj.ByteOrder = 'littleEndian';
fopen(tcpipObj);
pause(1);
fprintf(tcpipObj,'*IDN?')
data1 = query(tcpipObj,'*IDN?');%fscanf(tcpipObj);
fprintf(tcpipObj,'start');
out=fread(tcpipObj)

Thank you very much for your help
                                          Yassine Tounsi (Sup'com University)  

Outcomes