Launch expect from System Exec.vi

I tried using System Exec.vi to run some expect scripts but got an error message saying "tclsh80 generated errors and will be closed
by windows. You will need to restart the program".
I use window 2000 and tclsh80 with expect-5.21.
Under the command line in System Exec.vi window. I put "path\tclsh80.exe" "path\test1.tcl".
Thanks in advance.
-Kevin

Hi Kevin -
As the error message indicates, it seems to be a problem with your TCL script. Can you run this guy independently of your LabVIEW program? Can you run any TCL scripts? I would try to trim down the current script to its simplest form and work your way back. There are several posts on DevExchange (exchange.ni.com) about using TCL & LabVIEW together,
you might want to follow their suggestions. There is nothing incorrect about your approach, System Exec literally hands over operation directly to the OS.
good luck
ben schulte
national instruments

Similar Messages

  • -14001 error occurs from system exec.vi only on one machine

    I have a LV application that calls an executable that is bundled with the application using the System Exec command.
    I have tested it on our computers both pre-compiled and executable with no problems.  It has also worked fine on
    a variety of customer computers.
    But ONE computer from one customer returns a -14001 error.  It is a chinese language XP machine.
    Any info on this error?  Any idea how I might debug it?
    Thanks...
    -Umar.

    Error 14001 LabVIEW: Invalid refnum.
    Is the customer
    doing anything with DDE server, client, or functions? In every case
    that we have seen this error at National Instruments it was when a
    customer is using DDE. What is the operating system? In more than one
    case it was suggested that it was a problem with the operating system.
    In one case the customer said that it ended up beiong a Microsoft issue. You could also try contacting Microsoft and ask them if they can tell you how to set the NetDDE permissions differently.
    Vince M
    Applications Engineer

  • Terminating DOS window from system exec

    Hi, I'm using the system exec.vi to run a program, wait for the program to finish and then run it again with slightly different input parameters. This happens hundreds of times and works OK except sometimes the program crashes and the DOS window just sits there until you close it manually.
    To stop this I want to detect how long the program runs for and if it's longer than 5 minutes or so, force it to close.
    Detecting how long the program has run for isn't a problem, but I don't know how to force the window to close from labview....
    can anyone help?
    thanks,
    Philip 
    Solved!
    Go to Solution.

    I would look at killing the process for the System Exec, which you can do by using the Windows taskkill command.
    ex: taskkill /yourexecutable.exe
    The System Exec VI will run your executable in a separate process from LabVIEW.  LabVIEW by itself cannot kill the process, however, you can use a second System Exec to call a Windows command which will.  See the following link:
    http://digital.ni.com/public.nsf/allkb/80432B061C5A4C888625705400737BE8?OpenDocument

  • How do i get ouput from System exec. ?

    Hii
    In my program, i am using system exec. and giving input via command line.
    i want to display response coming from the particuler application.
    How can i do it using System exec.?
    Puneet
    CLA 2014
    CCVID 2014

    duplicate

  • System Exec v. Cmd line differences

    From the DOS command line, I can start an external program; tell the program a file to open; and activate some switches.  From system exec, the program can't find or open its open file, althougth the error seems to have the correct file name.  What could be the problem? I've tried all sorts of variations in configuring the LV code.

    The thing you have to remember is that System Exec is really more like using the Start -> Run command. It is not the same as having a command window open. Thus, if you cannot enter a valid command via Start -> Run, then your command will not work with System Exec as is. Usually you can use cmd /c or cmd /k as suggested to get the command window "environment". In some cases you need to resort to a batch file to get it working.

  • Introscope webview from System Monitoring workcenter

    Hi All,
    I had installed Wily 8.2.2 and its working fine. Iam able to launch it from RCA workcenter.
    When I try from System Monitoring workcenter I get blank page URL= http://<solman server>:8000/sap/public/myssocntl?sap-client=200
    I went to SICF and deactivated this service just to check, after I deactivated the service when I tried to launch webview from system monitoring workcenter
    I get http://<wily_server>:<WILY_PORT>/webview/console/frameset.do?managementModuleName=SAP_J2EE&dashboardName=2.SAPJ2EE+Triage&domain%20%20Name=SuperDomain
    It has not recognized my wily server and port.
    Is this a bug? if yes how can I correct this.
    Regards,
    Shyam

    Hi,
    As  mentioned earlier... wily is working fine when launched from RCA workcenter.
    Issue is: When I  try to launch webview from system monitoring workcenter I get "page can be displayed" some IE error.
    it is pointing me to http://server:port/sap/public/myssocntl?sap-client=300
    Is this a bug... could you please try this in your system. I have Solman SPS23.
    Regards,
    SHyam

  • How do I determine expected output size for System Exec vi

    I am running a DOS exe from a Batch file using the System Exec vi. My exe is programming software for a microcontroller and passes data to the programmer via the serial port. When I run the batch file externaly to LabView it works fine. When I run the same batch file using the System Exec vi I get an error from the programmer app (DOS app). Not every time but usually within 20 attempts. I reduced the execution priority of my vi's to give more time to the DOS window. This seems to have helped but hasn't solved the problem completely. I read in the help file that LabView will run more efficiently if you specifiy the expected output size in the System Exec vi, but how do I determine it? Is the expected output
    size the size of the bat file I call?

    > I am running a DOS exe from a Batch file using the System Exec vi. My
    > exe is programming software for a microcontroller and passes data to
    > the programmer via the serial port. When I run the batch file
    > externaly to LabView it works fine. When I run the same batch file
    > using the System Exec vi I get an error from the programmer app (DOS
    > app). Not every time but usually within 20 attempts. I reduced the
    > execution priority of my vi's to give more time to the DOS window.
    > This seems to have helped but hasn't solved the problem completely. I
    > read in the help file that LabView will run more efficiently if you
    > specifiy the expected output size in the System Exec vi, but how do I
    > determine it? Is the expected output size the size of the bat fi
    le I
    > call?
    If you think it is due to timing, and you wish to yield to the DOS app,
    don't just lower the priority of LV, but use Wait ms to put overeager
    diagram elements to sleep and limit their loop rate. Use the task
    manager or performance monitor of the computer to determint if this is
    the issue.
    Greg McKaskle

  • Launching an app via system exec behaves differently to launching it outside LabVIEW

    Hi,
    My problem is as follows:
    I am trying to write some code to communicate with an Anritsu unit (MT1810A chassis with MU181020A plug-ins) via ethernet.  Anritsu supply a standalone app to control this instrument (MX180000A.exe) which gives comprehensive control over the setup & config of the instrument.
    I want to control this unit via LV however without recourse to their program.
    The only time that either MAX or LV seem to be able to successfully communicate with the unit is when the supplied Anritsu app is running.  Not only that, the app must be opened manually, ie by clicking on the exe (or selecting it from the Start --> Programs etc menu) or using cmd prompt with exe path.  Once the app has been started this way, MAX can talk to the unit and any LV code executes without error.
    If however I use the system exec vi within LV to launch the Anritsu app, the app opens as normal, is able to control the unit however MAX now has an exclamation mark on the VISA resource - status shown as:
    VISA returned this static device when finding resources, and MAX could use VISA to parse the resource name. MAX could not succesfully open a VISA session to the device.
    and it can no longer talk to the unit.  In addition any LV code now generates the following error when trying to open a VISA connection to the unit:
    Error -1073807343 occurred at VISA Open in BER Initialize.vi
    Possible reason(s):
    VISA:  (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system.
    So, getting to the point -
    - Why the difference in behaviour depending on how the app has been opened?
    (oh and of course, how do I fix it? )
    Regards
    Andy
    System is running XP, LV version 8.5, VISA 4.2
    Unit needs to be added to MAX using manual entry of raw socket, ie
    TCPIP0::192.168.1.21::5001:OCKET
    There are 2 network cards in the PC.  The unit is connected to card 2 which has been specified as the default in the network control panel.

    Hi,
    Here is a KnowledgeBase article that might help concerning the error you're receiving. Do you see this behavior on multiple PCs as well?
    Amanda Howard
    Americas Services and Support Recruiting Manager
    National Instruments

  • How to Launch a "setup.exe" with LabVIEW app? No luck with System Exec.vi

    I've got an application that I'm trying to update with a separate LabVIEW application (the "Updater"). It's the "Check for Updates" capability you see on other major apps.
    Here's the glitch: When the Updater tries to launch "setup.exe" using "System Exec.vi", The installer seems to catch the attempt and pops a dialog titled "Windws XP Setup" saying "Please go to the Control Panel to install and configure system components".  The install does not begin and the installer closes (if it was ever open!).
    Running the same installer by double-clicking the "setup.exe" file from windows runs just fine.
    Here's the question: "How can a LabView app launch an installer?" 

    Could you show the code.
    Look at the path where you want to run the code.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • HT4901 iCloud app can't be launched from system preferences.

    iCloud app can't be launched from system preferences and screens an error to be reported to Apple:
    Process:         System Preferences [408]
    Path:            /Applications/System Preferences.app/Contents/MacOS/System Preferences
    Identifier:      com.apple.systempreferences
    Version:         11.0 (11.0)
    Build Info:      SystemPrefsApp-214009000000000~8
    Code Type:       X86-64 (Native)
    Parent Process:  launchd [134]
    The rest of apps can be openned but not iCloud. I have tried to log in into iCloud from the web and my iPhone and it works fine.
    Any help on how to solve this problem from the macbook?
    Thanks

    Does it open in the guest user?  If it's not enabled, you can do it from the apple >> system preferences >> users and groups.  Open the lock, select the guest user account and check the box to allow logging into it.

  • Launching windowed program from getRuntime().exec( )

    hello,
    I have a tomcat web app that launches media player from getRuntime().exec(mediaplayerExecutable). It works fine when i run tomcat manually (startup.bat) but it only plays audio when I run tomcat as a service. when i look at the error messages for media player process, it complaining about "direct3d video output error: Could not read adapter capabilities"....
    I believe it is execution context issue. any idea? Thanks in advanced.

    Services in Windows must not have a user interface.
    If I remember correctly, there are special loopholes that (native) Windows services go through to get at least some user interaction, but by default you can't interact with the user via the UI at all.
    This seems to go for applications started from services as well.
    But why would you ever want to start a video client from a service? Or a application server at all?

  • Launching Acrobat 9 from system preference pane

    How do you launch new Acrobat 9 from System Preference pane? Message comes up "FMCore stopped. Start from System Preference pane, then relaunch. Illustrator does the same thing.

    Update your Extensis Suitcase with the latest version. Check on their website. It's not an Acrobat or Illustrator problem.

  • Labview system exec slow on launching octave

    Hi everyone,i am using a v.i which makes more than one call to  octave through system Exec.vi,however the actual launching of octave seems to take some time and therefore increasing the total time it takes to execute this v.i,,,does anyone know of anyways of making the launching of octave when called by labview faster?

    Hi,
    first of all, you are talking about GNU Octave programm, right? Of course, the easier way is the System Exec.vi:
    http://digital.ni.com/public.nsf/websearch/8E19CA8​1874FFDD786256BE40066C151?OpenDocument
    Using this VI is like using command line and of course it's possible to have some delay before the programm is launched. Another way i through activex, but i don't know if it's possibile for Octave Programm. Here some extra info:
    https://decibel.ni.com/content/docs/DOC-9073
    I hope it is useful
    Mario

  • How can I run different commands in the same system exec window?

    I want to open a window (cygwin) on my Xp machine and sent commands within that window. I then have to monitor what the responses are coming back into the window that was launched. Any ideas on how to do this? I have been playing with the system exec VI but can't seem to get it to do what I want. Any help would be appreciated. Thanks - Troy

    Hello,
    Have you tried setting the wait until completion to true on the System Exec VI?  If so, the LabVIEW documentation claims that the parameter "standard output returns information from the program you called if wait until completion is TRUE. If wait until completion is FALSE, System Exec returns an empty string."
    Could this be the answer to the problem of getting the data returned?
    I hope this helps!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • System exec+ problem

    I'm using the system exec+ file to read in a msdos executable into labview, and to have it stay open until the user exits. Whats happening now is that when its reading in my program (awc.exe), it pops up an error message (in dos) that says "cannot find fonts." The font files are in the directory (c:\awc) with the executable. Do I need to link the font files somehow to awc.exe, or is this being caused by some other problem?

    jdaltonnal wrote:
    > I'm using the system exec+ file to read in a msdos executable into
    > labview, and to have it stay open until the user exits. Whats
    > happening now is that when its reading in my program (awc.exe), it
    > pops up an error message (in dos) that says "cannot find fonts." The
    > font files are in the directory (c:\awc) with the executable. Do I
    > need to link the font files somehow to awc.exe, or is this being
    > caused by some other problem?
    Not sure about your awc.exe prog but I have had similar problems with
    other exe progs.
    The awc program is probably expecting c:\awc is set as the dos current
    directory; I don't think exec+ does this.
    Try this:
    Open a dos session manually in Windows.
    Don't change directory; keep the default one dos gives you.
    Type in the
    command you are passing to exec+; maybe c:\awc\awc.exe (or
    just awc.exe if c:\awc has been set in your path?) What happens?. Same
    problem? So now try running awc.exe again but first change to c:\awc
    directory. Does it now work ok. If so you need to set c:\awc as the
    working directory from within exec+. To complicate things you must set
    this current directory in the same dos session as awc.exe is called so
    you can't do this by running two exec+ commands.
    I use the following technique. Write a .bat (just a text file saved with
    the file extension .bat). You could call this awc.bat
    In this file put something like:
    c:
    cd \awc
    awc.exe
    then call exec+ to execute awc.bat instead of awc.exe
    You will need to tell exec+ to wait for execution to finish but I guess
    you already know that.
    Hope this works for you.
    Dave.

Maybe you are looking for

  • What is available free memory in skeleton air application?

    hi, My pc has 12 gb. I was developing full scale DESKTOP adobe air app and it started to crash on mousemove. So basically i wanted to see whats available free memory  it was showing 50mb that was too low for my app to process data. So i went back and

  • Is it OK to copy and paste Aperture and iTunes libraries to new computer?

    Is it OK to copy and paste Aperture and iTunes libraries to new a computer in OS X Mavericks?

  • LSMW Multiple Structures

    I need to create an LSMW to create and/or modify vendords.  How do I physically set up my input file to contain records for BGR00, BLF00, and BLFA1 Structures? How does this correspond with the "Identifying Field Value" parameter of the Source Field

  • Design a network for voip over wan

    Hi all,             I need your valuable suggestions how to design a network of voip using voip. Suppose there is a Site A and Site B and you are using different service providers and creating different vlans in each site for voice and data.Lets say

  • Safari 3.2 Crashes - possible solution

    Safari 3.2 was constantly crashing. I found a suggestion in another thread to uncheck the "Warn when visiting a fraudulent website" checkbox in the Safari Security Preferences. Safari hasn't crashed since I unchecked the box. I do not use third party