Gets the process Upper and Lower Specification Limits (USL and LSL) for the specified SPC tag. The values that are returned are the values that are currently being used by the SPC (trend) server, not necessarily the values specified in the SPC Tag definition.
This function is a blocking function. It will block the calling Cicode task until the operation is complete.
SPCSpecLimitGet(sSPCTag, LSLVariable, USLVariable [, ClusterName] )
The SPC Tag name as defined in SPC Tags.
The Cicode variable that stores the Lower Specification Limit (LSL). This variable needs to be defined as a global of type REAL. Do not specify a constant in this field.
The Cicode variable that stores the Upper Specification Limit (USL). This variable needs to be defined as a global of type REAL. Do not specify a constant in this field.
Specifies the name of the cluster of the SPC tag.
0 (zero) if successful, otherwise an error number is returned. The LSL is written to LSLVariable, while the USL is written to USLVariable.
/* This function will increase the current USL and LSL of the specified Tag by 10 percent.*/
! These variables need to be global to the file, so are declared outside of the function
REAL rIncPercent = 1.1;
REAL rDecPercent = 0.9;
iError = SPCSpecLimitGet(sTag, rLSL, rUSL);
! If no error, rLSL and rUSL now hold the current values of LSL and USL for sTAG
rLSL = rLSL * rDecPercent;
rUSL = rUSL * rIntPercent;
IF iError = 0 THEN
iError = SPCSpecLimitSet(sTAG, rLSL, rUSL);
! The function would be called as follows;
Expand Temperature Limits