AnsweredAssumed Answered

PNA, DCOM, & Matlab: meas.PutDataComplex

Question asked by golfnut on Aug 7, 2012
Latest reply on Aug 7, 2012 by Dr_joel
Does anyone have an example script for uploading data into a PNA from Matlab on a remote PC via DCOM? Specifically, I'm trying to put data with the putDataComplex method of the measurement object.  The PNA is working well with Matlab via DCOM; it's just the "put" action that is causing a problem for me.

For example:
Let "meas" be a variable refering to the active measurement and "myData" be a complex array of size = 21,1 in Matlab.  The active channel is in linear sweep mode with the number of points set to 21.

The following does not work:

* x=(1:21)/21;  
* tmp = x.*exp(j*2*pi*x); 
* myData = tmp.'; 
* meas.PutDataComplex('naMeasResult', myData);

I've tried transposing the dimensions of myData. I've also tried letting myData be a 21x2 array where the first column is the real and the second column is the imaginary information.  (and I tried the transpose).

* for m=1:21
* myData(m,1)=real(tmp(m));
* myData(m,2)=imag(tmp(m));
* end

The typical error is:
  +Error using+
  +Interface.Agilent_PNA_Series_1.9_Type_Library.IMeasurement8/putDataComplex+
  +Invoke Error, Dispatch Exception:+
  +Description: Method putDataComplex failed: The parameter is incorrect.+

Any ideas?  

Outcomes