LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string input!!!!

Hi!
I want to know that how can I compare string datas?
In details, If I input model number of UUT like ABC1D0920X0 so it compares with actual number meance 1=30 and if 2 = 40 like D=50, E=60 if F=70 so it display  that you have to check this UUT and goes for that UUT model number test. (meance 30unit and 60gain UUT).
ex.ABC2F0920X0 - meance 40 unit and 70 gain UUT
How can I make this kind of logic?
 
 
0 Kudos
Message 1 of 9
(3,094 Views)
You're not really trying to compare anything here. You're trying to perform a conversion from a character to something that represents a property of your UUT. You need to extract the specific character you want (with the "String Subset" function) and then do something with it. What that is is completely dependent on what the rest of your code is doing and what those numbers represent.

The example you provided seems to imply a pattern in which you can take the character you extracted and convert it to a number using the simple formula Y = 10*X + 20, where X is the number you extracted ("1", "2,", "3,", etc), and Y is your value ("30", "40", "50", etc.). Whether or not this is the right thing to do for your situation is anybody's guess since we don't know what you're doing with this information.
0 Kudos
Message 2 of 9
(3,085 Views)

HI!

According to Model number it decides the which UUT has to test. Software will start from UUT model number. It's not like that extracting the number from model number. I believe that first I have to make data file for UUT model number so input model number compares character by character to data base information and finally gives the output like this is the test you have to do.(meance xx unit and yy gain UUT you are going to test).

My question is how to make data base of all model number and how to compare that data base with my input model number so give me some idea.

thanks

0 Kudos
Message 3 of 9
(3,078 Views)
You're now asking the same question you asked in this post.
0 Kudos
Message 4 of 9
(3,071 Views)
No any other option to develop program. Model number has to compare from only five numbers. if you know any other option than let me know. I don't want to create username and password database but only five model number.
 
0 Kudos
Message 5 of 9
(3,064 Views)
I don't understand what the problem is and why you think you have to do a character by character comparison. If you have an array of strings or characters, you can use the Search 1D Array function. For example, if you have the item 'ABCDE' as element 3 in an array and you specify 'ABCDE' as the element to search for, the function will return 3. If you have other columns, you can then use that index value to return the entire row. You also have the Equal function. this will work on entire strings at a time and not just numbers. Here's a simple example that does a search for items column 0 of a table. If found, the entire row is returned. You can easily create the 2D array by using one of the file read functions. Now if you had wanted to use a database, the database engine would do the search for you.
0 Kudos
Message 6 of 9
(3,059 Views)
Swami,
I have attached what I can only guess is a simple solution to your question.  I have done something similiar with sensors since MAX did not accomodate me as far as reporting details and error control.
 I created a sensor maintainer that logs scaling info, calibrate date, status,serial #, ID#, Sensor type etc...  This is written to tab delimited text file in a sensor directory (essentially poorman's database) which is populated on a tree control for drag and dropping of sensor specifics to dynamically apply scaling and for reporting and error control purposes.  If anybody is interested I will post the Maintainer and the chooser.
 
Chris
0 Kudos
Message 7 of 9
(3,047 Views)

hi! thanks my half problem is solved.

I am new to use LabVIEW. you are right i have to load more properties like frequency band too. so as you told that save text file of every model number and populate a tree control so how does I make it.

please guide me

 

0 Kudos
Message 8 of 9
(3,010 Views)

Hello!  You can create a tree control by following this How-To.

Janell R | Applications Engineer

0 Kudos
Message 9 of 9
(2,957 Views)