AnsweredAssumed Answered

polling really slow

Question asked by cmontoya on Mar 15, 2010
Latest reply on Mar 22, 2010 by cmontoya

I am having a hard time with my N9010A. I have configured my device using the IVI drivers. I found polling to be virtually imposable with IVI so I embedded a bit of scpi  just to do the polling.  according to the screen the swept should take ~37ms,  BW=51hz,Span=1khz. yet it takes  ~441ms for me to get my results this test time is killing me. this is all done in CVI, using usb.

This is the polling code:
double MeasureSpectrumAnalyzerPeakN(int avg)

                            status|=agmxa_WriteInstrData (saSession, "*CLS\n");

                         status|=agmxa_WriteInstrData (saSession,"*ESE 1\n");
                         status|=agmxa_WriteInstrData (saSession,"INIT:CONT 0\n");
                         status|=agmxa_WriteInstrData (saSession,"INIT:IMM\n");
                         status|=agmxa_WriteInstrData (saSession,"*OPC\n");
                                        status|=agmxa_WriteInstrData (saSession,"*ESR?\n");
                                        status|=agmxa_ReadInstrData (saSession, 3, rstr, &j);
                         status |= agmxa_QueryMarker (saSession, &position, &amp);


when it's all done
I have also tried using *opc? and removing the *ESR? command it still takes to long     

here is the setup code: rBw=51, frequency=x, attn=20, span=1e3, reflevel=10
          status=agmxa_WriteInstrData (saSession,"DISPlay:ENABle OFF\n");
          status |= agmxa_ConfigureMeasurementType (saSession, AGMXA_VAL_MEASURE_TYPE_SA);
          status |= agmxa_ConfigureSweepCoupling (saSession, VI_FALSE, rBw, VI_TRUE, rBw, VI_TRUE, 0.004);
          status |= agmxa_ConfigureAcquisition (saSession, VI_TRUE, 1, VI_FALSE, AGMXA_VAL_DETECTOR_TYPE_NORM,
          status |= agmxa_ConfigureLevel (saSession, AGMXA_VAL_AMPLITUDE_UNITS_DBM, 50.0, refLevel, 0, VI_FALSE, atten);
          status |= agmxa_ConfigureFrequencyCenterSpan (saSession, frequency, span);
          status |= agmxa_ConfigureMarkerEnabled (saSession, VI_TRUE, "1");
          status |= agmxa_SetActiveMarker (saSession, "1");
          status |= agmxa_ConfigureMarkerSearchCharacteristics (saSession, AGMXA_VAL_PEAK_SEARCH_CRITERIA_MAX,
                                                                           VI_TRUE, VI_FALSE, VI_FALSE);

If (you see a way to fix this==TRUE && you post it here==TRUE){
thank you
thank you, for looking