JSL for specifying variable number of Phase Levels in a Control Chart
Jul 26, 2018 7:01 PM(2948 views)
Hello. I'm writting a script to automate the creation of control charts based on some configuration I'm reading in for each chart to be created. Below is a code snipet for creating a control chart. This chart contains two different phases where the Phase Level command is used to specify the Sigma and Avg within the phases.
I'd like to be able to do this for any number of phases, where I would have the phases specified in my configuration info and loop through them. But I don't know how to make a call to Phase Level () like that. I figure there are maybe three options :
create the control chart object without the Phase Level info and then issue a message (or Send to Report - Dispatch) to the control chart object that will add the Phase Levels in a for loop and then call chart << Redo Analysis(),
have a function with a loop embedded within the Control Chart( Chart Col(Individiaul Measurement ())) commands, but I don't know how to do that or if it is possible, or
have the for loop before the Control Chart() command, and save the Phase Level() commands to a list variable and then use that list somehow within the Control Chart () command.