How to start and control a WIN console application out of Labview ?

I have a windows console application, which requires user inputs (keystrokes) during the application run. Now I want to start and control this application out of labview (8.5). Has anyone a good idea, how this can be done ? The "System Exec.vi" seems to be unsuitable, because you can not pass any data to stdin during the run of the application.

Well, of course I agree absolutely with JoeLabView that Cheap + Fast != (not equal) Good. My company is a manufacturer for medical devices. These are long-living (compared to consumer electronics) and therefore it is extremly important for us that my written code is manageable, reusable and stable. Thats the reason, why I spent  time to think about the really best solution for my task here and I am very amused that we can share our knowledge here in this forum.
I also thinked about creating a DLL as suggested by smercurio. If I will solve my task in that way, I still have to remove the User Interactions and call the appropriate subfunctions directly. If a newer ART-Tool will be used in the future, this work must be repeated. It that maybe that the developer must go deeply into the coding of the tool. Nevertheless it is a possible way, of course.
Actually I thinked about a further solution I want to discuss with you. The .NET framework provides functions for redirection of standart input and output. Refer to the explanation of  "ProcessStartInfo.RedirectStandardOutput Property" and "ProcessStartInfoRedirectStandardInput Property" within the .NET Framework Documentation, there are also some examples of how to use them. With this background knowledge, I think that it must be possible to write some kind of wrapper code, which starts the tool and redirects the input/output to labview. The code maybe implemented as a DLL which can then being embedded into LV, or as a separate executable file, whereby the communication between LV and the wrapper code may be done over TCP for example. What do you think about this attempt ?
@smercurio:
>> trying to use the ART-tool as it is for automated testing will cause you grief in the long run ....
Where exactly, did you have the problems? Did you have the problems across multiple art revisions ? What was your "main" problem ? Please let me know your experience, cause I do not want to run into similar problems.

Similar Messages

  • How to Starting and Stopping OC4J Server using Ant

    How to Starting and Stopping OC4J Server using Ant
    In the ant task definitions for ant-oracle-classes.jar (see antlib.xml) there are two tasks called
         name="restartServer" classname="oracle.ant.taskdefs.deploy.JSR88StartServer"
         name="shutdownServer" classname="oracle.ant.taskdefs.deploy.JSR88ShutdownServer"
    I thought that these would shutdown and start the OC4J server. I guessed the parameters as – (Does anyone know where 50 ant targets are documented?)
    <oracle:restartServer
    userid="${oc4j.admin.user}"
         password="${oc4j.admin.password}"
         deployeruri="${deployer.uri}"
    />
    <oracle:shutdownServer
         userid="${oc4j.admin.user}"
         password="${oc4j.admin.password}"
         deployeruri="${deployer.uri}"
    />
    This, however does not start and stop the SOA suite. To do that I've hacked this solution together -
    <path id="oc4j.console">
         <pathelement location="${oracle.home}/config"/>
         <pathelement location="${oracle.home}/jlib/startupconsole.jar"/>
         <pathelement location="${oracle.home}/opmn/lib/optic.jar"/>
         <pathelement location="${oracle.home}/lib/xmlparserv2.jar"/>
    </path>
    <target name="stop" description="stop oc4j server" depends="init">
         <java classname="oracle.appserver.startupconsole.view.Runner">
              <classpath refid="oc4j.console"/>
              <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
              <arg value="stop"/>
         </java>
    </target>
    <target name="start" description="restart oc4j server" depends="init">
         <java classname="oracle.appserver.startupconsole.view.Runner">
              <classpath refid="oc4j.console"/>
              <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
              <arg value="start"/>
         </java>
    </target>
    This sort of works – except when the SOA suite doesn't stop cleanly – and needs user interaction to press a Close button. This isn't very useful when doing a continous integration build and deploy.
    So, does anyone have any suggestions or alternative methods to do this?
    - frank

    Actually if the server throws exceptions when it stops (which it always has since we applied patch 10.1.3.3) this technique will pause until a user responds to pop-up ... So a better way (I think) is -
    <target name="start" description="start oc4j server" depends="init">
    <java classname="oracle.appserver.startupconsole.view.Runner">
    <classpath refid="oc4j.console"/>
    <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
    <arg value="start"/>
    </java>
    </target>
    <target name="stop" description="stop oc4j server" depends="init">
    <echo message="We expect OC4J *NOT* to stop cleanly, so we will timeout after 3 minutes ..."/>
    <java classname="oracle.appserver.startupconsole.view.Runner" fork="true" timeout="180000">
    <classpath refid="oc4j.console"/>
    <sysproperty key="ORACLE_HOME" path="${oracle.home}"/>
    <arg value="stop"/>
    </java>
    </target>
    <target name="restart" description="restart oc4j server">
    <antcall target="stop"/>
    <!-- wait for server to quieten down -->
    <waitfor maxwait="2" maxwaitunit="minute">
    <not><http url="http://${oc4j.http.hostname}:${oc4j.http.port}"/></not>
    </waitfor>
    <antcall target="start"/>
    </target>

  • How to run and control live cams on applets

    hi
    i want to now how can we run and control live images form a camera on to a aaplet.what technologyi used for this project . u can check the url http://www.jal.co.jp/en/live/ as a demo.plz can anyone guide me.how to start and which technologies to use,
    regards
    sheetal

    start with this:
    http://search.java.sun.com/search/java/index.jsp?col=javaforums&qp=&qt=%2Blive+%2Bcamera&x=11&y=12

  • How to start and finish a transaction using EJB 3.0 in JDeveloper

    Hello everybody!
    Does anybody can explain how to start and finish a transaction using EJB 3.0. I need to start a transaction insert some information in some tables and if everything was fine commit the information.
    I put the annotation @TransactionManagement(TransactionManagementType.BEAN) in my session bean and @Resource SessionContext ejbContext; but I don't what anything else I have to do.
    Any help will be appreciate.

    I tryied to use in the client the statement EntityTransaction transaction = myBean.getTransact(); but I receive the EJBException: Cannot use resource level transactions with a container managed EntityManager
    I just need to start a transaction something like this: transaction.begin(); and finish the transaction, something like this: transaction.commit();
    Does anybody can help?

  • How to start and stop the BI Services in Solaris 10

    Hello All,
    Can anyone guide me on how to start and stop the BI Services in Solaris 10. In windows there are options set in Start->Programs->Middleware_Home->Start/Stop BI Services.
    Primarily after doing changes to the scheduler configuration, I need to restart the services to get it implemented? If yes how can I do it?
    Any help will be appreciated
    Thank you
    Ash
    Edited by: 902739 on Jan 11, 2012 12:17 PM

    Please help me by showing action plan for stop sap , offline backup and then start sap.
    i am little bit confuse How to start and stop SAP on cluster for offline backup
    Below are the systems name with host name , please explain me in sequence
    Systems name                                   Hostname
    # Hope SAP ERP Prod DB Primary       gsgbbux860
    # Hope SAP ERP Prod DB Standby      gsgbbux861
    # Hope SAP ERP Prod Cluster              gsgbbux862
    # Hope SAP ERP App 1                       gsgbbux864
    # Hope SAP ERP App 2                       gsgbbux865
    Thanks in advance
    Zaheer

  • How to Start and Stop Processes?

    How to Start and Stop Processes?
    Im trying to create a program which allows me to Start and Stop (and Restart) GameServers. I will then expand on this so i can start and stop them through a web applet with build in useraccounts.
    Currently the way we do this is to log into the server using a RemoteAssistance. Which is not very safe as the users have the abbility to do anything on the server and potentially corrupt it.
    Below is my code for how i start the servers. But i dont know how i would stop the process.
                    private void startServers()
                   for(GameServer gs : servers)
                        int ID = Integer.parseInt(gs.getID());
                        if(isChecked(ID))
                             try
                                  String cmd[] = gs.getStartString();
                                  Runtime.getRuntime().exec(cmd);
                                  int sleepPeriod = Integer.parseInt(sleepField.getText());
                                  Thread.sleep(sleepPeriod*100);     
                             catch(Exception e)
                             System.out.println(e);
                   }//end of iterator
                   JOptionPane.showMessageDialog(null,"All Selected Servers Have been started.","Servers Started",2);     
         }//end of startserversAnyhelp would be great thanks.

    Using the process class would give you a nicer API, but using destroy isn't a nice way to shutdown a process. Its like killing the process with your task manager. You should make a connection in some way with the game server and tell it to shutdown in stead (gracefull termination).

  • How to Start and Stop the SAP System

    Hi,
    I have installed "Sneak Preview"; Searched for start and stop scripts but there are more than one script which has named start.bat and stop.bat. Moreover, I searched the documents which comes with Sneak Preview but could find useful instruction there either.
    Question: Could you please point me to the documentation where it explains the starting and stopping SAP, for Sneak Preview?
    Thanks in advance
    Jawad Kakar

    Please help me by showing action plan for stop sap , offline backup and then start sap.
    i am little bit confuse How to start and stop SAP on cluster for offline backup
    Below are the systems name with host name , please explain me in sequence
    Systems name                                   Hostname
    # Hope SAP ERP Prod DB Primary       gsgbbux860
    # Hope SAP ERP Prod DB Standby      gsgbbux861
    # Hope SAP ERP Prod Cluster              gsgbbux862
    # Hope SAP ERP App 1                       gsgbbux864
    # Hope SAP ERP App 2                       gsgbbux865
    Thanks in advance
    Zaheer

  • How to start and stop Oracle Application Server from ANT

    How to start and stop Oracle Application Server and Web application from ANT
    Thanks in Advance.
    Mani

    Hi,
    You can use: startManagedWebLogic.sh, it is in your domain directory and you have to execute it in this way
    ./startManagedWebLogic.sh managedServerName http://adminServerHost:adminServerPort
    For instance, in my case I use:
    unixserv01:/webportal/domains/appServerWeb/bin>startManagedWebLogic.sh managedServ01 http://pelma3w3per01.mesaperu.next:7001
    You have to run it on the machine where the managed server was installed.
    Best regards,
    Raúl

  • How to start and stop VIO cluster

    How to start and stop VIO cluster
    How to extend/modify the VIO cluster once created from webclient
    Thanks,
    Venkat

    VIO 1.0 GA version has the UI to start/stop the cluster

  • How to run and control any program by java

    hi everyone ,
    I wonder that how to execute and control some menus or how to use some property of any program by java, not for the whole program, it's just only a few features of program.
    Is there any idea?
    if it's impossible to do with java , how can I do it? which way?
    thanks a lot..

    No. Applications have to be specifically built to be able to be controlled by other programs; for example office applications allow you to communicate with them through a special protocol. To be able to communicate you need to know the protocol and write specific code for specific tasks.
    The software world is not as simple as they show in movies, where hackers just press two buttons and take control over entire buildings and applications.

  • Starting and stopping timer using external inputs interfaced with labview

    hello,
    I have trouble finding how to start and stop the timer using external voltage or current pulse. we are interfacing a circuit to labview. so for that we need to count the time it takes between the two external voltages. We have to keep on comparing the voltages to some reference voltage. And when the external voltage crosses the reference voltage we have to start the timer and again we have to stop the timer using tha same logic. We need it for time calculation between the triggers.
    hope you can help.

    https://decibel.ni.com/content/docs/DOC-23334 is agood example to start. You need to modify it to include stop trigger.

  • How to start and stop sapmmc server when windows is started and shutdown

    Hi,
    May i know how i can make sure the sapmmc server for ECC 6.0 to start when the windows 2003 server is started. I know i need to add this as a service in the windows service manager but i dont know how to do that.
    Please advise me on how to add a service to start the sapmmc server when windows is started and how to stop the sapmmc server automatically when windows is shutdown.

    Hi Raja
    checkout this document m sure it will help you in configuration
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0512c790-0201-0010-72b7-886677ad7955
    also check
    /message/6511605#6511605 [original link is broken]
    All the best ,,
    Cheers
    dEE

  • How to start and stop a progress-bar thread before/after the main thread

    hi. I would appreciate any kind of help on my request.
    I have this as my main() function
         public static void main(String[] args)
              SwingUtilities.invokeLater(new Runnable(){
                   public void run(){                              
                        Options op = new Options();
                        OdessaClient oc = new OdessaClient(op);     
                        oc.setVisible(true);                    
         }Whenever I try to start a simple JFrame with an indeterminate progress bar on it just before the main function and stop it somewhere after I get a StackOverFlow error
    Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
         at java.awt.Component.show(Component.java:1302)
         at java.awt.Component.setVisible(Component.java:1253)
         at com.client.CylonBar.hide(CylonBar.java:25)
         at java.awt.Component.show(Component.java:1302)
         at java.awt.Component.setVisible(Component.java:1253)
    ...and so on...How must I implement something like it?

    Not precisely that way, but just off the top of my head, you would have to have a handle to the proccess (server) in the first window, then have a monitor program that allows you take this handle and end it. I would make this monitor program be the gateway to starting and stopping your server. To run a .bat file you can use runtime.exec().

  • How to start and stop a queue in ECC??

    Dear all,
    I have a problem regarding the Start and Stop of queues in ECC. Whenever I change the data in ECC (for example extension of a material to a new distribution chain, or Creating a quotation which has to trigger a corresponding quotation in CRM), replication is not happening to CRM. On analysis of the outbound queue in ECC, we are finding corresponding ernties for the material / quotation. On dbl cliking an entry, we are able to see the queue in STOP status. When tried to reset status and activate, system throws a message saying GENERIC STOP SET.
    1) How to overcome this problem?
    2) How to START or STOP a queue (for Eg: R3AD*) in ECC? 
    Please respond.
    Every point you share will fetch so many points / lot many smiles to you (No surprises.. I am plagerizing the famous quote on SDN)
    Regards,
    Rajesh

    Dear Chandra,
    Thanks for ur quick response. I have awarded you a sixer. Ofcourse, the content is much richer than that. But if i award 10, thread has to be closed. So that stopped me from awarding that
    Dear all,
    Can someone else share their views?
    Regards,
    Rajesh

  • How to start and keep Skype at contacts, no home for default?

    iMac Snow Leopard 10.6.8, skype 6.15 (335) How can I start and keep skype showing my contacts by default instead of the no_idea_why_it_exists_ "home" option?  I NEVER use (and have no need for) the home stuff. Thanks.

    With 10g and previously a correlation was on the instance i,e, as soon as it was initiated and the instance was alive an exception would be thrown if we tried to create another instance. It seems to be on activity in 11g. Is that correct ?

Maybe you are looking for

  • Crystal Report Page Setting In Browser

    Hello all, I have designed my Report In Crystal-9 and using jar files i have linked it to My web Page Now My Problem is , am getting proper preview in Crystal Report preview , But when am seeing same report in Webpage only half of my report is visibl

  • My HP Officejet Pro 8600 can't print from my MacBook Air

    Hi, My HP Officejet Pro 8600 can't print from my MacBook Air. It keeps on showing "The printer is not connected", but the screen on the printer shows connected. I often reset the printer 'EVERY TIME" I want to use it. I also tried to turn off my lapt

  • Problems with custom search form in adf

    Hi, I am using JDeveloper 11.1.2.4. please can you help with this issue? I've created a custom search form with the help from this link. Jdeveloper,Oracle ADF &amp; Java: Implementing custom search form in ADF programmatically (Without using af:query

  • N95 - BH800 bluetooth disconnection / reconnection...

    I am having a small problem with my Nokia N95 and Nokia BH800. I can connect them no problem. Trouble is when I move out of range of the headset it obviously disconnects, but when I come back into range it doesn't re-connect automatically. I have to

  • File is too big for exporting as QuickTime

    When I try to export my 2 h HD movie, through QuickTime conversion H264, 960 + 540, I get an error message telling me that the file is too big. How can i change my settings to make it work???