LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I start an other program for example all 3 Minutes

I realised a control monitor on Labview, now I want that all 3 Minutes an Exe-File with an presentation starts an then the control go back to Labview again. Is that possible and how can I do that
0 Kudos
Message 1 of 13
(3,343 Views)
Possibly. It all depends on what the exe program is and what (if any) interface the vendor has provided. If it's something like PowerPoint or Media Player with ActiveX properties and methods, then you can call call those from LabVIEW and tell the exe to start and stop when you want. There's a shipping example that runs a PowerPoint presentation and a lot of other ActiveX examples available for download. If you need details, reply back with the actual name of the program you're trying to control.
0 Kudos
Message 2 of 13
(3,343 Views)
Thank you very much, you have right I have to control a PowerPoint application. I'm a beginner in Labview and if you could tell me any details it would be helpfull. You also said there are examples for download, were can I get those.

Thanks for your help
Stevi
0 Kudos
Message 3 of 13
(3,343 Views)
There's one on your disk drive if you installed the example programs. Go to Help>Find Examples. Click the Browse tab and open Communicating with External Applications>ActiveX>General>Slideshow.vi. At NI Developer Zone, a lot of ActiveX examples and info can be found here.
0 Kudos
Message 4 of 13
(3,343 Views)
the sliewshow.vi would be a good example to solve my problems, but I think it doesen't run correctly. If run the vi it tell's me to open a *.pps that's ok and then it open's PowerPoint and now it's finish. The vi don't run the slideshow and don't go back to Labview. What are I doing wrong?
0 Kudos
Message 5 of 13
(3,343 Views)
Hi stevi,

I have tested the example with Office 97 and the slideshow did run. After the presentation Power Point was left open. This is how the example is build. To close Power Point you need to insert a Invoke Node and a Automation Close at the end of the chain. Get the reference wire from the first Property Node named _Application and the error in from the Automation Close which is connected to the error cluster named error out. Choose the method Quit for the new Invoke Node.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 6 of 13
(3,343 Views)
thanks for your help,
Now I have tested slideshow.vi on an other Computer and it run, maybe it have problems with different Office Version. But now I have another Problem I wanted that the control go back when my presentation is finished. I have made the changes you said me, but it close the PowerPoint suddently after it have open and not at the end of the presentation. An other things is I wanted that the show start all 15 minutes, how can I program that. Labview could not wait the hole time because the programm have other things to do at this time, when PowerPoint didn't run.
Can you help me again,
thanks a lot
Stevi
0 Kudos
Message 7 of 13
(3,343 Views)
Dear stevi,

your are right. In my test the slideshow VI was closing PPT when the VI changes from running to edit mode when it was ready. If I let the VI run PPT was not closed. The reason is that three references will be opened. 1 for the application, 2 for presentations 3 for the document itself. The example closes only reference 3 and I said to you to close reference 1. Reference 2 was open so PPT would not stop.

I have corrected this. Also I made three VIs handling the sheduled task. Start_PPT_Shedule will start a VI handling the shedule for the presentation. Abort_PPT_Shedule will stop the shedule for the presentation. Shedule_PPT will start PPT regularily. Since the last VI will go to sl
eep using the "Wait until next ms multiple" function you need to abort the VI.

You can enhance this in several ways. You can do detailed error checking. You can add controls for time and path to Shedule_PPT and set them in Start_PPT_Shedule with "Set control Value" before the "Run VI". You can add synchronisation to avoid aborting during the presentation using a functional global.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 8 of 13
(3,343 Views)
Dear Stevi,

corrected VIs. They will work if you will not preload the VIs in the development environment.

If you would change the MS Office version you have to connect the slideshow_close_PPT VI new to the version you have. You can do this by a right click on the PowerPoint._Application control on the front panel and then select VI server class.

Unfortunatly LV stores the class id and not the application name. The application name is constant but the class id changes with the MS Office version.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 9 of 13
(3,343 Views)
Dear Waldemar,
thank you very much for your help and time you have spend on it. Now I can solve my problem.

stevi
0 Kudos
Message 10 of 13
(3,163 Views)