11-17-2009 05:15 AM
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).
11-17-2009 12:42 PM
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.
11-17-2009 12:49 PM
11-17-2009 01:00 PM
Mark made a reasonable request, but here's a solution for my interpretation of what you explained.
It sounds like you have a message being passed around in a loop?
11-17-2009 01:06 PM
11-17-2009 02:29 PM
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.
11-17-2009 03:32 PM
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.
11-17-2009 03:58 PM
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.
11-17-2009 04:19 PM
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.
11-17-2009 04:34 PM