NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Database Logging On The Fly and Null UUT Records

Hi all,

 

I'm trying to add OTF compatibility to our customized database results processing plugin. (A modified version of the stock NI one.) Everything works perfectly when using the LogToDatabase sequence (non OTF).

 

As soon as I switch over to OTF mode, in the OTF entry point a call to LogMultipleResults produces a completely empty UUT record. (Weird that the UUT record gets inserted here. Intuitively you'd think that only step results would be.) On the second time around the database complains because the primary key is not unique. Literally every field in the UUT record is null.

 

Any idea why this is happening? We have a modified schema, but one would think that "Logging.UUT.SerialNumber" would still log. Do I have to somehow alias the Logging.UUT variable so it exists?  Is there something I should be populating in the OTF entry point? I want this to work in both OTF and standard mode.

 

Thanks very much,

 

Mr. Jim.

0 Kudos
Message 1 of 4
(2,641 Views)

What steps did you take in customizing this? It would be helpful to see how different it is from the vanilla OTF implementation.

For your reference, NI has the following public documentation on Report Generation and OTF:

 

https://www.ni.com/en/support/documentation/supplemental/06/report-generation-explained.html

https://www.ni.com/docs/en-US/bundle/teststand/page/on-the-fly-report-generation.html

 

Screenshots would also be helpful.

0 Kudos
Message 2 of 4
(2,608 Views)

Hi OctavioS,

 

Thanks very much for your reply. I should probably mention that I've successfully gotten OTF working well for HTML. (Oh, so painful to modify and get right, though. With many quirks, but I digress.)

 

I reviewed the articles you posted, and while helpful as a refresher they make no mention of OTF for database results. I did manage to get the basic motherboard example working with OTF on a bone stock database plugin using Access, though.

 

In a nutshell, here are our customizations:

  • Addition of a new container attached to most results: Logging.StepResult.Common.AdditionalColumns
  • Addition of a sequence that conditionally modifies TestStandDatabaseSchemas.ini by adding our schema if it doesn't already exist. This gets executed as part of "Model Plugin - Begin" and "Model Plugin - Configure Standard Options"
  • Model Plugin - UUT Done: Added a step to convert local time to UTC
  • LogToDatabase: Added a step that retrieves a specially formatted result containing our UUT_RESULT column values. Only the extra columns we have added use this - the rest refer to "stock" variables.
    This specially formatted result is: Parameters.MainSequenceResults.TS.SequenceCall.ResultList[ 0 ].AdditionalResults["Parameters"]["UUT_Result_AdditionalColumns"]
  • LogToDatabase: For each step result I am processing some additional results attached to the step that contain STEP_RESULT column values we've added.
  • LogToDatabase: Added an if() statement around the two ActiveX adapter steps. If we are in developer mode then results aren't logged to the database.
  • A few changes in ModelPluginComponentDescription to help identify our customized plugin
  • Added a step to configure standard options at "ModelPlugin - Initialize" and "Model Plugin - Configure Standard Options". This sets our connection string, DatabaseManagementSystem and DatabaseSchema.Name
    Added Hard coded result filter expressions.
  • Model Plugin - Begin: If in OTF mode and a UUT socket thread, retrieve UUT_RESULT column values. In OTF mode, these come directly from our model customization plugin's per socket run-time variables.
  • Model Plugin - OnTheFly Step Results: added steps to process additional results containing STEP_RESULT columns we have added to our customized schema.

Here's what our UUT_RESULT schema looks like:

UUT_RESULT.png

Maybe I'm just missing something annoyingly simple - I will take a look at everything from a "big picture" perspective and reassess.

 

Kind regards,

 

Mr. Jim

0 Kudos
Message 3 of 4
(2,592 Views)

Hello Mr. Jim,

Based on the scope of your issue, I would recommend calling in an making a service request with one of our Applications Engineers. They can provide 1 on 1 support with your issue. You can call 866-275-6964 or go to ni.com/support and open a request using our online Service Request Manager.

 
0 Kudos
Message 4 of 4
(2,570 Views)