willy Posted February 6, 2009 Report Share Posted February 6, 2009 G'day All. :-) I have struggling with a strange problem lately. I am using System Exec.vi to call executable file "conversion.exe. " It always return the following message: Error 2 occurred at System Exec.vi. Command was "CalConversionDNC.exe "C:\test" "C:\test\test.ini" 1 Possible reason(s): LabVIEW: Memory is full. ========================= NI-488: No Listeners on the GPIB. However, when I run this via dos command line. It works fine. Could any one here help me on this? Thank you for your kindly help indeed. Take care William Quote Link to comment
jg69 Posted February 6, 2009 Report Share Posted February 6, 2009 Perhaps it helps to first call the "DOS-Command-Box". Change the Command line that you send to the System Exec to something like: cmd.exe "CalConversionDNC.exe "C:\test" "C:\test\test.ini" 1" Jens Quote Link to comment
Peeker Posted February 6, 2009 Report Share Posted February 6, 2009 My experience is that the SystemExec.vi behaves rather like the windows "run" than like the DOS prompt. Adding cmd.exe before might help, I haven't tried that. Another solution that I have used from time to time is to enter all the commands in a batch (*.bat) file and then calling that file from SystemExec.vi instead. It gets a bit annoying though if you have some sort of dynamic input, then you have to create and save the batch file programatically before running it. Quote Link to comment
willy Posted February 6, 2009 Author Report Share Posted February 6, 2009 Thank you all. I have gone to the easier and quicker way according to the suggestion 1. I add "cmd.exe" to input line of System Exec.vi. and it works. Originally, I added "cmd.exe" to command line. However, "test.exe is not called. Once again, than you peeker and jq69. Really appreciated your time and great help. Best regards, William Quote Link to comment
Rolf Kalbermatter Posted February 10, 2009 Report Share Posted February 10, 2009 QUOTE (Peeker @ Feb 5 2009, 06:21 AM) My experience is that the SystemExec.vi behaves rather like the windows "run" than like the DOS prompt. Adding cmd.exe before might help, I haven't tried that. Another solution that I have used from time to time is to enter all the commands in a batch (*.bat) file and then calling that file from SystemExec.vi instead. It gets a bit annoying though if you have some sort of dynamic input, then you have to create and save the batch file programatically before running it. That is correct. SystemExec launches a process and nothing more. If you want to have DOS box behaviour you need to launch the DOS command prompt and pass the commands you want it to execute as command line parameters. Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.