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

SPCAlarms

Returns the status of the specified SPC alarm. This function is used to configure SPC alarms, by defining alarms with this trigger in Advanced Alarms.

This function can only be used if the Alarm Server is on the current machine. When the Alarm Server is not in the calling process, this function will become blocking and cannot be called from a foreground task. In this case, the return value will be undefined and a Cicode hardware alarm will be raised.

Syntax

SPCAlarms(sSPCTag, AlarmType)

sSPCTag:

The SPC Tag name as defined in SPC Tags.

AlarmType:

The description of the alarm type. The following types are valid:

XFreak
XOutsideCL
XAboveUCL
XBelowLCL
XOutsideWL

XGradualUp
XGradualDown
XUpTrend
XDownTrend
XErratic

XStratification
XMixture
ROutsideCL
RAboveUCL
RBelowLCL

Return Value

Alarm status, ON (1) or OFF (0).

Related Functions

AlarmAck

Example

Advanced Alarms

Alarm Tag

Feed_SPC_XBLCL

Alarm Desc

Process mean below LCL

Expression

SPCAlarms("Feed_SPC", XBelowLCL)

Comment

Trigger an alarm when XBelowLCL condition becomes true.

Advanced Alarms

Alarm Tag

Temp_SPC_GRADUP

Alarm Desc

Mean is drifting up

Expression

SPCAlarms("Temp_SPC", XGradualUp)

Comment

Trigger an alarm if mean drifts up.

See Also

SPC Functions