Jump to content

Using System Exec.vi


Recommended Posts

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

Link to comment

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.

Link to comment

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

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.