"Brennan Peterson" writes:
> Hi. I am trying to use labview for some strig parsing, and I am finding it
> a bit frustrating. Am I missing something about text parsing under Labview,
> or is there a more powerful way of addressing strings (or should I just make
> Python or TCL/TK or Perl calls)
>
> To give an example, I need a flexible system for commanding thin film
> growth, and a typical statement looks like
>
> 1*(Cu,50)+20*(Co,30)(Cu,10)+1*(Cu,200)
>
> Which means I grow 1 50 angstrom thick layer of copper, followed by a
> multilayer with 20 bilayers, and each bilayer composed of 10 angstoms of
> Copper and 30 angstoms of cobalt. Finally, a cap of 20 Angstoms of copper
> is placed on the stucture.
>
> I read off the mumber
of cells (things preceded by a *) and the material in
> each cell.
> This data is read into a timing array/cluster, which is tells the computer
> which shutters to open and when.
>
> Things get more complicated when I need to consider more complicated dual
> bilayer structures, and alloys. However, this is all doable (and has been
> done) with a very, very old Basic system, which I would like to update. So
> I need a good, simple text parser.
>
> Either that, or a better, more stable system of controlling the growth
> parameters.
>
> Thanks
>
> Brennan Peterson
Brennan,
I'd use a different approach:
A simple linear control file is all you need. Just use time (per
state) and shutter positons (in pseudo-boolean 1 or 0). Reading in via
"Read Spreadsheet" is simple.
These control files are error prone if written by hand. What about a
seperate script generator? It just needs a for loop of 20 counts of 2
lines in the middle part...
You could possibly use a lot of regex expression
s to decode the control
language. IMHO if you really need a kind of language you don't use
labview, but a lexical analyser (flex on unix systems).
Johannes Niess