Error 2 Occurred At System Exec.vi
Exec VI Primary Software: LabVIEW Development Systems>>Full Development System Primary Software Version: 1.0 Primary Software Fixed Version: N/A Secondary Software: N/A Problem: Why do I receive an Error 2(memory full) when using the System Exec VI in LabVIEW? Solution: This error normally occurs when trying to run a command-window-specific command such as dir or set, or when trying to run an executable from the command line. Using the System Exec VI is not the same as typing a command into a command prompt; 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:
To run an executable, you would use the following string as your command line input into System Exec VI:cmd /c C:\...\application_name.exe
In this case, application_name.exe is the name of the executable you are calling. You must include the entire file path for the application, as represented by the C:\...\. If the file path contains any spaces then the entire path must be surrounded by quotation marks. For example, to open LabVIEW 8.2 you would use the following string:cmd /c "C:\Program Files\National Instruments\LabVIEW 8.2\LabVIEW.exe"
Note: This only works in Windows NT/2000/XP/Vista. For instructions on Windows 95/98/ME, please see the link below. Related Links: KnowledgeBase 2MPCL53N: How Do I Execute a Windows Command in LabVIEW?KnowledgeBase 1V0I7F00: Can I Call a Windows Shortcut from LabVIEW? Attachments: Report Date: 08/08/2001 Last Updated: 06/30/2008 Document ID: 2C7F28O9 Your Feedback! Poor|Excellent Yes No Document Quality? Answered Your Question? 1 2 3 4 5 Document needs work? Please tell us why. Please Contact NI for all product and support inquiries. My Profile | RSS | Privacy | Legal | Contact NI © 2014 National Instruments Corporation. All rights reserved. |
with Twitter Sign in with LinkedIn Sign Up All Content All Content This Topic This Forum Advanced Search Browse Forums Downloads Gallery Staff Online Users More Activity All Activity My Activity Streams Unread Content Content I Started Search More More More All Activity Home Software & Hardware Discussions LabVIEW (By Category) Calling External Code using "system exec.vi" to get file opened in excel Sign in to follow this Followers 3 using "system exec.vi" to get file opened in excel Started by longzoo, August 30, 2013 system exec call windows program excel 8 posts in this topic longzoo 1 More Active Members 1 25 posts Location:Johnstown, PA Version:LabVIEW 2011 Since:2004 Posted August 30, 2013 NOTE: while typing this up i found my solution but decided to post anyway in case it may help someone else http://digital.ni.com/public.nsf/allkb/EA1600EBA422E97286256AA20073C616 I decided to quit beating my head off the keyboard and ask for help...I have a vi that will eventually be an .exe distributed across a variety of windows xp to windows 7 machines (32 and 64 bit). In this vi a bunch of data is saved to a .tsv file at C: i then need to open the .tsv file in excel. After some searching i found System Exec.vi. it initially seemed to be my silver bullet because if i open command line in windows and https://lavag.org/topic/17094-using-system-execvi-to-get-file-opened-in-excel/ type " excel.exe c:temp.tsv" Excel is opened (and this should work across different versions of Office). BUT with system exec.vi i get an error "Error 2 occurred at System Exec.vi Command was "excel.exe c:temp.tsv" Possible reason(s): LabVIEW: Memory is full." blah blah blah... If i replace "excel.exe" with Notepad it opens the data no problem with notepad but i need it to be in Excel. i read about using "cmd /c" and attempted to no avail Here's where i found my issue... it is "cmd /c" NOT "cmd c" ! so i used "cmd /c c:temp.tsv" and voila it opens with the default program for .tsv (which is obscure enough that i can make Excel a default on all of the computers in the building) for some reason cmd /c excel.exe does not work to open excel. i found this odd as excel.exe entered directly in the command line will open excel regardless of which version you have installed, but i believe i can live with this. Share this post Link to post Share on other sites Mellroth 64 The 500 club Members 64 600 posts Version:LabVIEW 2013 Since:1995 Posted September 2, 2013 Here's where i found my issue... it is "cmd /c" NOT "cmd c" ! so i used "cmd /c c:temp.tsv" and voila it opens with the default program for .tsv (which is obscure enough that i can make Excel a default on all of the computers in the building) for some reason cmd /c excel.exe does not work to open excel. i found this odd as excel.exe ent
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
SEGGER US Store The link you are trying to reach is no longer available or is invalid. Forum Software: Burning Board 3.0.9, developed by WoltLab GmbH