NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel model

 Is there a way to reflect messages from my steps in the Parallel Model Panel ?
0 Kudos
Message 1 of 5
(4,177 Views)
There is no built in functionality that allows you to post messages to the Status area in the Parallel UUT Dialog.  However, if you have CVI then you can modify the ModelSupport2.dll which is where the dialog functions exist.  The ModelSupport2 project can be found in the <TestStand>\Compenents\NI\Models\TestStandModels directory.  The code for the Paralell UUT Dialog is held in the paralleluutdlg.c source file.  If you take a look at the source, there is actually quite a bit going on.  However, it is not too difficult to add a function that hooks into the Status Text controls so that you can post your own messages.  I added the following function to the modelsupport2 project and rebuilt the dll.  This function allows the user to set a custom message that will be displayed in the Status Text for the given TestSocket.  Note that the dlgHandle parameter represents the UUT Dialog panel handle.  The handle is actually stored in the Process Model.  You can access the Dialog Handle using RunState.Root.Parameters.ModelData.DialogHandle from your client Sequence.

int DLLEXPORT _stdcall PostParallelUUTDialogStatusMessage(int dlgHandle, int testSocketIndex, char *statusMsg)
{    int error = 0;
    ERRORINFO errorInfo;
    int panelId = dlgHandle;
    int childPanel = -1;

    PUUT_PanelData *panelData = NULL;
    TestSocketData *testSocketData = NULL;

    errChk( GetPanelAttribute (panelId, ATTR_FIRST_CHILD, &childPanel));
    errChk( GetPanelAttribute (panelId, ATTR_CALLBACK_DATA, &panelData));
    testSocketData = &(panelData->testSocketDataArray[testSocketIndex]);

    errChk( ResetTextBox (childPanel, testSocketData->ctrls[kTSCtrl_Status], statusMsg));

    Error:
   
    return error;
}

If you do not have CVI, then I would be happy to post the modified modelsupport2.dll.  The other option is to rewrite the Panel in LabVIEW, which would be a non trivial task.  Please let me know what version of TestStand you are using.

Thanks,

Tyler Tigue
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(4,156 Views)
Thanks a lot  Tyler,
Your solution works perfectly!
I'm using TestStand 3.1 and CVI 6.0
Best Regards
0 Kudos
Message 3 of 5
(4,146 Views)
Hello,
 
iám using more LabView than CVI. How can I access the message or how can I give the message to dialog (for example the test result from a locals (variable)?
And where must I exactly place your program text in the dll?
 
Thankyou
 
Schwede
0 Kudos
Message 4 of 5
(4,046 Views)
Schwede,

This item will only work for the Parallel Process Model because it is the only model that has a persisted dialog that is displayed with a status message area.  That being said, you can use the above code for any message that you want to send.  It is simply a matter of modifying the Parallel Process Model by adding a DLL call to this function.  If you want to send specific test results, then you would have to add this function call in the ProcessModelPostResultListEntry, which is a sequence that is executed after every test result is added to a list entry.  The Parameters contain the Result container for the step that was added.  So you could use the above code and pass Parameters.Result.Status.

The function itself is added to the paralleluut.c file in the modelsupport2 project.  Simply place it at the end of the C file and recompile the code.

Regards,

Tyler T.
Message 5 of 5
(4,015 Views)