NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Message popup with response string pops up twice

Hi,

I have a (really small) problem but it drives me gracy... In Teststand 2016 I used the message popup step with a response string and one single "OK" button,... everything works fine, the only problem is that this popup window pops up twice (independent if I change the default answer or not). There are not many options I can choose with one button: The "cancell" button is disabled (no button) and "Activate Control" and "Default Button" is set to Button1.

 

Any Ideas?

 

Thanks a lot.

Matthias

  

0 Kudos
Message 1 of 8
(3,272 Views)

Which process model are you using?  It sounds like you have multiple threads running and they are both calling that code.

 

Also, do they pop up at the same time?  Or does one pop up and then the other?

 

If you copy it to a new sequence file by itself and run it does it exhibit the same behavior?

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 8
(3,257 Views)

Hi jiggawax

 

Thanks for your answer. I used the default Sequential Model and there is only one single thread.

The second popup window pops up after the first one is closed. Sorry for that missing information 🙂.

 

I copied this step into a new sequence and got an error for the post expression (that’s normal as I did not copy the corresponding variables.)

Without that post expression the window pops up only once, that’s ok. Perhaps it is the post expression which gives the user a retry ?!?!?

 

The Post Expression was:

StationGlobals.targetSWArray[Locals.LeafIndex] = Step.Result.Response,

StationGlobals.targetSW = Step.Result.Response

 

So I simply tried to copy the Step variables out into locals, here in the new sequence:

Locals.unused1 = Step.Result.Response,

Locals.unused2 = Step.Result.Response

 

With that the popup window pop up only once in the new sequence!!! I also tried to use an invalid index (here zero) in the new sequence

 

StationGlobals.targetSWArray[0] = Step.Result.Response,

StationGlobals.targetSW = Step.Result.Response

 

but the result was not a second popup, it was an error message (and that’s OK).

And one important thing:  My Message Popup Step is in the Report Options Callback, this is an important difference to the "new sequence" where it is in "main" in the "main sequence". 

 

So still I have no solution for my sequence, but at least I know that it is generally working :). 

 

Best regards

Matthias

0 Kudos
Message 3 of 8
(3,247 Views)

How many plugins are turned on for result processing?  My guess is that the Report Options Callback is being called twice.

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

Hi Jigg,

Thanks for your answer! Yes that was also the idea I had today,... but the behaviour is the same even if I disable the second report in "Result Processing". Is there any other possibility to cancel the generation of the second report?

 

Best regards

Matthias

 

 

0 Kudos
Message 5 of 8
(3,235 Views)

Disabling it should stop it from calling that callback.  You can put a breakpoint by the message popup and look at the call stack.  This will show you who is calling that callback.  This will help you figure out who needs to be calling it.  You can precondition the step to only popup if the plugin is named a certain thing.

 

Something like: Parameters.ModelPlugin.Base.SequenceFileName == "NI_ReportGenerator.seq" or something else that differs this plugin set from another one.  Like look to see if it is HTML vs XML or ATML, etc...

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 6 of 8
(3,230 Views)

Hi Jigg,

thanks for your help and sorry for the late response, there were technical issues to be solved by NI before I can reply now....

Disabling did NOT stop from calling that callback. But I was able to precondition the call of my popup so it pops up only once. For now it is OK, but I'm still thinking of a better solution (a boolean variable called: alreadySet, which is set to true in the first call and avoids the call of the popup later, independent of the order of "html","xml","....", reports)....

 

Best redgards

Matthias 

0 Kudos
Message 7 of 8
(3,185 Views)

Hi Jigg,

another (better) solution would be to use a callback which is called only once before the report is started. As we do SW Tests, the UUTLoop is not used (entry point: single pass); What about the ModelPluginOptions? Is it called once or twice when 2 reports are written?

 

Thanks

Best regards

Matthias

0 Kudos
Message 8 of 8
(3,182 Views)