Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

How to require the operator to enter a unique lot name in a text entry box for each batch run?

I have an application that operates several batch processes simultaneously.  The operator is required to enter a unique lot name for each batch that is initiated.  I need a way to check to see that the lot name is in fact unique before I allow the operator to launch the batch.  There will be a possible 35,000 unique batch names over the 10yr life of this process.
 
I can search a text string for the name and, if unique, append the new names to the end of the string.  However, I don't think Lookout will handle text strings that long and I need a way to ensure I don't loose the list if Lookout were shut down and restarted for any reason.
 
I can log the new names off to Citadel but the limited SQL functionality in Lookout will not let me search the history to see if there is a match.
 
I can use a spreadsheet object or a datatable to store the values but again, I have no good way to search the entries from lookout.
 
Any suggestions?  The simpler the better.  Thanks in advance.
0 Kudos
Message 1 of 3
(4,492 Views)
One possible way is that you log all the strings to Citadel and use SQL to query.
 
For example, you create TextEntry1 on panel, and log its value. Then, input several strings, and all will be logged. But the problem is that you have to input all historical batch names one by one.
 
You can use SQLExec to query. This is what I did to search and it worked.
Create TextEntry2 to input the string to search.
For SQLExec object,
Data Source = "DSN=lookout61; DBQ=C:\Program Files\National Instruments\Lookout 6.1\database\;"
SQL = "SELECT COUNT(""sh-rd-rshi/default/TextEntry1"") FROM RawData Where ""sh-rd-rshi/default/TextEntry1""= '"&TextEntry2&"' "
 
TextEntry1 is the trace that stores all the strings.
I logged a string "test", so if I input "test" to TextEntry2, the SQLExec object's datamember c1 will be 1 as query result. If it is 0, no such string in database.


Message Edited by Ryan.S on 12-06-2007 01:08 AM
Ryan Shi
National Instruments
0 Kudos
Message 2 of 3
(4,484 Views)

Thanks Ryan.  I had thought of this approach but had read (or rather, misread) somewhere that the time and interval fields were the only data that could be used in the "WHERE" condition.  Guess I should have tesed it anyway.  Thanks for your help.

0 Kudos
Message 3 of 3
(4,476 Views)