JSL 自动化过程能力中使用的列你好,
所以我想编写一个 JSL 脚本,它可以通过单击工具栏上的按钮来运行 Process Capability。除了过程变量,我对所有东西都进行了编码。请参阅下面的代码。我将如何能够动态添加“过程变量()”中的列
func_Process_Cap = Function({summ_table,spec_table},
// local vars
{},
Process Capability(
Process Variables( // hard coded - not ideal
:Name( "column1" ), //some columns are preseeded by :name()
:column2 // some are not
),
Spec Limits(
Import Spec Limits(spec_table) // dynamic
),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Overall Sigma Summary Report( 1 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
Order By( "Overall Sigma Ppk Ascending" ),
);
);回复:JSL 自动化过程能力中使用的列效果很好!我将 pcVar = Eval(.... 添加到脚本中,我能够将命令发送到窗口,因此 pcVar << Goal Plot(0); 用于进一步定制。对于将来看到这个的人!
pcVar =Eval(Parse("dt << 过程能力(
过程变量(“|| TheVars||”)),
));));
pcVar <回复:JSL 自动化过程能力中使用的列尝试这个
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" );
// Create a complex name for a column to make sure it will be
// processed correctly
dt:NPN1 << set name( "NPN1-7/Best" );
// Get a list of columns to be used
colList = dt << get column names( continuous, string );
ProcessFunc = Function( {TheList},
// Move them into a single literal string of the format required
// for the Process Variables element in the Process Capability
// platform
TheVars = ":Name(\!"" || TheList[1] || "\!")";
For( i = 2, i <= 10, i++,
TheVars = TheVars || "," || ":Name(\!"" || TheList[i] || "\!")"
);
// Run the Process Capability platform, using the literal
// string "TheVars"
Eval(Parse("dt << Process Capability(
Process Variables( "|| TheVars|| ") ) ,
Goal Plot( 1 ), Capability Index Plot( 1 )
);"));
);
Return = ProcessFunc( colList );回复:JSL 自动化过程能力中使用的列这是一个好的开始,但它只接受第一列。我制作了一个虚拟数据表(第 1 列、第 2 列、第 3 列),并修改了字符串的外观以匹配我保存的虚拟数据分析脚本,它仍然只接受第一列。会尝试不同的方法,如果我发现任何东西会报告回来!
回复:JSL 自动化过程能力中使用的列我不太确定我写的脚本(见下文)是否会给你一个可能的方向,让你知道你想去哪里。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\semiconductor capability.jmp" );
// Create a complex name for a column to make sure it will be
// processed correctly
dt:NPN1 << set name( "NPN1-7/Best" );
// Get a list of columns to be used
colList = dt << get column names( continuous, string );
ProcessFunc = Function( {TheList},
// Move them into a single literal string of the format required
// for the Process Variables element in the Process Capability
// platform
TheVars = ":Name(\!"" || TheList[1] || "\!")";
For( i = 2, i <= N Items( TheList ), i++,
TheVars = TheVars || "," || ":Name(\!"" || TheList[i] || "\!")"
);
// Run the Process Capability platform, using the literal
// string "TheVars"
dt << Process Capability(
Process Variables( Eval( Parse( TheVars ) ) ),
Goal Plot( 1 ), Capability Index Plot( 1 )
);
);
Return = ProcessFunc( colList );