temp409x Posted December 24, 2005 Report Share Posted December 24, 2005 I did do a search but didn't find what I need. I have a multi-line string and need to search for a small string in each line and if that line contains it i want to pull that entire line into another string. So for example: My mutil-line string looks like this 01 02 11 22 22 22 01 02 00 22 22 22 01 02 10 22 22 22 01 02 11 22 22 22 01 02 10 22 22 22 01 02 11 22 22 22 01 02 00 22 22 22 And my search string is: "10 22" So my output would be 01 02 10 22 22 22 01 02 10 22 22 22 Maybe transfer the multi-line string into a cluster of strings would be a better idea ? Quote Link to comment
Jim Kring Posted December 24, 2005 Report Share Posted December 24, 2005 I did do a search but didn't find what I need. I have a multi-line string and need to search for a small string in each line and if that line contains it i want to pull that entire line into another string. So for example: My mutil-line string looks like this 01 02 11 22 22 22 01 02 00 22 22 22 01 02 10 22 22 22 01 02 11 22 22 22 01 02 10 22 22 22 01 02 11 22 22 22 01 02 00 22 22 22 And my search string is: "10 22" So my output would be 01 02 10 22 22 22 01 02 10 22 22 22 Maybe transfer the multi-line string into a cluster of strings would be a better idea ? Here is a solution: Download File:post-17-1135383630.vi Happy Holidays! :beer: PS - you will need to download and install OpenG Commander you will need the the OpenG Toolkit Array and String libraries (oglib_array and oglib_string packages) in order to run this example. Quote Link to comment
temp409x Posted December 24, 2005 Report Share Posted December 24, 2005 Thanks! One problem though: Installed OpenG Selected packages Downloaded and Installed but then, nothing shows up in my feature palette. Nothing, no in the "users libraries", not in main, I have noticed the files are in the user.lib dir, but they don't show up. Am i missing somthing here? Quote Link to comment
Jim Kring Posted December 24, 2005 Report Share Posted December 24, 2005 Thanks!One problem though: Installed OpenG Selected packages Downloaded and Installed but then, nothing shows up in my feature palette. Nothing, no in the "users libraries", not in main, I have noticed the files are in the user.lib dir, but they don't show up. Am i missing somthing here? Make sure that (1) you installed the dynamicpallete package and that (2) you rebooted LabVIEW. This should fix the problem. After doing that, you will see an "OpenG" palette submenu in the Functions palette. Also, If you switch to the "Dynamic Palette View" or "2-D Dynamic Palette View" palette view you will see that the OpenG libaries appear in the applicable subpalettes. Quote Link to comment
ahlers01 Posted December 24, 2005 Report Share Posted December 24, 2005 I did do a search but didn't find what I need. I have a multi-line string and need to search for a small string in each line and if that line contains it i want to pull that entire line into another string. So for example: My mutil-line string looks like this 01 02 11 22 22 22 01 02 00 22 22 22 01 02 10 22 22 22 01 02 11 22 22 22 01 02 10 22 22 22 01 02 11 22 22 22 01 02 00 22 22 22 And my search string is: "10 22" So my output would be 01 02 10 22 22 22 01 02 10 22 22 22 Maybe transfer the multi-line string into a cluster of strings would be a better idea ? You don't need the OpenG tools, it can of course be done with plain LabVIEW: Download File:post-833-1135437245.vi -Franz Quote Link to comment
temp409x Posted December 24, 2005 Report Share Posted December 24, 2005 You don't need the OpenG tools, it can of course be done with plain LabVIEW: Download File:post-833-1135437245.vi -Franz Thats what I was a looking for! I wouldn't mind the OpenG ones, but.... For one I could not get the subVIs to show up in the menu. I could add them manually, And second once I did get them installed.... That VI didn't even work for me. I copied it e-x-a-c-t, but nothing, I'm guessing that even tho the VIs said they were installed they were not working. I wonder if it has anyhing to do with me having XP x64 and the labview installed in the C:\Program Files (x86)\ dir ? Now I just need to make it so it filters upto 10 different strings, first try didn't go so well, kept overwriting my filtered messages buffer. I can probably figure it out tho, Thanks for all your help everyone, Quote Link to comment
temp409x Posted December 25, 2005 Report Share Posted December 25, 2005 How about something for LabVIEW 7.1 ? I am having trouble getting a string array in 7, looks easy in 8. Nevermind, I got a String Array....... it was luck though. How do you guys make a String Array ? Quote Link to comment
Yair Posted December 25, 2005 Report Share Posted December 25, 2005 Nevermind, I got a String Array....... it was luck though. How do you guys make a String Array ? You create an array control or indicator and drag a string control into it. This is really quite a basic thing. You should learn this from going through tutorials (hint, hint). Quote Link to comment
i2dx Posted January 9, 2006 Author Report Share Posted January 9, 2006 @temp409x and Jim: i have the same problem with OpenG. I can install the Commander and download Packages, but i see nothing in my palettes. Maybe this happens, because i have a english LabVIEW installed on a german Windows XP? where the default path to LabVIEW is not "C:\Programm Files\National Instruments\..." but "C:\Programme\National Instruments\..." best regards, CB Quote Link to comment
Rolf Kalbermatter Posted January 9, 2006 Report Share Posted January 9, 2006 @temp409x and Jim:i have the same problem with OpenG. I can install the Commander and download Packages, but i see nothing in my palettes. Maybe this happens, because i have a english LabVIEW installed on a german Windows XP? where the default path to LabVIEW is not "C:\Programm Files\National Instruments\..." but "C:\Programme\National Instruments\..." Mmmh, I think the path should not really matter. I'm not intimate with all aspects of OpenG tools such as Commander and Builder but the different OpenG tools and menu palettes should all use relative paths internally. Otherwise it couldn't work on non-Windows systems at all and as far as I can say (Linux) it seems to work fine. Rolf Kalbermatter Quote Link to comment
Neville D Posted January 10, 2006 Report Share Posted January 10, 2006 @temp409x and Jim:i have the same problem with OpenG. I can install the Commander and download Packages, but i see nothing in my palettes. Maybe this happens, because i have a english LabVIEW installed on a german Windows XP? where the default path to LabVIEW is not "C:\Programm Files\National Instruments\..." but "C:\Programme\National Instruments\..." best regards, CB Are you using LV 8? Then all the OpenG stuff appears in a single sub-pallete. If using prior to 8 you should have a full set of tools in all the appropriate locations. Check your user.lib folder in NI/LV x.x/user.lib If correctly installed you should see a whole bunch of OpenG tools installed there. If correctly installed, then cruise over to: Block diagram>right-click-pallete & nail it, then -options (top right corner) and select Dynamic pallete view. You should see the OpenG functions in each of the sub palletes. Check array functions to see if you have the OpenG array tools. I would really urge you to download and install these tools. They are well-written, extremely useful and in general bug-free. Neville. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.