From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

LogToDatabase in SequentialModel.seq has no effect

Solved!
Go to solution

Hello,

I am attempting to modify the LogToDatabase callback behavior in the sequential model. However, I cannot get execution to enter the LogToDatabase callback in the process model.

 

When I have a LogToDatabase callback in my client sequence, the execution enters the callback:

Capture10.PNG

 

When I have the LogToDatabase callback in the process model (no callback in client sequence), execution completely skips over the sequence:

Capture11.PNG

 

This behavior is true for both synchronous and asynchronous results process. OTF logging is disabled. Running Teststand 17 SP1 32-bit.

 

Has anyone else had this issue? Am I misunderstanding how the LogToDatabase process model callback works?

 

Ultimately, I want to react to an error (such as a failed connection) when logging to the database. Is there a way to accomplish this other than examining the Results property of the LogToDatabase sequence call step?

0 Kudos
Message 1 of 4
(1,101 Views)
Solution
Accepted by wterry

@wterry wrote:

When I have a LogToDatabase callback in my client sequence, the execution enters the callback:

Capture10.PNG


- This is expected behavior if  LogTODatabase in client sequence contains this standard call which explicitly calls LogToDatabase in NI_Database.seq:

Roman_L_0-1627400004399.png

 


@wterry wrote:

When I have the LogToDatabase callback in the process model (no callback in client sequence), 

 execution completely skips over the sequence:

Capture11.PNG

 -This is how it works. Check Using Callbacks in NI TestStand - NI

 


@wterry wrote:

 

Ultimately, I want to react to an error (such as a failed connection) when logging to the database. Is there a way to accomplish this other than examining the Results property of the LogToDatabase sequence call step?


- Yes, consider this option:  Overriding Engine Callbacks - SequenceFilePostStepRuntimeError - TestStand 2017 Help - National Inst...

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

LogToDatabase only exists in the SequentialModel.seq to show it in your client when you click on the insert callbacks dialog.  It is actually defined in what is called a secondary process model called NI_DatabaseLogger.seq.  That is the one being called when your client file version isn't called and NOT the one in the process model.  

 

I actually have posted an idea on the exchange here: https://forums.ni.com/t5/NI-TestStand-Idea-Exchange/Create-a-configurable-Model-Callback-list/idi-p/...

 

This would help eliminate the confusion you are experiencing now.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 3 of 4
(1,080 Views)

Roman_L, thanks for your reply. I have already read through the callback user guide (several times now), unfortunately it's missing some key points about how the plugin architecture (or secondary process model according to jigg) callbacks interact with the main process model.

 

Thanks for pointing me towards the engine callbacks, looks like that is going to be the most straightforward path.

 

Jigg, thanks for the good info, definitely helps clarify what is going on.

0 Kudos
Message 4 of 4
(1,072 Views)