LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple inputs into a string

Solved!
Go to solution

You're on the right track with the Invoke Node, but it seesm that you haven't linked it to your String indicator.  You can right-click on the indicator and select Create -> Invoke Node -> Reinitialize To Default to do this, or you can right-click on your existing node and select Link to -> Pane -> (name of your 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 11 of 25
(1,664 Views)

Hey Jim,

 

Thanks for the help. With your instruction I "linked" the Invoke Node to my string indicator, but it's not working the same as the VI invoke node to reinitialize all to default.  

 

I have a boolean button wired up to a T/F case structure, in one case I allow the message to pass through to the string display and in the other I would like to reinitialize to default value (empty). When I use the VI invoke node to reinitialize all to default, the button on the front display doesn't act like a boolean switch it simply clears everything to default values. When I use the linked invoke node however, it acts exactly like when I wired up an empty string indicator - you can click back and forth between the two string displays which makes me wonder if I am doing something wrong? I can't figure out a way to wire anything to or from the linked invoke node, I just place it in the T/F box and leave the string display unconnected. 

 

 

 

 

 

 

0 Kudos
Message 12 of 25
(1,654 Views)
It would be most helpful if you pasted the code that is giving you the problem. At a minimum post a screen shot but the code would be best.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 13 of 25
(1,649 Views)

Mark made a reasonable request, but here's a solution for my interpretation of what you explained.

 

message.png

It sounds like you have a message being passed around in a loop?

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 14 of 25
(1,646 Views)
Here is the part of the code that I'm having trouble with, am I using this invoke node correctly?
0 Kudos
Message 15 of 25
(1,645 Views)

Not really.

 

If the button is pressed, then the alarm string is reinitialized to the default.  But you have an unwired tunnel coming out of that case going to the alarm string.  The default value for an unwired string tunnel is an empty string.  So an empty string is passed to the alarm string.  If the default value of the string was empty, then all is working fine.  If the default value you are trying to reinitialize back to is something else, then you aren't getting what you want.  It doesn't matter what you are doing inside the case structure because the value that comes out of the tunnel will always decide what goes into the string indicator.

 

The easiest solution is any of the number of replies that just send a value (whether empty string or some other constant) to the string in a select statement.  Using Reinit to Default is really kind of overkill.

 

But if you continue to insist on using Reinit to Default, then put the string control inside the false case of the case structure, an only have the Reinit to default in the True case.

0 Kudos
Message 16 of 25
(1,629 Views)

OK I'm just going to attach the file because I don't think my question is coming across correctly. 

 

I tried what you suggested Ravens Fan, well at least what I thought you meant, but it's still not working in the way that I want it to. 

 

What I am going for is an Alarm window that clears messages while the program is running but what I've got when I push the "Clear Alarm" button is a toggle between a clear window and the window with a triggered alarm message. I want to be able to clear the alarm window while the program is running and allow for more alarm messages to come through so I really don't see how reinit to default is overkill. 

 

I set the retort gas temp limit value to a default 0 so that it will trigger its message.  

 

Thanks for the help.  

 

 

 

 

 

0 Kudos
Message 17 of 25
(1,621 Views)

First, get rid of all those select statements where there is a True wired to the True input and a False constant wired to the False.  That is a rube goldberg.  Just wire the output of the comparison directly to the case structure.

 

How is the code not doing what you want?

 

The way you have it programmed, any current alarms are strung together and put to the Alarm String.  If an alarm goes away, so does its message.  If you hit the clear button, the message goes to its current default value of "RETORT GAS TEMPERATURE OVER MAXIMUM         "  .  But when the clear button goes back to false, any active alarms will once again be placed in the Alarm string.

0 Kudos
Message 18 of 25
(1,618 Views)

The code isn't doing what I want because there's no point to toggling between an empty window and one with alarm messages. I either want it clear because there are no alarms or I want the alarm messages to show, and if the alarm messages show then I would like the ability to clear them.

 

To illustrate my point of how I would like the program to function, I've attached an updated version of the VI. The retort gas temperature value is set to 1000, set it to 0 before you start the program and then observe the difference of how the "clear alarm" button functions. It doesn't toggle, it just resets to default and the program keeps running. There has to be a way to get that function without resetting every value in the VI to default, but for whatever reason the invoke node for the string function doesn't behave in the same manner. 

 

Thanks for the help.

 

0 Kudos
Message 19 of 25
(1,614 Views)
The suggestions given you would work if you had implemented them. I have attached a modified version of your code. Notice then in your case to clear the alarm the invoke node is linked ONLY to the Alarm display. It is not defaulting ALL controls. Several posts above suggested this change already. Please take the time to read the suggestions posted and actually try them rather than getting angry with folks who are offering suggestions.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 20 of 25
(1,608 Views)