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

Similar Messages

  • System Exec returns Error code 0xC1

    When I try to bring up a help file (blah.chm) thru system exec,
    nothing shows up on the screen and an error code 0xc1 is returned.
    I tried launching notepad, that works fine. I can launch the chm
    file from a command prompt, works fine also. A chm file is a compiled
    help file, which windows knows how to bring up as an application. Can
    anybody tell me why it may not work like any other windows executables
    via system exec?
    Thanks,
    Ratin

    Here is how I do it. See if it works for you. use this all you want and modify as needed.
    Joe.
    "NOTHING IS EVER EASY"
    Attachments:
    runapp.vi ‏49 KB

  • 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!

  • Windows system exec error in application causes app to crash

    The basics:
    LabView 11.0 (32-bit)
    Windows 7 enterprise
    Because I have to control an elevated app I run my built app elevated on a Win7 64 machine.
    I have an application that uses the system exec.vi (attached) to get a portion of the arp table. When I run this in development it works great. However when I build an app and run it this vi causes the app to be unstable and crash.... sometimes. I have a troubleshooting vi that I wrote that I place at the start and end of vis. This puts a log file on my desktop so that I can trace where it crashes. I've attached the log as well.
    Basically we have a power controller that we control by Telnet but 1st I have to get the IP. I have the MAC of the controller which is DHCP but not the IP. To get the IP I fill the ARP table and search it for the MAC.
    get ARPCache.vi throws the error messaage: System Exec.vi . Command was "cmd /c "arp -a | find "192.168.120"" but only in the built app.
    Update: While getting more info to complete this post I did a build where I changed "get ARPCachs.vi" to show when called so I could see the error cluster. Now it pops up but no errors. hmmm
    Norm
    Attachments:
    get ARPCache.vi ‏22 KB
    Log program message start finish.vi ‏24 KB
    Program Log.txt ‏2 KB

    It depends on how the exe deals with the arguments. Some do honor escape characters, some not.....
    Afaik, there is no difference regarding the System Exec in development environment vs. exe. But it is possible, that these are executed using different user rights?
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • App via SMS downloads, but Unable to launch - N8

    Hello To All,
    Perhaps this has been covered already, or perhaps I've overlooked this topic on the board, but I could really use some advice.
    I purchased an app from the Nokia Store that did not work, and the app developer sent me a completely different app (in lieu of a refund).  The app was sent to me via SMS text.
    I clicked on the link in the text (the app was sent as a .sis file - I don't what that is exactly) and it downloaded to my memory card.  I then clicked to install.  I checked 'Installed Apps' and the app is listed there, however, the app is not in 'Applications', so I am unable to launch it.  The developer sent me a different file (also .sis), via SMS, I repeated the steps, but still I am unable to launch the app.
    Can anyone advise what I am doing incorrectly?  I typically only download apps via the Nokia Store directly to my device, and this is the first time I've received an app to download via SMS.
    Any assistance that can be provided would be greatly appreciated.
    Kind Regards.

    Hi Paul Zadie,
    Please rename OOBE to OOBE.old
    Location
    Macintosh HD--->Computer--->library--->Application Support--->Adobe--->OOBE
    After renaming it you can login to www.creative.adobe.com and from the tab  'download center'  download and install 'Adobe creative cloud'
    Thanks
    Kapil

  • How to capture keyboard strokes while focus is on an external app. Opened with system exec

    Hi to the Forum,
    I have an application that runs an external app. Through system exec, while this application is open the user needs to input a 6 digit serial number using the keyboard, I need to capture in parallel that information on my main VI in order to perform some information validations, such as the six digits were entered, the serial number is not repeated etc. I have read other post about the same issue but did not found a practical way to achieve a solution, please help with an example of how to do that as I'm on the final stage of the project.
    Thanks in advance for your time and help.
    MRDK

    Hi MRDK,
    You can/have to use Connectivity>>Input Device Control palette functions.
    Attached is the simple example.
    Regards,
    Yogesh Redemptor
    Regards,
    Yogesh Redemptor
    Attachments:
    Get Keyboard Event.vi ‏15 KB

  • 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

  • Upgrading pacman behaves differently on different systems

    This isn't a problem, since I haven't noticed any issues. I'm only curious to why two systems behave differently.
    System 1 (x86_64 locale sv_SE):
         Interrupts upgrade of system to specifically upgrade pacman first.
    System 2 (x86 locale ru_RU):
         Doesn't interrupt, instead it upgrades pacman along with other packages.
    Is there a logic answer to why? I'm only asking, since I don't know whether such differences could create problem for some users.

    Look into your /etc/pacman.conf for the SyncFirst variable. It defaults to having pacman there, and it is the list of which packages to upgrade first like on your first system. See man pacman.conf for more details.
    Last edited by jac (2011-01-03 20:25:59)

  • 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

  • Setting items and branching to a different app via a report column link

    Hi,
    I'm figuring out how to branch to another application by using a URL redirect and contructing the target URL with items and item values to pass to the target app. So far, so good. But I'm now trying to branch to another app via a column link from a report form (I had previously branched to a page within the same app, but that page should really be another app, callable from several sources). Before, I had also set several items (in the calling app). Now, when I choose to re-direct to a URL, rather than a page in the current application, the item and value setting boxes get disabled. Is there a way to also set current page items (that are not being passed to the target app) at the time the link is redirected?
    Frank

    Frank,
    It's easy. Just type in the relative f?p URL along with the item names/item values, e.g., to redirect to app 200 page 20 from your app's page 1 passing P1_ITEMA and P1_ITEMB into similarly named items on page 20 type in:
    f?p=200:20:&APP_SESSION.::NO::P20_ITEMA,P20_ITEMB:&P1_ITEMA,&P1_ITEMB.
    Note that redirecting to another application may require the user to authenticate to that application. If that is your intent there is no need to include &APP_SESSION. in the link.
    Scott

  • 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

  • Time stamp control dialog kills System Exec.vi !

    Hello!
    I just experiance a really strange behaviour in my application. I managed to reduce it to a much smaller VI, please do not look at the framework but at the actual problem, this test MAIN vi looks like this since it is a skeleton of a bigger application (i had to remove many non-relevant and confidential parts).
    So. I have a USB watchdog relay from a 3rd party company, which I can use perfectly in my application via a supplied EXE. I call this exe from LabVIEW using the System Exec.vi , and it works perfectly and the Watchdog functions as it should. However I see a strange bug (?): if I launch a Time stamp control dialog browser window, it "pauses" somehow the System Exec.vi. So my watchdog command setting stops, relay opens, problem!
    I zipped my test application and I can reproduce this same problem even if I just call a command line PAUSE win command. Note that, in my real application, the Time stamp control is located in a separate, dynamically callled (call and forget method) VI, but I get the same bug!!!
    Steps to reproduce the bug:
    start my application
    observe as the bottom loop iterates
    Click on the Time Stamp control's browser to pop-up the dialog window.
    You can see the iteration of the bottom loop stopped (DAQ loop iterations)
    if you close the dialog window, the bottom loop continues execution
    What the heck is this???
    How is this possible, why there is "interference" between a totally separated control and a bottom loop System Exec.vi ???
    Thanks for any suggestion!
    In my real app, as a workaround, I just hide the browser element of the Time stamp control...
    Solved!
    Go to Solution.
    Attachments:
    HYDE_loop_software.zip ‏348 KB

    Thanks! Yep, I can do a workaround, like create my own time stamp dialog window to pop-up if i wanna be "fancy".
    But this is important to keep in mind, if we use the SystemExec vi!
    If someone can explane this issue/feature deeper, I will be happy, but I mark this above post as solution, thanks!

  • 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

  • Problem: Using "msg" command with "System Exec.vi"

    I'm attempting to write some LabView code that takes advantage of the "System Exec.vi". At the moment, I've tried using it to ping machines, return the ipconfig and run through the example code that NI provides.
    I would like to use the "msg" command used on Windows operating systems to send out a message to multiple machines on our network at once. Warning them we're about to update a program and they should log-off, things like that.
    I tried using the "msg" command in LabView keeps returning errors. I also wrote a quick batch file as follows:
    @echo on
    cd c:\Windows\System32\
    msg.exe /server:localhost * test
    When I launch the batch from windows, it executes. When I launch it from LabView (using the System Exec.vi) it fails.
    Potential Quirks:
    I discovered in a different location that in order for a machine to receive these messages they need to have a registry entry in:
    "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" and have a DWord called "AllowRemoteRPC" = 1.
    Note that "/server:localhost" could be "/server:anycomputer" and the " * " is used as a wildcard which sends a message to anyone who is logged onto that machine. Also note that "test" is the message to be sent.
    Any ideas why I'm having a problem?
    tl;dr: "System Exec.vi" won't run the "msg" command. Why is this?
    - Mike
    ~~~~~~~~~~~~~~
    Current Setup:
    LabView 2010
    Windows 7
    Solved!
    Go to Solution.

    -> What versions of labview and windows are you on?
    LabView 2010 and Windows 7.
    -> Have you ever sent any commands out, or is msg the only one you've tried so far?
    I've successfully used the 'ping' command and also returned a standard 'help' command to LabView.
    -> Finally, in tools>>options, you may need to change your access settings under VIserver and Webserver.
    My VI server settings are allowing everything except "Show VI Scripting Functions, properties and methods"
    I have nothing configured for a web server, since I didn't plan on using it for this. Unless it has some sort of connection that I am missing.
    I'm attempting a work-around where LabView will generate a batch file to run from the desktop instead, since it seems that something is getting lost in translation between LabView and the command-prompt.
    - Mike
    ~~~~~~~~~~~~~~
    Current Setup:
    LabView 2010
    Windows 7

  • Managing apps via iTunes 12 causes crash

    When installing apps via iTunes 12, opening the graphic view of the destination page and either clicking on the "install" button for the app or attempting to drag the icon from the list to the desired page on the device usually causes iTunes itself to crash. The destination page has been doubled-clicked and in the forefront before attempting the install.  This happens both with a direct USB connection and when synching over Wi-Fi.
    Two actions which sometimes seem to help are:
    Synching before any rearranging or installing an app on a page, and
    Using the scrollbar on the Apps list which seems to force more (all?) of the app icons to be displayed.
    Probably not relevant, but I've also found that entering a portion of a file name in the Find field at the top of the Apps list often misses app names which don't appear until more than the text of the title is typed in.  For example, I have the app "Listacular" which will display as found (along with 19 other apps) if I enter the text "list" in the search field, but not if I only enter "lis" for which only 3 apps are returned.
    I'm wondering if this is a Yosemite issue since, for example, I do not get the "Do Not Disturb" option at the top of Notification Center until I've done a scrolling action on my "Today" list? Scroll = Swipe to Refresh?
    I don't recall this ever happening with the prior version of iTunes.
    I can rearrange the app's page location on the device itself, but through iTunes should be more efficient. 

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    For this step, the title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    In the top right corner of the Console window, there's a search box labeled Filter. Initially the words "String Matching" are shown in that box. Enter the name of the crashed application or process. For example, if Safari crashed, you would enter "Safari" (without the quotes.)
    Each message in the log begins with the date and time when it was entered. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    ☞ The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    ☞ Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, select
              DIAGNOSTIC AND USAGE INFORMATION ▹ User Diagnostic Reports
    (not Diagnostic and Usage Messages) from the log list on the left. There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points down. You'll see a list of crash reports. The name of each report starts with the name of the process, and ends with ".crash". Select the most recent report related to the process in question. The contents of the report will appear on the right. Use copy and paste to post the entire contents—the text, not a screenshot.
    I know the report is long, maybe several hundred lines. Please post all of it anyway.
    If you don't see any reports listed, but you know there was a crash, you may have chosen Diagnostic and Usage Messages from the log list. Choose DIAGNOSTIC AND USAGE INFORMATION instead.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report—they're very long and rarely helpful.

Maybe you are looking for

  • How to get 16:9 resolutions when using DVI to Video Adapter?

    I just plugged my new Intel Mac Mini into a 16:9 widescreen TV with the Apple DVI to Video Adaptor (PAL Video version). It only offers me: 640x480 720x480 720x576 800x600 1024x768 (all interlaced) I do get a choice of 50hz (PAL) or 60hz (NTSC). Howev

  • Report for PGI & billing value with reference to SO Line item

    Dear all, Please guide me whether there is any standard report available to check the PGI value and billing at a time with reference to a sales order (line item). Thanks & regards. Pranab

  • Error while downloading the xml file

    i am having a internal table which contains data in xml format but i am unable to download the data into local system by using 'GUI_DOWNLOAD' fn. module its error its showing is as : The XML page cannot be displayed Cannot view XML input using XSL st

  • HT2404 How do I download os x 10.6.8 software for my Macbook Pro on blank harddrive

    My old hard drive got damaged and I had to get a new one to put in my Macbook Pro (Mid 2010).I didn't purchase it from a store with a warranty, it was from a friend. I also didn't get the installation disks that came with it either, which I came to f

  • Remittance Advice to Vendor

    Hi Expertise, In fact I am required to deliver the Remittance Advice in SMARTFORMS to the vendor for thier invoices paid. For example after running the automatic payment run (F110), we issue a check or do EFT transfer direct to the vendor's bank acco