LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Merging two or more unique strings

You still haven't explained what logic will be used to construct the string. Until you do that, we can't really help.

Your questions in general seem to indicate that you're a beginner. I would strongly suggest taking some of the tutorials I linked to earlier.

As for the folder name question, I can't say I understood it, but using Array of Strings to Path might help you.


___________________
Try to take over the world!
0 Kudos
Message 11 of 25
(1,787 Views)

Hmm, from what he's said so far, it sounds like the idea is along the lines of read a config file and an excel file.  The config file will tell the program something like 'new string' = 'Cell A1' + 'Cell B3'.

From the example it also sounds like he wants to add some other abilities.

Do you know what the extent of the 'commands' you will need to use will be?

Jon D
Certified LabVIEW Developer.
0 Kudos
Message 12 of 25
(1,776 Views)
That's my problem I don't know how far into merging I will need to go..I am reading a toturial right now which a someone provided me I. I apologize for making this a puzzle for everyone I am a beginner and that's part of the problem.
0 Kudos
Message 13 of 25
(1,766 Views)

I have attached 3 files

 

 

1:Testonly is the main vi which calls two other files which are: (1) mergstrings (2)filepath

 

All this does is combine a path with a string of yourchoice.

 

You will have to enter the second set of characters inside the mergstrings.vi and also use this to use  view the newly formed string this could have be easily changed I will update it when I have a little bit more time.

Download All
0 Kudos
Message 14 of 25
(1,743 Views)

For the file path question, look in the FILE IO section on the block diagram. There is a path to string function and path to array of strings function.

 

For the string operations, I would look at replace substring, search and replace substring, and maybe Format into String

0 Kudos
Message 15 of 25
(1,740 Views)

Hi MrSafe,

 

as you're a beginner: Please don't use string functions to build path!

There are special functions to split/build a path and there are path constants too (like "Empty path"). This way you avoid hazzles with file system specific characters. And you don't need to convert an empty string to a path when there is an appropriate constant :smileywink:

 

From this I would advise you to take beginners courses on LabView, here you can find some.

Message Edited by GerdW on 08-13-2008 09:11 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 25
(1,736 Views)
Thank you I am currently reading quite a bit currently 😃 one thing I forgot to mention about the vi that I recently posted how come the subvi( the files inside testonly) must be open in order for them to recieve values? is there anyway to fix that?
0 Kudos
Message 17 of 25
(1,732 Views)

Hi MrSafe,

 

what do you mean by that?

The subvis will receive all values where you connected a wire to their input. Otherwise they will use the default value for that control..

 And for your second subvi you only connected one (former, see my last attachment) string input to the connector pane, the second string control isn't connected and hence will not get any new values.

Message Edited by GerdW on 08-13-2008 09:14 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 25
(1,729 Views)

Currently the VI Testonly contains mergstrings.vi and filepath.vi

 

When you excute testonly.vi it will run filepath.vi which asks the user to locate a file(could be any file for this example) and return THE exact location and file name. Which is sent to the mergstrings.vi where it is combined with a string of your choice.

 

However if you excute the testonly.vi the mergstrings.vi doesn't recieve any values. However, if I open the mergstrings.vi i can see the values being recived as soon as I excute testonly.vi

 

 

 

Message Edited by MrSafe on 08-13-2008 02:19 PM
0 Kudos
Message 19 of 25
(1,726 Views)

Hi MrSafe,

 

how do you know that "mergstring" doesn't receive any values when you don't have it open? You don't have any outputs on that vi (apart from error cluster)...

When you want to have that merged string in your testonly.vi you have to connect the concatenated string to the connector pane (as you did for the input) and create an indicator in testonly.vi too! See attachment!

Message Edited by GerdW on 08-13-2008 09:23 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 25
(1,722 Views)