01-23-2012 03:39 AM
Hi,
I am making an exe file with a command line argument. I have no problem running the program via a command line. The problem is I want to call the same program several times with a different command line value. This is not possible unless I close the LV exe application.
In addition to this I do not want to run the same program in a multiple instances mode.
The main idea is to be able to send data between a VBA application than can call exe with a command line to a labview program that is constantly running in the background.
Thanks
01-23-2012 08:57 AM
Hi,
you cannot pass different arguments in such way to an exe which is already running. This is true for all executables, regardless of the used ADE (application development environment). So writing the same exe in ANSI C will create the same result.
The best way, if you want to stick to "not stop, but simply 'restart' application" approach is to implement some network protocol incorporating this feature. This will require some extension to your exe.
Another approach (closing exe for each call) could be to collect all calls (e.g. appropriate arguments) into a batch file. So each entry in the batch file calls the exe (with its arguments) and when the exe has finished, it will start again.
hope this helps,
Norbert
01-23-2012 10:01 AM
Thanks a lot!
Just before I give up I want to clarify my question:
I whish to send (and resend again and again) the same argument BUT with different value. Is this still (not) possible?
I wish to explain what I am trying to do:
I have a dynamic excel sheet which is in fact the main interface. It has macros, VBA code and controls. A labview application is running in the background and collecting data from some kind of DAQ. When certain event occurs it changes some values in the Excel file (by using ActiveX).
The problem is that from time to time the Excel has to send some data to the LV. (it is very simple data. It defines the mode of the DAQ and it uses an integer value from 1 to 4)
I have implemented this Excel->LV communication by using keystrokes. (The Excel is sending Keystroke to LV, each "Mode" has a different keystroke)
I was just looking for a neater way to this because my knowledge in VBA is so so good... (I guess the best way would be to create a dll from the LV panel. And call it from Excel?)