03-18-2016 09:21 AM
Hello everyone,
I have the following question:
In Labview there is a function called concatenate strings. When I want to "add" three strings I can pull the concatenate string to size three for three inputs.
Is there a possibility to implement a numeric control where I can enter a number which varies my inputs for the concatenate string function?
If I want to add three strings I enter 3 into my numeric control and my function gets three inputs. After my program ran I want to have five strings added so I would enter 5. Is there a possibility to achieve this?
Thanks for your help in advance.
Best regards,
Tresdin
Solved! Go to Solution.
03-18-2016 09:29 AM
You might be able to acheive what you are looking for by using an array of strings and then use concatinate strings on the array (with a single input).
03-18-2016 09:42 AM
Thank your crossrulz, I will play a bit around and see if this solves my problem.
03-18-2016 12:51 PM
@crossrulz wrote:
You might be able to acheive what you are looking for by using an array of strings and then use concatinate strings on the array (with a single input).
I had no idea that you could do this. Every time I have needed to do this I just put a ccat in a for loop and indexed the array. I feel a bit silly now.
03-18-2016 12:58 PM - edited 03-18-2016 12:59 PM
@Jacobson-ni wrote:
@crossrulz wrote:You might be able to acheive what you are looking for by using an array of strings and then use concatinate strings on the array (with a single input).
I had no idea that you could do this. Every time I have needed to do this I just put a ccat in a for loop and indexed the array. I feel a bit silly now.
Well Context Help does tell you that you can do it. All you need to do is read it!
03-21-2016 04:41 AM - edited 03-21-2016 04:41 AM
Thanks everyone for their input.
I have a followup question concerning the same problem:
Overall I want to sent a string command to an external robot arm. I want to do the following: Before I start I want to enter all the coordinates the arm should drive to, something like:
Point 1: (x1,y1,z1)
Point 2: (x2,y2,z2)
..
etc. after I entered all my points I want to start the program. The points shall be entered in my 1D Array as crossrulz explained it to me.
How can I temporary save my input strings? I would have done this with shift registers usually I think, but as I have a varying number of points (for example sometimes I want to driver to 4 different points, sometimes I want to drive to 50 different points). So shift registers don't seem to be the solution here. My question: How can I temporary save my input strings and write them to a 1D array after I finished entering every string.
If the mods think this doesn't fit into this thread anymore. I would be grateful if you move this, but I thought it fits because it's still the same problem I'm working on.
Thanks everyone again!
03-21-2016 05:19 AM - edited 03-21-2016 05:20 AM
It sounds to me like your program should be in a FOR loop, autoindexing on the array of points.
03-21-2016 05:23 AM
Hi crossrulz,
thank you for your fast reply. This sounds a bit embarrassing but what are the points on the left side (I guess a cluster?). I would copy it to my blockdiagram but unfortunately I'm using Labview 2012.
03-21-2016 05:43 AM
Points is an array of clusters. Each element in the array is a cluster with X, Y, and Z numerics.