cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-796730%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E8%AD%A6%E5%A0%B1%E8%85%B3%E6%9C%AC%E6%9C%AA%E5%AF%AB%E5%85%A5%E6%AA%94%E6%A1%88%E3%80%82%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-796730%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%E5%91%80%EF%BC%8C%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E6%88%91%E6%AD%A3%E5%9C%A8%E5%8A%AA%E5%8A%9B%E8%99%95%E7%90%86%E8%AD%A6%E5%A0%B1%E8%85%B3%E6%9C%AC%EF%BC%8C%E5%A6%82%E4%B8%8B%E6%89%80%E7%A4%BA%E3%80%82%E6%AD%A4%20CuSum%20%E5%9C%96%E8%A1%A8%E7%94%9F%E6%88%90%207%20%E5%80%8B%E8%AD%A6%E5%A0%B1%EF%BC%8C%E5%9B%A0%E6%AD%A4%E6%87%89%E8%A9%B2%E7%94%9F%E6%88%90%E6%97%A5%E8%AA%8C%E6%96%87%E4%BB%B6%EF%BC%8C%E4%BD%86%E4%BA%8B%E5%AF%A6%E4%B8%A6%E9%9D%9E%E5%A6%82%E6%AD%A4%EF%BC%8C%E6%88%96%E8%80%85%E4%B8%8D%E6%98%AF%E6%AF%8F%E6%AC%A1%E9%81%8B%E8%A1%8C%E8%85%B3%E6%9C%AC%E6%99%82%E9%83%BD%E6%9C%83%E7%94%9F%E6%88%90%EF%BC%8C%E9%80%99%E5%BE%88%E5%A5%87%E6%80%AA%E3%80%82%E5%B0%8D%E7%99%BC%E7%94%9F%E7%9A%84%E4%BA%8B%E6%83%85%E6%9C%89%E4%BB%80%E9%BA%BC%E6%83%B3%E6%B3%95%E5%97%8E%EF%BC%9F%E6%88%91%E4%BD%BF%E7%94%A8%E7%9A%84%E6%98%AF17.2%E5%B0%88%E6%A5%AD%E7%89%88%E3%80%82%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E5%90%8D%E7%A8%B1%E9%A0%90%E8%A8%AD%E7%82%BA%E6%AD%A4%E8%99%95(%201%20)%3B%3CBR%20%2F%3E%20dt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FQuality%20Control%2FOil1%20Cusum.jmp%22%20)%3B%3CBR%20%2F%3E%20obj%20%3D%20dt%20%26lt%3B%26lt%3B%20%E7%B4%AF%E7%A9%8D%E5%92%8C%E6%8E%A7%E5%88%B6%E5%9C%96(%3CBR%20%2F%3E%20Y%EF%BC%88%EF%BC%9A%E9%87%8D%E9%87%8F%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%20H(2)%2C%3CBR%20%2F%3E%E4%B8%8B%E5%81%B4(%201%20)%2C%3CBR%20%2F%3E%E7%9B%AE%E6%A8%99%EF%BC%888.1%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%20K(0.025)%2C%3CBR%20%2F%3E%E8%A5%BF%E6%A0%BC%E7%91%AA%EF%BC%880.02%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%E9%A0%98%E5%85%88%E5%84%AA%E5%8B%A2(%200.05%20)%2C%3CBR%20%2F%3E%E8%AD%A6%E5%A0%B1%E8%85%B3%E6%9C%AC(%3CBR%20%2F%3E%E5%85%A7%E5%AE%B9%20%3D%20Substitute(%20%22%E6%A8%A3%E6%9C%AC%20%5EQCSAMPLE%20%E4%B8%AD%E5%88%97%20%5EQCCOL%20%E4%B8%AD%E7%9A%84%20%5EQCTEST%E3%80%82%22%2C%3CBR%20%2F%3E%20%22%5EQCTEST%22%2C%20%E9%81%B8%E6%93%87(%20qc_test%2C%3CBR%20%2F%3E%20%E3%80%8C%E8%B6%85%E5%87%BA%E6%8E%A7%E5%88%B6%E9%99%90%E7%9A%84%E4%B8%80%E9%BB%9E%E3%80%8D%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%20%E2%80%9C%5EQCCOL%E2%80%9D%EF%BC%8Cqc_col%EF%BC%8C%3CBR%20%2F%3E%20%22%5EQCSAMPLE%22%2C%20char(%20qc_sample%20))%3B%3CBR%20%2F%3E%20filename%20%3D%20%E8%BD%89%E6%8F%9B%E6%AA%94%E6%A1%88%E8%B7%AF%E5%BE%91(%22%24TEMP%2Ftest%20log.txt%22%2C%20%E7%B5%95%E5%B0%8D)%3B%3CBR%20%2F%3E%20if%20(%E6%AA%94%E6%A1%88%E5%AD%98%E5%9C%A8(%20%E6%AA%94%E6%A1%88%E5%90%8D%E7%A8%B1%20)%2C%20%E5%84%B2%E5%AD%98%E6%96%87%E5%AD%97%E6%AA%94%E6%A1%88(%20%E6%AA%94%E6%A1%88%E5%90%8D%E7%A8%B1%2C%20%E5%85%A7%E5%AE%B9%2C%20%E6%A8%A1%E5%BC%8F(%22%E8%BF%BD%E5%8A%A0%22)%20)%2C%20%E5%84%B2%E5%AD%98%E6%96%87%E5%AD%97%E6%AA%94%E6%A1%88(%20%E6%AA%94%E6%A1%88%E5%90%8D%E7%A8%B1%2C%20%E5%85%A7%E5%AE%B9)%20)%3B%3CBR%20%2F%3E%20)%2C%3CBR%20%2F%3E%20%EF%BC%89%EF%BC%9B%3CBR%20%2F%3E%20%2F%2F%20%E9%96%8B%E5%95%9F%E6%B8%AC%E8%A9%A6%201%3CBR%20%2F%3E%20obj%20%26lt%3B%26lt%3B%20%E6%B8%AC%E8%A9%A6%201(1)%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-796730%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3E%E8%87%AA%E5%8B%95%E5%8C%96%E5%92%8C%E8%85%B3%E6%9C%AC%E7%B7%A8%E5%AF%AB%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-796741%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E8%AD%A6%E5%A0%B1%E8%85%B3%E6%9C%AC%E6%9C%AA%E5%AF%AB%E5%85%A5%E6%AA%94%E6%A1%88%E3%80%82%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-796741%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E4%B8%8D%E6%98%AF%E6%8E%A7%E8%A3%BD%E5%9C%96%E5%B0%88%E5%AE%B6%EF%BC%8C%E4%BD%86%E6%98%AF%EF%BC%8C%E6%88%91%E8%83%BD%E5%A4%A0%E9%80%8F%E9%81%8E%E6%B7%BB%E5%8A%A0%E4%BE%86%E8%A7%B8%E7%99%BC%E6%96%87%E4%BB%B6%E7%9A%84%E5%AF%AB%E5%85%A5%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ETest%20beyond%20limits(%201%20)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E7%AC%A6%E5%90%88%20CUSUM%20%E6%8E%A7%E8%A3%BD%E5%9C%96%E8%A6%8F%E7%AF%84%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FQuality%20Control%2FOil1%20Cusum.jmp%22%20)%3B%0Aobj%20%3D%20dt%20%26lt%3B%26lt%3B%20CUSUM%20Control%20Chart(%0A%09Y(%20%3Aweight%20)%2C%0A%09H(%202%20)%2C%0A%09Lower%20Side(%201%20)%2C%0A%09Target(%208.1%20)%2C%0A%09K(%200.025%20)%2C%0A%09Sigma(%200.02%20)%2C%0A%09Head%20Start(%200.05%20)%2C%0A%09Test%20beyond%20limits(%201%20)%2C%0A%09Alarm%20Script(%0A%09%09contents%20%3D%20Substitute(%20%22%5EQCTEST%20in%20column%20%5EQCCOL%20in%20sample%20%5EQCSAMPLE.%22%2C%0A%09%09%09%22%5EQCTEST%22%2C%20Choose(%20qc_test%2C%20%22One%20point%20beyond%20the%20control%20limits%22%20)%2C%0A%09%09%09%22%5EQCCOL%22%2C%20qc_col%2C%0A%09%09%09%22%5EQCSAMPLE%22%2C%20Char(%20qc_sample%20)%0A%09%09)%3B%0A%09%09filename%20%3D%20Convert%20File%20Path(%20%22%24TEMP%2Ftest%20log.txt%22%2C%20absolute%20)%3B%0A%09%09If(%20File%20Exists(%20filename%20)%2C%0A%09%09%09Save%20Text%20File(%20filename%2C%20contents%2C%20Mode(%20%22Append%22%20)%20)%2C%0A%09%09%09Save%20Text%20File(%20filename%2C%20contents%20)%0A%09%09)%3B%0A%09)%2C%0A%0A)%3B%0A%2F%2F%20Turn%20on%20Test%201%0Aobj%20%26lt%3B%26lt%3B%20Test%201(%201%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22txnelson_0-1725791859342.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1725791859342.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1725791859342.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1725791859342.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1725791859342.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1725791859342.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68026i06E413C2AAEE95F6%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22txnelson_0-1725791859342.png%22%20alt%3D%22txnelson_0-1725791859342.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EPS%20%E6%96%B0%E5%A2%9E%20JMP%20%E7%A8%8B%E5%BC%8F%E7%A2%BC%E6%99%82%EF%BC%8C%E8%AB%8B%E4%BD%BF%E7%94%A8%E9%A0%90%E8%A6%BD%E9%A0%81%E9%9D%A2%E9%A0%82%E9%83%A8%E7%9A%84%20JSL%20%E5%9C%96%E7%A4%BA%E3%80%82%E5%AE%83%E6%8F%90%E4%BE%9B%E4%BA%86%E6%9B%B4%E5%AE%B9%E6%98%93%E9%96%B1%E8%AE%80%E5%92%8C%E7%90%86%E8%A7%A3%E7%9A%84%20JSL%20%E9%A1%AF%E7%A4%BA%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-796843%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E8%AD%A6%E5%A0%B1%E8%85%B3%E6%9C%AC%E6%9C%AA%E5%AF%AB%E5%85%A5%E6%AA%94%E6%A1%88%E3%80%82%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-796843%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%97%A8%E5%90%89%E5%A7%86%EF%BC%8C%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E8%AC%9D%E8%AC%9D%E4%BD%A0%E3%80%82%E4%BD%86%E9%80%99%E4%B8%A6%E4%B8%8D%E5%AE%8C%E5%85%A8%E6%98%AF%E6%88%91%E6%83%B3%E8%A6%81%E7%9A%84%E3%80%82%E5%9C%A8%E4%B8%8B%E9%9D%A2%E7%9A%84%E6%8E%A7%E8%A3%BD%E5%9C%96%E4%B8%AD%EF%BC%8C%E6%9C%89%207%20%E5%80%8B%E9%BB%9E%E5%81%B5%E6%B8%AC%E5%88%B0%E5%81%8F%E7%A7%BB%EF%BC%8C%E5%A6%82%E4%B8%8B%E9%9D%A2%E7%9A%84%E5%9E%82%E7%9B%B4%E7%B7%9A%E6%89%80%E7%A4%BA%E3%80%82%20%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202024-09-08%20162150.png%22%20style%3D%22width%3A%20589px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202024-09-08%20162150.png%22%20style%3D%22width%3A%20589px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202024-09-08%20162150.png%22%20style%3D%22width%3A%20589px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202024-09-08%20162150.png%22%20style%3D%22width%3A%20589px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202024-09-08%20162150.png%22%20style%3D%22width%3A%20589px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68038iE5326320E745FD83%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202024-09-08%20162150.png%22%20alt%3D%22Screenshot%202024-09-08%20162150.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E7%84%B6%E5%BE%8C%EF%BC%8C%E6%88%91%E6%9C%9F%E6%9C%9B%E4%B8%8B%E9%9D%A2%E7%9A%84%E7%A8%8B%E5%BC%8F%E7%A2%BC%E8%83%BD%E5%A4%A0%E5%A1%AB%E5%85%85%20ReportOut%20%E6%95%B8%E6%93%9A%E8%A1%A8%EF%BC%8C%E5%85%B6%E4%B8%AD%E5%8C%85%E5%90%AB%207%20%E8%A1%8C%E6%95%B8%E6%93%9A%EF%BC%8C%E4%B8%A6%E7%82%BA%E5%81%B5%E6%B8%AC%E5%88%B0%E7%9A%84%E6%AF%8F%E5%80%8B%E7%8F%AD%E6%AC%A1%E5%9F%B7%E8%A1%8C%E4%B8%80%E6%AC%A1%E8%AD%A6%E5%A0%B1%E8%85%B3%E6%9C%AC%E3%80%82%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0A%0AReportOutDataTable%20%3D%20New%20Table(%20%22ReportOut%22%2C%0A%2F%2FAdd%20Rows(1)%2C%0ANew%20Column(%20%22Name%22%2C%0ACharacter%2C%0A%22Nominal%22%2C%0A)%0A)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FQuality%20Control%2FOil1%20Cusum.jmp%22%20)%3B%0AReportOUtDataTable%20%3D%20Data%20Table(%22ReportOut%22)%3B%0Aobj%20%3D%20dt%20%26lt%3B%26lt%3B%20CUSUM%20Control%20Chart(%0A%09Y(%20%3Aweight%20)%2C%0A%09H(%202%20)%2C%0A%09Lower%20Side(%201%20)%2C%0A%09Target(%208.1%20)%2C%0A%09K(%200.025%20)%2C%0A%09Sigma(%200.02%20)%2C%0A%09Head%20Start(%200.05%20)%2C%0A%09%2F%2FTest%20beyond%20limits(%201%20)%2C%0AAlarm%20Script(%0A%09ReportOutDataTable%26lt%3B%3CADD%20rows%3D%22%22%3E%3C%2FADD%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CCODE%20class%3D%22%20language-jsl%22%3EHowever%20looks%20like%20the%20alarm%20script%20wont%20run%20at%20all%2C%20unless%20Test%20beyond%20limits%20(1)%20is%20used.%20This%20then%20results%20in%20all%20points%20out%20of%20control%20in%20the%20chart%20being%20circled%20(71%20in%20my%20example)%20%2C%20and%20therefore%2071%20rows%20of%20data%20being%20added%20to%20my%20ReportOut%20Data%20table.%3C%2FCODE%3E%3C%2FP%3E%3CP%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%20%3C%2FCODE%3E%3C%2FP%3E%3CP%3E%3CCODE%20class%3D%22%20language-jsl%22%3EUltimately%2C%20I%20want%20%20the%20alarm%20script%20to%20run%20only%20when%20a%20shift%20is%20detected%2C%20and%20then%20output%20information%20on%20the%20shift%20to%20a%20ReportOut%20Data%20table%2C%20with%20information%20like%20the%20Sample%20Number%20on%20which%20the%20shift%20was%20detected.%20Maybe%20I'm%20misunderstanding%20how%20the%20Alarm%20script%20is%20indented%20to%20function%3F%3C%2FCODE%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-796905%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E8%AD%A6%E5%A0%B1%E8%85%B3%E6%9C%AC%E6%9C%AA%E5%AF%AB%E5%85%A5%E6%AA%94%E6%A1%88%E3%80%82%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-796905%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%B9%9F%E8%A8%B1%E7%8F%AD%E6%AC%A1%E3%80%8C%E6%B8%AC%E8%A9%A6%E3%80%8D%E4%B8%8D%E8%A2%AB%E8%A6%96%E7%82%BA%E8%AD%A6%E5%A0%B1%EF%BC%8C%E5%9B%A0%E6%AD%A4%E5%AE%83%E4%B8%8D%E6%9C%83%E8%A7%B8%E7%99%BC%E8%AD%A6%E5%A0%B1%E8%85%B3%E6%9C%AC%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-797193%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E8%AD%A6%E5%A0%B1%E8%85%B3%E6%9C%AC%E6%9C%AA%E5%AF%AB%E5%85%A5%E6%AA%94%E6%A1%88%E3%80%82%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-797193%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%8F%AF%E8%83%BD%EF%BC%8C%E4%BD%86%E7%9C%8B%E8%B5%B7%E4%BE%86%E5%BE%88%E5%A5%87%E6%80%AA%EF%BC%8C%E5%9B%A0%E7%82%BA%20CuSum%20%E5%9C%96%E7%9A%84%E7%9B%AE%E7%9A%84%E6%98%AF%E6%AA%A2%E6%B8%AC%E6%95%B8%E6%93%9A%E7%9A%84%E8%AE%8A%E5%8C%96%EF%BC%8C%E9%80%99%E5%9C%A8%20Jmp%20%E4%B8%AD%E4%BB%A5%E4%B8%8A%E9%9D%A2%E7%9A%84%E5%9E%82%E7%9B%B4%E7%B4%AB%E8%89%B2%E7%B7%9A%E8%A1%A8%E7%A4%BA%E3%80%82%E7%94%A8%E6%88%B6%E5%B8%8C%E6%9C%9B%E5%9C%A8%E8%B3%87%E6%96%99%E7%99%BC%E7%94%9F%E8%AE%8A%E5%8C%96%E6%99%82%E9%81%8B%E8%A1%8C%E8%AD%A6%E5%A0%B1%E8%85%B3%E6%9C%AC%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-797236%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E8%AD%A6%E5%A0%B1%E8%85%B3%E6%9C%AC%E6%9C%AA%E5%AF%AB%E5%85%A5%E6%AA%94%E6%A1%88%E3%80%82%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-797236%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%8F%AF%E8%83%BD%E6%98%AF%E9%80%99%E6%A8%A3%EF%BC%8C%E4%BD%86%E7%9B%AE%E5%89%8D%E7%9C%8B%E4%BE%86%E5%AE%83%E5%8F%AA%E5%9C%A8%E8%AD%A6%E5%A0%B1%E6%99%82%E8%A7%B8%E7%99%BC%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%E5%9C%A8%E6%8F%9B%E7%8F%AD%E6%99%82%E8%A7%B8%E7%99%BC%E3%80%82%E4%B9%9F%E8%A8%B1%E5%89%B5%E5%BB%BA%E4%B8%80%E5%80%8B%E9%A1%98%E6%9C%9B%E6%B8%85%E5%96%AE%E9%A0%85%EF%BC%8C%E5%B8%8C%E6%9C%9B%E7%8D%B2%E5%BE%97%E5%B0%8D%E3%80%8C%E7%8F%AD%E6%AC%A1%E6%9B%B4%E6%94%B9%E8%85%B3%E6%9C%AC%E3%80%8D%E6%88%96%E9%A1%9E%E4%BC%BC%E5%85%A7%E5%AE%B9%E7%9A%84%E6%94%AF%E6%8F%B4%EF%BC%9F%E7%9B%AE%E5%89%8D%EF%BC%8C%E6%82%A8%E5%8F%AF%E4%BB%A5%E5%B0%87%E5%AE%83%E5%80%91%E6%94%BE%E5%85%A5%E5%96%AE%E7%8D%A8%E7%9A%84%E8%A1%A8%E4%B8%AD%EF%BC%8C%E4%B8%A6%E6%A0%B9%E6%93%9A%E8%A9%B2%E8%A1%A8%E8%A7%B8%E7%99%BC%E6%82%A8%E8%87%AA%E5%B7%B1%E7%9A%84%E6%93%8D%E4%BD%9C%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0Adt%20%3D%20Open(%22%24SAMPLE_DATA%2FQuality%20Control%2FOil1%20Cusum.jmp%22)%3B%0Aobj%20%3D%20dt%20%26lt%3B%26lt%3B%20CUSUM%20Control%20Chart(%0A%09Y(%3Aweight)%2C%0A%09H(2)%2C%0A%09Lower%20Side(1)%2C%0A%09Target(8.1)%2C%0A%09K(0.025)%2C%0A%09Sigma(0.05)%2C%0A%09Head%20Start(0.05)%0A)%3B%0Adt_summary%20%3D%20obj%20%26lt%3B%26lt%3B%20Save%20Summaries%3B%0A%0Ar%20%3D%20dt_summary%20%26lt%3B%26lt%3B%20Get%20Rows%20Where(Is%20Missing(%3AShift%20Start))%3B%0Adt_summary%20%26lt%3B%26lt%3B%20Delete%20Rows(r)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
BrianK
Level I

Alarm Script not writing to a file.

Hi there,

 

I'm struggling with an alarm script, like in the below. This CuSum chart is generating 7 alarms, and therefore should be generating the log file, however it is not, or not every time the script is run, which is strange. Any ideas on what's going on? I'm using version 17.2 pro. 

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" );
obj = dt << CUSUM Control Chart(
Y( :weight ),
H( 2 ),
Lower Side( 1 ),
Target( 8.1 ),
K( 0.025 ),
Sigma( 0.02 ),
Head Start( 0.05 ),
Alarm Script(
contents = Substitute( "^QCTEST in column ^QCCOL in sample ^QCSAMPLE.",
"^QCTEST", Choose( qc_test,
"One point beyond the control limits" ),
"^QCCOL", qc_col,
"^QCSAMPLE", char( qc_sample ));
filename = Convert File Path("$TEMP/test log.txt", absolute);
if (File Exists( filename ), Save Text File( filename, contents, Mode("Append") ), Save Text File( filename, contents) );
),
);
// Turn on Test 1
obj << Test 1(1);

5 REPLIES 5
txnelson
Super User

Re: Alarm Script not writing to a file.

I am not a control chart expert, however, I was able to trigger the writing of the file by adding 

Test beyond limits( 1 )

to the CUSUM Control Chart specification

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" );
obj = dt << CUSUM Control Chart(
	Y( :weight ),
	H( 2 ),
	Lower Side( 1 ),
	Target( 8.1 ),
	K( 0.025 ),
	Sigma( 0.02 ),
	Head Start( 0.05 ),
	Test beyond limits( 1 ),
	Alarm Script(
		contents = Substitute( "^QCTEST in column ^QCCOL in sample ^QCSAMPLE.",
			"^QCTEST", Choose( qc_test, "One point beyond the control limits" ),
			"^QCCOL", qc_col,
			"^QCSAMPLE", Char( qc_sample )
		);
		filename = Convert File Path( "$TEMP/test log.txt", absolute );
		If( File Exists( filename ),
			Save Text File( filename, contents, Mode( "Append" ) ),
			Save Text File( filename, contents )
		);
	),

);
// Turn on Test 1
obj << Test 1( 1 );

txnelson_0-1725791859342.png

P.S.  Please use the JSL icon at the top of the preview page when adding your JMP code.  It provides a display of your JSL that is much easier to read and understand.

Jim
BrianK
Level I

Re: Alarm Script not writing to a file.

Hi Jim,

 

Thanks for that.  But its not quite what I was looking for. In the control chart as per below, there are 7 points on which a shift is detected, as indicated by the vertical lines below. Screenshot 2024-09-08 162150.png

I was then expecting my code below to populate the ReportOut Datatable, with 7 rows of data, with the alarm script running once for each shift detected. 

Names Default To Here( 1 );

ReportOutDataTable = New Table( "ReportOut",
//Add Rows(1),
New Column( "Name",
Character,
"Nominal",
)
);
dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" );
ReportOUtDataTable = Data Table("ReportOut");
obj = dt << CUSUM Control Chart(
	Y( :weight ),
	H( 2 ),
	Lower Side( 1 ),
	Target( 8.1 ),
	K( 0.025 ),
	Sigma( 0.02 ),
	Head Start( 0.05 ),
	//Test beyond limits( 1 ),
Alarm Script(
	ReportOutDataTable<<Add Rows({:Name="test1"}); 					
	),
);

However looks like the alarm script wont run at all, unless Test beyond limits (1) is used. This then results in all points out of control in the chart being circled (71 in my example) , and therefore 71 rows of data being added to my ReportOut Data table.

 

Ultimately, I want  the alarm script to run only when a shift is detected, and then output information on the shift to a ReportOut Data table, with information like the Sample Number on which the shift was detected. Maybe I'm misunderstanding how the Alarm script is indented to function?

jthi
Super User

Re: Alarm Script not writing to a file.

Maybe shift "test" isn't considered an alarm so it won't trigger the alarm script.

-Jarmo
BrianK
Level I

Re: Alarm Script not writing to a file.

possibly, but would seem strange, given the purpose of a CuSum graph is to detect a shift in data, and this is indicated in Jmp with the vertical purple lines as per above.  Its on a shift in data a user would want the alarm script to run.

jthi
Super User

Re: Alarm Script not writing to a file.

Might be so but currently it seems that it only triggers on alarms, not on shift change. Maybe create a wish list item in hopes to get a support for "shift change script" or something similar? Currently you can get those into a separate table and trigger your own actions based on the table

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp");
obj = dt << CUSUM Control Chart(
	Y(:weight),
	H(2),
	Lower Side(1),
	Target(8.1),
	K(0.025),
	Sigma(0.05),
	Head Start(0.05)
);
dt_summary = obj << Save Summaries;

r = dt_summary << Get Rows Where(Is Missing(:Shift Start));
dt_summary << Delete Rows(r)
-Jarmo