LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

exiting program after text file is created

i want to close labview using the exit.vi after the text file is created....also i am using c++ to execute the labview application is there anyway to make sure labview finishes its routine in c++ before i send the text file to a motion controler
 
the c++ routine to open the exe is
int main()
{
  system("start C:\\greg\\g.exe");
  return 0;
}
then the digital i/o command woudl execute
anyone know what i can do before sending a digital line to tell the motion control software to pick up the text file?
 
thanks
0 Kudos
Message 1 of 3
(2,556 Views)
the digital i/o has nothin to do wiht labview ...i am basically using c++ to control a frame grabber and saving a bmp then using labview to open that bitmap and process it and send it to excel.. thanks
0 Kudos
Message 2 of 3
(2,551 Views)
Given the amount of time it takes for LV to launch, you would probibly get better response time if you let the LV code run in a loop watching a predefined "input" directory for new files to process, and writing its results to a predefined "output" directory. The code that uses the text files would likewise sit in a loop waiting for a new text file to appear. (BTW: what will that other piece of code be written in?)
 
Alternately, if you don't like the idea of polling a directory, make the main LV application event-driven with a user event that performs the processing. Then create a small VI that you run from your C++ code that simply fires that user event.
 
Finally, given all the limitations of C++ perhaps the most straightforward solution might be to write the whole application in LV?
 
Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 3
(2,526 Views)