LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

Using cygwin commands from Lab view

Hi

 

I haveinstalled Cygwin successfully with all the required packages mentioned in thelink below. I have also changed the system variable PATH. However, I am stillunable to see the UNIX console using Lab view embedded module – Targets andDevices. (I have downloaded evaluation software of Labview embedded development module and Lab view 8.5). My intention of installing Lab view embedded module is to embed theunix console and talk to Cygwin through lab view and also execute cygwin commandsfrom lab view. I am open to any method which can do this.      

http://zone.ni.com/devzone/cda/tut/p/id/5412

 

Beforegoing further on this, I would like to know few things.

 

  1. Will lab view be able to execute cygwin commands from Lab view block diagram? Like running perl files.
  2. For example, I am running a perl script “ABC.pl”. I should be able give this perl file name (ABC.pl) as an input to the cygwin through lab view.
  3. This is my specific question – If in case ABC.pl is executed properly from lab view; in my case “ABC.pl” will need user inputs; this perl file can take three different inputs. Once I am inside ABC.pl, I need to Process or Execute or Quit. Let’s say, I want to Process – So, the command executed in cygwin through lab view should be “ABC.pl” followed by “Process”. Let’s say if want to “Process” and “execute” – So the command executed in cygwin through lab view should be “ABC.pl” followed by “Process” followed by “Execute”. My question is, can Lab view embedded module pulling the unix console can do this?
  4. I have tried the above mentioned option using “system executable” – It works perfect as intended except one issue. The issue is (I will use the above example again) – In the standard input of the “system executable” – I give the following command one after the other “ABC.pl, Process, Execute”. It runs all the three commands but the vi doesn’t stop, If figured out why that is – because it is still inside the perl file “ABC.pl” – Lab view is not coming out of the perl file, the command I have to use to exit from the perl file “ABC.pl” and to get to the command prompt of the cygwin is “quit” (one of the three commands accepted by ABC.pl”). Only if I give the “quit” command the lab view vi stops. If not, the vi continuously runs for an infinite time and never stops. Can lab view send internal commands of a perl file through cygwin (in my case ABC.pl)? Which means, I still should be able be inside the perl file and move to the next block of codes in lab view block diagram. Is that possible? If not, how can I achieve that - please suggest.
  5. For the “system executable” mentioned above, these are my connections and inputs – Command line – “C:\cygwin\cygwin.bat”, Wait until completion – “True”, Path – I kept this empty, Standard Input – “ABC.pl Process Evaluate Quit”. Please let me know whether this connections or inputs are right for this system executable.

 

Please letme know if you need a more detailed explanation on this. Also suggest somealternatives if I am not taking the right path.

 

Thanks

 

Shasi

0 Kudos
Message 1 of 2
(7,114 Views)

For using Cygwin in Lab view the only solution I found was to use "System executable" block in the lab view block diagram.

 

It is a system call from Lab view to the Cygwin.exe. In the “System executable” block in the block diagram of Lab view you just tell it what 3rd party software you want to call (here in my case is Cygwin) & give the path the Cygwin is installed.

Moreover, you can give the inputs the 3rd party software expects (here in my case for Cygwin it is *.pl scripts). Also, you can see the response of the Cygwin software in the lab view front panel after execution of the Perl script in Cygwin.

 

This makes the Lab view environment friendly enough to deal with GUI like power meters & fancy stuff in front panel (GUI) & use the Lab view “System executable” block for calling any 3rd party  application like Cygwin.

 

Thanks

 

Shasi

0 Kudos
Message 2 of 2
(6,450 Views)