newLV Posted October 30, 2007 Report Share Posted October 30, 2007 Hi, everybody, I am a new user of LV and my present version is LabVIEW8.5. Maybe it is not very proporiate to ask these kind of "easy" question on this forum. But I think you guys still can help me out. I need to call an executable file from Labview, let's say MS word, and then open a doc file automatically. I tried the 'system exec.vi' function with executable path in the command line. The result is the function keep opening the MS word many times until I stop the execution. There are a few questions in my mind: 1, how to make it just open once. 2 How to let LV know that I close the executable file . 3 How can it automatically open a program file when the executable is open? Online waiting, please help! I really appreciate it! Quote Link to comment
Karissap Posted October 30, 2007 Report Share Posted October 30, 2007 The exec.vi doesn't keep opening the application, check that you haven't put it in a loop. You can also use activex methods to open word, do document control and close it afterwards. There are examples included in LabVIEW that show how to do this. Search for excel or word. There's also the Report Generation Toolkit from NI. This file might also help word97_activex.zip It should still work for a newer version of word. Quote Link to comment
newLV Posted October 31, 2007 Author Report Share Posted October 31, 2007 QUOTE(Karissap @ Oct 29 2007, 03:35 PM) The exec.vi doesn't keep opening the application, check that you haven't put it in a loop.You can also use activex methods to open word, do document control and close it afterwards. There are examples included in LabVIEW that show how to do this. Search for excel or word. There's also the Report Generation Toolkit from NI. This file might also help http://zone.ni.com/devzone/cda/epd/p/id/992' target="_blank">word97_activex.zip It should still work for a newer version of word. Thank you for your answer. I ran the example "calling System Exec.vi" come with this version. Once it is executed, the notepad will be open hundreds of times until my computer is out of memory. What I can do is to end the LV task from the task manager. The application I need to call from LV is Honeywell HC900 Utility. I can open the Utility from LV now, but don't know how to automatically open the utility configuration file. Quote Link to comment
Karissap Posted October 31, 2007 Report Share Posted October 31, 2007 The example "calling System Exec.vi" should only open notepad once. It does on my computer. Are you sure you pressing the run button in the toolbar and not run continuously? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.