11-08-2009 11:27 PM
First off, sorry if my Labview terminology is not up to par. Basically what I have is an array of strings and each of these strings contains a message. Each of these messages represents a condition that is being checked for via comparison logic, and if a certain condition is over its maximum allowed value I would like to output the message from the array of strings into a separate isolated string. My problem is that basically I have approximately twenty conditions and I don't know how I would get them all to output to the single string, I would rather not have another array just to output my desired messages. Hopefully this makes sense because it's a lot less complicated than it reads - I'd just like a single window display to show my messages and if possible scroll through messages if more than one condition is out of its boundary values. Thanks for reading.
Solved! Go to Solution.
11-08-2009 11:53 PM
I don't see what is wrong with having an array of strings.
I would have an array strings. I would have a while loop (or For loop) that has a shift register to store the outgoing message.. If the condition is true, then it concatenates the string to the shift register. If it is false, then it just passes on the string. Once you've looped through all the possible conditions, the loop ends and the string coming out of the shift register will contain all the text messages you appended to it.
11-09-2009 07:23 AM
11-11-2009 05:11 PM
Jim, thanks for the response it worked out well.
Now that my display is working properly, I was wondering if there was a way to clear the string display window while Labview is running? And more importantly if there is a way to identify the computer that cleared the string display window?
Thanks again.
11-12-2009 11:26 AM
Hello,
If you want to clear your string indicator, you would have to write a blank string to it. You could do this with the value property node and then wiring in a blank string constant.
-Zach
11-12-2009 01:44 PM
Thanks for the reply. But what if I wanted to clear a string while the program is running, is there any way to do that?
11-12-2009 02:20 PM
11-12-2009 06:34 PM
11-12-2009 06:43 PM
You could read the initial value of the control and store it in a shift register, then when you want to reinitialize it to its default value, just wire that value into its local variable.
Or, create an Invoke Node of that control. There is a method called Renit to Default.
What are you really trying to do? It seems like you either keep repeating the same question, (reply 6 vs. 4), or keep changing the nature of the question (reply 8 reinit to default, vs. 6 &4 clear string, vs. 1 put multiple messages in string)
11-16-2009 04:26 PM
What I'm trying to do is reinitialize my string window to its default value (empty).
I'm honestly not sure how to accomplish this with a shift register, and the Invoke Node I found seems to only have the option to reinitialize all values to default - I really just want to reinitialize the string window to empty by pressing a button.
In regards to my other replies - 6 & 4 were my mistake, I was asking the wrong question. The empty string constant thing works but it's not what I'm trying to accomplish. As far as my first reply, I accomplshed putting multiple messages into the string, I'm now trying to figure out how to clear the window while the program is running. I can do this when I stop the program by right click > data operations > reinitialize to default value but I am not sure how to program that.
Thanks for looking.