LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

User Interface NI Teststand QuitButton

Hello everybody !

I create a UserInterface to call the function in NI Teststand. If I press the button "Test starten", the Panel is inactive and can´t press the button "QUIT" to stop the programm.

 

Function:

 

void __stdcall ptf_CtrlRunUserInterface(CAObjHandle thisContext,
short*sErrorOccurred, int *lErrorCode, char cErrorMessage[])
{
iGlobalPass = TRUE;
SequenceContext = thisContext;
SetCtrlAttribute(MainPanel, PANEL_STARTTEST, ATTR_DIMMED, 0);
SetCtrlAttribute(MainPanel, PANEL_STOPSEQ, ATTR_DIMMED, 0);
SetCtrlAttribute(MainPanel, PANEL_ABBRUCHTEST, ATTR_DIMMED, 1);
SetCtrlAttribute(MainPanel, PANEL_SERIAL, ATTR_CTRL_MODE, VAL_HOT);
SetCtrlVal(MainPanel, PANEL_SERIAL, "");
RunUserInterface();
}

 

int CVICALLBACK StartTest(int panel, int control, int event, void *callbackData,
int eventData1, int eventData2)
{
switch (event)
{
case EVENT_COMMIT:
TS_PropertySetValBoolean(SequenceContext, &pTSErrorInfo,
"FileGlobals.StartTest", 0, VTRUE);
GetCtrlVal(MainPanel, PANEL_SERIAL, cMsgText);
TS_PropertySetValString(SequenceContext, NULL, "FileGlobals.Serial", 0,
cMsgText);
GetCtrlVal(MainPanel, PANEL_PRUEFER, cMsgText);
TS_PropertySetValString(SequenceContext, NULL, "FileGlobals.Pruefer", 0,
cMsgText);
SetCtrlAttribute(MainPanel, PANEL_STARTTEST, ATTR_DIMMED, 1);
SetCtrlAttribute(MainPanel, PANEL_STOPSEQ, ATTR_DIMMED, 1);
SetCtrlAttribute(MainPanel, PANEL_ABBRUCHTEST, ATTR_DIMMED, 0);
SetCtrlAttribute(MainPanel, PANEL_SERIAL, ATTR_CTRL_MODE, VAL_INDICATOR);
QuitUserInterface(0);
break;
}
return 0;
}

 

 

Can you help me?

PanelPanelNI TeststandNI Teststand

0 Kudos
Message 1 of 1
(1,188 Views)