Showing results for 
Search instead for 
Did you mean: 

Taking Notes in LabVIEW on Front Panel During Data Acquisition

Go to solution

What is in your edit box?  Is it a multiple lines of text?


Looks to me you have a multi-line string in your string control.  And it is doing exactly what you are telling it to do which is put a time in front of your message.

Message 11 of 15

Hi zhale,


to add to RavensFan comment: that string control "Note" should be set to "limit to Single line"=enabled!

Now each time you end the string input with either <Return> (standard keyboard) or <Enter> (numeric pad) that single-line entry will be saved to your text file.


You will generate a new text file with each event as you still use the (current) timestamp to generate the filename for that textfile!

Best regards,
CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

Message 12 of 15

Hi zhale,


please don't ask questions related to this thread by PM. I mostly ignore such PMs…


Of course the event sturcture belongs into a loop! Did you read the LabVIEW help on event structures and the related Caveats article? Did you examine the example VIs coming with LabVIEW to learn how to use event structures?


Related to your question from your PM: I would clear the string input after saving it's content to the text file. I guess it's part of your confusion that you rely on the multi-line input capabilities of that string control while you want to handle single lines…

Best regards,
CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

Message 13 of 15

Here's a basic example that should show what I think you're trying to do.


Note that you of course cannot just copy and paste this if you already have an Event Structure and While loop set up, and should instead add the appropriate cases or modify them to match this code (or similar code, if you'd like different timestamp formatting and so on). Note that you can trivially modify this to work with a Value Change event on the string rather than a button (and that the timeout case reading the file is unnecessary) but that with multiple lines, you get the behaviour you've already screenshotted, as has been described by RavensFan and GerdW.


VI is saved in 2017 (I for some reason that I don't recall clearly believe you're using 2018...)

Message 14 of 15

Thank you everyone! I apologize for my lack of knowledge and familiarity with LabVIEW. 

0 Kudos
Message 15 of 15