<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Running a batch file with error output in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Running-a-batch-file-with-error-output/m-p/3769179#M1061973</link>
    <description>&lt;P&gt;Hello all&lt;/P&gt;
&lt;P&gt;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 )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used a System Exec.vi to run .bat file with wait until completion = True. But then, the trigger VI is not executed.&lt;/P&gt;
&lt;P&gt;with wait until completion = False, the .bat file is executed but then i dont get any error outputs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is there any other way to run the batch file and to get standard outputs?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Mar 2018 11:05:42 GMT</pubDate>
    <dc:creator>Nghtcrwlr</dc:creator>
    <dc:date>2018-03-19T11:05:42Z</dc:date>
    <item>
      <title>Running a batch file with error output</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Running-a-batch-file-with-error-output/m-p/3769179#M1061973</link>
      <description>&lt;P&gt;Hello all&lt;/P&gt;
&lt;P&gt;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 )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used a System Exec.vi to run .bat file with wait until completion = True. But then, the trigger VI is not executed.&lt;/P&gt;
&lt;P&gt;with wait until completion = False, the .bat file is executed but then i dont get any error outputs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is there any other way to run the batch file and to get standard outputs?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 11:05:42 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Running-a-batch-file-with-error-output/m-p/3769179#M1061973</guid>
      <dc:creator>Nghtcrwlr</dc:creator>
      <dc:date>2018-03-19T11:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Running a batch file with error output</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Running-a-batch-file-with-error-output/m-p/3777183#M1064558</link>
      <description>&lt;P&gt;Hi Nghtcwrlr,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you described below sounds like &lt;A href="https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PAHmSAO" target="_self"&gt;expected behavior of an environment&lt;/A&gt;.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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would this work for you?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 14:16:20 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Running-a-batch-file-with-error-output/m-p/3777183#M1064558</guid>
      <dc:creator>n_dakota</dc:creator>
      <dc:date>2018-04-05T14:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Running a batch file with error output</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Running-a-batch-file-with-error-output/m-p/3777191#M1064563</link>
      <description>&lt;P&gt;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&lt;/P&gt;</description>
      <pubDate>Thu, 05 Apr 2018 14:22:08 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Running-a-batch-file-with-error-output/m-p/3777191#M1064563</guid>
      <dc:creator>jwscs</dc:creator>
      <dc:date>2018-04-05T14:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Running a batch file with error output</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Running-a-batch-file-with-error-output/m-p/3783591#M1066834</link>
      <description>&lt;P&gt;Hi jwscs,&lt;/P&gt;
&lt;P&gt;Thanks for the tip. i added a " &amp;gt;&amp;gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 06:07:07 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Running-a-batch-file-with-error-output/m-p/3783591#M1066834</guid>
      <dc:creator>Nghtcrwlr</dc:creator>
      <dc:date>2018-04-20T06:07:07Z</dc:date>
    </item>
  </channel>
</rss>

