06-05-2015 06:52 AM
Hello,
I am using TestStand API in CVI to run a test sequence. I want the button start to be dimmed during the execution, so I wrote these lines:
SetCtrlAttribute(panel, PANEL_COMMANDBUTTON, ATTR_DIMMED, TRUE);
TS_NewEngine (NULL, &lEngine));
TS_EngineGetProperty (lEngine, &errorInfo, TS_EngineGlobals, CAVT_OBJHANDLE, &stationGlobalsHandle));
TS_EngineGetSeqFileEx (lEngine, &errorInfo, "SequenceFile1.seq",TS_GetSeqFile_OperatorInterfaceFlags, TS_ConflictHandler_UseGlobalType,&lCurrentSequenceFile ));
TS_SeqFileGetFileGlobalsDefaultValues (lCurrentSequenceFile,&errorInfo, &fileGlobalsHandle);
TSerrChk( TS_EngineNewExecution (lEngine, &errorInfo, lCurrentSequenceFile,"MainSequence", modelSeqFile, VFALSE,TS_ExecTypeMask_Normal, CA_DEFAULT_VAL, CA_DEFAULT_VAL, CA_DEFAULT_VAL, &lCurrentExecution));
TS_ExecutionWaitForEndEx(lCurrentExecution,&errorInfo, INFINITE,TRUE,CA_DEFAULT_VAL,CA_DEFAULT_VAL,&end);
SetCtrlAttribute(panel, PANEL_COMMANDBUTTON, ATTR_DIMMED, FALSE);
But it's not working, the sequence is not even executed and the button remains dimmed.
If anyone can help me I would appreciate it.
Thank you
07-08-2015 06:25 AM
There are several flaws in your approach:
thanks,
Norbert