01-28-2004 03:39 AM
01-28-2004 06:38 AM

Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.01-28-2004 07:46 AM
01-28-2004
11:32 AM
- last edited on
12-12-2024
01:03 PM
by
Content Cleaner
Hi Uwe!
I am used to seeing you on info-LabVIEW becuase I kunk on that list.
Yes, Ed's #3 is invalid for the reason you cited.
I do not think you should rule the VIT approach so quickly.
I have used VIT's to do this type of thing on a number of occations. Let me share my approach.
I will use an action engine that I use as a messanger to communicate Start/Stop/Exit messages to the VI instanciated from VIT's. It is a simple VI that uses the VI name to post messages from the daemon to the VI(VIT) and report status back.
How this works;
1) After the VI is instanciated using the invoke node "run do not wait" I use the reference to get the name of the VI that was created. I then use this name when I call my "messenger" to tell the VI to start.
2) The VIT's will first find out what their name is and then check my "messenger" to determine if they should start/stop....
3) The VI that launches the VIT's will use the "messenger" to check if the VI started OK. If not, I can abort and start the shutdown procedure and log an error after a resonable timeout period.
4) If the VI(VIT) started OK, the code will then procede to launch the next instance of that VIT.
5) When it is time shutdown the instanciated VI's, the same "messenger" is used to pass the shutdown message.
6) VIT's are coded to post their state (stopped, running, exit) to the mesenger.
7) When shutting down I can monitor if any of the instanciated VI's fail to shutdown and then log errors to give a clue as to which one was getting stuck.
The cool part of this approach is that all of the instanciated VI's show in the "hiarchy screen" and I can simply double click on the icon and get the FP open for that instance. This lets way I can do execution hightlighting to see what is happening without getting in the way of teh others.
Re#3;
I seem to remeber Rolf Kalbermatter lsiting this as with re-entrant VI's that he did not like.
Trying to repay you for "Info-LabVIEW" contribution,
Ben
Ben Rayner
Certified LabVIEW Developer
www.DSAutomation.com
01-28-2004 01:51 PM

Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.01-28-2004 02:36 PM