system.kanoa.quality.spc.getRuleInfo()
Returns each violation key spcCheck() can return (aboveUCL, WE4_8_same_side, N2_9_same_side and the rest) with a readable label, a one-sentence description and its kind, for screens that show a measure's violations to people. The Measure SPC Analysis popup and the notifications widget use it.
The kinds:
| Kind | Meaning |
|---|---|
limit | A point is beyond a control or spec limit |
pattern | A run of points shows the process has shifted, is drifting or is unstable |
variation | Too little variation: the points hug the center line |
Parameters
None.
Returns
ruleInfo Dictionary: violation key -> {label, description, kind}
| Key | Label | Kind |
|---|---|---|
aboveUCL / belowLCL | Above UCL / Below LCL | limit |
aboveUSL / belowLSL | Above USL / Below LSL | limit |
WE1_beyond_3sigma, N1_beyond_3sigma | Beyond 3σ | limit |
WE2_2of3_beyond_2sigma, N5_2of3_beyond_2sigma | 2 of 3 beyond 2σ | pattern |
WE3_4of5_beyond_1sigma, N6_4of5_beyond_1sigma | 4 of 5 beyond 1σ | pattern |
WE4_8_same_side | 8 on one side | pattern |
N2_9_same_side | 9 on one side | pattern |
WE5_6_trending, N3_6_trending | 6 trending | pattern |
N4_14_alternating | 14 alternating | pattern |
N8_8_none_within_1sigma | 8 outside 1σ | pattern |
WE6_15_within_1sigma, N7_15_within_1sigma | 15 within 1σ | variation |
Example
ruleInfo = system.kanoa.quality.spc.getRuleInfo()
violations = system.tag.readBlocking(['[Kanoa]CoreForge/Philadelphia/Machining/Machine 1/measures/Coolant Temperature/ruleViolations'])[0].value or []
print ', '.join(ruleInfo[key]['label'] for key in violations)
# 9 on one side, 4 of 5 beyond 1σ, 6 trending, 8 on one side