AnsweredAssumed Answered

PNA Source Power Calibration - Channel Not Found

Question asked by kent96 on May 26, 2011
Latest reply on May 27, 2011 by johanericsson
I'm getting a silly error, and can't figure out what is causing it... but i'm following a similar example to the the online help
example for Source Power Calibration.

When I execute the "pwrcal.AcquirePowerReadings naPowerSensor_A, True" function.
The PNA reports an error "Channel not Found"

I tried querying the active channel right before the "AcquirePowerReadingsEx" and it returns
the expected channel of 1.

I tried putting a breakpoint right before executing the acquire method and manually went to the PNA Front Panel - Channel Options.
It lists the Active Channel as the channel i expect, 1.

There's an active channel and it's the channel i set when executing the SetCalInfoEx functions, yet it complains about
a channel not found error. Not sure what is going on. If i use the scipi parser method to send the equivalent scipi command it
executes the source power calibration as expected; however i would like stick to the COM functions.

Set PNA = CreateObject("AgilentPNA835x.Application")
Set chan = PNA.Channels(1)
Set pwrcal = PNA.SourcePowerCalibrator

' Set the number of sweep points to 21 on Channel 1.
chan.NumberOfPoints = 21

' Specify the GPIB address of the power meter
' that will be used in performing the calibration.
pwrcal.PowerMeterGPIBAddress = 13
pwrcal.UsePowerLossSegments = False
pwrcal.UsePowerSensorFrequencyLimits = False
pwrcal.IterationsTolerance = 0.1
pwrcal.MaximumIterationsPerPoint = 3
pwrcal.ReadingsTolerance = 0.1
pwrcal.ReadingsPerPoint = 5
pwrcal.SetCalInfo2 naPowerMeter, chan.channelNumber, port, offset, bDisplay

pwrcal.AcquirePowerReadings naPowerSensor_A, True

' Conclude the calibration.  This applies the cal data to PNA channel memory,
' and turns the correction ON for Port 2 on Channel 1, but does NOT save the
' calibration.

' At this point, if you choose to save the instrument state as a ".CST" file,
' the calibration will be saved with the instrument state in that file.
' Read the stimulus values from Channel 1.
stimulus = chan.GetXAxisValues