NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Call Log Result for OTF at the beginning of Sequence Call

I'm implementing results logging to database using my custom schema and trying to utilize TestStand Database Logger. On-the-fly logging is must for me. 

What I'd like to implement is that Sequence Call step logs data twice, at the beginning and after completion. This is required to comply with schema's foireign key restrictions, step's table uses fields from sequence's table as a foreign key, so sequence call should be inserted in databse before any step's result from the sequence gets inserted. At the end of sequence execution, the sequence's record should be updated with result and module time.

I found out that OTF logging ends up with calling "Model Plugin - OnTheFly Step Results" sequence in NI_DatabaseLogger.seq which has only one step in it, call of LogMultipleResults method of TSDBLog class in zNI TestStand Database Logging server. The "Model Plugin - OnTheFly Step Results" sequence itself is actually called twice, at the beginning of Sequence Call step and at the end of it, but actual result logging happened only once at the end, which is probably regulated by the called method. Is it possible to make it call statement assigned to the step in Database Options twice? Ideally it would be good if different statements can be assigned to the begining of step and to the end of step, but I can manage difference in my called stored procedure, so calling the same statement would be enough.

Right now the Statement's "Apply to" control has only tree options: UUT Result, Step Result, and Property Result. I'm using Step Result option linked to a step type. That works great for steps in the sequence, but not for sequence calls.

By the way, Report Generator having the same routine for OTF logging, it is calling "Model Plugin - OnTheFly Step Results" sequence in Report Generator sequence file. But, unlike the database logging, report generator enters data for sequence call at the beginning of the step with Running status and 0 time, then all sequnce's steps are logged, and then the sequence call record is updated with final status and time. I want the same behavior for database logging.

0 Kudos
Message 1 of 3
(4,663 Views)

Hi Sergey,

 

This should be possible - there should be some useful information in the following documentation under the "Method 2: Modifying database logging directly" header.

 

http://www.ni.com/tutorial/14595/en/#toc2

 

Regards,

Regards,

Kristen M

Automated Test Product Marketing Engineer
National Instruments
0 Kudos
Message 2 of 3
(4,603 Views)

I'm using such methods as you pointed to for logging additional information into database directly.

The best solution I've found so far is to create an empty steptype, just a place holder for database logging, it may do nothing or collect inforation required for database and put it in its Results container so it is visible by database logger. Propagated locals works as well. Then, a logging routine "applied to step result" is assigned to that steptype. So, now we can place this step in the sequence where we want to log data in db. This way the pre-logging can be done for such steps as Sequence Call, which logs data after executing of all steps in the sequence.

The only caveat  with this method, this special database logging step will be logged into report as well. Result Recording Option, if Disabled for a step affect ALL results recording, report and database, so the step for database logging will appear as a line in the report, while it serves solely the database logging purpose, and not logged as a step to the database. Although I believe that can be customized in the report sequences.

0 Kudos
Message 3 of 3
(4,364 Views)