11-14-2009 07:01 PM
is anybody familiar with ssi test executive, I having problems pulling the UUTMSN number from the test configuration.
this is what i have so far.
test=texGetTPC("UUTMSN" ,SkrSerialNumberk,40);
MessagePopup("Seeker Serial Number",SkrSerialNumberk);
// Get UUT serial number
if((texGetTPC ("UUTMSN" ,SkrSerialNumberk,40))== FALSE)
{
MessagePopup("Seeker Serial Number",SkrSerialNumberk);
// Try again
if( (texGetTPC (UUT_MSN,SkrSerialNumberk, 40)) == FALSE )
{
MessagePopup("Seeker Serial Number",SkrSerialNumberk);
sprintf( szStringk,
"texGetTPC error - Skr Serial Number cannot be retrieved '%s'",
SkrSerialNumberk );
LOG_FILE( szStringk );
strcpy( SkrSerialNumberk, "Unknown");
MessagePopup("Seeker Serial Number",SkrSerialNumberk);
}
}
Ini_PutString(iniStationFileHandle, "RECOVER", "OperatorID",
SkrSerialNumberk);
Ini_PutString(iniStationFileHandle, "RECOVER", "UUTMSN",
SkrSerialNumberk);
MessagePopup("Seeker Serial Number",SkrSerialNumberk);
11-16-2009 08:34 AM
Darnell:
I have never used the SSI Test Executive, but I have the following questions and comments.
What problem are you having?
What does your first call to texGetTPC return? (What is the value of test after the call to texGetTPC?)
Why are you retrying your call to texGetTPC? You are just reading from a file. I don't think in this case a retry will help you any. Unless some other application or thread is writing to the same file, retrying will always give you the same results as the first try.
According to the user manual for SSI Test Executive v6.36, texGetTPC has the following return values:
Returns TRUE if the field is located and read from the TPC file. Returns FALSE if the field doesn't exist, the TPC file cannot be located or a test is not active (i.e. texStart() has not been previously executed). (See electronic page 175, labeled as page 166 in the user manual).
But in your code, you try to print the field if texGetTPC returns FALSE. From the user manual, it looks like the field is only valid if texGetTPC returns TRUE. Don't try to print the field if texGetTPC returns FALSE.
Here's a link to the user manual: http://www.serendipsys.com/Texec63.pdf
Check to make sure that you call texStart pointing to the correct file, and that the file exists and that the UUTMSN field exists in that field. I also don't know if the file keywords are limited to a specific list or if you can use any keyword you want. One example in the user manual refers to UUTMSN (electronic page 114, labeled page 106), but another keyword list shows UUT_MSN (electronic page 122, labeled page 114).
Also read the following note in the remarks for texGetTPC in the user manual:
Note: When operating from within a program development environment, the TPD file name must be specified with a full directory path. Without a full directory path this function is unable to locate the TPC file.
You should not call Ini_PutString to write SkrSerialNumberk if your call to texGetTPC fails. As far as I can see, the contents of SkrSerialNumberk are not defined if the call to texGetTPC fails. You are also using SkrSerialNumberk both as the OperatorID and the UUTMSN.
11-16-2009 05:50 PM
I found out the problem, I didnt have the .TPC file in the right path,So it couldnt open up and read the information, thanks.