NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing parameters from a sequence to a callback

How can I pass parameters from a sequence to a callback sequence? I tried with a sequence call and passing parameters by reference but no success.

0 Kudos
Message 1 of 10
(4,268 Views)

What callback sequence are you trying to call?

0 Kudos
Message 2 of 10
(4,262 Views)

The DatabaseOptions callback. I need to disable logging to the database. But I figured out this callback is only for pre_UUT testing. I need something to disable database logging while I'm in my main client sequence.

0 Kudos
Message 3 of 10
(4,256 Views)

Ok, I'm confused - The DatabaseOptions callback is designed to do exactly that. If you add it to your test sequence (the process model client) to override the process model default settings, and execute it using an entry point, setting the Parameters.DatabaseOptions.DisableDatabaseLogging to True in your override DatabaseOptions sequence will disable database logging for the current execution.

 

Are you using something other than the Sequential Model?

 

-Jack

Message 4 of 10
(4,242 Views)

The entry point for the DatabaseOption callback is before the start of the client sequence.

0 Kudos
Message 5 of 10
(4,239 Views)

JoVMo,

 

The start of the client sequence file starts when you click the execution button.  There are callbacks all throughout the process model that could potentially be overridden by your client sequence file.  In fact the first one you can override is the Process Setup Callback.  So if you have that in your client sequence file then that will be the first thing executed in your client.  It is true that the MainSequence callback doesn't get called until well into the process model.

 

I think you need to be more clear on the behavior you desire.  Capt. Jack gave you the correct solution for what you asked.  However, I think what you want is to turn off the database options for one UUT and leave it on for another (depending on the test results).  Is this correct?  If you follow the advice of Capt. Jack you will disable it for everything. 

 

Can you be more clear in the behavior you want exactly?

 

Thanks,

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

I had the idea at execution the model starts first and then there is an entry point in the model to the client sequence file. And then from out the client sequence there is the callbacks to the model. But when I place a DatabaseOptions callback in the client sequence it get executed first.

0 Kudos
Message 7 of 10
(4,229 Views)

I think the fundamental question is: do you want to log results to a database at any point in your test sequence (MainSequence), or do you just want to disable database recording for an entire test sequence execution? The answer you seek depends on your answer to this question.

 

-Jack

0 Kudos
Message 8 of 10
(4,225 Views)

At the end of the test (after u get the Pass/Fail Banner) I want to decide if there needs to be logged to the database.

0 Kudos
Message 9 of 10
(4,218 Views)

Well, in that case you have two options:

 

1. Always log results to the database using the method I referred to earlier to enable logging, and when you get to the Pass/Fail banner in the PostUUT callback, decide there whether to keep or delete the database entries.

 

2. Disable database recording, then write a sequence that you call from the PostUUT callback that takes the Parameters.Result and writes the test results to your database depending on whether or not you decide you need them.

 

Hope this helps.

 

-Jack

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