nameOfMasterProbe = "MasterProbe" //Actual name of the reference probe

sigmaLimit = 0.001 //General limit of approval for your probes.

passwordProtected = false //Protect statistical program with password

excludeList = list("not_defined") //List of probes not allowed to qualify (must contain not_defined since it is a dummy probe)

path = "X:\Calypso\Calypso_Accura_Ljung\workarea\inspections\AutoRun_Program" //Path to your CMM programs that can be used to qualify configurations used in specific program(s)

autoSubsequEval(0) //Turn off evaluation computer if used.

//DONT CHANGE THIS FUNCTION - CONTINUE EDITING AFTER THIS FUNCTION
defineFunctionStart("createToleranceTuple")
	strBuild = "list("
	for i = 0 to aIndex
		strBuild = strBuild + "list(" +qm()+ getParameterNamed(a[i]).first +qm()+", "+qm()+ getParameterNamed(a[i]).second +qm()+", "+qm()+getParameterNamed(a[i]).third+qm()+"), "
	next i
	strBuild=mid(strBuild,1,len(strBuild)-2)+chr(41)
	tuple = compute(strBuild)
defineFunctionEnd("")
//END OF FUNCTION


//Creating tuple with selectCase, more user user-friendly and easier to read/maintain.
//Format: "CFG" "PRB" "TOL"
selectCase getRecordHead("dmesn") 
	case "123456" //Machine number
		a[0]=list(nameOfMasterProbe,"1","0.0004")
		a[1]=list("DummyCfg", "1_-Z", "0.0006")
		a[2]=list("DummyCfg", "2_+Y", "0.002")
		a[3]=list("DummyCfg", "3_+X", "0.0006")
		a[4]=list("DummyCfg", "5_-X", "0.0006")
		aIndex = 4 //Change this to last index of the a[] variable - In this example 4
		executeFunctionNamed("createToleranceTuple")
	case is <> "000000" //Machine number
		a[0]=list(nameOfMasterProbe,"1","0.0004")
		a[1]=list("DummyCfg", "1_-Z", "0.0006")
		a[2]=list("DummyCfg", "3_+X", "0.0006")
		a[3]=list("DummyCfg", "5_-X", "0.0006")
		aIndex = 3 //Change this to last index of the a[] variable - In this example 3
		executeFunctionNamed("createToleranceTuple")
	caseElse
		tuple=list(list("","")) //empty tuple must exist.
endSelect

//Alternate method to create tolerance tuple, if you dont wish to use the selectCase and function method above.
//if getRecordHead("dmesn") <> "000000"
//	tuple = list(list(nameOfMasterProbe, "1", "0.0007"),list("DummyCfg", "1_-Z", "0.0005")) //Set tolerance of sigma for specific probe. Or generic "sigmaLimit" will be used. Format: list("CFG" "PRB" "TOL")
//else
//	tuple=list(list("","")) //empty tuple must exist.
//endif