cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Neo
Neo
Level VI

How to add a single Fail column when any one or more test parameter fail (spec limits saved to each parameter column)?

I have a data table with test data. The first column has the part ID and rest of the columns (other column names are test parameter names) having test data corresponding to each part ID. All tested parameters columns have spec limits (LSL/USL) saved in them. I want to add a Fail column (with 1 for fail otherwise 0) when any one or more of the test parameters for each part fail the spec (LSL or USL or both).

How to do this in JSL?

(my data set is very similar to $SAMPLE_DATA\Semiconductor Capability.jmp)

 

When it's too good to be true, it's neither
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How to add a single Fail column when any one or more test parameter fail (spec limits saved to each parameter column)?

If JMP can create it to your script, you can most likely use it even if it is not mentioned in Script Index

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
col_names = dt << Get Column Names("String");
Remove From(col_names, 1, 4);
pc = dt << Process Capability(
	Process Variables(Eval(col_names)),
	Spec Limits Dialog("No (skip columns with no spec limits)"),
);
pc << Select Out of Spec Values(1);
-Jarmo

View solution in original post

7 REPLIES 7
jthi
Super User

Re: How to add a single Fail column when any one or more test parameter fail (spec limits saved to each parameter column)?

With JSL you could try using Select Out of Spec Values with Process Capability

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Cities.jmp");
obj = dt << Process Capability(
	Process Variables(:OZONE, :CO, :SO2, :NO),
	Spec Limits(Import Spec Limits("$SAMPLE_DATA/CitySpecLimits.jmp"))
);
obj << Select Out of Spec Values(1);

And then set 1 to those rows which have been selected and then clear selection (and close platform)

-Jarmo
Neo
Neo
Level VI

Re: How to add a single Fail column when any one or more test parameter fail (spec limits saved to each parameter column)?

@jthi . Thanks. If you provide your example using $SAMPLE_DATA\Semiconductor Capability.jmp  instead, it would help me understand the necessary steps better as the is table is very similar to what I already have i.e. spec limits already applied to the columns.I do not need to import spec limits like in the Cities data table. 

When it's too good to be true, it's neither
jthi
Super User

Re: How to add a single Fail column when any one or more test parameter fail (spec limits saved to each parameter column)?

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
col_names = dt << Get Column Names("String");
Remove From(col_names, 1, 4);
pc = dt << Process Capability(
	Process Variables(Eval(col_names)),
);
pc << Select Out of Spec Values(1);
-Jarmo
Neo
Neo
Level VI

Re: How to add a single Fail column when any one or more test parameter fail (spec limits saved to each parameter column)?

@jthi . This should work, but my data table has got some parameters without spec limits which need to be ignored. I can do this manually, but can this be done automatically?

When it's too good to be true, it's neither
jthi
Super User

Re: How to add a single Fail column when any one or more test parameter fail (spec limits saved to each parameter column)?

You could loop over the list of your parameter list and then filter out those which don't have spec limits defined. Then use that cleaned list as input for Process Capability

-Jarmo
Neo
Neo
Level VI

Re: How to add a single Fail column when any one or more test parameter fail (spec limits saved to each parameter column)?

Thanks @jthi . I notice that in Process Capability there is an option of skipping columns without spec limits. Saving the script from the interactive dialog box shows  but I cannot find this in the scripting index. 

Spec Limits Dialog( "No (skip columns with no spec limits)" ),

Is there a JSL command for the same?

When it's too good to be true, it's neither
jthi
Super User

Re: How to add a single Fail column when any one or more test parameter fail (spec limits saved to each parameter column)?

If JMP can create it to your script, you can most likely use it even if it is not mentioned in Script Index

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
col_names = dt << Get Column Names("String");
Remove From(col_names, 1, 4);
pc = dt << Process Capability(
	Process Variables(Eval(col_names)),
	Spec Limits Dialog("No (skip columns with no spec limits)"),
);
pc << Select Out of Spec Values(1);
-Jarmo