01-06-2008 11:38 AM
01-08-2008 11:24 AM
Hi Rafi,
Here is what the comment for that sequence states: This sequence is called by the controlling execution from the Test UUTs sequence. It loops waiting for requests that the dialog enqueues into the ModelData.DialogRequestQueue. Those requests are names of sequences to call. When this sequence receives such a request it calls the requested sequence. Additionally this sequence periodically calls the Monitor Threads sequence to check to make sure the test socket executions are still running and update information about them if they are not.
The Tell Dialog To Get Next UUTs step is calling a function in the modelsupport2.dll called BUUT_GetNextUUTs. The source code is located in C:\Program Files\National Instruments\TestStand 4.0\Components\NI\Models\TestStandModels and was written in CVI. I don't have CVI on this machine so I can't look at the source code but I assume that something in there is being queued and then the ProcessDialogRequests uses that. You will most likely have to look at that source code if you want to imitate it in LabVIEW.
Is there a reason you need to override the PreBatch or create your own? What are you trying to accomplish? Maybe there's a better way to do what you want?!?!
Regards,
01-08-2008 11:53 AM
01-08-2008 12:54 PM
Hey Rafi,
I think the problem is pretty clear now. I've never personally done what you are attempting. Seems very involved.
What it looks like to me is that the Tell Dialog To Get Next UUTs step opens the dialog and then the ProcessDialogRequests interacts with that dialog while you have it open. Since you are trying to replace that dialog with a VI then the ProcessDialogRequests sequence doesn't know how to intaract with your VI. So you have a couple options here:
1- Hope someone has already done something similar and will share thier code. Anyone?
2- Change the ProcessDialogRequests sequence to interact with your VI rather than the CVI code.
3- Have your VI call the modelsupport2.dll. And interact with it from your VI. Checking the serial numbers, etc...
4- Modify the modelsupport2.dll to attend to your personal needs. This requires CVI and C programming skills.
Personally, option 4 will be the easiest as most of the code is already written. All you have to do is modify a few lines to read the scanner and compare the reads. I did find this on NIs website: http://zone.ni.com/devzone/cda/epd/p/id/5290 It looks like they changed the code to use tha Alt key to determine which UUT to scan the serial number in to.
The key here would be understanding how the step and sequence call in the PreBatch sequence work together. Once you understand that completely then you'll be able to figure out the best method for your application. Part of that involves understanding how modelsupport2.dll works and how the panels inside of there work. Again you will have to open it up in CVI and you do have all the source code for it.
Let me know if this helps and if you need anything else,
01-08-2008 12:54 PM - edited 01-08-2008 12:57 PM
One more thing I thought of.....
If your scanner doesn't need any special dll calls or anything and will just place the numer where the cursor is then maybe after they read in the serial numbers you can validate them with a VI and if they are incorrect then make the operator reenter them.
01-11-2008 04:23 PM
Hello Rafi,
I think that jigg gave some very good suggestions to help solve you problem. I wanted to also note that there are some shipping examples in TestStand that you might find helpful for additional references. If you browse to the <TestStand>\Examples\ProcessModels\ folder there are a couple examples which show how to edit the UUT Serial Number dialog. There are two sets of examples, one for the Parallel and one for the Batch process models, each located in their respective folders.
Here is an comment from the Parallel example which explains some of what is going on: "This example demonstrates how to override the default UUT dialog in the parallel process model. First override the ModelOptions callback to disable the default dialog, then override PreUUT to define a new way to get the serial number. Optionally you can override PostUUT as well to get the status of a test socket after it finishes a run." For your case you can further edit the PreUUT to allow more data to be input in the initial dialog and then verify and store said data.
I hope this is helpful.