원래 요청은 jsl을 사용하여 사양 제한 관리 플랫폼에 제한 테이블을 로드한 다음 열 속성에 저장하는 것 같습니다.아래는 그렇게 할 JSL입니다.
dtLimits=New Table( "Limits",
Add Rows( 4 ),
New Column( "Variable",
Character,
"Nominal",
Set Values( {"OZONE", "CO", "SO2", "NO"} )
),
New Column( "_LSL",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.075, 5, 0.01, 0.01] )
),
New Column( "_USL",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.25, 12, 0.09, 0.04] )
),
New Column( "_Target",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.15, 7, 0.04, 0.025] )
),
New Column( "Show Limits",
Numeric,
"Nominal",
Format( "Best", 12 ),
Set Values( [1, 1, 1, 1] )
),
New Column( "Importance", Numeric, "Nominal", Format( "Best", 12), Set Values([2,4,1,3])),
New Column( "Units",
Character,
"Nominal",
Set Values( {"lbs", "mi", "in", "ft"} )
),
New Column( "Centerline",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.15, 7, 0.05, 0.025] )
),
New Column( "Sigma",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [.05, 4, 0.03, 0.01] )
),
New Column( "Measurement Sigma",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 5, .5, .8] )
),
New Column( "Lower Tolerance",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.075, 5, 0.01, 0.02] )
),
New Column( "Upper Tolerance",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.25, 12, 0.1, 0.05] )
),
New Column( "Reference",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.15, 7, 0.04, 0.025] )
),
New Column( "Resolution",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.05, 1, 0.08, 0.9] )
),
New Column( "Historical Mean",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0.15, 7, 0.04, 0.025] )
),
New Column( "Historical Process Sigma",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 2, 3, 4] )
)
);
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj=dt<<MANAGE spec="" limits=""></MANAGE>obj << Save to Column Properties;다음은 사양 제한 관리에 사용할 수 있는 제한 테이블을 만드는 간단한 스크립트입니다.
Names Default To Here( 1 );
// point to your table that has limits
dt = Data Table( "your table name" );
// Create the new limits table
dtLimit = New Table( "Limits",
New Column( "Variable", character ),
New Column( "LSL" ),
New Column( "USL" ),
New Column( "Target" )
);
// Read through the original table and move to the new limits table
For( i = 1, i <= N Rows( dt ), i++,
dtLimit << add rows( 1 );
dtLimit:Variable[i] = dt:your column name that has the parameter name[i];
dtLimit:LSL[i] = dt:your column name that has the LSL value[i];
dtLimit:USL[i] = dt:your column name that has the USL value[i];
dtLimit:Target[i] = dt:your column name that has the Target value[i];
);
사양 테이블에서 사양 제한 관리를 채우시겠습니까, 아니면 사양 테이블에서 측정 테이블로 사양 제한을 설정하시겠습니까? 스크립팅을 통해 제한 테이블에서 로드를 사용하여 사양 제한 관리를 채울 수 있는지 확실하지 않지만 그렇지 않은 경우 채울 수 있는 방법이 적어도 두 가지 있습니다.
- 루프를 통해 제한 테이블의 열 속성으로 측정 데이터 테이블 열에 사양 제한을 추가한 다음 필요한 경우 사양 제한 관리를 엽니다.
- Spec Limits 관리 플랫폼은 Table Box이므로 일부 스크립팅으로 값을 설정할 가능성이 가장 높습니다.
내 의견으로는 더 간단한 옵션이므로 옵션 1을 사용합니다.
이 스크립트는 옵션 1을 수행하는 방법에 대한 몇 가지 아이디어를 제공합니다.
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
<BR />//create spec table
dt_spec = New Table("Limits",
Add Rows(2),
New Column("Variable", Character, "Nominal", Set Values({"height", "weight"})),
New Column("LSL", Numeric, "Continuous", Format("Best", 12), Set Values([50, 49])),
New Column("USL", Numeric, "Continuous", Format("Best", 12), Set Values([150, 151])),
New Column("Target", Numeric, "Continuous", Format("Best", 12), Set Values([100, 101]))
);
//Loop over spec table and look for matches in measurement table
meas_cols = dt << Get Column Names("String");
For Each Row(dt_spec,
If(Contains(meas_cols, :Variable),
Eval(
Eval Expr(
Column(dt, :Variable) << Add Column Properties(
Set Property("Spec Limits", {LSL(Expr(:LSL)), USL(Expr(:USL)), Target(Expr(:Target)), Show Limits(1)})
)
)
)
);
);
//open manage spec limits if needed
dt << Manage Spec Limits(Y(dt_spec[0, "Variable"]));
//Close(dt_spec, no save);