04-18-2012 01:18 PM
Hi Everyone,
So I have this VI that I had created and someone on here helped vamp it up big time. Thanks again for that. I have run into a snag with my program. So I have this VI that takes in arrays and places them in an xml file. I am using teststand to control a SigGen, PowerMeter, and a switch matrix so I can take a whole bunch of array measurements and place them into a singke xml file. My problem is that my xml file (when the test is completed) will have about 200 or more arrays in it. So I was hoping that I could make the 2-D array name into a variable so I can make each array unique in my xml file. That way I can eventually create another VI that takes the xml file and display the desired array. Does anyone know how to make the 2-D array name into a variable so I can change it to what I want from teststand? My VI is attached below.
Thanks,
dlovell
Solved! Go to Solution.
04-18-2012 01:33 PM
I think post-processing the output from the Flatten to XML may be your best bet.
Do a Search and Replace on
<Array>
<Name>2D-Array</Name>
and replace with
<Array>
<Name>variable name</Name>
04-19-2012 10:58 AM
Hey,
Thanks for the quick response. Do you mean replace by hand when the xml file is completed? I don't fully understand, I am new to this xml format...
Thanks,
dlovell
04-19-2012 12:33 PM
Something like this:
04-19-2012 03:13 PM
Hey Taki,
So I understand now where you are coming from. Did your VI (the picture you posted) work? I can't get the 2D-Array to change to my Var_Name (my input name)... Below is my VI that I made look like your picture.
Thanks,
dlovell
04-19-2012 04:06 PM
I didn't actually test the previously posted version.
I think my inputs to the search function aren't right.
The newline seems to be screwing it up.
Try using
<Name>2D-Array</Name>
for the search string
and
<Name>%s</Name>\n
as the Scan into String Function.
I did test a subset of this and it worked for me.
04-19-2012 05:08 PM
THANKS Taki!!!!! This was exaculty what I was looking for!!