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.
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.
10-06-2011 11:21 PM
I am running C code using the System Exec vi. It executes some of the code and the stops. The code executes from the terminal everytime without a hitch. Could there be a conflict between system calls in C and the System Exec? Other ideas and suggestions are appreciated.
10-06-2011 11:41 PM
Could there be any 64/32 bit issues? I.e. LabVIEW being 32 bit while the c code is 64. Also, try running LabVIEW as an administartor, maybe that will help.
Which windows is it? Also, what do you mean it stops? Does it exit with an error code, crash?
Matt
10-07-2011 12:21 AM
Im running on a MAC. No error Code. Works in way through most of the code, then stops - thinks its done. How do I run as an administrator?
10-07-2011 12:24 AM
I assumed you're on Windows, I don't know anything about Mac. I imagine the admin issues I brought up above don't apply to Mac.
10-07-2011 12:25 AM
Thanks for trying.
10-07-2011 01:29 AM
How do you determine that it stops? What does happen and what not? Do you have control of the source code of the command line tool, so you can add console output to debug what happens?
The most likely reason is that your program expects certain conditions, such as process authorization, environment settings, etc, that are normally existent for a console style application started from the shell, but not as child process when started from a GUI application. The process started with SystemExec inherits all its environment, authorization and what else from the LabVIEW process and not from the unix shell, that you would normally use to start a consolde application. This has usually no consequences and in Windows it actually didn't make much of a difference until Vista was released. Under Unix/Linux things can be a bit more complicated as some of that security was built in from beginning.
10-07-2011 01:40 AM
Thanks. Code just stops early. Prints out a few lines of code; makes some files; but never runs completely. However, sytem exec thinks it's done
10-07-2011 02:12 AM - edited 10-07-2011 02:16 AM
Then the program is done! But it may skip some of what you think it should do because of the reasons I mentioned. What are the user rights of your LabVIEW application? Does LabVIEW have access to all the file locations this program tries to access? Does this application store some configuration settings somewhere with a name generated internally?
Maybe the standard error output or the standard output of the SystemExec can give you some extra hints.