Sets a new subgroup size for the specified SPC tag. The new subgroup size becomes the new size as long as the SPC (trend) server is running. The subgroup size is updated first in the SPC server, which then informs the clients to update. This will force re-calculation of SPC values (UCL and LCL) across the span of any displayed charts.
This function is a blocking function. It will block the calling Cicode task until the operation is complete.
This function can only be called while the SPC tag is being displayed on an SPC page.
SPCSubgroupSizeSet(sSPCTag, iSize [, ClusterName] )
The SPC Tag name as defined in SPC Tags.
The new size of the subgroup to set.
Specifies the name of the cluster of the SPC tag.
0 (zero) if successful, otherwise an error number is returned.
/* This function increments the subgroup size for FEED_RATE_1 by the specified amount. */
! This variable needs to be global to the file, so is declared outside of the function
iError = SPCSubgroupSizeGet("FEED_RATE_1", iSize);
! If no error, iSize now contains the current subgroup size of FEED_RATE_1
iSize = iSize + iIncrement;
IF iError = 0 and (isize > 1) THEN
iError = SPCSubgroupSizeSet("FEED_RATE_1", iSize );