cancel
Showing results for 
Search instead for 
Did you mean: 

control .exe with separate vi

michaelbails
Member

control .exe with separate vi

Hi,

 

I have a rather large .exe that was designed in LabVIEW (2009).  The .exe has a boolean start/stop to begin the simulation.  I'd like to create a separate vi that can drive this start/stop switch without having to rebuild the .exe with new code.  Basically, I want to start the simulation, wait some time, then stop the simulation, wait some time, repeat n iterations.

 

Any advice would be great.

Thanks.

3 REPLIES 3
srikrishnaNF
Active Participant

Re: control .exe with separate vi

Hi michaelbails,

  While building any LabVIEW exe,an option should be set/checked in MyAPPLICATION PROPERTIES/advanced section to allow the exe to accept all the parameters in a command line.If that is the case we can call that exe using system exec.vi and pass the parameters from another vi.If it wont accept any command line,then you can call the exe but you cant pass any command line from another VI.

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


michaelbails
Member

Re: control .exe with separate vi

Hi,

 

Thanks for the reply.  The LabView exe already exists (I didn't build it), but I want to drive an on/off switch.  Maybe I'm a bit confused by your response.  Could you elaborate a bit more.

 

Thanks in advanced.

 

Mike

Knight of NI

Re: control .exe with separate vi

Message contains an attachment

You would need to use the VI Server to do this. You will have to add a couple of lines to the application's .ini file to set the VI server port. You want to make this different from LabVIEW. In your VI you can open an application reference and then open a VI reference. See attached example.