NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

In TestStand call an API for Real time SPC as part of the standard data log function

In TestStand 3 I would like to call an API for the Hertzler Gainseeker SPC package in addition to using the standard log function from TestStand.  I assume that the standard function disposes of the data after logging it and that I would need access to the data prior to logging it.  Why both?  AT test completion I will present a dialog box that asks if the data is valid and should it be used for SPC, only if the answer is yes will the SPC function be called. 
 
So I assume that I need to modify the test complete sequence to place up this dialog and call the API based on the answer?  How do I get the data that is stored in the TestStand globals so I can send them to Hertzler.
0 Kudos
Message 1 of 10
(4,423 Views)
Hi,

You can modify the process model to include the dialog.  Another way would be to override the PostUUT callback within your sequence.  If you go to Edit >> Sequence File Callbacks.  Click on PostUUT and then click Add.  This will add this callback to your sequence, allowing you to modify it.  This is where you will want to add the dialog box. 

I'm not sure I fully understand your question about the station globals.  Are you retrieve the station global data to send to the dialog box, to the report, or somewhere else?
0 Kudos
Message 2 of 10
(4,405 Views)
On 7/14 Terry wrote
 
I'm not sure I fully understand your question about the station globals.  Are you retrieve the station global data to send to the dialog box, to the report, or somewhere else?
 
I was assuming that data from the sequence was stored in globals and that if the user select yes to the dialog box, I could read those globals and store the data to the database.  If they are not stored in globals, then is data actually written to a database at each test step.  I assume that if they are written at the test step level that I need to modify the step sequence to include a write data element to the .NET object, and then at the end in PostUUT if the dialog box is checked as yes that the data from the .NET object is stored to the database.
0 Kudos
Message 3 of 10
(4,386 Views)

You could look at the way the TestReport Callback works in the sequential model ?

You could add add a mechanism into that which you could use to log to your SPC package.

All the results for all the steps are available in there.

Or Even add your own step into the Test UUTs sequence, you can pass in the results list from there. Look at 'TestReport Callback' step.

0 Kudos
Message 4 of 10
(4,382 Views)

Actually what I was looking at was to 

1.  Modifying the UUT data type to include some extra fields I need. 

2.  Modify Identify UUT in PreUUT callback sequence to add the additional fields and instantiate my object

3.  Modify main in the to add a step after New UUT for Database Logging that would call my NewUUT

4.  I have not figured exactly where to add measurement values, but I need to modify the standard step to do this.

5.  Modify PostUUT to add a new item "Display Save Data Banner" which would ask if the data is valid and should it be stored.

6.  Modify LogtoDatabase callback to a a step to call my object to store the data.

I think that this makes the modifications simpler then trying to get in to the local variables that the reporting function uses.  Any thoughts on this.  

0 Kudos
Message 5 of 10
(4,339 Views)
Hi,

There doesn't appear to be anything wrong with that approach.  It should work just fine.  Let us know if you have any questions.
0 Kudos
Message 6 of 10
(4,320 Views)

Terry

In your last message you said this should work fine, and for the most part everything appears to be going smooth except for step 4.  I still have not figured out just where to add measure data.  I have traced the sequential model and it appears to me that data is only written to the log file, or to a database after the entire test sequence has run.  At this time it processes the nested data elements to create the log.  I would prefer not to have to recreate that in depth processing of data.  Instead I would like to process data at the completion of every step in the sequence but I do not see how to create a callback to do that except in my sequence itself.  Are there any other options?

 

Del

0 Kudos
Message 7 of 10
(4,292 Views)
Hi Del,

You can make these changes in the ProcessModelPostResultListEntry callback.  This callback is located within your process model.  Here is a link to more information about that callback.

http://digital.ni.com/public.nsf/websearch/C65305FE996E28F98625704700006C6F?OpenDocument

Let me know if you have any questions.
0 Kudos
Message 8 of 10
(4,275 Views)
I likewise thought my custom OTF data processing call belonged in ProcessModelPostResultListEntry, however I can't seem to find how to get the information it needs to it.  I need to pass to it an object reference, which I guess I could do as a Global, but I am trying to reserve Globals for station configuration items.  With this phylosophy in mind everything I have done so far has used a local for the object reference, and I have been able to pass it to any sequence that needs it.  While I can add parameters to teh ProcessModelPostResultListEntry, I do not see anywhere that I can select what gets passed to it. 
0 Kudos
Message 9 of 10
(4,247 Views)
Hi,

When you say that you want to pass an object reference to this step, exactly what type of object are you wanting to pass?  Is this a reference to your device or to some other object?
0 Kudos
Message 10 of 10
(4,226 Views)