LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SAVING DATA

HELLO,

When I try to save data, it only saves date and time but no data. The graph is displayed but no data is stored except time and date.

Best Regards
labview1958
0 Kudos
Message 1 of 11
(3,835 Views)

@labview1958 wrote:
HELLO,

When I try to save data, it only saves date and time but no data. The graph is displayed but no data is stored except time and date.

Best Regards
labview1958



Ho, sad news... 😞 and what should we do ?

We probably could help you, but are you sure that you brought enough info for that ? 😉

Post a simplified vi illustrating your problem.

CC
Chilly Charly    (aka CC)
Message 2 of 11
(3,833 Views)
There are no broken eroors or error in the block diagram. Any help?
0 Kudos
Message 3 of 11
(3,799 Views)
Obviously, there is no error in your code, since you can run it, but like Charly said, if you don't publish the code and tell us what you expect it to do, we can't help you. To attach your VI to a message, you have an "Attachment" section right under the window in which you write the text. Select the file you want to attach and then submit the post.

___________________
Try to take over the world!
Message 4 of 11
(3,795 Views)
Hi,

I am sending the labview file that I have difficulty saving data. The file is in Labview 6.0. If you open it in labview express, it might not work at all.
0 Kudos
Message 5 of 11
(3,761 Views)
There are quite a few problems in your VI, the biggest of which (from my persepctive) is that it doesn't even seem to write date and time to the file, but only the force reading (which you're writing twice, by the way), so I'm not entirely sure what your problem is. Other than this, there are design flaws, like using the Stop VI. If you actually use it to stop your for loop, the entire VI will stop and not write the data to the file. Or like not having a Close Serial Driver VI and more.
I've modified your VI slightly to hopefully do what you want, but I haven't improved the basic structure of the VI. I suggest you send more details about the current problem you're having if this isn't helpful. I also suggest you search this site and google for LabVIEW tutorials or contact your local NI representative for a LabVIEW course. You can also use the example finder (Help>>Find Examples) to find examples of working VIs.

___________________
Try to take over the world!
Message 6 of 11
(3,757 Views)
Hi Labview1958,

I would like to endorse what Chilly Charlie and tst have already said and offer some topics that will help you master LabVIEW.

1) Chase down those tutorials that tst mentioned.

2) Research the differences between a For Loop and a While Loop. When you are done with this reseach you should know about "auto-indexing" and how to control how many times each type of loop iterates.

3) Research "data Flow" paradym. You should be able to predict the execution order of your code when you understand this topic. Watching your code in execution highlighting mode (light bulb on) should help get familiar with this.

4) Find out how to get help on a function on the diagram. This should help explain why you should not use teh "stop" function to stop a "For loop".

5) When asking questions on this Exchange, try to include code or an image that we can look at. WE are much better with visual aids.

If you run into problems along the way, post new questions if the questions are on a new topic. This will help others find the same answers in the future.

Once you get a handle on how to control and manipulate LabVIEW programs you will start to have fun. Getting started can be a little painful, but the same thing can be said about riding a bike.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 11
(3,738 Views)
Hi TST,

Thanks for the advice. I am a real novice. I have difficulty getting the entire JPG file. I hope you can sent it in labview 6.0. What is a JPG file?
0 Kudos
Message 8 of 11
(3,735 Views)
"When I try to save data, it only saves date and time but no data"

There was no link between the path chosen for the "Write Characters To File.vi" where you wrote the header and the "Write To Spreadsheet File.vi". I can guess what you were trying to do with the path reference, but dataflow is the way to go.

Attached is LV6 version of your VI slightly revised to incorporate the points others were making too. By no means is it perfect yet.

Good luck on the learning curve.
=====================================================
Fading out. " ... J. Arthur Rank on gong."
Message 9 of 11
(3,720 Views)
Oh. I see, Donald. The date and time are saved. I missed that part of the code.
Anyway, just for a couple of quick answers: A JPG file is a picture file. I "took a picture" of my screen and posted it and that's why you can't see the entire VI. This is a common way to post code, and it has the advantage that people with different versions of LabVIEW can see it. I suggest that for now, you take Donald's version, and just make sure you don't save the force reading twice (assuming you don't want to). Also, as suggested, go to your local NI representative (you can find the information on the site) and ask for a course and\or look for tutorials on the web. Both should be a good place for learning LabVIEW and dataflow programming principles.

___________________
Try to take over the world!
Message 10 of 11
(3,697 Views)