Subscribe Bookmark RSS Feed

make a control chart with a variable for column

john_hutchinson

Community Trekker

Joined:

Jun 11, 2015

I want to make different control charts based on different columns of data, where the column name are numbers based on an SPC chart numbering system.

For example if I want a control chart based on column "45038", this works fine

chartnum = 45038;

ct1 = Control Chart(

    Sample Label( :lot ),

    KSigma( 3 ),

    GetLimits(\limits.jmp" ),

    Chart Col(

        :"45038",

        XBar( Limits Precision( 0 ) ),

        R( Limits Precision( 0 )) 

    )

);

I can replace :"45038" with name("45038").  But I get a syntax error if I replace it with name (chartnum) or name(char(chartnum))

Any ideas?

4 REPLIES
ms

Super User

Joined:

Jun 23, 2011

Try

As Column(Char(chartnum))


Or simply

:(Char(chartnum))

john_hutchinson

Community Trekker

Joined:

Jun 11, 2015

Thank you for the suggestion!

Both options enable to control chart to display the data from the appropriate column.

Unfortunately, both options do not find the control limits in my limits.jmp table.  Odd.

ct1 = Control Chart(

    Sample Label( :lot ),

    KSigma( 3 ),

    GetLimits("C:\_LOCAL\_Aurrion\_ToBeSorted\charts-working\JMP\limits.jmp" ),

    Chart Col(

//        :(Char(chartnum)), // display chart, but doesn't find limits in file.

        :"45038", // display chart and correct limits

//        As Column(Char(chartnum)), // displays chart, but doesn't get limits from file.

        XBar( Limits Precision( 0 ) ),

        R( Limits Precision( 0 )) 

    );

ms

Super User

Joined:

Jun 23, 2011

Ok, maybe a reference for the column is needed. Try this:

dt = Current Data Table();

chartnum = 45038;

col = Column(dt, Char(chartnum));

ct1 = Control Chart(

    Sample Label(:lot),

    KSigma(3),

    Chart Col(col, XBar(Limits Precision(0)), R(Limits Precision(0))),

    GetLimits("C:\_LOCAL\_Aurrion\_ToBeSorted\charts-working\JMP\limits.jmp")

);

john_hutchinson

Community Trekker

Joined:

Jun 11, 2015

Thanks!

I dont quite understand the different behaviors, but it works!