LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automation Event Log

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?

0 Kudos
Message 1 of 6
(3,343 Views)

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

0 Kudos
Message 2 of 6
(3,320 Views)

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?    

0 Kudos
Message 3 of 6
(3,302 Views)
Your screenshot shows a for loop that will only run 1 time.  I'm going to assume that you have something that runs more often then that.  Put your string indicator inside the loop so it gets updated on each iteration.  As it is now, it only gets written to when the For loop ends.
0 Kudos
Message 4 of 6
(3,297 Views)
I only want it to run once, so the only reason I have the for loop there is to create a shift register.  In one of my sub vis, Ih ave some more sub vis which add log messages.  However they all do this within the same loop and once this loop finishes, i get the updated messages back to my main vi, which has the log display on its front panel.  Instead of having it accumulate, wait till the end of the loop and then update my display log, how can I have it done in real time, as the sequence/event is occuring?  I don't know if there is another way other than to wait till the loop ends... 
0 Kudos
Message 5 of 6
(3,279 Views)

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.

0 Kudos
Message 6 of 6
(3,272 Views)