I need some advice.
Firstly in BinaryCode.txt the data is as such:
Replace BinaryCode0 1 0 0 0 0 0 0 0 0
Replace BinaryCode0 1 0 0 0 0 0 0 0 1
Replace BinaryCode1 1 1 1 0 1 1 1 1 1
Replace BinaryCode1 1 0 0 0 0 0 0 0 0
the first line in the text file is the header. So I need to check if the names in the second column (BinaryCode0 or BinaryCode1)appear in the Timed_Sets.txt file.
The data in Timed_Sets.txt is as such:
For example since BinaryCode0 is a match I will output the entire row in Timed_Set.txt to another array.
I have been working on a program but I don't get the expected output.
The text files and the VI are attached.
I appreciate your kind assistance in the matter.
Solved! Go to Solution.
Some of the code in your VI can be simplified a bit, but let's skip that for now. I don't quite understand what you're trying to do. Let's just deal with the word "BinaryCode0". You have multiple lines in BinaryCode.txt that have "BinaryCode0" in the second column. You also have multiple lines in Timed_set.txt that have "BinaryCode0" in the first column. You also said if the names in the second column (BinaryCode0 or BinaryCode1) appear in the Timed_Sets.txt file then you "will output the entire row in Timed_Set.txt" to another array. But there's more than one row in Timed_Sets.txt that has one or the other of these "keys". Your code seems to imply to output them all, but this doesn't make much sense either. Are you supposed to output them all for each instance of "BinaryCode0" in BinaryCode.txt?
BInaryCode.txt has BinaryCode0, BinaryCode1 and BinaryCode2 and so on. Multiple entries are expected as this file is generated elsewhere. But as long as there is a single entry, the information from Timed_Sets.txt is required. So for every instance of BinaryCode0 in Timed_Sets.txt, there are information that needs to be extracted.
In Timed_Sets.txt, there are multiple entries of BinaryCode0 and BCName1. I only want to move the lines with BinaryCode0 to a output array since there is a match with the entry in BinaryCode.txt.
I hope this clarifies.
Thanks for your help. This is what I was looking for.
I will make sure to flag your reply as the solution.