AnsweredAssumed Answered

PNA X 835 series. I created two measurements from ports S31 and S41 in one channel CH1. I see measurements rezalts on PNA  screen. How to obtain data from each measurement in programm?

Question asked by PetroSobachkin on Jul 20, 2016
Latest reply on Jul 29, 2016 by PetroSobachkin
IUnknown*****   = 0;
IApplication*   pNA= 0;
IChannel*pChan  = 0;

IArrayTransfer* pTrans = 0;

IMeasurements*  pMeass = 0;

IMeasurement*   pMeas  = 0;

...........

hr=****->QueryInterface(IID_IApplication,(void**)&pNA);

  if (!FAILED(hr))

   {

    hr = pNA->get_ActiveChannel(&pChan);

 

    if (pChan)

     {

       pNA->get_Measurements(&pMeass);

       if(pMeass)

        {

           pNA->set_Visible(true);

           PNAState = true;

 

pMeas = pMeass->Item("CH1_S31_1");  // Compiler Error. Must be parameter tagVARIANT. How to use the measurement collection ???

 

        }

       else

         { ShowMessage("Active Measurement is out!"); } // Application->Terminate(); }

     }

    else

    { ShowMessage("Not activ chan!"); } // Application->Terminate(); }

   }

Outcomes