LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stuck!

Solved!
Go to solution
Thanks Yam! that worked like a charm! I'm only having one problem now. What do I wire to N i manually am putting in the different numbers to match my string length but i need it to be able to change any string of any length.
0 Kudos
Message 11 of 19
(2,592 Views)
Solution
Accepted by Chod

Here's a VI that breaks down a string into an array of words and punctuation. (8.6)

 

(png of block diagram attacked for users in pre 8.6 - I'm sure you can work out what the other cases do!)

 

Hope this helps

 

James

 

(The problem I found recently with the search and replace function it that it doesn't take account of punctuation. This method does.)

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Download All
Message 12 of 19
(2,591 Views)
Thanks James! I might have used that earlier but now most of my work with the punctuation has been dealt with in my sub vi. Here is my nearly completed work, I just need to know what to wire to N, any suggestions?
Download All
0 Kudos
Message 13 of 19
(2,581 Views)

One thing to note Chod,

 

just as you marked my code as the solution, I was playing with putting the pig latin subvi at then end of my code. You really shouldn't handle the numbers, punctuantion and other ascii charaters in the subVI if you do this (or if you do, handle them carefully.)

Try your code with strings like:

I bought 1 apple.

R U there 2nite?

 

- that sort of thing (try and break it.)

 

If you can't, you've got good code Smiley Very Happy - Thats why I handled the punctuation like that.

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Message 14 of 19
(2,560 Views)

Hi Chod,

attached you'll find another solution.

 

Mike

Message 15 of 19
(2,550 Views)

Hi Chod,

 

I've attached an updated version of the original VI I posted which calls your Pig Latin subVI and fixes a bug in the original VI I just found.

 

I think this should do exactly what you want.

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 16 of 19
(2,524 Views)

Thanks a ton guys! I was able to fix my issues!

 

James, yeah I can't do stuff like that, but if it's correct english my program can handle it 🙂

0 Kudos
Message 17 of 19
(2,523 Views)

Chod wrote:
Thanks Yam! that worked like a charm! I'm only having one problem now. What do I wire to N i manually am putting in the different numbers to match my string length but i need it to be able to change any string of any length.

 

You dont. 😉 You make it a while loop and Stop when Match is an empty string. The loop counter I will be the number of words (of ofc the length of the new array)

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 18 of 19
(2,508 Views)

Edit, oops.

Good responses everyone Smiley Very Happy

Message Edited by Broken Arrow on 04-16-2010 08:01 AM
Richard






0 Kudos
Message 19 of 19
(2,488 Views)