AnsweredAssumed Answered

Low level GPIB question

Question asked by blavoie on Jun 15, 2011
Latest reply on Jun 16, 2011 by blavoie
Hello,

I'm programming an E4440A over gpib using low level board commands (ibwrt, ibrd etc...). I am able to read and write to the device but am having a hard time getting a screen shot from the analyzer onto my pc. Can some one suggest where I am going wrong, here is a snippet of code that captures the screen image to analyzer memory (I can see it by checking on the actual analyzer itself manually), request the file be put onto the gpib bus, tries to read it to a local file on my pc, then deletes the image from the analyzer. The image does get created and deleted, but it does not get read into my local file on my pc.

Any comments?

>>>>

     //save bitfile
     ibwrt(Dev, "MMEM:STOR:SCR 'C:\PROVA.GIF'", 28L);
     if (Ibsta() & ERR)
     {
          GPIBCleanup(Dev, "Unable to save screencap to E4440");
          return 1;
     }

     //ask for bitfile
     ibwrt(Dev, "MMEM:DATA? 'C:\PROVA.GIF'", 25L);
     if (Ibsta() & ERR)
     {
          GPIBCleanup(Dev, "Unable to save screencap to E4440");
          return 1;
     }

     //read bitfile
     ibrdf(Dev, (const wchar_t *)"E:\tmp\PROVA.GIF");
     if (Ibsta() & ERR)
     {
          GPIBCleanup(Dev, "Unable to write screenshot from E4440");
          return 1;
     }


     //delete bitfile from e4440
     ibwrt(Dev, "MMEM:DEL 'C:\PROVA.GIF'", 23L);
     if (Ibsta() & ERR)
     {
          GPIBCleanup(Dev, "Unable to write screenshot from E4440");
          return 1;
     }  

Outcomes