LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add one column of string to columns of integer

Hi there,

 

Could someone help please. 

I would like to add one column of strings to a few columns of integer. 

 

                                                       --------- Added elements ------ 

20C=           100     101    102           20C=100     20C=101    20C=102

15C=           200     201    202          15C=200     15C=201    15C=202

10C=           300     301    302          10C=300     10C=301    10C=302

 

 

Thanks for help. 

0 Kudos
Message 1 of 14
(3,106 Views)

For Loops.  With auto indexing turned on.  One inside the other.  Inside the inner most loop is the concatenation (or perhaps Format into String) of the string element from the one array, and the integer value from the other.

0 Kudos
Message 2 of 14
(3,099 Views)

Thanks for reply. 

 

Sorry i don't know what Auto indexing means! Is it the same as 'Auto Grow'? 

0 Kudos
Message 3 of 14
(3,090 Views)

Hi Hoverman,

 

reading the LabVIEW help might help…

 

As autoindexing is a very basic feature of LabVIEW I also suggest taking the free online courses offered by NI!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 14
(3,088 Views)

I have tried your suggestion, but I am not sure if I have done correctly. 

Could you please have look at this. 

 

Thanks

 

 

0 Kudos
Message 5 of 14
(3,082 Views)

How can you say "I am not sure if I have done correctly"?  Have you run it?  Did it give you the results you were looking for? 

 

It looks like a good start.  It doesn't look quite right to me, but it looks like you have something you can work with.  It seems like your output is Appended Array, and the result will only be the values created from the very last iteration of your while loops.  Note that you can use auto-indexing on output terminals of your For Loops as well.  This auto-builds and array from each iteration of a For Loop.

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

0 Kudos
Message 6 of 14
(3,080 Views)

I had a look at the tutorial link you sent. They are not particularly relevant to my question. 

Why do you think I am posting a question? I have already spent a few hours searching forum and looking at examples. It would be more helpful to have a relevant example or a solution.

 

Thanks for your time.  

0 Kudos
Message 7 of 14
(3,068 Views)

Tutorials are very relevant to your question.  They are a basic LabVIEW concept that.  They are covered in the tutorials.  You said you hadn't heard of them.

 

So the first step is taking the tutorials so you can learn the basic and important LabVIEW concepts.

 

If I had time to give you a solution, (which I don't right now), I could.  But that doesn't help you learn.

0 Kudos
Message 8 of 14
(3,058 Views)

@Hoverman wrote:

I had a look at the tutorial link you sent. They are not particularly relevant to my question. 

Why do you think I am posting a question? I have already spent a few hours searching forum and looking at examples. It would be more helpful to have a relevant example or a solution.

 

Thanks for your time.  


What is your problem here? RavensFan gave you information quite relevant to your task, but you had not (and still have not) answered his questions, so he could not (nor anyone else) tell where in your task you are having trouble. Do you know how for loops work, with respect to outputs? Your questions imply that you need to spend some real time learning LabVIEW, not just "having a look at the tutorials."

 

Hmm, it looks like you had a similar problem with your last question, and you still have not indicated that you understood how to solve it. Smiley Frustrated

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 9 of 14
(3,056 Views)

Of course I know how For loop works. Did you understand my question? 

 

 

---Adding first column to the other columns---         ------------ Result  ---------

20C           100     101    102                             20C100     20C101    20C102

15C          200     201    202                             15C200     15C201    15C202

10C          300     301    302                             10C300     10C301    10C302

 

@ Cameron: I solved the first problem after watching an example on youtube and thanks for replying anyway.  

0 Kudos
Message 10 of 14
(3,044 Views)