08-13-2009 11:45 AM
Reminiscent of the "Word of the Day" calendars, I will choose a VI (or structure) and you can:
1) Look at the context help for the VI (extra credit for reading detailed help)
2) Use it in a simple VI (use all connectors)
3) Explore the behavior with different inputs, does it accept arrays (1D,2D), different inputs, try to find interesting behaviors
If you are one of those users that have used every VI that comes with LV, then feel free to chime in about why a certain VI should or should not be useful in our daily lives. Any gotchas we should be aware of. Cool tricks?
If you are an advanced user, perhaps there are some functions that you haven't had occasion to use, or perhaps there are new ways to solve old problems.
If you are a beginner, feel free to post questions/comments. I hope you learn two things, how to use the context help and perhaps a new VI or two.
Depending on interest in this thread,a certain VI, my day job, etc. this may become VI of every other day, VI of the fortnight, etc. I don't have LV9 (yet) so in the beginning I will stick to some oldies but goodies. I will also try to stick to general purpose VIs before delving into some of the more obscure VIs.
The first VI is "Scan String for Tokens" I like this particular one, but feel I have only scratched the surface of its uses.
Enjoy!
08-13-2009 11:58 AM
One feature I particularly like about "Scan String for Tokens", is the fact that it allows multiple delimiters and (by default) consecutive delimiters are contracted into one. This make it easy to deal with ASCII spreadsheets that have been manually modified (edited) by idiots (e.g. replaced a single space with multiple spaces, replaced tab with spaces, etc.) so it "looks right" in notepad.
08-13-2009 12:07 PM
altenbach wrote:....This make it easy to deal with ASCII spreadsheets that have been manually modified (edited) by idiots (e.g. replaced a single space with multiple spaces, replaced tab with spaces, etc.) so it "looks right" in notepad.
LOL!
Its funny because my boss has done that before.
08-13-2009 02:18 PM
08-13-2009 03:54 PM
I love scan for tokens for the reasons mentioned above and also because it's quite capable of searching relatively large strings.
It doesn't modify the original string, only the portion it returns as a token. Because of this, searching for a specific part of a large string causes minimal memory allocation. The "index" input allows you to maintain the original string until you are finished and then just get rid of the whole thing. This makes the entire operation quite efficient.
Shane.
08-14-2009 09:54 AM
Thanks to all of the participants!
The VI for today is "Concatenate Strings"
Wait a minute, you say. Is he giving an easy one because it is Friday?
Maybe. If you have ever written a for-loop with shift-registers to convert a string array into a single string, it is time to read the help.
You are a good LV programmer and take special care to avoid memory thrashing with build array, ever think about it with concatenate strings?
Finally, ever notice that the wires for picture controls look similar to strings? Coincidence? I think not.
08-14-2009 12:59 PM
Darin.K wrote:
I hope you learn [...] a new VI or two.
[...]
Finally, ever notice that the wires for picture controls look similar to strings? Coincidence? I think not.
I read the help, and I learned something. Thanks for sharing Darin !
Keep them coming.
Regards,
08-14-2009 02:24 PM
Hey Darin,
Do you think it would maybe be better to have separate thread for VIOTD, which could be linked to from this thread?
Cool idea though. I'm subscribed!
08-14-2009 02:45 PM
RandyP wrote:
Do you think it would maybe be better to have separate thread for VIOTD, which could be linked to from this thread?
I think that is probably a very good idea. I wanted to start a little bit off-to-the-side in case I was adding more noise than signal to the main LV board. The response has been sufficiently positive (thanks again) that perhaps beginning on Monday I will post a new VIOTD on the LV board and keep the links in this board. Any other suggestions?
08-14-2009 04:08 PM
DOH!
call me Mr Rube Goldberg. Thanks Darin- I'm glad i'm not the only one that missed this interesting feature.