LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Record Button

Solved!
Go to solution
Hi! I am new in LabVIEW and I am trying to implement a graph chart which read intensity versus time. I need to use a button to record data (time and intensity) while button is pressed I need to save the data.  I found some examples, but I cannot make them work correctly. I am developing the program in LabVIEW 5.1 version.
I will appreciate any suggestion. Sincerely, Julieta.
0 Kudos
Message 1 of 6
(4,384 Views)

In general, all you need is the button wired to a case statement and inside the case statement, have your file save functions.

 

You should really attach what you have written though you are going to have issues with posting 5.1 code. It can't even be opened by the latest versions of LabVIEW. Any chance you can upgrade to something from the 21st century?

0 Kudos
Message 2 of 6
(4,374 Views)
I have already the button, and the case statement included, and inside the case statement the functions to save. But is doing just a part of what suppose to do. I am new (very new) in LabVIEW and maybe what I am doing is not all right. I attached here a “picture”… I know is a version of the era of dinosaurs, but… I hope I will change it soon for a new one.
Thank you for your quick replay, I apreciate.
Sincerely, Julieta.
Output:
19.972
18.757
29.9 …

I need time conected to that intensity the time.
0 Kudos
Message 3 of 6
(4,357 Views)

You have to place it inside the loop if you want to selectiviely write some data. Instead of using the Write to Spreadsheet function, you can use one of the lower level file write functions (whatever they were called back then) or wire the scalar to a build array function and then wire the output of that to the Write to Spreadsheet.

0 Kudos
Message 4 of 6
(4,335 Views)
Hi! Finally, I am using a new version of LabVIEW 8.5. I am trying to do here the same, the record button. I changed a little the program, but I am having the same problem. The program is able to save only one time and one intensity point at the time. In addition, I am having an error message:

Possible reason(s😞
Measurements: Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value:
Task Name: _unnamedTask<8> ”

I will appreciate any advice or suggestion,
Sincerely,
Julieta.
0 Kudos
Message 5 of 6
(4,284 Views)
Solution
Accepted by topic author Julieta
Well, did you try any of the suggestions in the error message? I would first try the last suggestion. You did not post any code so it's impossible to say how you configured that DAQ Assistant. If you have it configured for continuous acquisition, the time it's taking to save the data is causing the samples to be overwritten. A fixed number of samples should work or you can use a producer/consumer architecture. Look at the design patterns (File>New...) for an example.
0 Kudos
Message 6 of 6
(4,276 Views)