06-13-2019 04:29 PM
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.
06-14-2019 12:59 AM - edited 06-14-2019 01:01 AM
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!
06-15-2019 04:26 AM
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…
06-16-2019 08:43 PM - edited 06-16-2019 08:47 PM
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...)
06-17-2019 07:37 AM
Thank you everyone! I apologize for my lack of knowledge and familiarity with LabVIEW.