From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-13-2011 03:04 AM
Hi,
I'm doing some string manipulation and have found a feature of labview I need to get around.
I appears that Labview does not consider a space as part of a sting but a delimiter.
As a consequence I find that the Path vi only returns the path up to a space in the name.
I also wish to append a string with a space to another string. I find that if the first string has a space in it, only the first part is appended.
I've looked at a few tutorials but can't find anything to help.
Can anyone shed some light on how to include spaces as part of the string.
Cheers
Andy
06-13-2011 03:19 AM - edited 06-13-2011 03:21 AM
@AndyNC wrote:
I'm doing some string manipulation and have found a feature of labview I need to get around.
I appears that Labview does not consider a space as part of a sting but a delimiter.
What your saying seems false. What is your LabVIEW version? What is your OS?
@AndyNC wrote:
As a consequence I find that the Path vi only returns the path up to a space in the name.
I am not familiar with Path.vi. Can you tell us where you found it and possibly attach it? Earlier you talked about strings, but now you are talking about paths. I assume you are aware that they are not the same in LabVIEW.
@AndyNC wrote:
I also wish to append a string with a space to another string. I find that if the first string has a space in it, only the first part is appended.
Again, that is not correct. Please attach an actual VI example that demonstrates the problem.
06-13-2011 04:44 AM
Thankyou for your response
I'm using LabVIEW 2010 on Win XP
For the concat of strings I've attached StringConcat.vi. It shows Max Value is trimmed to Max and the number 101.66.. is not appended. I'm probably missing something simple here. ( this has been cut out of a larger vi)
I'm using the "Current Vi's path" which is in the file constants pallete.
I've attached a simple VI that shows the problem.
If I run it from C:\Labview\ I get "C:\Labview\"
If I run it from C:\Lab view\ I get "C:\Lab view\"
But if I run it under C:\My Documents\ I get "C:\My"
It's very inconsistant.
Thanks
Andy
06-13-2011 05:18 AM
Hi Andy.
Both programs work as expected for me, but I had to make the front pannel indicator larger to see all the text.
Ian
06-13-2011 05:57 AM
I made the front panel indicator large as well but I still have these problems.
To me this indicates an underlying difference in the operation of my system versus yours. ie a setting somewhere that needs changing.
Is there some setup difference that treats strings differently. I know it's clutching at straws but it doesn't work on my machine.
Cheers
Andy
06-13-2011 06:02 AM
I'm also running LV2010 and Win XP.
It works as it should for me too, once I'd made the indicator big enough to see all of the contents.
MC
06-13-2011 06:20 AM
I've just made them even longer and it works OK.
I can now see what's happening. The indicator will only display complete blocks of non-whitespace.
I certainly was not expecting this behaviour. I'm used to edit boxes which will display as much of a string as possible and simply truncate what won't fit in the box.
It's diverted me from my original problem which I can now get back to.
Many thanks to all.