Cicode Programming Reference > Cicode Function Categories > Statistical Process Control Functions Introduction > SPCSetLimit


Sets the upper or lower control limits of X-bar, range, or standard deviation charts. Using this function will only set the controller limits on the Client display which will not affect the SPC Alarms. To set the server control limits, use the SPCProcessXRSSet function.


SPCSetLimit(AN, Type, Value, Setting)


The AN where the SPC chart is located.


The SPC type:

1 - X-bar upper control limit

2 - X-bar lower control limit

3 - Range upper control limit

4 - Range lower control limit

5 - Standard deviation upper control limit

6 - Standard deviation lower control limit

7 - X-bar centre line

8 - Range centre line

9 - Standard deviation centre line


The value for the control limit.


Automatic calculation or manual setting of control limits:

0 - Automatic

1 - Manual

Return Value

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


! Sets X-bar upper control limit to 250 at AN40.

See Also

SPC Functions