From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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 Problem Under NT 4.0

NG,

Wanted to see if anyone had seen this before: Trying to call
SystemExec.vi(?), the labVIEW provided vi that executes a system command
line, from a subVI. If the subVI is run as a standalone VI, i.e. opened
from the launch window, it runs flawlessly. When the subVI is called by
its top level VI it consistently generates Error 42, labVIEW generic
error. Hit National Instruments website, incorporated their suggestions
and talked with customer support, incorporated their suggestions. No
difference.

Comments?
--

Frank Lane
(256)961-4677
lanef@boris.msfc.nasa.gov
0 Kudos
Message 1 of 3
(2,208 Views)
> Wanted to see if anyone had seen this before: Trying to call
> SystemExec.vi(?), the labVIEW provided vi that executes a system command
> line, from a subVI. If the subVI is run as a standalone VI, i.e. opened
> from the launch window, it runs flawlessly. When the subVI is called by
> its top level VI it consistently generates Error 42, labVIEW generic
> error. Hit National Instruments website, incorporated their suggestions
> and talked with customer support, incorporated their suggestions. No
> difference.

You may want to set a breakpoint on the VI or push the pause button. See
if the parameters to the subVI are what you expect, and see if the failure
and success has a pattern that you see based on the inputs. Other guesses
are that the default dire
ctory changes and this causes the command to fail.
You may want to use a full path to in the command and see if that helps.

Greg McKaskle
0 Kudos
Message 2 of 3
(2,208 Views)
I had the same problem with this vi under NT. I use the vi to execute a command script and since the script is dynamic generated, after execute I want to delete it. So I put a case structure after the vi in which call file delete vi and wire the error code to the case switch. For this structure I had the same error code as you did. Then I figured out that since there is no handshake or feedback about execution complete(Labview just dump it to NT, I guess), so the script file was deleted actually before it been executed.
0 Kudos
Message 3 of 3
(2,208 Views)