Schleifen der ProzessfähigkeitsfunktionIch versuche, eine Reihe von Spaltennamen zu durchlaufen, die vom Benutzer ausgewählt wurden (col_name).
Von dieser Liste wird der Code für jede einzelne Spalte ausgeführt
Das Problem ist, ich kann nicht scheinen, dass der JMP den Spaltennamen [i] als Spalte liest, er liest sie einfach als Zeichenfolge
und geben Sie an, dass die Spalte nicht in der Datentabelle gefunden werden kann
/*****************************************************
*********************** Cpk *********************
*****************************************************/
cpk =expr(
for (k=1,k<=n items(col_name),k++
Process Capability(
Process Variables( col_name[i]) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{choice[i] << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == config[k] )
))
);Re: Schleife der Prozessfähigkeitsfunktionhi, beigefügt ist eine vereinfachte Version der verwendeten Rohdaten
Re: Schleife der ProzessfähigkeitsfunktionBitte geben Sie einige Beispieldaten an, um das Problem zu beheben.
Re: Schleife der Prozessfähigkeitsfunktionscheint nicht zu funktionieren, ich habe versucht, die subituted config zu drucken, es erscheint
aber der Name des Ausgangs ändert sich noch
CPK = Expr(
v list box(
For( i = 1, i <= N Items( choices ), i++,
For( j = 1, j <= N Items( Config ), j++,
;
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( As Column( choices[i] ) ),
Spec Limits(
__choices__(
LSL( FAI_SPECS[choices[i] || " LSL"] ),
Target( FAI_SPECS[choices[i] || " Nominal"] ),
USL( FAI_SPECS[choices[i] || " USL"] )
)
),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{__choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == config[j] );//"P1_41_PBO")///":name(\!"" || Config[j] || "\!")")
SendToReport(
Dispatch(
{},
"Individual Detail Reports",
OutlineBox,
{Set Title( __YourConfig__ )}
)
);
);
print(__YourConfig__);
),
Expr( __choices__ ), Parse( ":name(\!"" || choices[i] || "\!")" ),
Expr( __YourConfig__ ), Char( Config[j] )
)
)
;
)
)
)
);Re: Schleife der ProzessfähigkeitsfunktionHier ist eine einfache Erweiterung der Funktion Substitute (), die Ihnen die gewünschten Ergebnisse liefert.
CPK = Expr(
For( i = 1, i <= N Items( choices ), i++,
For( j = 1, j <= N Items( Config ), j++,
Print( choices );
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( As Column( choices[i] ) ),
Spec Limits(
__choices__(
LSL( FAI_SPECS[choices[i] || " LSL"] ),
Target( FAI_SPECS[choices[i] || " Nominal"] ),
USL( FAI_SPECS[choices[i] || " USL"] )
)
),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{__choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == config[j] );//"P1_41_PBO")///":name(\!"" || Config[j] || "\!")")
SendToReport(
Dispatch(
{},
"Individual Detail Reports",
OutlineBox,
{Set Title( __YourConfig__ )}
)
);
)
),
Expr( __choices__ ), Parse( ":name(\!"" || choices[i] || "\!")" ),
Expr( __YourConfig__ ), Char( Config[j] )
)
)
;
)
)
);Re: Schleife der ProzessfähigkeitsfunktionHallo Herr,
Vielen Dank für Ihre Geduld, mir mit diesem JSL-Skript zu helfen
Ich hätte es nicht ohne dich tun können.
Nur noch eine Anpassung für dieses Skript
Wie stelle ich den Titel ein?
CPK = Expr(
For( i = 1, i <= n items(choices), i++,
for(j=1,j<=n items(Config),j++,
print(choices);
Eval(
Substitute(
Expr(
Process Capability(
Process Variables(as column(choices[i])) ,
Spec Limits( __choices__( LSL(FAI_SPECS[choices[i] || " LSL"] ), Target( FAI_SPECS[choices[i] || " Nominal"] ), USL( FAI_SPECS[choices[i] || " USL"] ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{ __choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config ==config[j]);//"P1_41_PBO")///":name(\!"" || Config[j] || "\!")")
SendToReport(
Dispatch(
{},
"Individual Detail Reports",
OutlineBox,
{Set Title( "To the same as config[j]" )}
)
)
)
),
Expr( __choices__ ), Parse( ":name(\!"" || choices[i] || "\!")" )
)
)
)
)
);Re: Schleife der ProzessfähigkeitsfunktionMit dem komplexen Spaltennamen, den Sie haben, benötigt JMP Hilfe beim korrekten Parsen. Die: Name () - Funktion muss verwendet werden, um den Namen als einen Namen und nicht als etwas anzuzeigen, das ausgeführt werden muss.
CPK = Expr(
For( i = 1, i <= N Items( choices ), i++,
Print( choices );
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( As Column( choices[i] ) ),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{__choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config=="P1_A1_MBO" )
);
Print( "choice: _", __choices__, "_chhoice" );
),
Expr( __choices__ ), Parse( ":name(\!"" || choices[1] || "\!")" )
)
);
)
);
dt=current data table();
choices = { "FAI 37_SPC AK R14 Thickness R14 top - Cu Surface","Filling VIM Total Thickness" };
new window("jo",V list box(cpk));Re: Schleife der ProzessfähigkeitsfunktionDer Code funktionierte für die Beispieldatentabelle, aber als ich es mit meinen Daten versuchte, gaben sie mir diesen Fehler.
Das beigefügte ist das Zeigen der Daten, die versucht werden zu ziehen
CPK = Expr(
For( i = 1, i <= N Items( choices ), i++,
Print( choices );
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( As Column( choices[i] ) ),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{__choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config==P1_A1_MBO )
);
Print( "choice: _", __choices__, "_chhoice" );
),
Expr( __choices__ ), Parse( ":" || choices[1] )
)
);
)
);
dt=current data table();
choices = { "FAI 37_SPC AK R14 Thickness R14 top - Cu Surface","Filling VIM Total Thickness" };
new window("jo",V list box(cpk));{"FAI 37_SPC AK R14 Dicke R14 oben - Cu-Oberfläche", "VIM-Gesamtdicke füllen"}}
Ungelöster Name: Konfig {1} beim Zugriff oder bei der Auswertung von 'Config': Konfig / * ### * /
Diese Where-Klausel für die Datentabelle 'FAI_Spec 2' ergab keine Zeilen: Config == P1_A1_MBO
"Wahl: _"
Ungelöster Name: FAI 37_SPC AK R14 Dicke R14 oben {1} beim Zugriff auf oder Bewertung von 'FAI 37_SPC AK R14 Dicke R14 oben': FAI 37_SPC AK R14 Dicke R14 oben / * ### * /
Re: Schleife der ProzessfähigkeitsfunktionHier ist eine vereinfachte Datentabelle zusammen mit dem von Ihnen angegebenen Code. Auf meinem System wird dieser fehlerfrei ausgeführt, einschließlich Ihrer Print-Anweisungen
dt = New Table( "Example",
Add Rows( 40 ),
New Column("config",
Character( 1 ),
Set Values(
{"P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "M", "M", "M", "P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "M", "M", "M",
"M", "P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "P1_31_PBO", "M", "M", "M", "M", "M", "M", "M", "P1_31_PBO",
"P1_31_PBO", "M", "M", "M", "M", "M", "P1_31_PBO", "P1_31_PBO", "M", "P1_31_PBO", "M", "M"}
)
),
New Column("height",
Set Values(
[59, 61, 55, 66, 52, 60, 61, 51, 60, 61, 56, 65, 63, 58, 59, 61, 62, 65,
63, 62, 63, 64, 65, 64, 68, 64, 69, 62, 64, 67, 65, 66, 62, 66, 65, 60,
68, 62, 68, 70]
)
)
);
CPK = Expr(
For( i = 1, i <= N Items( choices ), i++,
Print( choices );
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( As Column( choices[i] ) ),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{__choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == "P1_31_PBO" )
);
Print( "choice: _", __choices__, "_chhoice" );
),
Expr( __choices__ ), Parse( ":" || choices[1] )
)
);
)
);
dt=current data table();
choices = { "height" };
cpk;Re: Schleife der Prozessfähigkeitsfunktion CPK = Expr(
For( i = 1, i <= n items(choices), i++,
print(choices);
Eval(
Substitute(
Expr(
Process Capability(
Process Variables(as column(choices[i]) ),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{ __choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == "P1_31_PBO" )
);
print("choice: _",__choices__,"_chhoice")
),
Expr( __choices__ ), Parse(":" || choices[1] )
)
)
)
);Ich habe versucht, mit print zu sehen, was es gibt, aber ich bekomme immer einen "unbekannten" Fehler
Re: Schleife der ProzessfähigkeitsfunktionUm Jims Empfehlung hinzuzufügen, ist dieser Fall ein guter Zeitpunkt, um mit dem Debugger Ihre Variablen zu untersuchen oder zu beobachten, während Sie durch Zeilen oder an Haltepunkten springen.
Re: Schleife der ProzessfähigkeitsfunktionIch schlage vor, dass Sie die Werte von "i" schrittweise durchgehen und prüfen, welcher Code von der Funktion Substitution () für jeden Wert von "i" erzeugt wird. Sie sollten dann sehen, warum der Code für bestimmte Werte von "i" nicht funktioniert.
Re: Schleife der Prozessfähigkeitsfunktion///BOX PLOT///
boxplot=expr(
data_filtering;
choices=choice<<GETKEYS></GETKEYS><BR />
//BOX PLOT inner expression//
box_plot_inner_expr=expr(
for(i=1,i<=n items(choices),i++,
FAI_USL=Fai_specs[concat(choices[i]," USL")];
FAI_LSL=Fai_specs[concat(choices[i]," LSL")];
FAI_target=Fai_specs[concat(choices[i]," Nominal")];
print(FAI_USL);
Oneway(
Y(choices[i]),
X( :Config),
All Pairs(
1,
Confidence Quantile( 0 ),
LSD Threshold Matrix( 0 ),
Connecting Letters Report( 0 ),
Ordered Differences Report( 0 )
),
Comparison Circles( 0 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
Connect Means( 1 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
OutlineBox,
{
}
),
Dispatch(
{},
"1",
ScaleBox,
{Min( FAI_LSL-10 ), Max(FAI_USL+10 ), Inc( 5 ), Minor Ticks( 1 ),
Add Ref Line( FAI_LSL, "Dashed", "Medium Dark Red", "LSL", 1 ),
Add Ref Line( FAI_USL, "Dashed", "Medium Dark Red", "USL", 1 ),
Add Ref Line( FAI_target, "Dashed", "Dark Green", "Target", 1 )}
),
Dispatch(
{},
"Oneway Plot",
FrameBox,
{Frame Size( 347, 229 ), DispatchSeg(
Box Plot Seg( 1 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 2 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 3 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 4 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 5 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 6 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 7 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 8 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 9 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 10 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 11 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 12 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 13 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 14 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 15 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 16 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 17 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 18 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
), DispatchSeg(
Box Plot Seg( 19 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ), Line Color( "Red" )
}
)}
),
Dispatch( {}, "Means and Std Deviations", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Means Comparisons", OutlineBox, {Close( 1 )} )
)
)));
Re: Schleife der ProzessfähigkeitsfunktionWie sieht der Code aus, der den CPK-Ausdruck aufruft?Re: Schleife der ProzessfähigkeitsfunktionVielen Dank für Ihre Geduld, aber selbst wenn Sie nach n Elementen gesucht haben, wurden nur die Spezifikationen und das Histogramm eines der Elemente in den Auswahlmöglichkeiten erstellt
der andere JMP bat mich noch um manuelle Eingabe
CPK = Expr(
For( i = 1,i<=n items(choices) , i++,
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( as column(choices[i])),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{ __choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == "P1_31_PBO" )
)
),
Expr( __choices__ ), Parse( ":" || choices[i] )
)
)
)
);Re: Schleife der ProzessfähigkeitsfunktionIch habe die Definition der For () -Schleife geändert, als ich den Code testete, und habe vergessen, ihn wieder zu ändern. Dies ist wahrscheinlich das Problem ..... Ersetzen Sie die For () -Schleife mit
CPK=expr(for(i=1,i<=n items(choices),i++,
Re: Schleife der Prozessfähigkeitsfunktiontwitterte es leicht
aber die Spezifikationen und das verborgene Histogramm funktionieren nur beim zweiten Element in der Liste.
CPK = Expr(
For( i = 1, i <= 2, i++,
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( as column(choices[i])),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{ __choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == "P1_31_PBO" )
)
),
Expr( __choices__ ), Parse( ":" || choices[i] )
)
)
)
);Re: Schleife der ProzessfähigkeitsfunktionEinige Anweisungen in JSL können die Elemente in den Anweisungen nicht vor ihrer Ausführung auswerten. Wenn dies der Fall ist, funktioniert die Verwendung einer Ersetzung zum Erstellen der vollständigen Anweisung vor der Ausführung am besten. Nachfolgend finden Sie eine Änderung Ihres Skripts für die Substitutionsmethodik.
CPK = Expr(
For( i = 1, i <= 1, i++,
Eval(
Substitute(
Expr(
Process Capability(
Process Variables( __choices__ ),
Spec Limits( __choices__( LSL( 400 ), Target( 425 ), USL( 450 ) ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{ __choices__ << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == "P1_31_PBO" )
)
),
Expr( __choices__ ), Parse( ":" || choices[i] )
)
)
)
);Re: Schleife der ProzessfähigkeitsfunktionDanke für die schnelle Antwort,
k ist nicht mit i verbunden
k ist wie die Anzahl der Elemente einer Gruppe und i ist die Gruppe
Die as-Spalten funktionierten für die Prozessvariable, aber für Spezifikationsgrenzen und das Schließen des Histogramms scheint es nicht zu funktionieren
/*****************************************************
*********************** Cpk *********************
*****************************************************/
CPK=expr(for(i=1,i<=n items(choices),i++,
Process Capability(
Process Variables(as column(choices[i]) ),
Spec Limits(
as column(choices[i])(LSL( 400 ),
Target( 425 ), USL( 450 ))
),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{as column(choices[i]) <<
Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == "P1_31_PBO" )
);
));
Re: Schleife der ProzessfähigkeitsfunktionIch glaube, Ihr einziges Syntaxproblem besteht darin, dass Sie um den Spaltennamen [i] eine Funktion als Spalte () benötigen.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dt:sex << set name( "Config" );
dt:height << set property( "spec limits", {LSL( 55 ), USL( 70 ), Show Limits( 0 )} );
dt:weight << set property( "spec limits", {LSL( 80 ), USL( 160 ), Show Limits( 0 )} );
config = {"F", "M"};
col_name = dt << get column names( string, continuous );
cpk = Expr(
For( k = 1, k <= N Items( col_name ), k++,
Process Capability(
Process Variables( As Column( col_name[i] ) ),
Individual Detail Reports( 1 ),
Capability Box Plots( 0 ),
Goal Plot( 0 ),
Capability Index Plot( 0 ),
{choice[i] << Process Capability Analysis( Histogram( 0 ) )},
Where( :Config == config[k] )
)
)
);
For( i = 1, i <= N Items( col_name ), i++,
cpk
);
Ich bin auch etwas verwirrt über Ihre For-Schleife () mit "k". Sind Sie sicher, dass Sie 1 bis N Elemente (col_name) durchlaufen möchten. Es scheint, dass col_name mit der Variablen "i" verknüpft ist.