From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-19-2018 06:05 AM
Hello all
I have a situation where i have to run a .bat file to run an external program. As soon as the external program is run, it needs a trigger signal to be executed. Now , i need to get error outputs from System Exec. VI. ( because when an error comes in the external prgm, i need to see it )
I used a System Exec.vi to run .bat file with wait until completion = True. But then, the trigger VI is not executed.
with wait until completion = False, the .bat file is executed but then i dont get any error outputs.
is there any other way to run the batch file and to get standard outputs?
04-05-2018 09:16 AM
Hi Nghtcwrlr,
What you described below sounds like expected behavior of an environment.To achieve the logic you are expecting you would need to add some extra functionality in between that would store error like simple logging to file.
Would this work for you?
04-05-2018 09:22 AM
perhaps you can have something like a last line "SUCCESS" or "FAIL" that your .bat produces and then you can parse the output for this line
04-20-2018 01:07 AM
Hi jwscs,
Thanks for the tip. i added a " >>Output.txt" line in the .bat file and the outcome ( Error AND/OR SUCCESS) of the bat file is saved in to this txt file. After that i check the last line of the txt file and proceed further.