Programming Automated Test Equipment with MATLAB instrument control toolbox

2 Ansichten (letzte 30 Tage)
I've been recently trying to program an old power meter, specifically the Agilent HP 436A Power Meter. We are having trouble getting data back from the power meter.
We currently have this
fprintf(power1_obj, '9D+T'); % controls power meter - sets it to read in dB and puts it in trigger mode
power_1 = str2double(fscanf(power1_obj)); % read the power *** this line does not work
the first line works, we are able to change D to A or other ascii characters to change the units of the power meter. However we are unable to read the power out. I think it has something to do with the "EOI" command sent by the power meter.
From the Agilent forums I found out this information.
"The 436A always outputs a string a 12 characters, followed by the ascii < CR><LF> (cariage return, line feed) characters. The crlf is intended as the eos (or eol) sequence
Some interfaces (NI) are set to expect a GPIB hardware line, EOI (end-or-identify) to be asserted as the EOS "character". The 436A never uses this line - so if the software is waiting for it, there will be a timeout.
are you using the matlab instrument control toolbox?
The info in the 436A manual talks about formats used in 1970's era computers, and is just confusing. See the attached 1 page explanation of the 436A GPIB commands. If it is not shown on this page, the 436A does not support it - in other words, "*IDN?" is NOT recognized and should not be used, there is NO status byte, NO serial poll, no SRQ interrupts, etc.
FYI - 436A Introduction Date: 01 FEB 1975"
I'm trying to piece this together but I am afraid I do not know enough about MATLAB to do so. Can you tell me if it is possible to receive data from this power meter and how we should go about doing so?
I couldn't attach the GPIB commands the quoted text refers to but I can email it to you if you think you can help me. Thanks,
Matt Deibel

Antworten (1)

Ankit Desai
Ankit Desai am 27 Feb. 2011
Hi Matt,
You should be able to communicate over GPIB using the Instrument Control Toolbox. Once you have the GPIB object created (power1_obj - in your case) you should be able to set the properties of the object to match that of the instrument.
The online documentation talks more about how to read and write using GPIB object.
get(power1_obj)
will show all the properties of the object, including the EOSMode, EOIMode and EOSCharCode.
You can find more information on each of those properties on the online documentation too. Hopefully setting these properties to match the instrument will allow you to communicate with the instrument without any issue.
All the best,
-Ankit

Kategorien

Mehr zu Instrument Connection and Communication finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by