LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple inputs into a string

Solved!
Go to solution

 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.

0 Kudos
Message 1 of 25
(5,402 Views)

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.

0 Kudos
Message 2 of 25
(5,397 Views)
Solution
Accepted by topic author PeterCh
If it's easier to build an array of messages but you don't want to display an array, use Array To Spreadsheet String (using a linefeed delimiter) to feed them to a single string indicator.
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 3 of 25
(5,375 Views)

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. 

 

 

0 Kudos
Message 4 of 25
(5,334 Views)

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

0 Kudos
Message 5 of 25
(5,311 Views)

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?

0 Kudos
Message 6 of 25
(5,287 Views)
Yes.  Wire in an empty string constant.
0 Kudos
Message 7 of 25
(5,280 Views)
OK perhaps instead of just an empty string constant, is there a way to reinitialize the string window to its default value while Labview is running?
0 Kudos
Message 8 of 25
(5,267 Views)

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)

 

 

0 Kudos
Message 9 of 25
(5,264 Views)

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.

 

 

0 Kudos
Message 10 of 25
(5,211 Views)