LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple inputs into a string

Solved!
Go to solution

Hey Mark, 

 

Thanks for the help. Let me also preface my post by saying I am not getting angry. With that out of the way, the VI you attached is not what I'm trying to accomplish. The only way I can describe how I would like the "Clear Alarm" button to function would be with my previous post. In the VI you attached, the button toggles between two different string displays. I would simply like to clear the window and allow more alarm messages to come through, I am not interested in toggling between alarm messages and an empty display window. 

 

Thanks again guys I really do appreciate it and I'm sorry if this is frustrating, I'm very new to Labview and I'm doing the best that I can to describe my issue. 

0 Kudos
Message 21 of 25
(942 Views)

OK, I understand what you want. What you need to do is to keep your Alarm message in a shift register. You would also need to have some type of status message that would indicate if any alarms are present. If an alarm is present then write your alarm string to the display. Only update it when there is a change is alarm status. If you hit the clear alarm button then write an empty string to the control as well as the shift register. You should use value of the shift register to update the display, not your alarm string that you generate every iteration. Again, only change the display if there was a change in which alarms were active or if the user cleared the list. I don't have time to change the code.

 

I would also take a serious look at your code. It is not very clean and not very easy to read. As suggested early get rid of the useless select states. They will always return the value of the input to the select.  If the input is true a true comes out, if false then a false comes out. Try to avoid massively large block diagrams. A good rule of thumb is that it should fit on single monitor. Needing to scroll the block diagram to see everything makes it hard to understand and maintain.



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 22 of 25
(938 Views)

So you want to maintain a history of alarms?  If so, why didn't you ever say so.

 

If you get an alarm it shows up.

If the alarm goes away on its own, do you want it to continue to show until the user clears it?  (In which case you need a shift register like Mark said.)  If you want the message to clear itself when the alarm goes away, then the code exactly as you have it now does that.

If the alarm continues to exist, but the user clears the window, what do you want to have shown, the fact the alarm still exists, or nothing?

 

0 Kudos
Message 23 of 25
(930 Views)
I've tried looking for a decent shift register tutorial out there but the basic ones are not helping my situation. Am I on the right track if I use a for loop with one iteration to hold my default value? I can't think of any other way to accomplish that task. 
0 Kudos
Message 24 of 25
(914 Views)
No, that would not be the correct approach. I would place a shift register on the while loop that you have now. Initialize it to to be an empty string. After you generate your alarm string compare it to the value of teh shift register. If they are the same do nothing. If the are different, update the value of the Alarm display and also update the value of the shift register. You should get an empty string from your code that builds the alarm display so if you have no active alarms nothing will get displayed. If the user clears the alarm list write an empty string to the shift register and update the value of the Alarm display.


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 25 of 25
(912 Views)