Jump to content

Status messaging library

Recommended Posts

I was looking for a way to simply pass status messages from anywhere in my application to a log file and/or a status message box on my user interface without having to pass a queue reference or event reference everywhere. I wanted something like the good old printf() command that I could litter throughout my application. I also wanted something that didn't take much place on the block diagram. This is what I came up with.



This VI sends the message string along with a time stamp and the call-chain to listeners of the "stdout" event (only if the specified verbose level less than or equal to the globally set verbose level).


The message received by the stdout event handler is an instance of the "LV_Printf Msg" class. The data is available though property nodes or it can be flattened to a string through the dynamically dispatched "Receive Message" method. You can create a child of this class and override the "Receive Message" method to format the message differently.


Please try it out and let me know your thoughts.


Source & Example Usage - LabVIEW 2013: LV_Printf - 2013.zip

Source & Example Usage - LabVIEW 2011 (not tested): LV_Printf - 2011.zip



Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.