AnsweredAssumed Answered

Uploading a new cal set to PNAX

Question asked by satrimb on Jun 3, 2010
Latest reply on Jun 8, 2010 by satrimb
My goal is to upload a set of error terms from a controlling PC into a new cal set on the PNAX and then use those error terms for correction in a measurement.  Using the example programs provided in the help documentation, I'm able to create the cal set and upload the error terms.  I am unable to activate correction, however.

Once the PNA channel stimulus settings are set correctly, this code is used to push the error terms into a cal set.  I believe it follows the 'Writing Cal Set Data using COM' example in the help documentation except that the 'OpenCalSet' and 'CloseCalSet' methods have been skipped because they are documented as obsolete.  The 'savedCalSet' variable is a class which holds previously downloaded error terms, and the 'CreateVariantArray' converts the typed array values to an object.  (This is C#, by the way)

            ICalManager calMgr = PNA_App.GetCalManager() as ICalManager;
            ICalSet4 calSet = calMgr.CreateCalSet(channelNumber) as ICalSet4;
            IChannel channel = PNA_App.Channel(channelNumber);
            channel.SelectCalSet(calSet.GetGUID(), false);
            foreach (var term in savedCalSet.ErrorTerms)
                calSet.PutErrorTermByString(term.Name, CreateVariantArray(term));


The error terms upload correctly (I assume this because I can use the cal sets in the adapter characterization macro, and it creates a valid s2p file) so that part is not an issue.  The problem seems to be that the cal set does not know what type it is or how many ports the cal was over.  When I look at the cal set through the 'Manage Cals' dialog, it shows 'EMPTY' under 'Cal Types/Ports'.  And when I try to switch correction to ON, the PNA gives an error message stating "Calibration is required before correction can be turned on".

Is there some final command that rounds out a calibration upload?

Thanks for your help!