From:[email protected] [mailto:[email protected]] On Behalf Of Staffan Sent: Tuesday, November 20, 2018 8:13 AM To:[email protected] Subject: Re: [HP-Agilent-Keysight-equipment] Readings from 436A power meter using 82357B USB-GPIB?
?
Hello,
?
Many thanks. I have been successful in all the steps you mention using the Arduino converter, but I need to activate REN for sending a command and then deactivate REN before reading.?
This is not possible (controlling REN) using 82357 - or is there a way? I’m fairly sure this is the issue with the 436 (REN).
?
Regards,
?Staffan
On Tuesday, November 20, 2018, Dave_G0WBX via Groups.Io <g8kbvdave=[email protected]> wrote:
A simple task...
But it is NOT IEE488.2 compliant, so will not respond to such things as *IDN? etc.? (In fact, traffic like that can totally mess it up at times, as can other automated tricks to attempt to catalogue "live" devices on the bus..)
Modern GPIB systems will handle all the global un-listen, selected device addressing and so on for you, making life much easier.? If you create your own GPIB controller, you have to do all that yourself.
Make sure you know it's device address on the bus.? Ours is defaulted to a primary address of '13' (decimal.)??? AFIK (oddly, I cant find the detail in our manual!)? The address setting is a bank of switches internally.??? If you need to "scan the bus" to find it, you may need to manually reset the thing after you know it's address, as it's a simple state machine in hard logic internally, and can get "upset" by command data it cant understand.
Anyway, when you know it's bus address...?? And it's Talk Mode is set to "Normal".
Send it the command '9A+I' (not the quotes!) with no trailing terminator byte, with or without EOI asserted, it doesn’t care about that.? That command instructs it to send back a reading scaled in Watts.? (Or '9D+I' in which case It will scale in dB/dBm.)
Use Watt's initially, as a no input signal condition, will still result in a valid reading!
Give it a little time to figure things out...
When you then ask the system to read back the resulting "measurement".
The 436A will send a 14 byte fixed format ASCII string to the controller, ending in a CR/LF pair, so your GPIB system needs to be configured to stop reading when it sees a LF byte (ASCII code 10, or 0x0A)? The 436A does not use the EOI line, so you MUST configure your bus controller to recognise that LF byte to signify the end of it's reply, or to stop reading after 14 bytes have been received.
The first byte (byte 0) is the status. ('P' = valid reading.? Anything else is under/over range.)
Bytes 3 to 11 represent the measured value, in scientific format (Mantissa).
Byte 3 is a sign (ASCII space = +) or and ASCII -
Bytes 4..7 are the measured value, an implied decimal point is immediately after byte 7.
Byte 8 is always an 'E'.
Byte 9 is always a - sign.
Bytes 10 .. 11 is the Exponent.
Bytes 12..13 are CR/LF
It's all ASCII characters, so no "funny" stuff.
The above comes from table 3-4 on page 3-25 of the operating and service manual.
It's up to you to process that string to test for validity, and extract the value.
It is highly recommended to get a copy of at operator/service manual.? (I only have a dead tree version.)
Hope this helps.
Dave B (G0WBX)
-- Created on and sent from a Unix like PC running and using free and open source software. ::