12-09-2008 01:34 PM
Hi there. I'm looking for the best way to log some status/progress messages that I'd like the user to read to have an indication of what action my automation is performing at the moment. So the whole point is that I will create an executable where the automation begins with a click of a button, and on the front panel I can display messages such as 'Start of automation. Loading Test plans...' followed by "Test plans loaded successfully" once the test plans are loaded (this is just an example of what I'm trying to accomplish)
So far, I've created a sub VI which appends my time stamp with the text I input to it, but I'm confused where to go from here. I've created a global variable (I have several sub VIs) to store the new string data that needs to be displayed on the front panel, and then I just write that to a text indicator (which gets updated by then writing to its local variables), but its awfully repetetive, and I'm sure I'll run into some complications. Any advice as to what else I can try?
12-10-2008 05:22 AM
Hi msharma,
you can use a state machine architecture in which you use different cases for you action. In each case you can then add a string to a stored string from a shift register which contains your history. Another way is to use an action engine in which you store your history.
Mike
12-10-2008 04:13 PM
Hi Mike. Thanks for the info. I was looking up some info on action engine's and came up with this VI (see attached). Am I on the right track?
Now I want to add the data in a real-time manner, however I have several sub VI's I have to deal with in several loops. Global variables aren't helping me (or I'm not using them properly). Pretty much the logged messages just show up as a set all together once a particular loop is finished (a loop where it is important to add event messages to the log). I'm looking for the message to appear in my text window as the event occurs (real time). How can I go about this?
12-10-2008 04:30 PM
12-11-2008 01:34 PM
12-11-2008 03:08 PM
Your screenshot doesn't show any of the subVI's you are talking about, so I don't know how they come into play. And if the code shown truly only runs once, then there is no need for a N=1 loop or the shift registers.
If you want to update the indicator from some other subVI, pass a reference to that indicator to the subVI. Then in the subVI, you can pass the reference into a property node and write to the Value property.