사양 제한을 가져오기 위한 JSL별도의 데이터 테이블에서 기본 데이터 테이블로 사양 한계를 가져오는 JSL 코드를 작성하고 있습니다.
// Open the Spec Limits table
specTable = Open("C:\Trending Tool Spec Limits.jmp");
// Open data table for analysis
dataTable = Data Table( "Trending data" );
// Extract Spec Limits and Show Limits from Spec Table
For Each Row(
specName = specTable:Variable[];
LSL = specTable:LSL[];
USL = specTable:USL[];
showLimits = specTable:Show Limits[]; // Assume Show Limits column has 1 for "show" and 0 for "hide"
// Get the corresponding column in the data table
col = Column( dataTable, specName );
// Set the Spec Limits property as an associative array
col << Set Property( "Spec Limits", {LSL( LSL ), USL( USL ), "Show Limits"( showLimits )}
);
);
// Close the Spec Limits table
Close( specTable, NoSave );스크립트는 spec.limit 테이블에서 주어진 모든 올바른 위치에 spec.limit 속성을 설정하고 있지만 실제 spec limit를 가져오지 않습니다. 제안 사항이 있나요?
자동화 및 스크립팅Re: 사양 제한 가져오기 위한 JSL데이터 형식이 올바른 경우 Manage Limit 플랫폼을 사용할 수 있습니다.
Names Default To Here(1);
dtLimits = New Table("Cities Limits",
Add Rows(4),
New Column("Process", Character, Set Values({"OZONE", "CO", "SO2", "NO"})),
New Column("LSL", Numeric, Set Values([0, 0, 0, 0])),
New Column("Target", Numeric, Set Values([0.2, 15, 0.05, 0.035])),
New Column("USL", Numeric, Set Values([0.4, 30, 0.1, 0.07])),
Set Label Columns(:Process)
);
dt = Open("$SAMPLE_DATA/Cities.jmp");
obj = dt << Manage Limits(
Process Variables(:OZONE, :CO, :SO2, :NO),
Load From Limits Table(dtLimits)
);
obj << Save to Column Properties;
당신이 당신의 경로를 가고 싶다면, 당신은 한계를 평가해야 합니다
Eval(EvalExpr(
col << Set Property("Spec Limits", {LSL(Expr(LSL)), USL(Expr(USL)), Show Limits(Expr(showLimits)}))
));
Re: 사양 제한 가져오기 위한 JSL@jthi 감사합니다, 아주 잘 작동하네요!
원래 스크립트를 업데이트하여 한계를 평가했습니다.
// Open the Spec Limits table
specTable = Open("C:\Trending Tool Spec Limits.jmp");
// Open data table for analysis
dataTable = Data Table( "Trending data" );
// Extract Spec Limits and Show Limits from Spec Table
For Each Row(
specName = specTable:Variable[];
LSL = specTable:LSL[];
USL = specTable:USL[];
showLimits = specTable:Show Limits[]; // Assume Show Limits column has 1 for "show" and 0 for "hide"
// Get the corresponding column in the data table
col = Column( dataTable, specName );
// Set the Spec Limits property as an associative array
Eval(EvalExpr(
col << Set Property("Spec Limits", {LSL(Expr(LSL)), USL(Expr(USL)), "Show Limits"n(Expr(showLimits)))})
);
);
// Close the Spec Limits table
Close( specTable, NoSave );Re: 사양 제한 가져오기 위한 JSL@jthi , EvalExpr 함수로 spec limit을 가져올 때, limit은 가져오지만 spec.limit 속성 창을 열고 Apply를 누르기 전에는 limit으로 표시되지 않습니다. 그 이유를 알고 계시고, 이를 방지하기 위해 무엇을 할 수 있습니까?
Re: 사양 제한 가져오기 위한 JSL사양 한도 표의 데이터가 문자가 아닌 숫자인지 확인하셨습니까?
Re: 사양 제한 가져오기 위한 JSL네, 숫자입니다. Manage Limits 플랫폼에서 저장되었습니다.
Re: 사양 제한 가져오기 위한 JSL아... 이제 당신이 제한을 설정하는 데 잘못된 구문을 사용하고 있다는 것을 알았습니다. 목록(갈래 괄호)이 빠져 있습니다.

Names Default To Here(1);
dtLimits = New Table("Cities Limits",
Add Rows(4),
New Column("Variable", Character, Set Values({"OZONE", "CO", "SO2", "NO"})),
New Column("LSL", Numeric, Set Values([0, 0, 0, 0])),
New Column("USL", Numeric, Set Values([0.4, 30, 0.1, 0.07])),
New Column("Show Limits", Numeric, Set Values([1, 1, 1, 1]))
);
dt = Open("$SAMPLE_DATA/Cities.jmp");
For Each Row(dtLimits,
specName = dtLimits:Variable[];
low = dtLimits:LSL[];
high = dtLimits:USL[];
showLimits = dtLimits:Show Limits[];
Eval(Eval Expr(
Column(dt, specName) << Set Property("Spec Limits", {LSL(Expr(low)), USL(Expr(high)), Show Limits(Expr(showLimits))})
));
);
Close(dtLimits, NoSave);Re: 사양 제한 가져오기 위한 JSL완벽해요, 고맙습니다! 그게 효과가 있었어요!