LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Regular Expression for match pattern

Did you try my last solution (using Spreadsheet String to Array with a space as the delimiter)?

___________________
Try to take over the world!
Message 11 of 26
(1,545 Views)
OK, if the space isn't a problem, then it's much easier.

Try this.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 12 of 26
(1,544 Views)


@tst wrote:
Did you try my last solution (using Spreadsheet String to Array with a space as the delimiter)?



@JoeLabView wrote:

Why not simply use space delimited entries.  This way you avoid having to place a comma.

But the better approach is what tst is recommending.  If you have an Operator (User) Interface, simply have them enter numbers in one manner and format the string within your vi.  This eliminates (reduces?) bad entries.  You can also do entry checking before appending the new value to the string.  Did tst suggest using an array instead of using a string?  (Yes, tst did)   You should consider putting the values into an array9 or arrays?), then you can manipulate the data more efficiently in the future.

JLV

Message Edited by JoeLabView on 09-06-2005 08:13 AM



Why the single star?  If people recommend using Spreadsheet String to Array with a space as the delimiter, isn't that what I suggested?

If you absolutely want to use a comma, then you can scan for the white space to see if there is a comma preceding it.  If there is no comma, then you can append it.   😛

 

Message 13 of 26
(1,596 Views)

Yes, Shane, that´s exactly what I needed. Thanks a lot for your time.

Thanks also to the others, but as I said the program is allready done. I chek it and all functions are working with that, it would take me hours to update it. But now i´m conscient for future implementations (I also think that an array will be the best option).

See u, guys.

PS: Shane rules!
0 Kudos
Message 14 of 26
(1,536 Views)
IMHO, LabVIEW arrays are poor for end user interface input. Try something like this list editor where you can add/modify/delete a list of strings or numbers (you can change the number sontrol to a string). You can even drag itemsinside the list.


LabVIEW, C'est LabVIEW

Message 15 of 26
(1,584 Views)
Ok, guys, Let´s go to do it a bit more complicated... Smiley Wink
 
The last proposed solution by Shane brushes the perfection, but there is still a problem: it gives error with decimal numbers, which shouldn´t be. i.e. (4, 3.2, -5) is also correct.
 
Superstar dj´s, here we go!
 
 
0 Kudos
Message 16 of 26
(1,493 Views)
Easy,  just change the %d specifier to %f and you're done.

Or be lazy and take this VI...... 😄

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 17 of 26
(1,503 Views)
Thanks again, Shane. I´m starting to hesitate if I should include your name in the cooperation group of the program... Smiley Happy
0 Kudos
Message 18 of 26
(1,494 Views)
Hey, why hesitate.

I can stick it on my CV.

Or you could just give me a few stars (5 are always nicest.....)

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 19 of 26
(1,488 Views)
This VI (just as a test) works rather well IMO.  It alternatively scans and numbers and non-numbers until nothing is left.  Interesting advantage is just about anything can be used as a delimiter and they do not have to be consistant and it will still work.
 
Just thought I would pass this along because I thought this thread was interesting...
 
 
0 Kudos
Message 20 of 26
(1,475 Views)