01-03-2011 01:46 PM
Hi,
Here's what I want my program to do:
When I click SAVE DATA (a control button) the running data begins to save as per a specific file name acquired from a predefined list of names, which are available through a RING or ENUM for the operator to see. Now, I want to have a NEXT button, which when clicked, starts to save the current data in a new file who's name gets specified from the same list and on the RING or ENUM control we can see the next file name. Finally, I want to have a Back button which will let me go back to the previous file and replace the data saved from here on out.
I've already tried using Write to Measurement File. It helped me have a NEXT button but I haven't been able to incorporate the back button nor the custom file names.
A little background about me: I'm very new to programming, let alone LabVIEW but I'm enjoying the experience and logic required. Any help would be of great value to me.
I have attached two images which might help project a clearer picture of what I want.
Thanks.
01-03-2011 11:34 PM
Hi,
See attached example.
01-04-2011 10:48 AM
Thanks for the reply, Gaurav !
Firstly, in your program we had no signal coming in to be written so I introduced a Sine wave just like in the picture I posted earlier (although the data I would be writing is dynamic data).
I really like how you got the Next and the Back buttons there working! Thanks for that! You really made it look simple!
The next/back buttons were not writing the new files as per the names specified so I fixed that and introduced a few more things.
There are a few things which are not working as I want them to:
1. The data being written is not being a continuous data in the files which are getting saved. It is just saving one segment at the instant I press Write/Next/Back. I've tried to get around that but haven't found a reasonable explanation yet. I'll update this post if I find a way. Maybe you'll find it before me.
2. Also, I didn't mention in my first post that I want the columns of the file to be custom named instead of them being the default Untitled1, Untitled 2. It seemed to be a common problem so I searched this forum and found a couple of threads
http://forums.ni.com/t5/LabVIEW/naming-columns-when-writing-to-a-measurement-file/td-p/849750
but haven't been able to get them to work for me. The second link is out of contention. The first one has 2-3 which seem nice but it doesn't work for me.
I've attached the VI. Please have a look.
Thanks a lot, Gaurav. I appreciate your help.
Abdullah.
01-04-2011 05:53 PM
I'm also trying to incorporate those ideas into another big program I'm working on but I ran into this error I'm not able to get around.
Please find the pictures below. I don't understand why the constant value for the Shift Register is not changing to a number. I tried working around it but only managed to get to it to be a String. I have a feeling it is a small problem too and you'll easily be able to tell me whats wrong there.
I'm new to programming but totally enjoying how programming makes our mind work!
Many thanks.
01-05-2011 12:39 AM
Hi,
I am not able to open your code as I am using labview 9.
Secondly, about shift register problem, You are connecting string value in "Next value change" event.
Remove that. Do you want to save data continuously? Then put your code of writing into file in "Timeout" event.
So it will write data after every "x" ms mentioned by you for timeout event.
When you will press next or back button only file name will change and data logging will continue.
I hope this will answer your questions
Best of luck