Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

SPCSubgroupSizeSet

  • Last UpdatedJul 18, 2023
  • 1 minute read

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.

Syntax

SPCSubgroupSizeSet(sSPCTag, iSize [, sClusterName] )

sSPCTag:

The SPC Tag name as defined in SPC Tags.

iSize:

The new size of the subgroup to set.

sClusterName:

Specifies the name of the cluster of the SPC tag.

Return Value

0 (zero) if successful, otherwise an error number is returned.

SPCSubgroupSizeGet

Example

/* This function increments the subgroup size for FEED_RATE_1 by
the specified amount. */

INT iSize;

! This variable needs to be global to the file, so is declared outside
of the function

INT

FUNCTION

IncSubgroupSize(INT iIncrement)

INT iError;

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 );

END

Return iError;

END

See Also

SPC Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in