<?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 Re: calling perl script from labview in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607793#M283003</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Your picture did no show up in my display for whatever reason. I looked at some old code that worked on Labview 6 on Win 98. I do not know if this will help, we invoke the perl script using perl d:\... This generated a separate window that a user could interfae with.&lt;/P&gt;
&lt;P&gt;We are using active perl at this time.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Nov 2007 16:14:15 GMT</pubDate>
    <dc:creator>Joseph_Loo</dc:creator>
    <dc:date>2007-11-07T16:14:15Z</dc:date>
    <item>
      <title>calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/605287#M282002</link>
      <description>&lt;DIV&gt;Hi,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I have a perl script and I would like to call the perl script from Labview&lt;/DIV&gt;
&lt;DIV&gt;anyone can help me with that?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I used system exec but I'm getting an error. &lt;/DIV&gt;
&lt;DIV&gt;Anyone have a working example like calling a simple perl script from Labview.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks&lt;/DIV&gt;
&lt;DIV&gt;SL Ong&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Nov 2007 11:20:44 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/605287#M282002</guid>
      <dc:creator>SL_Ong</dc:creator>
      <dc:date>2007-11-02T11:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/605323#M282015</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;Did you protorype the ssytem exec on the command line prompt to verify that the command is the correct system exec?&amp;nbsp; What error do you get?&amp;nbsp;</description>
      <pubDate>Fri, 02 Nov 2007 13:15:59 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/605323#M282015</guid>
      <dc:creator>falkpl</dc:creator>
      <dc:date>2007-11-02T13:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/605380#M282037</link>
      <description>&lt;DIV&gt;This is the error that I get&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;GetConsoleMode failed, LastError=|6| at C:/Perl/site/lib/Term/ReadKey.pm line 264.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;but it's ok when I run at the command prompt.&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Nov 2007 14:40:38 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/605380#M282037</guid>
      <dc:creator>SL_Ong</dc:creator>
      <dc:date>2007-11-02T14:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/605473#M282081</link>
      <description>Could you post the actual command are you giving System Exec?&amp;nbsp; &lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Nov 2007 15:53:49 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/605473#M282081</guid>
      <dc:creator>cmpowell</dc:creator>
      <dc:date>2007-11-02T15:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/605668#M282163</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Some things to consider (I dont do perl) the error seems to be related to not running in a console.&amp;nbsp; Try using wait for completion = True and wire up the standard input.&amp;nbsp; This is just a guess since I dont know anything about the script.&amp;nbsp; I have had some decent luck with the command line prompt in the past.&lt;/P&gt;
&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2007 20:34:18 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/605668#M282163</guid>
      <dc:creator>falkpl</dc:creator>
      <dc:date>2007-11-02T20:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/605690#M282172</link>
      <description>&lt;DIV&gt;Readkey is used for simple terminal control. Evidently when labview takes over control it removes some of the controls the perl script needs to control the keyboard. I suggest you start a dos session that invokes the perl script. This in turn should open up a separate dos window that the perl script can grab control of.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Could you specify the string you used when you invoke the perl script.&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Nov 2007 21:37:33 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/605690#M282172</guid>
      <dc:creator>Joseph_Loo</dc:creator>
      <dc:date>2007-11-02T21:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/606008#M282266</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thanks for the reply from everyone.&lt;/P&gt;
&lt;P&gt;The attached is my code to call Perl script and after calling this, I need to query the Perl Script by sending command like @help. Do they have a way to query the Perl script by sending command like @help and get&amp;nbsp;the return result.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think Joseph you are right, but how do I get the return result if I invoke it in a separate dos session.&lt;/P&gt;
&lt;P&gt;SL Ong&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/007604ec92ba9afad088b2a41ca63b16af6ed45f/687474703a2f2f75732e6d67322e6d61696c2e7961686f6f2e636f6d2f79612f646f776e6c6f61643f6669643d496e626f78266d69643d315f333130333034395f4141777876733441414e557a5279796d6e5135763677676b6e5638267069643d3226746e65663d2659593d31313934323437363233363536266e657769643d3126636c65616e3d3026696e6c696e653d31" width="457" onload="(typeof theMainWindow != 'undefined' &amp;amp;&amp;amp; theMainWindow.shrinkToFitWidthWrapper( this ));" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2007 07:37:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/606008#M282266</guid>
      <dc:creator>SL_Ong</dc:creator>
      <dc:date>2007-11-05T07:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607362#M282801</link>
      <description>&lt;DIV&gt;Hi SL Ong,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks for contacting National Instruments.&amp;nbsp; That definitely sounds like a good idea and path that you are heading down right now.&amp;nbsp; I am not much of a Perl expert either, but I agree with what was said earlier in this thread where setting the "Wait for Completion" input to True is a good way to go when using System Exec.&amp;nbsp; I hope you are able to get some more input about the actual Perl script soon and good luck with your application!&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Nov 2007 22:25:01 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607362#M282801</guid>
      <dc:creator>NoahR</dc:creator>
      <dc:date>2007-11-06T22:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607659#M282938</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;Try piping the results to a file. When it completes, read the results from the file.</description>
      <pubDate>Wed, 07 Nov 2007 14:08:51 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607659#M282938</guid>
      <dc:creator>Joseph_Loo</dc:creator>
      <dc:date>2007-11-07T14:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607749#M282980</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Yeah, I already tried that but I can't get the script working when called from Labview,&lt;/P&gt;
&lt;P&gt;it still give out the error. Anyway, can National Instrument develope something to interface with a Perl script like&lt;/P&gt;
&lt;P&gt;a Mathlab node? It could help a lot of people out there, I guess.&lt;/P&gt;
&lt;P&gt;But, at the moment, how can I get the script run in command prompt but with Labview running at the background&lt;/P&gt;
&lt;P&gt;emulating the keyboard and retrieving the command prompt output? Is that possible?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2007 15:34:40 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607749#M282980</guid>
      <dc:creator>SL_Ong</dc:creator>
      <dc:date>2007-11-07T15:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607793#M283003</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Your picture did no show up in my display for whatever reason. I looked at some old code that worked on Labview 6 on Win 98. I do not know if this will help, we invoke the perl script using perl d:\... This generated a separate window that a user could interfae with.&lt;/P&gt;
&lt;P&gt;We are using active perl at this time.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2007 16:14:15 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607793#M283003</guid>
      <dc:creator>Joseph_Loo</dc:creator>
      <dc:date>2007-11-07T16:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607813#M283008</link>
      <description>Hi,&lt;BR /&gt;Could you attach the picture you posted earlier?&amp;nbsp; It does not show up properly now.&amp;nbsp; You should be able to LabVIEW to type keystrokes and &lt;A href="http://digital.ni.com/public.nsf/allkb/15D9EAAE7AF1132586256FB70066E0DD?OpenDocument" target="_blank"&gt;here&lt;/A&gt; is an article that discusses it.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Nov 2007 16:32:44 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607813#M283008</guid>
      <dc:creator>Eric A.</dc:creator>
      <dc:date>2007-11-07T16:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607861#M283014</link>
      <description>&lt;SPAN class="noindex"&gt;Your error is a perl error, not a Labview error and is caused my redirecting output from the perl script to somewhere other than the STDOUT (using Activestate, the windows cmd window)&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;&lt;B&gt;GetConsoleMode failed, LastError=|6| at C:/Perl/site/lib/Term/ReadKey.pm line 264.&lt;BR /&gt;&lt;BR /&gt;&lt;/B&gt;&lt;/I&gt;Could you post both your perl code and the block diagram of how you call the script from System Exec, depending on what your doing the problem can probably be solved by removing the refernece in the perl code which cause output to go somewhere other than STDOUT.&amp;nbsp; Alternativly it might be possibe to call your script in a different manner than the standard method using cmd /c c:\perl\xxxx.pl in System Exec.&lt;BR /&gt;&lt;BR /&gt;Good Luck&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;&lt;B&gt;&lt;/B&gt;&lt;/I&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Nov 2007 17:41:00 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607861#M283014</guid>
      <dc:creator>cmpowell</dc:creator>
      <dc:date>2007-11-07T17:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607960#M283053</link>
      <description>&lt;B&gt;Forget my last post&lt;/B&gt;, I'm sorry I needed to do a little more research and read your problem more carefully, I think your error is being caused because System Exec wants to read a command, and have the executable return an output throug through STDOUT.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;Your program waits for a keyboard input from you correct?&amp;nbsp; Could you remove the ReadKey module refs from you code and programatically pass the data you need to pass to perl in your&amp;nbsp; pl script itself? &lt;BR /&gt;&lt;BR /&gt;Again my apologies, for jumping the gun with my last post,&amp;nbsp; too little research, too little time,&amp;nbsp; I use failry simple perls scritps (UTM to Lat Lon conversion, and some astro stuff) that require no input from the keyboard and they play nicely with Sys Exec.&lt;BR /&gt;&lt;BR /&gt;BTW if I'm off base please let me know but the community as a whole would probably be able to help more if you post specifics, i.e. source code and/or screen shots.&lt;BR /&gt;&lt;BR /&gt;Good Luck&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Nov 2007 20:33:00 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/607960#M283053</guid>
      <dc:creator>cmpowell</dc:creator>
      <dc:date>2007-11-07T20:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/608195#M283135</link>
      <description>&lt;DIV&gt;Hi all,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Attached the image for your reference.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Nov 2007 07:02:56 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/608195#M283135</guid>
      <dc:creator>SL_Ong</dc:creator>
      <dc:date>2007-11-08T07:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: calling perl script from labview</title>
      <link>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/608748#M283346</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;I wired up a perl script using active state 5.8.8 822 build. If I just execute the script via command test_err_mesg.pl, it generates the following 2 types of error code 3 (something to do with a GPIB error) and 193 (makes more sense). The code 3 appears before I saved the vi and 193 after I saved the VI.&lt;/P&gt;
&lt;P&gt;I find that if I execute perl test_err_mesg.pl&amp;nbsp;it will open a menu and allow the perl script to run properly, note wait until completion is set to false.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Nov 2007 22:29:26 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/calling-perl-script-from-labview/m-p/608748#M283346</guid>
      <dc:creator>Joseph_Loo</dc:creator>
      <dc:date>2007-11-08T22:29:26Z</dc:date>
    </item>
  </channel>
</rss>

