03-02-2010 05:15 PM
I am thinking about creating a running log on the front panel of my VI. It is bascially a string indicator. Each time I write to it in my VI, the indicator will keep what is on there, and write on the next line. To do this, I am thinking about using a shift register to preserve what is in the indicator and continue to append to it.
Is that the best approach?
Yik
Solved! Go to Solution.
03-02-2010 06:44 PM
If you already have a Loop, then yes, it is a good approach.
The only reason I can't say best is that I didn't see your code.
Nevertheless, what you describe is a correct approach.
03-02-2010 10:45 PM
Is there an indicator out there that would keep what you write and append to what is already there when you write again?
Yik
03-03-2010 03:45 AM
03-03-2010 03:52 AM
shiftregister+string indicator
03-03-2010 04:36 AM
03-03-2010 07:38 AM
03-03-2010 09:40 AM
I have a set of VIs that implement a "Memory Log" so that when code runs they can log their actions. It's based on a queue with the element being a string. The queue is of a fixed size so that it does not grow out of bounds (in terms of the number of elements). There is a "Memory Log - Log Viewer" VI that has a string indicator to display the queue's contents. There's other tools on it, such as automatic scrolling to the bottom as new entries are added, clearing the log, searching the log entries for some text, and writing the entries to file.
No, I won't upload the code since it's company proprietary , but it should give you an alternative idea.
03-03-2010 11:30 AM
... since we are sharing ideas ...
I had implemented something similar to what SMercurio described, except that I used an ActionEngine. This allowed me to keep a log from any of the sub-vi's simply by "dropping in" the ActionEngine. It had additional features to enable / disable logging, select a file/folder, etc. Worked great.
03-03-2010 12:36 PM
Ray.R wrote:... since we are sharing ideas ...
I had implemented something similar to what SMercurio described, except that I used an ActionEngine. This allowed me to keep a log from any of the sub-vi's simply by "dropping in" the ActionEngine. It had additional features to enable / disable logging, select a file/folder, etc. Worked great.
Well, the core of it is an Action Engine. I just use wrapper VIs to perform certain functions. For example, there's a "Memory Log - Add Entry" VI that gets used by subVIs. That's just so I don't have to keep wiring the enum constant to specify what action to take. Gets tiresome after a while.