NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a custom UUT dialog for the parallel model

Hello,
 
I am attempting to customize the parallel process model in order to (amongst other things) present a different UUT info dialog.  (The default one defined in modelsupport2.dll only presents a single "Serial number" field where I need numerous other ones.)  Because I am not familiar with CVI (and don't have the development tools for it), I was hoping to create an ActiveX DLL in Visual Basic, or a .NET assembly to manage a slightly more complex version of the UUT info dialog...  While I am sure it would be great fun to fumble with all the complexities of this until it shows some semblance of proper functionality Smiley Wink I am hoping there may be some resources available online that would demonstrate how one would go about doing this kind of thing.  I've seen LabVIEW code that provides a different UUT dialog, but it was based on the sequential model which circumvents the most complex issues such as synchronizing the dialog with the TestStand threads, etc.  Any pointers would be greatly appreciated.
Thanks!
0 Kudos
Message 1 of 7
(5,322 Views)

I presented the same quiestion a few months back and I was able to make one using Labview.  I do remember someone giving a very advanced one developed with C#. See here.

Anyway, if I had my LabView code with me I would share it, but I don't so I'll try and recall some of the things I did.

First of all I disabled the defauld model dialog from showing.  There is a boolean some where that you can set so it doesn't run.  When you try an run with this off how you will get stuck in a loop because you don't have the dialog to stop the loop.

What I did was to use the TestStand SyncManager (ActiveX) to pause the teststand execution.  In detail (in the teststand model or sequence callback), I created a notification, passed the notification name to the OI with a UImessage, then waited for the notification.  Then the OI takes the named notification and access it with the syncmanager and when the serial number is entered (on the front panel of the custion OI) the OI sends the serial number and the continue testing boolean through the notification.  Teststand then resumes.  See this post...

One thing I limited my OI to was only 2 testsockest.  I created two execution managers to handle them and then posted one execution to one manager and the second to the other manager.  To make it dynamic would take a lot more work and was more than we needed at the time.

Hope this helps

0 Kudos
Message 2 of 7
(5,312 Views)

Thanks for your response paulmw.  I think the C# code may be useful for me.  My situation is a little different, but I believe I'll need to do some of the same things.  I am actually not creating an OI...  In fact, I don't believe I'm even permitted to since my company already has one that they want to use for all sequences.  Because of this, I am trying to accomplish this by directly modifying the parallel model sequence.  I'm hoping that I can create a replacement for the modelsupport2 component to support my UUT dialog changes.

In any case, I'm currently experimenting with creating a modelsupport2.dll that is a .NET assembly written in VB .NET.  Hopefully, by pulling together the existing CVI code and the C# code you've provided, I can make this work.  I'll post the code if I get it working.

Thanks again.

0 Kudos
Message 3 of 7
(5,308 Views)
Rob,

I'd recommend you have a look at the following example:

TestStand\Examples\ProcessModels\ParallelModel\OverrideSerialNumForParallelModel.seq

It shows how to disable the default uut dialog for the parallel model and how to use callbacks to replace it with your own code. This approach is much simpler than completely rewriting modelsupport2.dll. You could even put the changes directly into the model sequence file instead of overriding the callbacks if you prefer.

Hope this helps,
-Doug

Message Edited by dug9000 on 02-09-2007 10:43 AM

Message 4 of 7
(5,291 Views)

Thanks Doug.  I will look into it.  I am thinking this may not be a suitable solution for me due to some of the requirements that I am faced with.  For example, I will need to have 1 dialog that supports all test sockets.  In order to synchronize a shared dialog, I am thinking that I would basically be re-introducing much of the complexity...  I like the general concept behind the paralleluut dialog.  I think the idea of having the sequence sit and process requests while the dialog generates them is the right solution - it just isn't flexible enough as it is.

Nevertheless, I will definitely look into the option if creating a custom dialog component to plug into the existing infrastructure proves to be too difficult.  Thanks again.

0 Kudos
Message 5 of 7
(5,273 Views)

I am just posting this in case anyone else runs into the same sort of requirement.  The attached zip file contains the source for a .NET assembly that is the beginnings of a VB .NET replacement for the parallel UUT dialog of the modelsupport2 DLL.  I don't want to write an epic here, so the general idea is that the parallel model sequence is modified to make calls into this assembly instead of the modelsupport2.dll component.  But you can't just disable the dialog by setting the ShowUUTDlg boolean to false - that will completely remove the consumer loop in the ProcessDialogRequests sequence which the .NET assembly is trying to send requests to.  I've attached the modified ParallelModel.seq in case anyone's interested.

Note that there are still significant problems with this and it is provided as-is.  In particular, if you attempt to break and step through the parallel model sequence after the dialog has been initialized, you will not be able to continue - the main thread will hang until you restart TestStand.  With a little more thread mgmt, that could be fixed.  If nothing else, it is useful code to look at if you need to enqueue items from a .NET assembly into a queue defined in a TestStand sequence.

If you can afford to use the existing dialog as-is, and then add additional info gathering to the main sequence, that is clearly easier.  (That will be OK for my purposes so that is what I'll do.)  However, if you need to have one custom dialog that manages everything in the parallel model, this is the kind of code you should expect to need.

Hopefully that helps somebody.  There is not much info out there about integrating .NET at this level.

Download All
Message 6 of 7
(5,234 Views)

Hi Rob,

 

I too have a similar requirement to yours, i.e. I want to leave the parallel structure the same with a common dialog request divorced from the process model and operator interface - but I don't like the standard form supplied with modelsupport2.dll.

 

Did you ever get further on this project or did you finally just use the standard modelsupport2 interface?

 

Tom 

0 Kudos
Message 7 of 7
(4,611 Views)