10-20-2008 04:27 AM
Hi Chris,
I have tried to build the system as you have but mine seems to run differentyl to how your describing.
Could you possible send me your code,
What are you trying to achive?
Many thanks,
10-20-2008 06:05 AM
Hi J power, I've attached my code again though it is the same as last time. My overall project is to use labview to write tcl scripts and then open NS2 to run the scripts automatically.
For now im just trying to see if it can open cygwin from labview and that is where I get my problem. I dont know system exec.vi seems to open and close it repatedly.10-21-2008 06:43 AM
Hi, I thought I would attach the error that its giving as well. It claims that it cant locate the the file I want it to run. protocol.tcl is found in C:\cygwin\tclprojects\protocol.tcl
If I run a hello.c program then it says the same thing. I saved hello.c in C:\cygwin\hello.c same directory as cygwin.bat
10-22-2008 06:31 AM
Hi Dave,
Looking further into the problem, and I am wondering if:
1) Have you tried to run the command in the command prompt window to see how runs over there?
2) Another thought is how exactly do the commands execute in the batch file itself. Have you tried running the System Exec.vi with another batch file (something that you can create by yourself)?
Regards10-24-2008 06:55 AM
10-27-2008 05:51 AM
Hi Dave,
So you get the desired results when the comand is ran in the comand prompt, so the files are working as you would like them to.
Did you manage to look at the script of the batch file and understand what steps it is taking?
As I have been searching for your soultion a came across some other forum posts performing slightly similar applications, have you tried doing a different command or function to see if it working properly?
http://forums.ni.com/ni/board/message?board.id=170&message.id=154928&query.id=41887#M154928
Maybe check the hyperlink within the posts:
Here is the main dirctory for all of the Cygwin related posts:
http://forums.ni.com/ni/search?submitted=true&q=cygwin
Regards
10-28-2008 05:19 AM
Hi Dave,
I have been looking at the problem again and I have got the cygwin bash shell to open and stay open (see attachment).
This worked because I deleted the speech marks that surround the file path they were what I found to cause my command prompt to close rapidly.
Now you want to open and edit a script, the only way I can think of achieving this it to write to a txt file in LabVIEW (fully writing all the commands you need to execute) and then read the txt file into cygwin, letting it run through.
I think the other thing is that LabVIEW and cygwin run on separate threads within your processor so they will possible work in parallel rather that a series sequence, buy this I mean that once LabVIEW executes the cygwin command LabVIEW wont hand over the total control of the processor to cygwin and wait till its finished, it will run and then carry on doing what it is doing independently, and if that is only one item of code then this is another cause for the system to shutdown so quickly.
Again hope this helps.
Regards