Page tree
Skip to end of metadata
Go to start of metadata


AWRDE may be accessed from Matlab using the COM API. This interface allows users to perform any of the following:

  • Access system diagrams, circuit schematics, data files, etc., and modify their content
  • Set up and run simulations
  • Access data from graphs

Information on controlling AWRDE thru the COM API can be found here. The Mathworks website provides information on how to create COM objects and accessing COM methods.

An example of how to access AWRDE from Matlab is shown below.

Matlab code
h = actxserver('AWR.MWOffice.14.0');			% Open AWR v14
% h.Visible = false;							% Make AWR invisible
% h.Visible = true;								% Make AWR visible
% m = h.SystemModels;							% Get system models
% m.Exists('PHARRAY');							% Check if PHARRAY exits
% h.Open(ProjectFileName);						% Open project

h.Open('C:\Program Files (x86)\AWR\AWRDE\14_release\Examples\16QAM_IQ_Imbalance.emp');

df = h.Project.DataFiles;
sc = h.Project.Schematics;
sd = h.Project.SystemDiagrams;
gr = h.Project.Graphs;

dfnum = df.Count
scnum = sc.Count
sdnum = sd.Count
grnum = gr.Count

hp = h.Project;                   		% get project object
hgs = hp.Graphs;						% get graphs collection object
hg2 = hgs.Item(1);						% get object for graph 1
hg1 = hgs.Item('EVM');					% get object for graph 'EVM'
hts = hg1.Traces;						% get traces collection object
ht1 = hts.get('Item',1);				% get object for trace 1
ha1 = hg1.Axes.get('Item',1);			% get object for axis 1

hp.Simulator.RunStop;                   % run simulator to get the trace data

hm1 = hg1.Measurements.get('Item',1);	% get object for measurement 1
tv1 = hm1.TraceValues(1);               % get trace values for measurement 1

tv1
  • No labels