Hi ALL.
I am coder and work for OSAT industry.
i am trying to make JSL script.
i succeed getting Column Property "Spec Limits" But it come as List.
when i get List"Spec Limits" element in order to get value of LSL & USL, the elements type is Name. ( I am not get used to this type & JSL language)
when i try to convert this Name type to String, i couldn't find function(As String).
Q1. is there any function can convert type Name to String?
Q2. If there is no fucntion, how can i parse LSL,USL value from column property "Spec Limits"?
dt = Data Table( "ABC.stdparametric" );
dt << Add Rows(2, 0);
number_of_columns = NCOL(dt);
//------------------------------------------------------------
start_point =1; // Initialze the start-point variable. and looking for where testItem start.
For(j = 1, j <= N Col(dt), j++,
colName = Column(dt, j) << Get Name;
If(colName == "ATR_Present",
start_point = j; // Assign the column index if the name matches
Break(); // Exit the loop after finding the first occurrence
);
);
start_point = start_point+1;
------------------------------------------------
For( i = start_point , i <= number_of_columns ,i++, // from 28-boone;
columnIndex = 50;
columnName = Column(dt, columnIndex) << Get Name;
// Get the specification limits from column
specLimits = Column(dt, columnIndex) << Get Property("Spec Limits");
lsl=specLimits[1];
usl=specLimits[2];
usl_value = Eval(Parse(usl)); // not working
lsl_value = Eval(Parse(lsl)); // not working
dt:columnName[1] = lsl;
dt:columnName[2] = usl;
);
Here is a simple example that shows how to retrieve the numeric value of the LSL and USL from the retrieved Spec Limits List
names default to here(1);
dt=open("$SAMPLE_DATA/semiconductor capability.jmp");
specLimits = column( dt, "NPN1" ) << get property( "Spec Limits" );
usl_value = specLimits["USL"];
usl_value = specLimits["LSL"];Thanks Jim.
the solution helped me a lot.
i will study more about how to treat list & element.
Here are some options
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
specs = Column(dt, "NPN1") << Get Property("Spec Limits");
// lsl_val = Arg(specs[1], 1);
// usl_val = Arg(specs[2], 1);
lsl_val = specs["LSL"];
usl_val = specs["USL"];The other answers are the ones you really want, but the answer to converting names to strings is the char() function which will make some sort of string out of any JSL type.
e = Expr( xyzzy );
Show( Type( Name Expr( e ) ) ); // Type(Name Expr(e)) = "Name";
Show( Char( Name Expr( e ) ) ); // Char(Name Expr(e)) = "xyzzy";