Is it possible to have some sort of a note pad on the front panel I can type into in real time while acquiring data and then send that to the data file? I'm trying to keep track of when changes are made during a test to help when looking back at the data later. For example, I would be looking to write a note saying something like "Manual Valve A closed 50%" along with the time point.
Any ideas on how best to do this? It seems like a relatively simple thing to do, but I cannot find anything about this online.
Solved! Go to Solution.
A string control, an enter button, and an event structure that detects when you've pressed the enter button. It will then write the string into a file.
Thanks for responding so quickly. I am pretty new to LabVIEW so it is unclear to me how I would implement that. Could you provide an example?
(Event should be " 'string control':value change")
I have been able to implement this for the most part, but want to output the time stamp every time the control value is changed and cannot figure out how to do this. With what I have here, I have it writing the time stamp to the text file once and then it just outputs the control value every time it changes as you can see in the attached picture of the text file. I have come up with several possible solutions with no luck so far.
I don't understand what you are asking for. You are getting exactly what you programmed. A new file for each timestamp, and text within that which includes the timestamp.
Sorry for being unclear. I am looking for the following as an example:
10:14:30 Valve A Opened 25%
10:15:21 Valve A Opened to 75%
10:16:42 Valve A Wide Open
10:17:33 Valve A Closed
I'm looking for this to help me when I'm looking back at the data after a test. For example, I want to know when manual changes were made that aren't reflected in the data like a valve being opened by hand to explain a sudden spike in mass flow rate. I want a time stamp at each new value of the control.
then you need to prepend a timestamp to your string input before saving to the file:
Consider also writing an empty string to the control using either a local variable or property node in the value change event after you've read the value for writing to file.
Take care to avoid a race condition in which you overwrite the text before reading the value when the event occurs. If you're using 2019, there is a new node to synchronise data flows, otherwise a flat sequence structure can be used for the local variable. For a property node (which requires the UI thread) you can use the error input to synchronise using for example the Write text file node's output.