NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Excepcion ocurred in TSUI.IApplicationMgr

Hi I don't really understand why this happens. 

I can only use one method/property Node for ApplicationMgr at the same time in one VI?

Here I have the 3 main changes I made and maybe I'm not closing a reference properly or something.

 

Has anyone an Idea?snippet1.png

 

snippet2.png

 

snippet3.png

 

 

Thanks.

Regards.

=======
My Channel: https://www.youtube.com/@LV_Lab

0 Kudos
Message 1 of 12
(3,925 Views)

Why are you closing your application manager twice?  You can only have 1 application manager per UI.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 12
(3,901 Views)

Ok I get it. Thanks.

How can I implement the functionality of the Start and the OpenSequenceFile in one Node?

The thing I do with this part of the code is to load the File and then Open it automatically. Is there like an alternative?

=======
My Channel: https://www.youtube.com/@LV_Lab

0 Kudos
Message 3 of 12
(3,893 Views)

was..PNG

 I don't understand it ver well, here are 4 of them in a row. Why can you have here all the nodes you want but not in the main VI?

 

=======
My Channel: https://www.youtube.com/@LV_Lab

0 Kudos
Message 4 of 12
(3,887 Views)

Hi, i found another way to do what I wanted to do without using 2 Application Manager Control Nodes.

As usual it works fine the first time I execute it. But I get the same error dialog after I execute it for the second time.

 

I tried to make it the cleanest possible and here are the changes are made.TestOI.PNGTestOI_2.PNGTestOI_3.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

And the EndExecution Callback is this:

 

 

EndExecution_CB.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

What am I doing wrong? Smiley Frustrated

=======
My Channel: https://www.youtube.com/@LV_Lab

0 Kudos
Message 5 of 12
(3,880 Views)

To start a new execution you can put a NewExecution invoke node on the block diagram. This is an engine method.

 

It takes the sequence file ActiveX reference as parameter. and you have to specify the sequence to execute.

 

If you want to get the sequence file from the Callback VI you should add a load reference to it, because otherwise the engine unloads it from cache. But you can start it there directly.

Message 6 of 12
(3,876 Views)

*If you want to get the sequence file from the Callback VI you should add a load reference to it, because otherwise the engine unloads it from cache. But you can start it there directly.*

How can I do that, with a Global/Local Variable?

 

Do you have an Idea regarding the problem " Excepcion ocurred in TSUI.IApplicationMgr" ? 

 

Regards

=======
My Channel: https://www.youtube.com/@LV_Lab

0 Kudos
Message 7 of 12
(3,870 Views)

Why aren't you retrieving the sequence file name not directly from the clientfile object? You do not need to close the execution reference in your callback vi, since it is closed by the engine after the vi is finished.

 

As 

 

0 Kudos
Message 8 of 12
(3,868 Views)

Thanks a lot! You gave me my fiirst Kudo!

 

To use the new execution invoke node you have to retrieve an engine reference. Im not using variables at all and I don't do this for a reason. But you can get the engine from a application manager reference with a TSUI.IApplicationMgr,GetEngine invoke node. The best is to keep it until your application shuts down and then close it. You can keep it also in the UIData Cluster. Since this is a TypeDef Control it will be easy to modify.

 

You even can pass the reference to the callback vi if you define a cluster for the user parameter.

 

The exception can have multiple reasons. Do you still have two application manager controls on your front panels? Do you have an error number or desription?

Message 9 of 12
(3,864 Views)

If you open a sequence file using GetSequenceFileEx then you need to close it using ReleaseSequenceFileEx.  There is more in the help on this: https://zone.ni.com/reference/en-XX/help/370052R-01/tsapiref/reftopics/engine_getsequencefileex_m/

 

Also, I've been watching your posts.  It looks like you simply want to open a sequence file, execute it and close the UI when the file is completed.  You can just use the simple out of the box TestStand UI (no changes) and pass command line arguments.  This may be your simplest solution.  https://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/startup_opt/

 

I've attached a simple example of how to do this.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 10 of 12
(3,853 Views)