From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

system exec

I want to start an application with the system exec command.
Sometimes I get the error code 2:

"Warning 2 occurred at an unidentified location.

Possible reasons:

LabVIEW: Memory full.
or
NI-488: Write detected no Listeners."

I can not specify when this error occurs. But I can not believe that the
memory is full.
When I call the application (which I want to call from Labview) not with the
Labview system exec command but from a windows command input, it always
works fine. Besides the application - I want to call with the system exec -
is not very large.

Used system: LV 6.1, Win2000

Does anybody know this problem or is there another way to make a system
call?

Max

--
-> max.weiss@web.de / maximilian.weiss@celpat.de <-
-> Max Weiß * Eulenweg 2 *
76356 Weingarten * Germany <-
-> Fax/Voicebox: 01212-5-105-70-879 * Tel: +49 162 9114507 <-
-> ICQ: 123429315 * DB 8 MWE <-
0 Kudos
Message 1 of 11
(9,224 Views)
Are you running an application in 6.1 that you built in a previous version? The only instance I have ever heard of this happening in was when a LabVIEW user used a 5.1 VI in 6.02 and it gave this error. They ran a mass compile and I believe that this fixed the problem. If you have not already done so, make sure you do this.
J.R. Allen
0 Kudos
Message 2 of 11
(9,222 Views)
> Are you running an application in 6.1 that you built in a previous
> version? The only instance I have ever heard of this happening in was
> when a LabVIEW user used a 5.1 VI in 6.02 and it gave this error.
> They ran a mass compile and I believe that this fixed the problem. If
> you have not already done so, make sure you do this.
Definitely not - but I made a mass compile and nothing changed.

Max
0 Kudos
Message 3 of 11
(9,222 Views)
> I want to start an application with the system exec command.
> Sometimes I get the error code 2:
System Exec returns the windows error code - not the LabVIEW error code. The
Error 2 means, that the system cannot find the specified file.
So please check the path to the executable.

Martin
0 Kudos
Message 4 of 11
(9,221 Views)
> System Exec returns the windows error code - not the LabVIEW error code.
The
> Error 2 means, that the system cannot find the specified file.
> So please check the path to the executable.
Thanks a lot. I already wondered that I received the same error code 2 when
the file path is not valid. ;-/
Anyway, I still get this error but I think I have to check my file system.
I will let you know it when I have solved it. 🙂

Thanks a lot

Max


--
--
-> max.weiss@web.de / maximilian.weiss@celpat.de <-
-> Max Weiß * Eulenweg 2 * 76356 Weingarten * Germany <-
-> Fax/Voicebox: 01212-5-105-70-879 * Tel: +49 162 9114507 <-
-> ICQ: 123429315 * DB 8 MWE <-
0 Kudos
Message 5 of 11
(9,222 Views)
Have you solved this problem. I think I am having a similiar problem.
0 Kudos
Message 6 of 11
(9,222 Views)
Have you solved this problem. I think I am having a similiar problem.
0 Kudos
Message 7 of 11
(9,223 Views)
Yes i am getting the same error.  I tried running a visual basic program with the windows command line, it works fine.  When i run it in LabView i get the same error.  Does this have anything to do with the OS?  On the help page it mentions to put cmd/ c before the rest of the command line.  Without this i don't get an error, but the program doens't do what it is supposed to.

I am using LabView 8.0 and the program was coded in Visual Basic 5, compiled in 6.0. 

merci
0 Kudos
Message 8 of 11
(8,683 Views)

Hi teky,

Like you mentioned, to fix error 2 you saw you need to place a cmd /c  with the System Exec.VI The error normally occurs when trying to run a command prompt window specific command such as dir or set. Using the System Exec VI is not the same as typing a command into a command prompt window; instead it is like typing a command into the Run window.

To run command prompt commands from the System Exec VI, execute the command prompt window first with the following command:

cmd /c

For example, to run the DOS command dir, use the following string as your command line input into System Exec.vi:

cmd /C dir C:

So the real issue is how your program does not do what it is supposed to do.  You might post a little more information about what your trying to do and what the VB program is supposed to do.

Regards,

Steven B.

0 Kudos
Message 9 of 11
(8,660 Views)
I was getting the same error with system exec and none of the suggestions on this page or other ones I saw would fix the error. Though for me I noticed that the VI used to work, but had suddenly stopped working. The cause was that I had moved the folder containing my VI and my executable (same folder).


So I just recompiled the VI (make some minor change or use save as) and it started working again.
0 Kudos
Message 10 of 11
(8,441 Views)