AnsweredAssumed Answered

E4407B: import trace image

Question asked by picasso on Sep 14, 2011
Latest reply on Sep 16, 2011 by picasso

           I am new in this forum. I am using an E4407B Spectrum Analyzer and I have stablished a GPIB link from a C++ project. I am using VISA library and SCPI instructions to communicate with the device. The issue I am working now is to import a trace image that has just been saved into the FLASH memory of the analyzer. I am taking some code lines from an example (specifically from the Measurement Guide and Programming Examples file). These next two lines are the ones I have used,

                status = viVPrintf(vi, ":MMEM:STOR:SCR ’C:PICTURE.GIF’" + Chr$(10), 0);
                status = viVQueryf(vi, ":MMEM:DATA? ’C:PICTURE.GIF’" + Chr$(10), _"%#y", ArrayPtr(0)); 

           Since I don't know what Chr$(10) is or what format represents %y, I have changed them just to fit in my prgram. The result is:      
              // Reserve 50 KB for the image      
            char *ArrayPtr = new char[50000];       
             // Store in FLASH memory and import to my PC
            viPrintf(visa, (char *)"MMEM:STOR:SCR 'C:GUI.GIF';*WAI \n");       
            viQueryf(visa, (char *)"MMEM:DATA? 'C:GUI.GIF';*WAI \n", (char *)"%#c", ArrayPtr);           

           The second line works perfectly, but the third one is making me go crazy. It doesn't work; in fact, nothing is imported to my PC. Any suggestion??
            Thank you very much,

         Pablo L.