LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Taking Notes in LabVIEW on Front Panel During Data Acquisition

Solved!
Go to solution

Hi, 

 

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. 

0 Kudos
Message 1 of 15
(3,775 Views)
Solution
Accepted by topic author zhale

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.

Message 2 of 15
(3,763 Views)

RavensFan, 

 

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?

 

Thanks!

 

 

0 Kudos
Message 3 of 15
(3,757 Views)
Solution
Accepted by topic author zhale

Like this:

check.png(Event should be " 'string control':value change")

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 15
(3,739 Views)

GerdW, 

 

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.

 

 

Download All
0 Kudos
Message 5 of 15
(3,707 Views)

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.

0 Kudos
Message 6 of 15
(3,694 Views)

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. 

0 Kudos
Message 7 of 15
(3,654 Views)
Solution
Accepted by topic author zhale

Hi zhale,

 

then you need to prepend a timestamp to your string input before saving to the file:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 15
(3,650 Views)

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.


GCentral
Message 9 of 15
(3,644 Views)

GerdW, 

 

I did that and still am getting the time stamp just once before the value is changed instead of at every change in value. What could I be doing wrong?

 

Thanks!

Download All
0 Kudos
Message 10 of 15
(3,593 Views)