NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Handle the EndExecution event

Hi all,

i'm creating a custom OI and i would like to handle the EndExecution event in an event case structure, exactly in the same way as the ExitApplication event is handled in the Simple OI example.

 

I succeeded creating the callback VI but i don't know how to register the event in order to manage it in an event case.

In the attached image you can see related block diagram.

 

Hope someone could help me!

Message Edited by aRCo on 09-15-2009 03:17 AM
0 Kudos
Message 1 of 5
(4,206 Views)
Any clue? Plz... Smiley Wink
0 Kudos
Message 2 of 5
(4,176 Views)

Ciao aRCo,

 

I started from the UI distributed with TestStand (National Instrumenys->TestStand->User Interfaces->LabVIEW->Source code) and made some changes to add the end of execution event.

 

I'm attaching some screenshot of how I  succeded in this operation.

My callback VI simply opens a pop up after the execution of a sequence file.

 

Hope this can help.

 

Ciao,

 

Andrea 

Andrea N.
Principal Applications Engineer - Semiconductor EMEA
National Instruments Italy
Certified LabVIEW Architect - Certified TestStand Architect
Download All
Message 3 of 5
(4,163 Views)

So simple?!? Thus the only thing i have to do is to put some code into the callback VI that i've already created... Woooowww!

 

And what about error handling? Can i treat the callback VI as a normal VI and put into it an ErrorIn and an ErrorOut cluster in order to handle errors? 

0 Kudos
Message 4 of 5
(4,144 Views)

No you cannot treat error in and error out in the callack VI because if you change the prototype of the VI (the connector pane) by adding th error in and error out terminals you will get an error and the VI won't be a callback VI any more.

 

So what you have to do is to create a user event and fire the error event inside the callback VI. This event will be then managed by an event structure that you'll put in the main VI. 

 

You can take a look at this example about creating user events:

 http://decibel.ni.com/content/docs/DOC-5404

 

Your VI will be a little bit different because the data type of the event is the error cluster, and then you will fire the event in the callback VI and manage it in the Main VI. You will need to pass the user event reference to the callback VI as a parameter and then you're all set.

 

Have a good week end,

 

Andrea 

Andrea N.
Principal Applications Engineer - Semiconductor EMEA
National Instruments Italy
Certified LabVIEW Architect - Certified TestStand Architect
0 Kudos
Message 5 of 5
(4,115 Views)