04-03-2014 02:57 AM
Hello,
I Have two files one file has only Id numbers and second file has table with for example 4 column, and its first column has Id number.
So I want to compare the first element of the ID file with the 1st column of the table file's all elements of that column until it find the matches.
If compare match then LED will be ON other wise LED will be OFF.
Here in attachment I have attached the both file.
Please guide me how can I do the same.
Thank you very much in advance.
Solved! Go to Solution.
04-03-2014 03:11 AM
04-03-2014 04:57 AM
Thank you very much For your reply.
I tried with same logic, but I have one problem that How can I stop or break the For loop when condition is true.
For example in my case if id is match then I want to stop the For loop.
Here in attachment I have attached that vi.
Thank you very much For your help.
With Greetings,
Ankit.
04-03-2014 05:03 AM
I am not sure If I understand well but maybe it will be helpful.
Duro
04-03-2014 05:08 AM
Thank you for your reply can you please upload the vi in older version as I am using labview 12.
I want to break the for loop, means when its comparision true then its break the loop.
Thank you very much for your time again.
Akki.
04-03-2014 05:14 AM
In LV 2012, hope it is ok now.
04-07-2014 03:56 AM
Thank you very much For your answer.
Is it possible to compare the array with single element.??
For example: this table
ID X Y
10 2.1 3.43
11 3.4 4.3
12 4.12 5.4
and If user enter number 12 then 12 will be compare with the all element of the first column, if match then LED will be on and display all the element of the that column other wise LED OFF.
Thank you very much once again for your help.
04-07-2014 04:23 AM - edited 04-07-2014 04:24 AM
you can try something like this if you want to stop at the first found ID.
you will display conditional terminal on the for loop by right click on the border of for loop and selecting conditional terminal.
in the table 2 you will get the array with ID and rest of the data in that row.
but if you will have more rows with the same ID, this solution will get you only the first one.
04-07-2014 04:31 AM
Hiii,
Thank you very much for your reply.
sorry for again taking your time can you please upload this vi in some older version as I am using lV 2012.
Thank you very much fór your time.
04-07-2014 04:35 AM
Yes, sorry, I forgot again.