06-28-2007 04:42 AM
That's why you build it into an executable. That way it's another process.
@Troy K wrote:
The only problem is that it won't jump in front of a modal window
06-29-2007 12:12 AM
Thanks to tst and Troy for the Task Managers. I cant try Troy's as I am running LV7.1. I tried tst's with an empty string wired to the machine name. It worked nicely. I guess if I build it into an executable then I need to wire localhost to the machine name. Without building this executable, I decided to run my while loop vi and test tst's Task Manager, I got into trouble again, as this time the while loop vi blocked the Task Manager. So I tried Troy's and Altenbach's tricks try to stop the while loop vi, I end up having the Task Manager getting infront of the while loop panel which didnt have the correct string wired to its machine name in the block diagram (i.e. not executable), and I cant stop either vi. But this time I dont have any unsaved work, so I can exit LV. My main mistake was having that pop up window in the while loop, so I got double trouble.
I am going to build an executable from Troy's Task Manager, then I should be safe. My hard learned lesson here is that nested while loops and pop up windows are truly bad combinations if you dont know the nested while loop behavior to start with. Thanks again for sharing the task managers!
06-29-2007 12:39 AM
Still got some problem with Troy's Task manager...I first built the executable with "localhost", it didnt detect any running VI including itself. Then I used an empty string wired to the machine name and rebuild the executable, the task manager is only detecting itself, not the running whileloop.vi. I must have missed something?
By the way I am using Aldenbach's trick in terminating the whileloop.vi. It worked very nicely and reliably.
06-29-2007 12:56 AM
06-29-2007 01:39 AM
You must have the Open App Reference. Once you build it, it becomes a seperate application (with a single VI, as you saw). To connect to running instance of LabVIEW, you have to do an Open Application Reference with Localhost (since you're on the local machine) and, equally important, with the right port number.
The default number is 3363, but to get it to work you need a couple of extra steps:
Once you set it up, it should work perfectly and forever. You should note, however, that was just a quick example. I would polish it up greatly if I were using it myself (which is probably not a bad idea, now that I think about it).
06-29-2007 07:36 AM
Yes building a task manager for labview is not hard and I have one myself (unfortunately company property) but I still dont know why there is not one built into labview saving us from reinventing the wheel. It would take their developers less than a day to do but would save thousands of hours for the users of labview.
Paul
07-01-2007 10:50 PM
07-01-2007 11:14 PM - edited 07-01-2007 11:14 PM
I can understand why tst suggested to compile it to an exe. It needs to be running as a different process to get in front of a modal window such as the prompt in your original while loop vi you posted in the first message in this thtread.
Then because it is an exe and a different process, it needs another way to access the uncompiled vi(s) running. (At least that is how I understand it.)
You do not need to disable your firewall, you just need to allow the VI TaskManager app to access the TCP port you assign for it through your firewall if it kicks up a stink.
Message Edited by Troy K on 07-02-2007 03:15 PM
Message Edited by Troy K on 07-02-2007 03:16 PM
07-01-2007 11:37 PM
Port filtering!
@BryanL wrote:Hi tst, since we are running the task manager on the local machine, how can we still need to use TCP and disable the firewall? I thought LV shall be able to do all this locally without involving any ports. Will this cause any security concern if the firewall is disabled and TCP port enabled?
07-02-2007 02:24 AM
@TonP wrote:
Another possibility is ActiveX, LabVIEW exposes it's VI server model as an ActiveX server. That can be accessed with LabVIEW (or any dev envirenment including Excel/word), and you shouldn't miss anything, it just sounds like a detour.
It used to be limited, but I believe it should have the VI methods in any case. The main reason I don't like this is that it's Windows specific. Using the VI server should work transparently across networks and platforms.
Bryan, as Troy suggested, when it's a sepaerate process (which is a good thing) it needs some way to talk to the LabVIEW process. This is done through TCP even in the local computer (the communication packets doesn't actually leave the local computer). As said, you don't need to disable the firewall, just to allow the task manager to talk on the port it wants (and to enable the VI server's TCP access in LV).