SPC Functions

Parent Previous Next

SPC Functions

This page will approach SPC functions for the pens in a Trend object.


HasPenSPC Functions

Function Definition:


bool HasPenSPCMin(string tagName);

.     Return True if the pen has SPC Min, or false if not.


bool HasPenSPCMax(string tagName);

.     Return True if the pen has SPC Max, or false if not.


bool HasPenSPCAvg(string tagName);

.     Return True if the pen has SPC Avg, or false if not.


bool HasPenSPCDev(string tagName);

.     Return True if the pen has SPC Dev, or false if not.


Parameter:

.     String tagName: A string parameter containing the pen tag name in the Trend object.



To configure this property, follow the steps below:


1.   In an object event, configure the AddPen function: TrendObjectName.HasPenSPCMax(tagName);


2.   During the execution of RunTime, run the configured event.



Example with HasPenSPCMax(string tagName):


In the graphic document, the user has one Trend object (named as Trend1). In a Button object (named as Button1) the user configures the MouseUp event with the following event:


Trend1.HasPenSPCMax("NewTag1");


In this event, the function will return true or false depending if the "NewTag1" pen has SPC Max or not.



GetSPC Functions

Function Definition:


int GetPenSPCDevSigma(string tagName);

.     Return an integer value containing the pen SPC Dev Sigma.


double GetPenSPCMin(string tagName);

.     Return double value containing the pen SPC Min.


double GetPenSPCMax(string tagName);

.     Return double value containing the pen SPC Max.


double GetPenSPCAvg(string tagName);

.     Return double value containing the pen SPC Avg.


double GetPenSPCDev(string tagName);

.     Return double value containing the pen SPC Dev.


double GetPenSPCDevPositive(string tagName);

.     Return double value containing the pen SPC Dev Positive.


double GetPenSPCDevNegative(string tagName);

.     Return double value containing the pen SPC Dev Negative.



Parameter:

.     String tagName: A string parameter containing the pen tag name in the Trend object.



To configure this property, follow the steps below:


1.   In an object event, configure the AddPen function: TrendObjectName.GetPenSPCMin(tagName);


2.   During the execution of RunTime, run the configured event.



Example with GetPenSPCMin(string tagName):


In the graphic document, the user has one Trend object (named as Trend1). In a Button object (named as Button1) the user configures the MouseUp event with the following event:


Trend1.GetPenSPCMin("NewTag1");


In this event, the function will return the "NewTag1" pen SPC Min value.



SetSPC Functions

Function Definition:


void SetSPC(bool showSPC);

.     Shows SPC for all pens in a Trend object.


void SetSPC(bool showSpcMin, bool showSpcMax, bool showSpcAvg, bool showSpcDev, int spcDevSigma);

.     Shows SPC for all pens in a Trend object.


void SetPenSPC(string tagName, bool showSPC);

.     Shows SPC for a specific pen in a Trend object.


void SetPenSPC(string tagName, bool showSpcMin, bool showSpcMax, bool showSpcAvg, bool showSpcDev, int spcDevSigma);

.     Shows SPC for a specific pen in a Trend object.



Parameters:

.     String tagName: A string parameter containing the pen tag name in the Trend object.

.     Bool showSPC: A boolean parameter indicating if the SPC will be shown or not.

.     Bool showSpcMin: A boolean parameter indicating if the SPC Min will be shown or not.

.     Bool showSpcMax: A boolean parameter indicating if the SPC Max will be shown or not.

.     Bool showSpcAvg: A boolean parameter indicating if the SPC Avg will be shown or not.

.     Bool showSpcDev: A boolean parameter indicating if the SPC Dev will be shown or not.

.     Bool spcDevSigma: A boolean parameter indicating if the SPC Dev Sigma will be shown or not.



To configure this property, follow the steps below:


1.   In an object event, configure the AddPen function: TrendObjectName.SetSPC(showSPC);


2.   During the execution of RunTime, run the configured event.



Example with SetSPC(bool showSPC):


In the graphic document, the user has one Trend object (named as Trend1). In a Button object (named as Button1) the user configures the MouseUp event with the following event:


Trend1.SetSPC(True);


In this event, the function will showt the SPC for all pens in the Trend object.



 

Note: This function exists only to the following objects:

.    Trend