사양 제한에 따라 통과하거나 실패할 수 있는 제품을 테스트하는 열 공식이 있습니다. 연관 배열은 제품의 다양한 사양의 하한 및 상한을 참조하는 데 사용됩니다. 내가 겪고 있는 문제는 사용자가 합격/불합격 열로 가져올 제품 사양을 선택한다는 것입니다. 다른 데이터 테이블에서 참조한 후 매번 다릅니다. 목표는 수식 열이 요청된 사양 목록을 반복하여 각 사양이 제한 내에 있는지 확인하는 것입니다. 그렇다면 전체 합격/불합격 분류가 귀속됩니다. 이 작업을 수식 열 외부에서 수행했지만 스크립트의 뒷부분에서 해당 수식 열을 반복적으로 새로 고쳐 사양 제한 허용 오차를 변경하여 통과 및 실패 분석을 계속할 것입니다. 전체 계산이 열 공식 자체에 있어야 한다고 생각합니다.
두 개의 데이터 테이블과 아래에 진행 중인 작업 스크립트를 첨부했습니다.
Names Default To Here(1);
//declare associative array for specs
specs = Associative Array();/*
//input limits file
LimitsCSV = Pick File(
"Select The Appropriate Spec Limit Table",
"filepath"//Insert file path here.
);
//open limits file in JMP
LimitsTable = open( LimitsCSV, invisible);
//Open Current Product Testing Data
DataTable = Pick File(
"Select The Current Product Testing Data",
"filepath"// Insert File Path Here
);
//set testing data to be able to manipulate in JMP
GraphingTable = open(DataTable);
//Select the Specs you want to compare by using a COL LIST BOX
ListNumericCols = GraphingTable << Get Column Names(numeric);
New Window("Select Wanted Specifications", << Modal,
clb = Col List Box (<< Set Items (ListNumericCols))
);
ListSpecNames = clb << Get Selected;
show(ListSpecNames); //Display for testing
//insert spec names into associative array
for (i=1,i< (N Items(ListSpecNames) + 1), i++,
Insert Into(specs, ListSpecNames[i]);
ColSpec = Column(LimitsTable, 1); //1 is the coolumn for spec name
LimitList= {};
//Insert Lower Limit onto
for(j=1, j < (nrows(LimitsTable)+1), j++,
if (ColSpec[j] == ListSpecNames[i],
ColLimit = Column(LimitsTable, 2);//14 is the column for lower limit
MinVal = 0;
if(ColLimit[j] > 0, MinVal = ColLimit[j] / 2, MinVal = ColLimit[j]*2);
InsertInto(LimitList, MinVal );
break();
));
for(k=1, k < (nrows(LimitsTable)+1), k++,
if (ColSpec[k] == ListSpecNames[i],
ColLimit = Column(LimitsTable, 2);//14 is the column for lower limit
InsertInto(LimitList, ColLimit[k]);
break();
));
for(l=1, l < (nrows(LimitsTable)+1), l++,
if (ColSpec[l] == ListSpecNames[i],
ColLimit = Column(LimitsTable, 3);//14 is the column for lower limit
InsertInto(LimitList, ColLimit[l]);
break();
));
for(m = 1, m < (nrows(LimitsTable)+1), m++,
if (ColSpec[m] == ListSpecNames[i],
ColLimit = Column(LimitsTable, 3);//14 is the column for upper limit
MaxVal = 0;
if(ColLimit[m] > 0, MaxVal = ColLimit[m] *2, MaxVal = ColLimit[m] /2 );
InsertInto(LimitList, MaxVal );
break();
)
);
specs[ListSpecNames[i]] = LimitList
);
close(LimitsTable, no save);
PassBool = 1;
ColNameList = GraphingTable << get column names(string);
newcolumn = "Pass/Fail";
if (!contains(ColNameList, NewColumn),
GraphingTable << new column("Pass/Fail"));/*
if(((column("m1") >= specs["m1"][2]) & (column("m2") <= specs["m2"][3])),
show("Pass"),
show("Fail")
);*/
Column(GraphingTable, "Pass/Fail") << Set Formula(
//counter = 0;
for(i=1,i< (N Items(ListSpecNames) + 1), i++,
if((Column(ListSpecNames[i]) >= specs[ListSpecNames[i]][2]) & (Column(ListSpecNames[i]) <= specs[ListSpecNames[i]][3]),
show("Pass"),
show("Fail");
PassBool = 0;
break();
)
) ;
If(PassBool == 1, "Pass","Fail")
);
show(specs);아래 내 jsl 스크립트.