AnsweredAssumed Answered

How to get active measurement parameters ?

Question asked by Mathieu on May 22, 2011
Hi,

I've gtot my new E5071C VNA and I use the IVI-COM driver to communicate with the device (C++).

All is fine but I can't do this two tasks :
- get the number of Measurement on the Channel 1
- get the S parameter of the Measurement1 of the Channel 1.

I use this code :
IAgilentNAPtr spDriver(__uuidof(AgilentNA));
spDriver->Initialize(LPCTSTR(strResourceDesc), VARIANT_TRUE, VARIANT_FALSE, LPCTSTR(strInitOptions));
IAgilentNAChannelPtr spCh1 = spDriver->Channels->Item[_T("Channel1")];
IAgilentNAMeasurementsPtr tttt = spCh1->GetMeasurements();
IAgilentNAMeasurementPtr tt = tttt->GetItem("Measurement1");
tt->GetTrace();
long s_in, s_out;
tt->GetSParameter(&s_in, &s_out);

The GetSParameter failed and I don't know why.
Can you tell me what's going wrong ?

And then, can you tell me how can I get the number of measurement on the Channel 1 ?

Thank you for your help,

Best regards

Mathieu  

Outcomes