01-20-2009 09:51 AM
01-20-2009 11:48 AM - edited 01-20-2009 11:52 AM
For future reference, it is much easier to answer questions when they are asked explicitly and discretely.
LiQ wrote:
As of now, I'm using a System Tab Control to separate the two parts of the program, but I'm not sure how to make the program wait for all the input in the String Controllers, then allowing the user to hit a "Continue"-button which moves the user to the next tab. This probably isn't that hard, but as I said, this is the first time I'm working with LabVIEW
This is not how you should control data flow. You should control whether or not code operates within a case structure. That is not the correct usage for tabs.
LiQ wrote:
Another problem I have is that I want to save the input data to a TXT-file, which I have looked at and it seems pretty straight forward, but the only way I could make it work was by having to manually configure the path where the file would be saved. What I want to do instead is to use a relative path from the program. So the files end up in a folder called "data" which is in the same folder as the VI is run from. But I don't only want to save it, I want to be able to read it as well. Let’s say that I've got a dropdown list which has a field called "New", then the program should make a new file and put the input data in it and store it whenever I push the "Continue"-button. But if I choose another option from the dropdown list (which should be files already stored), then I want the program to display the information in their respective String Controllers. Anyhow, it's only the first part of this scenario that really is important, but I would like to implement this latter feature as well.
Use the build path function.
01-20-2009 11:54 AM
I would advise you to use state machine in your code to make sure the values are entered before data storage begins.
Then I would hide the tab-pages control, so your code displays the tab-page with the strings, then when the user hits continue shows the second page.
What kind of data do you want to store? are that several controls? If so I would have a look at the OpenG toolkit, this Open Source package has VIs for storing the controls in an INI like format.
With that approach you can read the files back easily.
Please add some code that you have allready.
Ton (and your english isn't that bad)
01-20-2009 11:59 AM - edited 01-20-2009 12:00 PM
LiQ wrote:
But I don't only want to save it, I want to be able to read it as well. Let’s say that I've got a dropdown list which has a field called "New", then the program should make a new file and put the input data in it and store it whenever I push the "Continue"-button.
01-20-2009 12:27 PM
TonP wrote:
What kind of data do you want to store? are that several controls? If so I would have a look at the OpenG toolkit, this Open Source package has VIs for storing the controls in an INI like format.
With that approach you can read the files back easily.
Well, there's nothing special about the data, just some personal information like name, weight and stuff like that, and I want it stored in clear text in the TXT-file. As to how I want the program setup, I've made screenshot of my LabVIEW stuff (but there isn't any code yet since I have no idea how to get it to work together yet).
What I want to do here is have the user type in all his data (or load it from file) and only then should he be allowed to move on to the next tab by pressing the button on the bottom of the program (it's written in Norwegian, but if there's any interest as to what it says, I could translate it). But as you can see, it's only a matter of really simple data here and nothing complex whatsoever.
01-20-2009 08:13 PM
TonP wrote:
Then I would hide the tab-pages control, so your code displays the tab-page with the strings, then when the user hits continue shows the second page.
I kind of know how to hide the tab-page, but I have no idea as to how I could connect my button so it switches to the next tab.
01-20-2009 08:18 PM