Hi,
You need to use the CVI Active X Automation Handle type so that you pass a CAObjHandle as your seqContextCVI parameter.
As shown below;
void __declspec(dllexport) MyTest(CAObjHandle seqContextCVI, double measurements[], char reportText[1024], short *errorOccurred, long *errorCode, char errorMsg[1024])
{
int error = 0;
ErrMsg errMsg = {'\0'};
ERRORINFO errorInfo;
//// REPLACE THE FOLLOWING WITH YOUR SPECIFIC TEST CODE
double lowLimit0;
const int NUM_MEASUREMENTS = 3; // Replace with the number of measurements you define in the MultipleNumericLimitTest step.
int i;
for (i = 0; i < NUM_MEASUREMENTS; i++)
measurements[i] = 5.0; // Replace with the actual measurement values
// The following code shows how to access a property or variable via the TestStand ActiveX API
// To use this code you must add a parameter "struct IDispatch *seqContextDisp" to this function
// and pass a sequence context to it.
tsErrChk(TS_PropertyGetValNumber(seqContextCVI, &errorInfo,
"Step.Result.Measurement[0].Limits.Low", 0, &lowLimit0));
// Note: This template requires that you do not select the Specify a Data Source for Each Measurement step option.
// If you select this option, the MultipleNumericLimitTest step does not necessarily use the contents of Step.NumericArray.
// You typically do not call a code module when you set this step option.
Error:
//// FREE RESOURCES HERE
// If an error occurred, set the error flag to cause a run-time error in TestStand.
if (error < 0)
{
*errorOccurred = TRUE;
// OPTIONALLY SET THE ERROR CODE AND STRING
*errorCode = error;
strcpy(errorMsg, errMsg);
}
}
Regards
Ray Farmer
Regards
Ray Farmer
