NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Callback Hang

Hi,

I'm creating custom operator interface. I want to terminate all executions when user clicks exit button without asking him for the decision (terminate/abort/kill etc). So I created event callback for "exit button click" (using Register Event Callback primitive).

Now when I trying to run it it always hangs (works only if highlight execution is enabled).

Callback content is shown in the snippet below. I'm terminating all executions and then waits until all executions completes its terminating. After that I'm shutting it down.

I'm aware of the whole thing of "use other 2 execution system" and I tried it in different ways but without any success... and still I'm not sure when I need to use different execution system and how. For example how can I know that TS method is synchronous?

 

Please help 🙂

 

Exit Hang.png

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 1 of 3
(3,463 Views)

Using Desktop Execution Trace Toolkit I can see that it hangs on the first Property Node.

 

PROP.PNG

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 2 of 3
(3,437 Views)

It seems that it initially was hanging because I changed "User Parameter" typdef and registartion of event callbacks needs strict VI reference.

 

Now, it is working, but still not in a way I would like it to work.

 

If I run this code my Executions NumIncomplete in a loop doens't decrements (refreshes) 😞

 

Exit Loop.png

 

exit loop trace.PNG

 

 

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 3 of 3
(3,422 Views)