04-18-2013 09:04 AM - edited 04-18-2013 09:17 AM
Hi,
I'm trying to transfer a screendump from a spectrum analyzer (HP/agilent E7405A) over the GPIB bus with matlab.
I've stored a image in the internal memory on the instrument using the command fwrite(g, 'MMEM: STOR: SCR "C:IMAGE.GIF"');
Then I use fwrite(g, 'MMEM: DATA? "C:IMAGE.GIF"'); This to get the data of the image onto the bus. But it's now im not quite sure on how to continue.
What I understand I need to use something like data=binblockread(g,'char'); to read the data. But I'm not to good with this, I don't seem to get all of the data. Then I also need to arrange it somehow to be able to print a picture out of it using imshow(). Now it's all in one column, it should be like a matrix with 3 "layers" for a color picture.
Any suggestions or idea´s?!?
Help is appreciated. 😃
04-18-2013 04:40 PM
Once the image file is created and in the filesystem on the analyzer. Why not just IP connect and transfer the file with USB stick or network connection?
I don't understand why the image file transfer must be done with GPIB?
04-18-2013 04:46 PM
This instrument is older and probably doesn't have USB port or Ethernet port.
Not sure how Matlab works, so it may be better to ask on their forum.
04-18-2013 09:22 PM
The other option is the binary file transfer over GPIB, but thats getting homey with the programming manual. Agilent is pretty good with App notes, User Guides etc. Having done this in the past with other instruments from them, I know how instrumment specific the methods are even within the Agilent instruments. They have different division building different models and the firmware and GPIB interface methods can vary widely. Agilent should have the manuals on line.