JSL automatisiert die in Process Capability verwendeten SpaltenHallo,
Deshalb möchte ich ein JSL-Skript schreiben, das Process Capability mit einem Klick auf eine Schaltfläche in einer Symbolleiste ausführen kann. Ich habe alles außer Prozessvariablen codiert. siehe Code unten. Wie kann ich die Spalten in „Prozessvariablen()“ dynamisch hinzufügen?
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" ),
);
);Betreff: JSL automatisiert die in Process Capability verwendeten Spaltenfunktioniert super! Ich habe pcVar = Eval(.... zum Skript hinzugefügt und kann Befehle an das Fenster senden, also pcVar << Goal Plot(0); zur weiteren Anpassung. Für die Leute, die das in Zukunft sehen!
pcVar =Eval(Parse("dt << Prozessfähigkeit(
Prozessvariablen( "|| TheVars|| ") ),
);"));
pcVar <Betreff: JSL automatisiert die in Process Capability verwendeten SpaltenVersuche dies
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 );Betreff: JSL automatisiert die in Process Capability verwendeten SpaltenEs ist ein guter Anfang, aber es akzeptiert nur die 1. Spalte. Ich habe eine Dummy-Datentabelle (Spalte1, Spalte2, Spalte3) erstellt und das Aussehen der Zeichenfolge so geändert, dass sie mit dem Skript übereinstimmt, das ich für die Analyse der Dummy-Daten gespeichert habe, und es wird immer noch nur die erste Spalte akzeptiert. Ich werde verschiedene Methoden ausprobieren und wenn ich etwas finde, melde ich mich zurück!
Betreff: JSL automatisiert die in Process Capability verwendeten SpaltenIch bin mir nicht ganz sicher, ob das von mir geschriebene Skript (siehe unten) Ihnen eine mögliche Richtung vorgibt, in die Sie gehen möchten.
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 );