LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compare text file to test system

Solved!
Go to solution

hi there everyone,

can someone please help me.

i already created this subvi.

it is already doing what i wanted. 

it is the only way i know how to do it.

BUT...

i need another way to do this before i have a new system. i will have to modify the code. i just want to modify a text file if possible. its easier to document rather than changing the code.

 

here is what i have..

 

Best regards,
Krispiekream
0 Kudos
Message 1 of 22
(3,805 Views)

Hi krispikream, you are missing a subvi.  I am not sure I understand your question.  It looks to me like the vi you attached is not fully wired, but you say that it works.  I am guessing that you have to modify it because of all the hard wired constants in your case structures?  What do these constants represent?  What text file are you talking about modifying?

Message 2 of 22
(3,801 Views)

I would put all the Computer Names and Test System Names in arrays.  Search the Computer Names Array using Search 1D array and set the ring value to the index that comes out of the search.  You can load both names from a text file and set the ring Strings Property from the array of Test System Names.  However, you will have to constantly do this throughout the code where you want to display the ring.

 

Since you didn't really tell us what you are doing in the grand scheme of things, you may just want to take the text file and save the 2 arrays into a LV2 style global.  This way whenever you need the Test System value, you search the Computer Names array for the matching Computer Name, then index the Test System Names to get the Test System string.

Message 3 of 22
(3,793 Views)

ok..ignore the subvi..

 

the bottom of my code is where i am working with new code...

the top portion is the current code i have...

can you run it with what i have.. and see how it does..

basically. it read from the computer the name of the system. if test sytem = xxxxxxx then this is equal to test system...

 

 

i want to implement the same routine, but not using the same code...

i want to read from a text file. and not from  String to ip o ip to string.

Best regards,
Krispiekream
0 Kudos
Message 4 of 22
(3,792 Views)
Forget your code for the moment.  What is it you are trying to accomplish?
Message 5 of 22
(3,788 Views)

okay...

start at test..

user select test system...i currently have 4. i dont want that..i want labview to select the system...

so i created the code above...

if ip to string = system1, then testsequence = 1...something like that...

 

 

that is the problem..right now i have 4 system...if i more systems in the future. We will have to write new requirements..

so maybe its best that i create text file. 

read from text file and determine what system it is..

 

 

knowing what system is what will move on to the setting up of the system and that's already taken care of with other subvi..

 

 

test sequence control is needed on the next subvi...

 

 

 

Best regards,
Krispiekream
0 Kudos
Message 6 of 22
(3,782 Views)

If you just want to put the System Name in the text file, then create a simple text file in Notepad which has the ID.  Then use Read Characters from File on the File pallette to get the text string.  You then have your System ID.

 

Message 7 of 22
(3,774 Views)
Message Edited by krispiekream on 12-09-2008 02:30 PM
Best regards,
Krispiekream
0 Kudos
Message 8 of 22
(3,771 Views)
OK, so now there is a csv file you want to use.  As I said in my previous repsonse,  use the Read Characters from fiel (not read from Spreadhseet file) to read your TestStationID.txt file.  you will get a string output which is the ID.  Then search you csv column 0 for the matching ID.  The index is the row number to use to get all the other info from the CSV file.
Message 9 of 22
(3,763 Views)

Instead of using the TestStationID bit on the bottom just use one of these

 

 

 

like before to compare the active PC to the list of available PC's.

Message Edited by jmcbee on 12-09-2008 01:37 PM
Message 10 of 22
(3,762 Views)