NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

ProcessDialogRequests of Batch sequence

HI,
 
I'm tyring to use a batch model for the first time and can't jsut figure out what the above sequence is doing?
 
The first thing I did was creating my own PreBatch sequence and then modifying the  Tell Dialog To Get Next UUTs  with my own vi.
My question now is what is the purpose of ProcessDialogRequests because I was not able to figure it out. 
 
 
Thanks
Rafi
0 Kudos
Message 1 of 6
(3,608 Views)

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,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 6
(3,583 Views)
Hi jigg and thanks...
 
The reason we want to modify this procedure (by writing our own callback) is to modify the barcode input.  Instead of just entering serial number we have 5 or 6 fields.  We also check the input data and verify it's legality.  As a result of this step, we save all the barcode data into TestStand globals and write the serial numbers into the ModelData.
 
To summarize - we only replace the step Tell Dialog To Get Next UUTs withing the BatchModel.seq.
 
If you have a better way to do it (replacing this step in a different way) we will be more than happy to try it.
 
Thanks
Rafi
0 Kudos
Message 3 of 6
(3,580 Views)

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,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 6
(3,576 Views)

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.



Message Edited by ~jiggawax~ on 01-08-2008 12:54 PM

Message Edited by ~jiggawax~ on 01-08-2008 12:57 PM
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 6
(3,576 Views)

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.

John B.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,536 Views)