你好,我叫贾马尔。 我来自马来西亚,我真的不了解编写 JSL 脚本。 所以我的项目是,我从数据晶圆打开的每个表,它都带有不需要的行和列。 所以我的目标是,只有名称行参数和其他是新列时数据才会起作用。 另外我必须删除一些我没有使用的特定行。 所以我的问题是向脚本专家提出的。 你能写下如果我选择任何数据表它会自动删除红色标记内的另一行并将行参数作为新列的程序吗?
P/s 并非每个数据表都有相同的行参数 (44)
将双变量 JSL 更改为
Bivariate( Y( :Y ), X( :X ), Where( :WAFER_ID == ID_Wafer & :SITE_NO == 1 ) );
Bivariate( Y( :Y ), X( :X ), Where( :WAFER_ID == ID_Wafer & :SITE_NO == 2 ) );
还,
请不要只是剪切/粘贴并使用我提供的 JSL。请仔细阅读并学习它。
我的天啊。 非常感谢你先生。
我可以寻求一点帮助吗?
因为数据表的结果必须是双变量而不是马赛克。 在我的编码操作分发之前,我已经复制并粘贴了您的编码。 但它出现在马赛克结果中。 那么你可以参考我的代码并修复它吗?
请参考我刚刚上传的图片
- 如果我运行脚本,则站点 1 和站点 2 会彼此分开。如何像在 1 个窗口中一样将站点 1 和站点 2 结合起来?
User_Input = New Window( "JMP AUTOMATION", << modal(),
hlistbox(
Text Box( "Enter Wafer ID:" ),
ID_Wafer = Text Edit Box( "", <<SET width=""></SET>
这是我处理这个问题的方法。在 JMP 中打开 csv 文件,然后运行以下脚本。它将全局数据加载到表变量中,更改列名称,然后将测试列转换为数字等。
Names Default To Here( 1 );
dt = Current Data Table();
// Add Global info as table variables
theRow = 1;
While( Column( dt, 1 )[theRow] != "Parameter",
If( Column( dt, 2 )[theRow] != "",
dt << new table variable( Column( dt, 1 )[theRow],
Column( dt, 2 )[theRow]
)
);
theRow++;
);
// Get rid of unwanted rows
dt << select where( As Column( dt, 3 ) == "" & As Column( dt, 4 ) == "" );
dt << delete rows;
// Rename columns
theRow = (dt << get rows where( As Column( dt, 1 ) == "Parameter" ))[1];
For( i = 1, i <= N Cols( dt ), i++,
If( Column( dt, i )[theRow] != "",
Column( dt, i ) << set name( Column( dt, i )[theRow] )
)
);
dt << delete rows(theRow);
// Attempt to set meta data for columns
// List of know columns
metaList = {
"SBIN", "numeric", "ordinal",
"HBIN", "numeric", "ordinal",
"DIE_X", "numeric", "ordinal",
"DIE_Y", "numeric", "ordinal",
"SITE", "numeric", "ordinal",
"TOTAL_TESTS", "numeric", "continuous",
"X", "numeric", "ordinal",
"Y", "numeric", "ordinal",
"SITE_NO", "numeric", "ordinal",
"PassFail", "numeric", "ordinal",
"TimeStamp", "numeric", "timestamp",
"PartSN", "character", "nominal"
};
// Process metaList into separate lists for easier processing
colList = {};
typeList = {};
modelList = {};
For( i = 1, i <= N Items( metaList ), i++,
If(
Mod( i, 3 ) == 1, Insert Into( colList, metaList[i] ),
Mod( i, 3 ) == 2, Insert Into( typeList, metaList[i] ),
Insert Into( modelList, metaList[i] )
)
);
For( i = 1, i <= N Cols( dt ), i++,
foundName = Contains( colList, Column( dt, i ) << get name );
If(
foundName,
If(
Contains( {"ordinal", "nominal", "continuous"}, modelList[foundName] ),
Column( dt, i ) << dataType( typeList[foundName] ) << modelingtype( modelList[foundName] ),
modelList[foundName] == "timestamp",
For( k = 1, k <= N Rows( dt ), k++,
Column( dt, i )[k] = Word( 1, Char( Column( dt, i )[k] ), "_ " ) || "/" || Word( 2, Char( Column( dt, i )[k] ), "_ " ) || "/"
|| Word( 3, Char( Column( dt, i )[k] ), "_ " ) || " " || Word( 2, Char( Column( dt, i )[k] ), " " )
);
Column( dt, i ) << datatype( numeric ) << modelingtype( continuous ) << set informat( "y/m/d h:m:s" ) <<
Format( "y/m/d h:m:s", 18, 0 );,
),
Is Missing( Num( Column( dt, i )[1] ) ) == 0,
Column( dt, i ) << datatype( numeric ) << modelingtype( continuous );
);
);
这可能会起作用:
Names Default to Here( 1 );
dt = Current Data Table();
loc = Contains( Column( dt, 1 ) << Get Values, "Parameter" );
dt << Select Rows( 1::loc - 1 ) << Delete Rows;
loc = Contains( Column( dt, 1 ) << Get Values, "PID-1" );
dt << Select Rows( 2::loc - 1 ) << Delete Rows;
For( i = 1, i <= N Col( dt ), i++,
Column( dt, i ) << Set Name( Column( dt, i )[1] )
);
dt << Select Rows( [1] ) << Delete Rows