Peter Jansson, Teracom Malmoe wrote:
> Hello!
> It´s me again...
> I´ve created a VI that outputs a sting with a filepath if an error has
> occured. This is to be displayed on the screen when the measurement is
> stopped.
> So, this VI is located in a FOR loop. Enable indexing is active. I have
> wired it to a SEARCH 1D ARRAY VI. I want to scan the Array/String for the
> occurances of "
😕 " If
😕 occures, my intention is to display the full path
> on the screen.
> My question now is, what shall I type in my ELEMENT constant to the VI? The
> path might be, for example, C:\NISSE\TEMP. I am only interested in the
> occurance of
😕 because I don´t know the path they want to run this VI to...
> TIA,
> Peter Jansson,
> Teracom Malmö
The short answer is that you can't do
it that way - search 1D array
will only match a whole element. You need to check for the error
inside the for loop. I would do this by using match pattern, checking
to see if the index is greater than or equal to zero, and outputing
that as a boolean array from the for loop. You can then OR all the
elements of the boolean array to determine if an error occurred, and
if it did, search in the boolean array for the first true value to
find the index of the corresponding string.
--
******************************************************************************
Gavin Burnell Dept. Materials Science and Metallurgy
Device Materials Group University of Cambridge, UK
******************************************************************************
--
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/