From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-16-2011 08:03 AM
Hello,
In my Application I have 2 ExecutionView Manager, 2 SequenceView and one ListBar
When I run sequence and I connect the execution to the first ExecutionView Manager (TSUI_ExecutionViewMgrSetByRefExecution), the first SequenceView is updated correctly but the ListBar is also updated.
According to me this ListBar should not be updated because it is connected to the Second ExecutionView Manager.
Soemeone could explain me why this ListBar is updated?
my configuration :
CVI2010
TS2010SP1
WIN 7 32 bits
Thank you for your help
JPV
12-20-2011 09:45 AM
Hi JPV,
First of all, thank you for using the NI discussion forum.
I need more information on the connection between the different modules. Can you post your code in order to allow me to see how the connections are implemented?
Can you also tell me if the second SequenceView is updated too, when you connect an execution to the first ExecutionView Manager?
Best regards
Audrey_P
National Instruments France
12-22-2011 09:37 AM
Hi,
Thank you for your answer.
I extract the interesting code part from my whole code
The connection code part is the following :
// connection objet Graphique Production tsErrChk(TSUI_ExecutionViewMgrConnectExecutionView(gProdExecutionViewMgr, &errorInfo,gProdExecutionView, TSUIConst_ExecutionViewConnection_NoOptions, NULL)); tsErrChk(TSUI_ListBarGetPages(gProdExecutionListBar, &errorInfo, &ProdListBarPages)); tsErrChk(TSUI_ListBarPagesGetItem(ProdListBarPages, &errorInfo, CA_VariantLong(0), &ProdListBarPage)); tsErrChk(TSUI_ExecutionViewMgrConnectExecutionList(gProdExecutionViewMgr, &errorInfo, ProdListBarPage, &ProdExecListConnection)); tsErrChk(TSUISUPP_ExecutionListConnectionSetDisplayExpression(ProdExecListConnection, &errorInfo, "\"%CurrentExecution%\\n\"")); // connection objet Graphique Maintenance tsErrChk(TSUI_ExecutionViewMgrConnectExecutionView(gMaintExecutionViewMgr, &errorInfo,gMaintExecutionView, TSUIConst_ExecutionViewConnection_NoOptions, NULL)); tsErrChk(TSUI_ExecutionViewMgrConnectReportView (gMaintExecutionViewMgr, &errorInfo,gMaintRepportView,NULL));
The Callback fonction tha affect the exécution to executionView Manager is the following :
tatic HRESULT CVICALLBACK TSMngt_AppMgr_OnDisplayExecution(CAObjHandle caServerObjHandle, void *caCallbackData, TSUIObj_Execution execution, enum TSUIEnum_ExecutionDisplayReasons reason) { int error = 0; ERRORINFO errorInfo = {0, 0, "\0", "\0", "\0", 0, 0}; ErrMsg errMsg = "\0"; //l'exécution View manger dépend de l'éxécution switch (gCurrentSequenceType) { case eProductionSequence: tsErrChk(TSUI_ExecutionViewMgrSetByRefExecution(gProdExecutionViewMgr, &errorInfo, execution)); break; case eMaintenanceSequence: case eMaintenanceSequence_StartProg: tsErrChk(TSUI_ExecutionViewMgrSetByRefExecution(gMaintExecutionViewMgr, &errorInfo, execution)); break; case eSAVSequence: case eSAVSequenceStepped: tsErrChk(TSUI_ExecutionViewMgrSetByRefExecution(gSavExecutionViewMgr, &errorInfo, execution)); break; default: break; } Error: if(error<0) return E_FAIL; else return S_OK; }
And finally, To answer you last question, No the second sequence View is not updated when an execution is connected to the first ExecutionView
Manager
Thank you for your help
Best reagards
JPV
12-28-2011 10:15 AM
Hi JPV,
I have quickly implemented an user interface thanks to your code, and I realize that what you observe is the expected behavior of the ListBar.
The ListBar is actually a control which allows you to choose which execution will be associated to your ExecutionViewManager (see the ListBar definition in the TestStand reference manual page 124, you can find it here). So in your code, it displays all executions, and when you choose an execution by clicking on it, this chosen execution is linked to the second ExecutionViewManager and display on the second SequenceView.
In short, the connection between a ListBar and an ExecutionViewManager is in the ListBar to ExecutionViewManager direction, and not in the ExecutionViewManager to ListBar connection.
I hope this piece of information will help you. Don’t hesitate to ask more questions.
Best regards
Audrey_P
National Instruments France