05-12-2011 04:16 AM
Hi everyone
I have a problem with my VI. My VI reproduces an interface with a keyboard that the user has to use to fill the various boxes at the interface. At the moment, I can write all the information on a single string, the "Value in" and save it. This solution is ok but honestly I want to improve it for two reasons:
1) my output is a single string with all the data typed. I want to save these data in a file but because it is a string, I need to to split it and this operation requires that the various voices are separated by a particular character like a comma (not a good solution)
2) I have to add another string close to the "Value in" to indicate the required data to the user.
My idea, maybe I am sking the moon, is that the user can introduce the data moving freely between the boxes. When all the data have been introduced, click the Ok button, close the VI and save these data in a file as combination of strings.
Another possible solution should be to use my VI and modify it in order that the user digits the first raw of data, clicks Enter and can visualize this data in a separate string. Digits the second raw, clicks Enter, visualizes this data in another separate string and so on. After the last raw, clicks Enter, visualizes the data and closes the VI pushing the OK button. In this way, all the data visulaized in the separated strings can be saved easily in a file.
Any suggestions and/or help?
matomato
05-13-2011 08:06 AM
Hi there!
Thanks for your post and for putting up your vi. I think something that may be able to help would be the use of the Search and Match regular expressions functions in LabVIEW. With this, you can the write a regular expression to search for a certain format of data within just the one string. So therefore, as long as the data that you are putting in is along the same format each time it can separate and pass them to the required indicators (by format I mean something with a common factor such as searching for email addresses using the @ symbol).
Otherwise, there is no problem with using another character to separate the string (there is no reason that this couldn't be the enter command (carriage return)) which can then be passed into the different indicators.
I hope that this helps,
Liam
05-13-2011 08:15 AM
Hi Liam
Thanks for your reply. I will try this subVI and I will let you how it works.
Regards
matomato
05-13-2011 08:55 AM
this not a labview solution but I like to use this on screen keyboard
I like it because you can give it different layouts and it resizes very well
the windows on screen keyboard does not resize well and this one works very good on touch screen applicaitons
05-13-2011 09:07 AM
HI James
thanks for the reply. I will try your suggestion and let you know how it works.
Regards
matomato
05-13-2011 09:36 AM
Kudos for the cool looking vi!
I have to think about your question a little bit but I do have a couple comments. This would be a perfect XControl. I have never created an XControl but maybe this would be a good one to practice with.
In the meantime I did have a comment on how you are detecting the keypress. There are a million ways to do it and there is nothing wrong with your technique. But your technique is just a lot of development work. See the attached modification that uses search array instead of a case structure with 50 frames.
This part of your program would be perfect for a subvi and your keyboard cluster should be a strict typedef.
I hope you don't mind my unsolicited comments that have nothing to do with your question ![]()