Changes between Initial Version and Version 1 of OFDMReferenceDesign/Applications/MakeXML


Ignore:
Timestamp:
Jul 22, 2009, 3:42:46 PM (15 years ago)
Author:
rpl1
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OFDMReferenceDesign/Applications/MakeXML

    v1 v1  
     1The following are the steps for creating multiple XML files:
     2
     3
     4
     5The language used to create the custom XML files is AutoIt.
     6
     7'''SET UP TEMPLATE'''
     8
     9In order to turn XML into AutoIt code, first export a template from the Azimuth Director II software and then open the file in your favorite text editor.
     10
     11Copy the file to the clipboard using CTRL-A then CTRL-C
     12
     13Double click readmodel2autoitcode.au3 located in C:\Documents and Settings\Administrator\Desktop\makexml
     14
     15The AutoIt formatted XML code is now stored in the clipboard.
     16
     17It is time to open up the makemodelmanual.au3 located in C:\Documents and Settings\Administrator\Desktop\makexml
     18Open by right clicking and selecting SciTE editor.
     19
     20The explanation will show how to edit gains.
     21
     22Replace the current $value&= ... with the data in the clipboard  by typing CTRL-V inside Func MakeModel($gain, $name)
     23
     24Because we need to change certain values, we will need to edit this text slightly. AutoIt uses & to concatenate strings and values are specified as $value
     25
     26Change the following lines:
     27
     28{{{
     29$value&='    <MODEL_NAME>...</MODEL_NAME>' & @CRLF 
     30}}}
     31
     32with
     33
     34{{{
     35$value&='    <MODEL_NAME>'&$name&$fileCount &'</MODEL_NAME>' & @CRLF 
     36}}}
     37
     38
     39{{{
     40$value&='    <MODELGAIN>...</MODELGAIN>' & @CRLF 
     41}}}
     42
     43with
     44
     45{{{
     46$value&='    <MODELGAIN>'&$gain[$fileCount] & '</MODELGAIN>' & @CRLF 
     47}}}
     48
     49
     50'''INCLUDE CUSTOM GAINS'''
     51
     52
     53The following will explain how to AutoIT arrays to be used in the makemodelmanual.au3 from a matlab file.
     54
     55Let's say that the matlab script create the matrices MG_sd, MG_sr, and MG_rd. At the bottom of the matlab file add the following:
     56
     57
     58{{{
     59fid = fopen('gains.txt','wt');
     60
     61for i = 0: length(MG_sd.')-1
     62    fprintf(fid,'$gainSD[%d] = %f\n', i, MG_sd(1,i+1));
     63end
     64
     65for i = 0: length(MG_sr.')-1
     66    fprintf(fid,'$gainSR[%d] = %f\n', i, MG_sr(1,i+1));
     67end
     68
     69for i = 0: length(MG_rd.')-1
     70    fprintf(fid,'$gainRD[%d] = %f\n', i, MG_rd(1,i+1));
     71end
     72
     73}}}
     74
     75
     76These AutoIt arrays have been written to gains.txt
     77
     78Open gain.txt and copy the files to the clipboard.
     79
     80Go back to makemodelmanual.au3
     81
     82Copy the values into the Func Gains
     83
     84At the top change the Global $gainSD[], $gainRD[], and $gainSR[] to have the specified size for those files.
     85